diff options
Diffstat (limited to 'src/corelib/statemachine/qabstracttransition.h')
-rw-r--r-- | src/corelib/statemachine/qabstracttransition.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index c49731f..e207944 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -55,6 +55,7 @@ QT_MODULE(Core) class QEvent; class QAbstractState; class QState; +class QStateMachine; #ifndef QT_NO_ANIMATION class QAbstractAnimation; @@ -64,9 +65,9 @@ class QAbstractTransitionPrivate; class Q_CORE_EXPORT QAbstractTransition : public QObject { Q_OBJECT - Q_PROPERTY(QState* source READ sourceState) - Q_PROPERTY(QAbstractState* target READ targetState WRITE setTargetState) - Q_PROPERTY(QList<QAbstractState*> targets READ targetStates WRITE setTargetStates) + Q_PROPERTY(QState* sourceState READ sourceState) + Q_PROPERTY(QAbstractState* targetState READ targetState WRITE setTargetState) + Q_PROPERTY(QList<QAbstractState*> targetStates READ targetStates WRITE setTargetStates) public: QAbstractTransition(QState *sourceState = 0); QAbstractTransition(const QList<QAbstractState*> &targets, QState *sourceState = 0); @@ -78,6 +79,8 @@ public: QList<QAbstractState*> targetStates() const; void setTargetStates(const QList<QAbstractState*> &targets); + QStateMachine *machine() const; + #ifndef QT_NO_ANIMATION void addAnimation(QAbstractAnimation *animation); void removeAnimation(QAbstractAnimation *animation); @@ -87,7 +90,7 @@ public: protected: virtual bool eventTest(QEvent *event) const = 0; - virtual void onTransition() = 0; + virtual void onTransition(QEvent *event) = 0; bool event(QEvent *e); |