score::Action Class Reference

The Action class. More...

Detailed Description

The Action class.

An action is a wrapper class for QAction, which adds information that will be useful to allow to change the keyboard shortcuts :

  • Default shortcuts
  • Group

Actions should be part of the type systems as much as possible to prevent errors.

To allow this, the score::MetaAction template shall be specialized. The macro SCORE_DECLARE_ACTION is provided to do this easily.

The ActionKey should be unique across the whole software.

Public Member Functions

 Action (QAction *act, QString text, ActionKey key, ActionGroupKey k, const QKeySequence &defaultShortcut)
 
 Action (QAction *act, QString text, ActionKey key, ActionGroupKey k, const QKeySequence &defaultShortcut, const QKeySequence &defaultShortcut2)
 
 Action (QAction *act, QString text, const char *key, const char *group_key, const QKeySequence &defaultShortcut)
 
ActionKey key () const
 
QAction * action () const
 
QKeySequence shortcut ()
 
void setShortcut (const QKeySequence &shortcut)
 
QKeySequence defaultShortcut ()
 

The documentation for this class was generated from the following files: