An interface through which objects can provide actions to other objects. More...
#include <IActionProvider.h>
Public Types | |
enum | ActionFilter { NoFilter = 0, FilterDisabled = 1, FilterHidden = 2 } |
Action Filter Flag. More... |
Public Member Functions | |
virtual QList< QtilitiesCategory > | actionCategories () const =0 |
A list of all action categories provided through this interface. | |
virtual QList< QtilitiesCategory > | actionGroupCategories () const =0 |
A list of all action group categories provided through this interface. | |
virtual QMap< QActionGroup *, QtilitiesCategory > | actionGroupMap (QActionGroup *action_group=0) const =0 |
A map with the actions and action categories of all the action groups provided through the interface. | |
virtual QList< QActionGroup * > | actionGroups () const =0 |
A list of all the action groups provided through the interface. | |
virtual QMap< QAction *, QtilitiesCategory > | actionMap (IActionProvider::ActionFilterFlags action_filter, const QtilitiesCategory &category_filter=QtilitiesCategory()) const =0 |
A map with the action and action category of all the actions provided through the interface. | |
virtual QList< QAction * > | actions (ActionFilterFlags action_filter=NoFilter, const QtilitiesCategory &category_filter=QtilitiesCategory("Hello World!")) const =0 |
A list of all the actions provided through the interface. | |
virtual QAction * | addAction (QAction *action, const QtilitiesCategory &category=QtilitiesCategory())=0 |
Adds an action to the object implementing this interface and returns it if added successfully. Returns 0 otherwise. | |
virtual QActionGroup * | addActionGroup (QActionGroup *action_group, const QtilitiesCategory &category=QtilitiesCategory())=0 |
Adds an action group to the object implementing this interface and returns it if added successfully. Returns 0 otherwise. | |
virtual void | addActions (QList< QAction * > actions, const QtilitiesCategory &category=QtilitiesCategory())=0 |
Adds an list of actions to the object implementing this interface. | |
virtual void | disableAllActions ()=0 |
Disables all actions registered in this action provider. | |
virtual void | enableAllActions ()=0 |
Enables all actions registered in this action provider. | |
virtual QList< QAction * > | findActionsByObjectName (const QString &object_name, Qt::MatchFlags match_flags=Qt::MatchFixedString)=0 |
Finds an action with the specified objectName() and returns a reference to it, otherwise return 0 if it was not found. | |
virtual QList< QAction * > | findActionsByText (const QString &match_string, Qt::MatchFlags match_flags=Qt::MatchFixedString)=0 |
Finds an action that has the specified text and returns a reference to it, otherwise return 0 if it was not found. | |
virtual void | removeAction (QAction *action)=0 |
Removes an action from the action provider. Does not delete the action. | |
virtual void | removeActionCategory (const QtilitiesCategory &category)=0 |
Removes a complete category from the action provider. Does not delete the actions. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
virtual QObject * | objectBase ()=0 |
Returns the QObject* base of the interface. | |
virtual const QObject * | objectBase () const =0 |
Returns a const QObject* base of the interface. | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. |
An interface through which objects can provide actions to other objects.
For more information see ActionProvider.
|
pure virtual |
A map with the actions and action categories of all the action groups provided through the interface.
This function can be used to visualize the actions provided through this interface.
action_group | The action group for which the map is required. If no group is specified, all actions in all action groups are returned in the map. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
A map with the action and action category of all the actions provided through the interface.
This function can be used to visualize the actions provided through this interface.
action_filter | The action filter flags to be used to filter returned actions. |
category_filter | Only actions which have a category which appears in the category filter will be part of the returned list. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
A list of all the actions provided through the interface.
action_filter | The action filter flags to be used to filter returned actions. |
category_filter | Only actions which have a category which appears in the category filter will be part of the returned list. |
|
pure virtual |
Adds an action to the object implementing this interface and returns it if added successfully. Returns 0 otherwise.
action | The action to be added. |
category | The category under which the action should be added. By default no category is assigned. The first level of hierarchy in the category is defined by the first item in the list, and the last level of hierarchy by the last item in the list. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
Adds an action group to the object implementing this interface and returns it if added successfully. Returns 0 otherwise.
action_group | The action group to be added. |
category | The category under which the actions in the action group should be added. By default no category is assigned. The first level of hierarchy in the category is defined by the first item in the list, and the last level of hierarchy by the last item in the list. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
Adds an list of actions to the object implementing this interface.
actions | The actions to be added. |
category | The category under which the actions should be added. By default no category is assigned. The first level of hierarchy in the category is defined by the first item in the list, and the last level of hierarchy by the last item in the list. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
Finds an action with the specified objectName() and returns a reference to it, otherwise return 0 if it was not found.
match_string | The match string to match. |
match_flags | The match flags to use during matching. At present Qt::MatchExactly, Qt::MatchFixedString, Qt::MatchContains, Qt::MatchStartsWith, Qt::MatchEndsWith, Qt::MatchCaseSensitive is supported. |
Implemented in Qtilities::CoreGui::ActionProvider.
|
pure virtual |
Finds an action that has the specified text and returns a reference to it, otherwise return 0 if it was not found.
match_string | The match string to match. |
match_flags | The match flags to use during matching. All match flags except Qt::MatchRecursive and Qt::MatchWrap can be used. |
Implemented in Qtilities::CoreGui::ActionProvider.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|