KConfig
kdesktopfile.h
25 * @see <a href="https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html">Desktop Entry Spec</a>
KConfigGroup group(const QString &group)
Returns an object for the named subgroup.
Definition kconfigbase.cpp:21
KConfig(const QString &file=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
Creates a KConfig object to manipulate a configuration file for the current application.
Definition kconfig.cpp:240
KConfig * copyTo(const QString &file, KConfig *config=nullptr) const
Copies all entries from this config object to a new config object that will save itself to file.
Definition kconfig.cpp:543
Class for representing an Action of a desktop file.
Definition kdesktopfileaction.h:21
bool hasApplicationType() const
Checks whether there is an entry "Type=Application".
Definition kdesktopfile.cpp:245
QString fileName() const
Returns the name of the .desktop file that was used to construct this KDesktopFile.
Definition kdesktopfile.cpp:299
KConfigGroup actionGroup(const QString &group)
Sets the desktop action group.
Definition kdesktopfile.cpp:225
QString readGenericName() const
Returns the value of the "GenericName=" entry.
Definition kdesktopfile.cpp:181
QStringList readMimeTypes() const
Returns a list of the "MimeType=" entries.
Definition kdesktopfile.cpp:219
bool hasDeviceType() const
Checks whether there is an entry "Type=FSDevice".
Definition kdesktopfile.cpp:250
bool noDisplay() const
Whether the entry should be suppressed in menus.
Definition kdesktopfile.cpp:304
QString readComment() const
Returns the value of the "Comment=" entry.
Definition kdesktopfile.cpp:175
KDesktopFile(QStandardPaths::StandardLocation resourceType, const QString &fileName)
Constructs a KDesktopFile object.
Definition kdesktopfile.cpp:40
static bool isDesktopFile(const QString &path)
Checks whether this is really a desktop file.
Definition kdesktopfile.cpp:90
bool tryExec() const
Checks whether the TryExec field contains a binary which is found on the local system.
Definition kdesktopfile.cpp:255
KConfigGroup desktopGroup() const
Returns the main config group (named "Desktop Entry") in a .desktop file.
Definition kdesktopfile.cpp:55
static QString locateLocal(const QString &path)
Returns the location where changes for the .desktop file path should be written to.
Definition kdesktopfile.cpp:61
QString readDocPath() const
Returns the value of the "X-DocPath=" Or "DocPath=" entry.
Definition kdesktopfile.cpp:286
static bool isAuthorizedDesktopFile(const QString &path)
Checks whether the user is authorized to run this desktop file.
Definition kdesktopfile.cpp:95
bool hasActionGroup(const QString &group) const
Returns true if the action group exists, false otherwise.
Definition kdesktopfile.cpp:235
QStringList readActions() const
Returns a list of the "Actions=" entries.
Definition kdesktopfile.cpp:213
StandardLocation
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:05:07 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:05:07 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.