# class KServiceAction

###

Module | kdecore
Namespace |
Class | KServiceAction
Inherits |

Represents an action in a .desktop file Actions are defined with the config key Actions in the [Desktop Entry] group, followed by one group per action, as per the desktop entry standard.

See also KService.actions

### methods

- KServiceAction (name, text, icon, exec, noDisplay)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  text | QString |
  icon | QString |
  exec | QString |
  noDisplay | bool | 0

  Creates a KServiceAction. Normally you don't have to do this, KService creates the actions when parsing the .desktop file.

- KServiceAction ( )

  returns ctor

  Internal Needed for operator>>

- KServiceAction (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | KServiceAction |

  Copy constructor

- data ( )

  returns QVariant

  Returns the action's internal data.

- exec ( )

  returns QString

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

- icon ( )

  returns QString

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

- isSeparator ( )

  returns bool

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

- name ( )

  returns QString

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

- noDisplay ( )

  returns bool

  Returns whether the action should be suppressed in menus. This is useful for having actions with a known name that the code looks for explicitly, like Setup and Root for kscreensaver actions, and which should not appear in popup menus. Returns true to suppress this service

- setData (userData)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  userData | QVariant |

  Sets the action's internal data to the given userData.

- text ( )

  returns QString

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