A class which represents a shortcut which is enabled depending on the active context(s). More...
#include <Command.h>
Public Member Functions | |
QAction * | action () const |
The action associated with this command. If the command is a wrapper for a shortcut, 0 is returned. | |
QList< int > | activeContexts () const |
Returns a list of active contexts for this shortcut. | |
void | handleKeySequenceChange (const QKeySequence &old_key) |
Called when the key sequence changes. | |
bool | isActive () |
Returns true if the shortcut command is active in any of the current active contexts. | |
bool | setCurrentContext (QList< int > context_ids) |
Let this shortcut command know what contexts are currently active. | |
QShortcut * | shortcut () const |
The shortcut associated with this command. If the command is a wrapper for an action, 0 is returned. | |
QString | text () const |
Returns the text which appears as user friendly text to the user. | |
void | unregisterContext (int context_id) |
Removes all backend actions from the command which were registered for the specified context. | |
Public Member Functions inherited from Qtilities::CoreGui::Command | |
Qtilities::Core::QtilitiesCategory | category () const |
Gets the command's category. | |
QKeySequence | defaultKeySequence () const |
Returns the default key sequence. | |
QString | defaultText () const |
Gets the default text (id) associated with this command. | |
QKeySequence | keySequence () const |
Returns the current key sequence. | |
void | setCategory (Qtilities::Core::QtilitiesCategory category) |
Sets the command's category. | |
void | setDefaultKeySequence (const QKeySequence &key) |
Sets the default key sequence. | |
void | setDefaultText (const QString &text) |
Sets the default text (id) associated with this command. | |
void | setKeySequence (const QKeySequence &key) |
Sets the current key sequence. |
A class which represents a shortcut which is enabled depending on the active context(s).
For more information see the Action Management article.
|
virtual |
Removes all backend actions from the command which were registered for the specified context.
context_id | The applicable context. |
This function was added in Qtilities v1.2.
Implements Qtilities::CoreGui::Command.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|