Go to the documentation of this file.
30 #include <QStringList>
45 Action(QString description,
const QString &keys);
48 bool AddKey(
const QString &key);
49 bool ReplaceKey(
const QString &newkey,
const QString &oldkey);
54 return m_keys.removeAll(key) != 0;
67 bool HasKey(
const QString &key)
const;
QStringList GetKeys(void) const
Returns the key sequence(s) that trigger this action.
Action(QString description)
Create a new empty action.
QList< ActionID > ActionList
ActionID(QString context, QString action)
Create a new action identifier.
ActionID(void)
Create an empty action.
An action (for this plugin) consists of a description, and a set of key sequences.
QString GetAction(void) const
Returns the action name.
static const unsigned int kMaximumNumberOfBindings
The maximum number of keys that can be bound to an action.
bool operator==(const ActionID &other) const
QStringList m_keys
The keys bound to the action.
bool RemoveKey(const QString &key)
Remove a key from this action.
QString GetKeyString(void) const
Returns comma delimited string of key bindings.
bool HasKey(const QString &key) const
Determine if the action already has a key.
QHash< QString, Action * > ActionContext
bool AddKey(const QString &key)
Add a key sequence to this action.
QString GetDescription(void) const
Returns the action description. (note: not threadsafe)
bool IsEmpty(void) const
Returns true iff the action has no keys.
bool ReplaceKey(const QString &newkey, const QString &oldkey)
Replace a key.
QString m_description
The actions description.
A class that uniquely identifies an action.
ActionID & operator=(const ActionID &)=default
QString GetContext(void) const
Returns the context name.