class KActionCollection |
|
A container for a set of QAction objects.
KActionCollection acts as the owning QObject for a set of QAction objects. It allows them to be grouped for organized presentation of configuration to the user, saving + loading of configuration, and optionally for automatic plugging into specified widget(s). Additionally, KActionCollection provides several convenience functions for locating named actions, and actions grouped by QActionGroup. |
|
Constructor. Allows specification of a KComponentData other than the default global KComponentData, where needed. |
|
|
Return the QAction* at position "index" in the action collection.
This is equivalent to actions().value(index); |
|
Find the first action with a given name in the action collection.
name - Name of the KAction, or null to match all actions Returns A pointer to the first KAction in the collection which matches the parameters or null if nothing matches. |
|
Returns the list of all QActionGroups associated with actions in this action collection. |
|
Indicates that action was highlighted |
|
Indicates that action was triggered |
|
Returns the list of KActions which belong to this action collection. |
|
Returns the list of KActions without an QAction.actionGroup() which belong to this action collection. |
|
Add an action under the given name to the collection.
Inserting an action that was previously inserted under a different name will replace the old entry, i.e. the action will not be available under the old name anymore but only under the new one. Inserting an action under a name that is already used for another action will replace the other action in the collection. name - The name by which the action be retrieved again from the collection. action - The action to add. |
|
|
Creates a new standard action, adds it to the collection and connects the action's triggered() signal to the
specified receiver/member. The newly created action is also returned.
The action can be retrieved later from the collection by its standard name as per KStandardAction.stdName. |
|
Creates a new standard action, adds to the collection under the given name and connects the action's triggered() signal to the
specified receiver/member. The newly created action is also returned.
The action can be retrieved later from the collection by the specified name. |
|
Creates a new action under the given name to the collection and connects the action's triggered()
signal to the specified receiver/member. The newly created action is returned.
Inserting an action that was previously inserted under a different name will replace the old entry, i.e. the action will not be available under the old name anymore but only under the new one. Inserting an action under a name that is already used for another action will replace the other action in the collection. name - The name by which the action be retrieved again from the collection. action - The action to add. |
|
Associate all actions in this collection to the given widget, including any actions
added after this association is made.
This does not change the action's shortcut context, so if you need to have the actions only trigger when the widget has focus, you'll need to set the shortcut context on each action to Qt.WidgetShortcut (or better still, Qt.WidgetWithChildrenShortcut with Qt 4.4+) |
|
Access the list of all action collections in existence for this app |
|
Associate all actions in this collection to the given widget. Unlike addAssociatedWidget, this method only adds all current actions in the collection to the given widget. Any action added after this call will not be added to the given widget automatically. So this is just a shortcut for a foreach loop and a widget->addAction call. |
|
Return a list of all associated widgets. |
|
Clears the entire action collection, deleting all actions. |
|
Clear all associated widgets and remove the actions from those widgets. |
|
The KComponentData with which this class is associated. |
|
Returns the KConfig group with which settings will be loaded and saved. |
|
Returns whether this action collection's configuration should be global to KDE ( true ), or specific to the application ( false ). |
|
Overridden to perform connections when someone wants to know whether an action was highlighted or triggered |
|
Returns the number of actions in the collection.
This is equivalent to actions().count(). |
|
Indicates that action was inserted into this action collection. |
|
Returns whether the action collection is empty or not. |
|
The parent KXMLGUIClient, or null if not available. |
|
Read all key associations from config.
If config is zero, read all key associations from the application's configuration file KGlobal.config(), in the group set by setConfigGroup(). |
|
Removes an action from the collection and deletes it.
action - The action to remove. |
|
Remove an association between all actions in this collection and the given widget, i.e. remove those actions from the widget, and stop associating newly added actions as well. |
|
Indicates that action was removed from this action collection. |
|
Set the componentData associated with this action collection.
componentData - the KComponentData which is to be associated with this action collection, or an invalid KComponentData instance to indicate the default KComponentData. |
|
Set whether this action collection's configuration should be global to KDE ( true ), or specific to the application ( false ). |
|
Sets group as the KConfig group with which settings will be loaded and saved. |
|
|
|
Removes an action from the collection.
action - the action to remove. |
|
Write the current configurable key associations to config,
or (if config is zero) to the application's
configuration file.
config - Config object to save to, or null to use the application's config object. writeDefaults - set to true to write settings which are already at defaults. oneAction - pass an action here if you just want to save the values for one action, eg. if you know that action is the only one which has changed. |