#include <qevent.h>
Inheritance diagram for QActionEvent:


Actions can be added to widgets using QWidget::addAction(). This generates an ActionAdded event, which you can handle to provide custom behavior. For example, QToolBar reimplements QWidget::actionEvent() to create {QToolButton}s for the actions.
Definition at line 590 of file qevent.h.
Public Member Functions | |
| QActionEvent (int type, QAction *action, QAction *before=0) | |
| ~QActionEvent () | |
| QAction * | action () const |
| QAction * | before () const |
Private Attributes | |
| QAction * | act |
| QAction * | bef |
Constructs an action event. The type can be ActionChanged, ActionAdded, or ActionRemoved.
action is the action that is changed, added, or removed. If type is ActionAdded, the action is to be inserted before the action before. If before is 0, the action is appended.
Definition at line 2740 of file qevent.cpp.
| QActionEvent::~QActionEvent | ( | ) |
| QAction * QActionEvent::action | ( | ) | const [inline] |
Returns the action that is changed, added, or removed.
Definition at line 597 of file qevent.h.
Referenced by QMenuBar::actionEvent(), Q3ToolBar::actionEvent(), QMenu::actionEvent(), and QTornOffMenu::syncWithMenu().
00597 { return act; }
| QAction * QActionEvent::before | ( | ) | const [inline] |
If type() is ActionAdded, returns the action that should appear before action(). If this function returns 0, the action should be appended to already existing actions on the same widget.
Definition at line 598 of file qevent.h.
Referenced by QMenuBar::actionEvent(), QMenu::actionEvent(), and QTornOffMenu::syncWithMenu().
00598 { return bef; }
QAction* QActionEvent::act [private] |
QAction * QActionEvent::bef [private] |
1.5.1