Generic action class.
More...
#include <QtxAction.h>
|
| | QtxAction (QObject *=0, bool=false, const QString &=QString()) |
| | Constructor. More...
|
| |
| | QtxAction (QObject *, bool, const QString &, const QString &, const QString &=QString(), const QIcon &=QIcon()) |
| | Constructor. More...
|
| |
| | QtxAction (const QString &, const QString &, int, QObject *, bool=false, const QString &=QString()) |
| | Constructor. More...
|
| |
| | QtxAction (const QString &, const QString &, const QKeySequence &, QObject *, bool=false, const QString &=QString()) |
| | Constructor. More...
|
| |
| | QtxAction (const QString &, const QIcon &, const QString &, int, QObject *, bool=false, const QString &=QString()) |
| | Constructor. More...
|
| |
| | QtxAction (const QString &, const QIcon &, const QString &, const QKeySequence &, QObject *, bool=false, const QString &=QString()) |
| | Constructor. More...
|
| |
| virtual | ~QtxAction () |
| | Destructor. More...
|
| |
| virtual bool | eventFilter (QObject *, QEvent *) |
| | Customize action events. More...
|
| |
| QString | shortcutActionName () const |
| |
| void | setShortcutActionName (const QString &) |
| |
| const QString & | ID () const |
| | Unique for the entire application ID. More...
|
| |
| void | setID (const QString &theID) |
| |
Generic action class.
The class QtxAction inherits QWidgetAction class and can be used as base class when implementing any custom menu/toolbar actions. It is necessary to subclass from QtxAction and redefine virtual callback methods addedTo(), removedFrom() (which are called automatically when the action is added to the widget and removed from it) to customize the action behavior.
◆ QtxAction() [1/6]
| QtxAction::QtxAction |
( |
QObject * |
parent = 0, |
|
|
bool |
toggle = false, |
|
|
const QString & |
ID = QString() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| parent | parent object |
| toggle | if true the action will be a toggle action |
| ID | shortcut action identifier |
References ID(), and setID().
◆ QtxAction() [2/6]
| QtxAction::QtxAction |
( |
QObject * |
parent, |
|
|
bool |
toggle, |
|
|
const QString & |
ID, |
|
|
const QString & |
toolTip, |
|
|
const QString & |
text = QString(), |
|
|
const QIcon & |
icon = QIcon() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameters text, menuText and ID specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| parent | parent object |
| toggle | if true the action is a toggle action |
| ID | shortcut action identifier |
| toolTip | tooltip text |
| text | menu text |
References ID(), and setID().
◆ QtxAction() [3/6]
| QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QString & |
menuText, |
|
|
int |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false, |
|
|
const QString & |
ID = QString() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameters text, menuText and ID specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| text | tooltip text |
| menuText | menu text |
| accel | May be disabled by SUIT_ShortcutMgr! |
| parent | parent object |
| toggle | if true the action is a toggle action |
| ID | shortcut action identifier |
References ID(), and setID().
◆ QtxAction() [4/6]
| QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QString & |
menuText, |
|
|
const QKeySequence & |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false, |
|
|
const QString & |
ID = QString() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameters text, menuText and ID specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| text | tooltip text |
| menuText | menu text |
| accel | May be disabled by SUIT_ShortcutMgr! |
| parent | parent object |
| toggle | if true the action is a toggle action |
| ID | shortcut action identifier |
References ID(), and setID().
◆ QtxAction() [5/6]
| QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QIcon & |
icon, |
|
|
const QString & |
menuText, |
|
|
int |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false, |
|
|
const QString & |
ID = QString() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameters text, icon, menuText and ID specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| text | tooltip text |
| icon | iconset |
| menuText | menu text |
| accel | May be disabled by SUIT_ShortcutMgr! |
| parent | parent object |
| toggle | if true the action will be a toggle action |
| ID | shortcut action identifier |
References ID(), and setID().
◆ QtxAction() [6/6]
| QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QIcon & |
icon, |
|
|
const QString & |
menuText, |
|
|
const QKeySequence & |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false, |
|
|
const QString & |
ID = QString() |
|
) |
| |
Constructor.
Creates an action owned by parent. Parameters text, icon, menuText and ID specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter ID is used to de(serialize) shortcut settings.
- Parameters
-
| text | tooltip text |
| icon | iconset |
| menuText | menu text |
| accel | May be disabled by SUIT_ShortcutMgr! |
| parent | parent object |
| toggle | if true the action will be a toggle action |
| ID | shortcut action identifier |
References ID(), and setID().
◆ ~QtxAction()
| QtxAction::~QtxAction |
( |
| ) |
|
|
virtual |
◆ addedTo()
| void QtxAction::addedTo |
( |
QWidget * |
| ) |
|
|
protectedvirtual |
◆ customEvent()
| void QtxAction::customEvent |
( |
QEvent * |
e | ) |
|
|
protectedvirtual |
◆ eventFilter()
Customize action events.
Sends a notification event to the action when it is added to the widget or removed from it in order to perform custom processing.
- Parameters
-
- Returns
true if further event processing should be stopped
- See also
- customEvent(), addedTo(), removedFrom()
◆ ID()
| const QString & QtxAction::ID |
( |
| ) |
const |
Unique for the entire application ID.
References myID.
◆ removedFrom()
| void QtxAction::removedFrom |
( |
QWidget * |
| ) |
|
|
protectedvirtual |
◆ setID()
| void QtxAction::setID |
( |
const QString & |
theID | ) |
|
◆ setShortcutActionName()
| void QtxAction::setShortcutActionName |
( |
const QString & |
shortcutAction | ) |
|
◆ shortcutActionName()
| QString QtxAction::shortcutActionName |
( |
| ) |
const |
◆ myID
The documentation for this class was generated from the following files: