|
Lomiri Action API
|
Signals | |
| void | actionsChanged () |
| void | localContextsChanged () |
| Q_REVISION (1) void quit() | |
Public Member Functions | |
| ActionManager (QObject *parent=0) | |
| QSet< Action * > | actions () const |
| Q_INVOKABLE void | addAction (lomiri::action::Action *action) |
| Q_INVOKABLE void | addLocalContext (lomiri::action::ActionContext *context) |
| Q_INVOKABLE lomiri::action::ActionContext * | globalContext () |
| QSet< ActionContext * > | localContexts () const |
| Q_INVOKABLE void | removeAction (lomiri::action::Action *action) |
| Q_INVOKABLE void | removeLocalContext (lomiri::action::ActionContext *context) |
Properties | |
| lomiri::action::ActionContext * | globalContext |
ActionManager exports the application actions to the external components. See Platform Integration and Action Contexts for more details.
|
explicit |
| parent | parent QObject or 0 |
Creates a new ActionManager.
Also creates a global context which can be accessed with ActionManager::globalContext
| QSet< Action * > ActionManager::actions | ( | ) | const |
If an action is part of multiple contexts it's still only included once in the set.
|
signal |
An action was either added or removed from the global context or any of the local contexts the manager is currently tracking.
| void ActionManager::addAction | ( | lomiri::action::Action * | action | ) |
| action | action to be added |
this is a shorthand for
| void ActionManager::addLocalContext | ( | lomiri::action::ActionContext * | context | ) |
| context | context to be added |
Adds a local context.
Calling this function multiple times with the same context does not have any side effects; the context gets added only once.
ActionManager monitors if the context is deleted and does the appropriate cleanup when necessary, so it is not mandatory to call removeLocalContext() before the context is destroyed.
| QSet< ActionContext * > ActionManager::localContexts | ( | ) | const |
|
signal |
A local context was either added or removed.
| void ActionManager::removeAction | ( | lomiri::action::Action * | action | ) |
| action | action to be removed |
this is a shorthand for
| void ActionManager::removeLocalContext | ( | lomiri::action::ActionContext * | context | ) |
| context | context to be removed |
Removes a local context.
Calling this function multiple times with the same context does not have any side effects; the context gets removed only if it was previously added with addLocalContext().
|
read |
The globalContext of the Application.