com.trolltech.qt.gui
Class QActionEvent
java.lang.Object
com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QEvent
com.trolltech.qt.gui.QActionEvent
- All Implemented Interfaces:
- QtJambiInterface
public class QActionEvent
- extends QEvent
The QActionEvent class provides an event that is generated when a QAction
is added, removed, or changed. 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.
See also:
QAction
, QWidget::addAction()
, QWidget::removeAction()
, and QWidget::actions()
.
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent |
QEvent.Type |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
currentSender |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QActionEvent
public QActionEvent(int type,
QAction action)
- 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.
QActionEvent
public QActionEvent(int type,
QAction action,
QAction before)
- 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.
action
public final QAction action()
- Returns the action that is changed, added, or removed.
- See also:
before()
.
before
public final QAction before()
- 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. - See also:
action()
, and QWidget::actions()
.
toString
public java.lang.String toString()
- Returns a string representation of the this QActionEvent.
- Overrides:
toString
in class QEvent