KDesktopFileAction Class

Class for representing an Action of a desktop file. More...

Header: #include <KDesktopFileAction>
CMake: find_package(KF6 REQUIRED COMPONENTS Config)
target_link_libraries(mytarget PRIVATE KF6::ConfigCore)
Since: 6.0

Public Functions

KDesktopFileAction()
KDesktopFileAction(const QString &name, const QString &text, const QString &icon, const QString &exec, const QString &desktopFilePath)
QString actionsKey() const
QString desktopFilePath() const
QString exec() const
QString icon() const
bool isSeparator() const
QString name() const

Detailed Description

Member Function Documentation

[explicit] KDesktopFileAction::KDesktopFileAction()

Construct an empty KDesktopFileAction. Needed so the Action can be stored in containers that require type T to be default constructible (e.g. QVariant).

[explicit] KDesktopFileAction::KDesktopFileAction(const QString &name, const QString &text, const QString &icon, const QString &exec, const QString &desktopFilePath)

Construct a KDesktopFileAction with all required properties

QString KDesktopFileAction::actionsKey() const

Returns the action's internal name For instance Actions=Setup;... and the group [Desktop Action Setup] define an action with the name "Setup".

QString KDesktopFileAction::desktopFilePath() const

Returns the path of the desktop file this action was loaded from

QString KDesktopFileAction::exec() const

Returns the action's exec command, as defined by the Exec key in the desktop action group

QString KDesktopFileAction::icon() const

Returns the action's icon, as defined by the Icon key in the desktop action group

bool KDesktopFileAction::isSeparator() const

Returns whether the action is a separator. This is true when the Actions key contains "_SEPARATOR_".

QString KDesktopFileAction::name() const

Returns the action's Name, as defined by the Name key in the desktop action group