KService
kservice.h
33 * To obtain a KService instance for a specific application you typically use serviceByDesktopName(), e.g.:
39 * Other typical usage would be in combination with KApplicationTrader to obtain e.g. the default application for a given file type.
41 * @see <a href="https://specifications.freedesktop.org/desktop-entry-spec/latest/">Desktop Entry Specification</a>
454 static QString newServicePath(bool showInMenu, const QString &suggestedName, QString *menuId = nullptr, const QStringList *reservedMenuIds = nullptr);
QStringList mimeTypes() const
Returns the list of MIME types that this application supports.
Definition kservice.cpp:726
QString desktopEntryName() const
Returns the filename of the desktop entry without any extension, e.g.
Definition kservice.cpp:696
QStringList keywords() const
Returns a list of descriptive keywords for the application, if there are any.
Definition kservice.cpp:720
QList< KServiceAction > actions() const
Returns the actions defined in this desktop file.
Definition kservice.cpp:806
bool allowMultipleFiles() const
Checks whether this application can handle several files as startup arguments.
Definition kservice.cpp:572
QStringList supportedProtocols() const
Returns the list of protocols this application supports.
Definition kservice.cpp:756
QString genericName() const
Returns the generic name for the application, if there is one (e.g.
Definition kservice.cpp:714
bool substituteUid() const
Checks whether the application needs to run under a different UID.
Definition kservice.cpp:439
bool terminal() const
Checks whether the application should be run in a terminal.
Definition kservice.cpp:679
QString terminalOptions() const
Returns any options associated with the terminal the application runs in, if it requires a terminal.
Definition kservice.cpp:673
KService(const QString &name, const QString &exec, const QString &icon)
Construct a temporary service with a given name, exec-line and icon.
Definition kservice.cpp:262
QString username() const
Returns the user name if the application runs with a different user id.
Definition kservice.cpp:444
QString menuId() const
Returns the menu ID of the application desktop entry.
Definition kservice.cpp:588
bool showOnCurrentPlatform() const
Whether the application should be shown on the current platform (e.g.
Definition kservice.cpp:499
QString comment() const
Returns the descriptive comment for the application, if there is one.
Definition kservice.cpp:708
QString untranslatedGenericName() const
Returns the untranslated (US English) generic name for the application, if there is one (e....
Definition kservice.cpp:541
QStringList schemeHandlers() const
Returns the list of scheme handlers this application supports.
Definition kservice.cpp:740
QString docPath() const
The path to the documentation for this application.
Definition kservice.cpp:553
bool showInCurrentDesktop() const
Whether the application should be shown in the current desktop (including in context menus).
Definition kservice.cpp:457
QExplicitlySharedDataPointer< KService > Ptr
A shared data pointer for KService.
Definition kservice.h:49
bool hasMimeType(const QString &mimeType) const
Checks whether the application supports this MIME type.
Definition kservice.cpp:310
bool runOnDiscreteGpu() const
Returns true if the application indicates that it's preferred to run on a discrete graphics card,...
Definition kservice.cpp:685
Type
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:54:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:54:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.