class KAction |
|
|
^$begin$ ^$NoError ^$UnexpectedElementError ^$CustomError ^$NotWellFormedError ^$PrematureEndOfDocumentError ^$begin$ ^$NoToken ^$Invalid ^$StartDocument ^$EndDocument ^$StartElement ^$EndElement ^$Characters ^$Comment ^$DTD ^$EntityReference ^$ProcessingInstruction Class to encapsulate user-driven action or event The KAction class (and derived and super classes) extends QAction, which provides a way to easily encapsulate a "real" user-selected action or event in your program. For instance, a user may want to paste the contents of the clipboard, scroll down a document, or quit the |
|
Constructs an action. |
|
Constructs an action with the specified parent and visible text.
text - The visible text for this action. parent - The parent for this action. |
|
Constructs an action with text and icon; a shortcut may be specified by the ampersand character (e.g. \"&Option\" creates a shortcut with key O ) This is the other common KAction constructor used. Use it when you do have a corresponding icon.
icon - The icon to display. text - The text that will be displayed. parent - The parent for this action. |
|
Get the global shortcut for this action, if one exists. Global shortcuts allow your actions to respond to accellerators independently of the focused window. Unlike regular shortcuts, the application's window does not need focus for them to be activated.
type - the type of shortcut to be returned. Should both be specified, only the active shortcut will be returned. Defaults to the active shortcut, if one exists. See also KGlobalAccel See also setGlobalShortcut() |
|
Returns true if this action is permitted to have a global shortcut. Defaults to false. |
|
Returns true if this action's shortcut is configurable. |
|
|
Assign a global shortcut for this action. Global shortcuts allow your actions to respond to keys independently of the focused window. Unlike regular shortcuts, the application's window does not need focus for them to be activated. When an action, identified by main component name and text(), is assigned a global shortcut for the first time on a KDE installation the assignment will be saved and restored every time the action's globalShortcutAllowed flag becomes true. This includes calling setGlobalShortcut()! If you actually want to change the global shortcut you have to set loading to NoAutoloading. The new shortcut will be saved again. The only way to forget the action's global shortcut is to do setGlobalShortcut(KShortcut(), KAction.ActiveShortcut | KAction.DefaultShortcut, KAction.NoAutoloading) shortcut - global shortcut(s) to assign type - the type of shortcut to be set, whether the active shortcut, the default shortcut, or both (the default). loading - load the previous shortcut (Autoloading, the default) or really set a new shortcut (NoAutoloading). See also KGlobalAccel See also globalShortcut() |
|
Indicate whether the programmer and/or user may define a global shortcut for this action. Defaults to false. Note that calling setGlobalShortcut() turns this on automatically.
allowed - set to true if this action may have a global shortcut, otherwise false. |
|
|
|
Set the shortcut for this action. This is preferred over QAction.setShortcut(), as it allows for multiple shortcuts per action.
shortcut - shortcut(s) to use for this action in its specified shortcutContext() type - type of shortcut to be set: active shortcut, default shortcut, or both (the default). |
|
void setShortcut(const KShortcut& shortcut) Set the primary shortcut only for this action. This function is there to explicitly override QAction.setShortcut(const QKeySequence&). QAction.setShortcut() will bypass everything in KAction and may lead to unexpected behavior.
shortcut - shortcut(s) to use for this action in its specified shortcutContext() type - type of shortcut to be set: active shortcut, default shortcut, or both (default argument value). |
|
Indicate whether the user may configure the action's shortcut.
configurable - set to true if this shortcut may be configured by the user, otherwise false. |
|
|
Get the shortcut for this action. This is preferred over QAction.shortcut(), as it allows for multiple shortcuts per action. The first and second shortcut as reported by shortcuts() will be the primary and alternate shortcut of the shortcut returned.
types - the type of shortcut to return. Should both be specified, only the active shortcut will be returned. Defaults to the active shortcut, if one exists. See also shortcuts() |
|
Emitted when the action is triggered. Also provides the state of the keyboard modifiers and mouse buttons at the time. |
Autoloading | - | /p> p> See also setGlobalShortcut ( ) and set the shortcut as saved there . Look up the action in global settings ( using its main component ' s name and text ( ) ) | |
NoAutoloading | - | Prevent autoloading of saved global shortcut for action |
ActiveShortcut | - | The shortcut will immediately become active but may be reset to "default" . | |
DefaultShortcut | - | reset shortcuts to default . The shortcut is a default shortcut - it becomes active when somebody decides to |