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. |
|
Creates a new action under the given name, adds it to the collection and connects the action's triggered() signal to the specified receiver/member. The type of the action is specified by the template parameter ActionType. |
|
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. |
|
Add an associated widget. Associated widgets automatically have all actions in the action collection added to themselves. See also setAssociatedWidget(), removeAssociatedWidget(), clearAssociatedWidgets() and associatedWidgets(). |
|
Access the list of all action collections in existence for this app |
|
Returns a list of widgets currently associated with this action collection. Associations are created to enable custom widgets to provide keyboard interactivity via KActions without having to use QWidget.grabShortcut(). An example of its use is katepart, which creates actions for each editor command and then sets its view as an associated widget. See also addAssociatedWidget(), setAssociatedWidget(), removeAssociatedWidget(), and clearAssociatedWidgets(). |
|
Clears the entire action collection, deleting all actions. |
|
Clears all associated widgets. All actions in this collection will be removed from associated widgets. See also addAssociatedWidget(), setAssociatedWidget(), removeAssociatedWidget(), and associatedWidgets(). |
|
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 associated widget. Removes all actions in this collection from the removed associated widget. See also addAssociatedWidget(), setAssociatedWidget(), clearAssociatedWidgets(), and associatedWidgets(). |
|
Indicates that action was removed from this action collection. |
|
Set an associated widget (clears any others). Associated widgets automatically have all actions in the action collection added to themselves. See also addAssociatedWidget(), removeAssociatedWidget(), clearAssociatedWidgets() and associatedWidgets(). |
|
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. |