KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KServiceAction Class Reference

from PyKDE4.kdecore import *

Detailed Description

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

 __init__ (self, QString name, QString text, QString icon, QString exec, bool noDisplay=0)
 __init__ (self)
 __init__ (self, KServiceAction other)
QVariant data (self)
QString exec_ (self)
QString icon (self)
bool isSeparator (self)
QString name (self)
bool noDisplay (self)
 setData (self, QVariant userData)
QString text (self)

Method Documentation

__init__ (  self,
QString  name,
QString  text,
QString  icon,
QString  exec,
bool  noDisplay=0
)

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

__init__ (   self )

Internal:
Needed for operator>>

__init__ (  self,
KServiceAction  other
)

Copy constructor

QVariant data (   self )

Returns:
the action's internal data.

QString exec_ (   self )

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

QString icon (   self )

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

bool isSeparator (   self )

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

QString name (   self )

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

bool noDisplay (   self )

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 (  self,
QVariant  userData
)

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

QString text (   self )

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

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal