Go to the documentation of this file.
27 #include <QStringList>
45 const QString &description,
50 const QString &newkey,
51 const QString &oldkey);
QStringList GetKeys(const ActionID &id) const
Get the keys bound to an action by its identifier.
QStringList GetActionStrings(const QString &context_name) const
Returns a list of all action in the action set.
Maintains consistancy between actions and keybindings.
QList< ActionID > ActionList
QStringList GetContextKeys(const QString &context_name) const
bool Replace(const ActionID &id, const QString &newkey, const QString &oldkey)
Replace a specific key in a specific action.
QMap< QString, ActionList > m_keyToActionMap
ActionList GetModified(void) const
Returns the appropriate container of modified actions.
ActionList GetActions(const QString &key) const
Returns the actions bound to the specified key.
An action (for this plugin) consists of a description, and a set of key sequences.
QHash< QString, ActionContext > ContextMap
bool Remove(const ActionID &id, const QString &key)
Remove a key from an action identifier.
ActionSet()=default
Create a new, empty set of action bindings.
QStringList GetContextStrings(void) const
Returns a list of all contexts in the action set.
Action * GetAction(const ActionID &id)
Returns a pointer to an action by its identifier. (note: result not thread-safe)
bool HasModified(void) const
Returns true iff changes have been made.
bool AddAction(const ActionID &id, const QString &description, const QString &keys)
Add an action.
static const QString kJumpContext
The statically assigned context for jump point actions.
QStringList GetAllKeys(void) const
Get all keys (from every context) to which an action is bound.
bool IsModified(const ActionID &id) const
Returns true iff the action is modified.
bool SetModifiedFlag(const ActionID &id, bool modified)
Mark an action as modified or unmodified by its identifier.
static const QString kGlobalContext
The name of global actions.
A class that uniquely identifies an action.
QString GetDescription(const ActionID &id) const
Returns the description of an action by its identifier.
static bool modified(uint64_t sig)
bool Add(const ActionID &id, const QString &key)
Add a binding.
QString GetKeyString(const ActionID &id) const
Returns a string containing all the keys in bound to an action by its identifier.