Generic action class.
More...
#include <QtxAction.h>
|
| QtxAction (QObject *=0, bool=false, const QString &=QString()) |
| 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 |
| Return shortcut action name for the action. More...
|
|
void | setShortcutActionName (const QString &) |
| Set shortcut action name to the action. More...
|
|
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::QtxAction |
( |
QObject * |
parent = 0 , |
|
|
bool |
toggle = false , |
|
|
const QString & |
shortcutAction = QString() |
|
) |
| |
Creates an action owned by parent. Parameter toggle can be used to make the action checkable. Parameter shortcutAction can be used to assign the shortcut from preferences. This parameter value corresponds to shortcut action identifier in shortcut preferences.
- Parameters
-
parent | parent object |
toggle | if true the action will be a toggle action |
shortcutAction | shortcut action identifier |
References setShortcutActionName().
QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QString & |
menuText, |
|
|
int |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false , |
|
|
const QString & |
shortcutAction = QString() |
|
) |
| |
Creates an action owned by parent. Parameters text, menuText and accel specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter shortcutAction can be used to assign the shortcut from preferences. This parameter value corresponds to shortcut action identifier in shortcut preferences.
- Parameters
-
text | tooltip text |
menuText | menu text |
accel | shortcut key sequence |
parent | parent object |
toggle | if true the action is a toggle action |
shortcutAction | shortcut action identifier |
References setShortcutActionName().
QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QString & |
menuText, |
|
|
const QKeySequence & |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false , |
|
|
const QString & |
shortcutAction = QString() |
|
) |
| |
Creates an action owned by parent. Parameters text, menuText and accel specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter shortcutAction can be used to assign the shortcut from preferences. This parameter value corresponds to shortcut action identifier in shortcut preferences.
- Parameters
-
text | tooltip text |
menuText | menu text |
accel | shortcut key sequence |
parent | parent object |
toggle | if true the action is a toggle action |
shortcutAction | shortcut action identifier |
References setShortcutActionName().
QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QIcon & |
icon, |
|
|
const QString & |
menuText, |
|
|
int |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false , |
|
|
const QString & |
shortcutAction = QString() |
|
) |
| |
Creates an action owned by parent. Parameters text, icon, menuText and accel specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter shortcutAction can be used to assign the shortcut from preferences. This parameter value corresponds to shortcut action identifier in shortcut preferences.
- Parameters
-
text | tooltip text |
icon | iconset |
menuText | menu text |
accel | shortcut key sequence |
parent | parent object |
toggle | if true the action will be a toggle action |
shortcutAction | shortcut action identifier |
References setShortcutActionName().
QtxAction::QtxAction |
( |
const QString & |
text, |
|
|
const QIcon & |
icon, |
|
|
const QString & |
menuText, |
|
|
const QKeySequence & |
accel, |
|
|
QObject * |
parent, |
|
|
bool |
toggle = false , |
|
|
const QString & |
shortcutAction = QString() |
|
) |
| |
Creates an action owned by parent. Parameters text, icon, menuText and accel specify the action's attributes. Parameter toggle can be used to make the action checkable. Parameter shortcutAction can be used to assign the shortcut from preferences. This parameter value corresponds to shortcut action identifier in shortcut preferences.
- Parameters
-
text | tooltip text |
icon | iconset |
menuText | menu text |
accel | shortcut key sequence |
parent | parent object |
toggle | if true the action will be a toggle action |
shortcutAction | shortcut action identifier |
References setShortcutActionName().
QtxAction::~QtxAction |
( |
| ) |
|
|
virtual |
void QtxAction::addedTo |
( |
QWidget * |
| ) |
|
|
protectedvirtual |
void QtxAction::customEvent |
( |
QEvent * |
e | ) |
|
|
protectedvirtual |
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()
void QtxAction::removedFrom |
( |
QWidget * |
| ) |
|
|
protectedvirtual |
void QtxAction::setShortcutActionName |
( |
const QString & |
shortcutAction | ) |
|
QString QtxAction::shortcutActionName |
( |
| ) |
const |
QString QtxAction::myShortcutActionName |
|
private |
The documentation for this class was generated from the following files: