diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-22 15:20:19 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-22 15:20:19 (GMT) |
commit | f87641584424deed25e2abdadea08c3be94b9ce1 (patch) | |
tree | a185687744e724a8db896970416f23d20f5cad38 /src/corelib/statemachine/qsignaltransition.h | |
parent | 31f5348ea1691a7664b6abc04cf425dd02637b33 (diff) | |
download | Qt-f87641584424deed25e2abdadea08c3be94b9ce1.zip Qt-f87641584424deed25e2abdadea08c3be94b9ce1.tar.gz Qt-f87641584424deed25e2abdadea08c3be94b9ce1.tar.bz2 |
kill the stateactions api
It just didn't give us that much.
Typically you just reimplement onEntry/onExit/onTransition
when you want to do something.
We go back to the signals-and-slots approach: states have
entered() and exited() signals that you can connect to.
It's still possible to have an action-based API, but then
you build it on top of the core API, which is OK.
Replacing 4 public classes (and one layer in the hierarchy)
with 2 signals feels good.
Diffstat (limited to 'src/corelib/statemachine/qsignaltransition.h')
-rw-r--r-- | src/corelib/statemachine/qsignaltransition.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h index c1a41ae..4df97cf 100644 --- a/src/corelib/statemachine/qsignaltransition.h +++ b/src/corelib/statemachine/qsignaltransition.h @@ -43,9 +43,9 @@ #define QSIGNALTRANSITION_H #ifndef QT_STATEMACHINE_SOLUTION -#include <QtCore/qactiontransition.h> +#include <QtCore/qabstracttransition.h> #else -#include "qactiontransition.h" +#include "qabstracttransition.h" #endif QT_BEGIN_HEADER @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) class QSignalTransitionPrivate; -class Q_CORE_EXPORT QSignalTransition : public QActionTransition +class Q_CORE_EXPORT QSignalTransition : public QAbstractTransition { Q_OBJECT Q_PROPERTY(QObject* object READ senderObject WRITE setSenderObject) @@ -77,6 +77,7 @@ public: protected: bool eventTest(QEvent *event) const; + void onTransition(); bool event(QEvent *e); |