13class KDesktopFilePrivate;
41 explicit KDesktopFile(QStandardPaths::StandardLocation resourceType,
const QString &fileName);
135#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 82)
142 KCONFIGCORE_DEPRECATED_VERSION(5, 82,
"For lack of usage.")
143 QString readDevice() const;
172 const KConfigGroup actionGroup(
const QString &group)
const;
214#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 42)
222 KCONFIGCORE_DEPRECATED_VERSION(5, 42,
"Not recommended, Desktop Menu Specification defines another mechanism")
223 QStringList sortOrder() const;
250#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 89)
254 KCONFIGCORE_DEPRECATED_VERSION(5, 89,
"Use locationType() instead.")
255 QStandardPaths::StandardLocation resource() const;
A class for one specific group in a KConfig object.
Definition kconfiggroup.h:39
The central class of the KDE configuration data system.
Definition kconfig.h:57
KDE Desktop File Management.
Definition kdesktopfile.h:27
bool hasApplicationType() const
Checks whether there is an entry "Type=Application".
QString readPath() const
Returns the value of the "Path=" entry.
QString fileName() const
Returns the name of the .desktop file that was used to construct this KDesktopFile.
KConfigGroup actionGroup(const QString &group)
Sets the desktop action group.
QString readGenericName() const
Returns the value of the "GenericName=" entry.
QStringList readMimeTypes() const
Returns a list of the "MimeType=" entries.
bool hasDeviceType() const
Checks whether there is an entry "Type=FSDevice".
QString readName() const
Returns the value of the "Name=" entry.
KDesktopFile * copyTo(const QString &file) const
Copies all entries from this config object to a new KDesktopFile object that will save itself to file...
static bool isDesktopFile(const QString &path)
Checks whether this is really a desktop file.
bool noDisplay() const
Whether the entry should be suppressed in menus.
QString readComment() const
Returns the value of the "Comment=" entry.
KDesktopFile(QStandardPaths::StandardLocation resourceType, const QString &fileName)
Constructs a KDesktopFile object.
~KDesktopFile() override
Destructs the KDesktopFile object.
static QString locateLocal(const QString &path)
Returns the location where changes for the .desktop file path should be written to.
bool hasLinkType() const
Checks whether there is a "Type=Link" entry.
bool tryExec() const
Checks whether the TryExec field contains a binary which is found on the local system.
KConfigGroup desktopGroup() const
Returns the main config group (named "Desktop Entry") in a .desktop file.
QString readDocPath() const
Returns the value of the "X-DocPath=" Or "DocPath=" entry.
QString readUrl() const
Returns the value of the "URL=" entry.
QString readIcon() const
Returns the value of the "Icon=" entry.
bool hasActionGroup(const QString &group) const
Returns true if the action group exists, false otherwise.
QString readType() const
Returns the value of the "Type=" entry.
QStringList readActions() const
Returns a list of the "Actions=" entries.
static bool isAuthorizedDesktopFile(const QString &path)
Checks whether the user is authorized to run this desktop file.
KDesktopFile(const QString &fileName)
Constructs a KDesktopFile object.