summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstate.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-07 23:41:10 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-07 23:41:10 (GMT)
commitf3164b608e83a3e2c54643aea984095edc275346 (patch)
tree14b532e90e2a15b8d2ac5d46738971b0bedc561e /src/corelib/statemachine/qstate.h
parentb7ac7f5b4d4c8e08b4ded43c9720c712a3663810 (diff)
parent90057dabcb99759bcb42c1c21db7151c69d98706 (diff)
downloadQt-f3164b608e83a3e2c54643aea984095edc275346.zip
Qt-f3164b608e83a3e2c54643aea984095edc275346.tar.gz
Qt-f3164b608e83a3e2c54643aea984095edc275346.tar.bz2
Merge branch 'kinetic-animations' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/corelib/animation/qabstractanimation.cpp src/corelib/animation/qabstractanimation_p.h src/corelib/animation/qpropertyanimation.cpp
Diffstat (limited to 'src/corelib/statemachine/qstate.h')
-rw-r--r--src/corelib/statemachine/qstate.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h
index 4c86e02..73955d7 100644
--- a/src/corelib/statemachine/qstate.h
+++ b/src/corelib/statemachine/qstate.h
@@ -43,9 +43,9 @@
#define QSTATE_H
#ifndef QT_STATEMACHINE_SOLUTION
-#include <QtCore/qactionstate.h>
+#include <QtCore/qabstractstate.h>
#else
-#include "qactionstate.h"
+#include "qabstractstate.h"
#endif
QT_BEGIN_HEADER
@@ -55,47 +55,50 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Core)
class QAbstractTransition;
-class QHistoryState;
class QSignalTransition;
-class QStateFinishedTransition;
class QStatePrivate;
-class Q_CORE_EXPORT QState : public QActionState
+class Q_CORE_EXPORT QState : public QAbstractState
{
Q_OBJECT
+ Q_PROPERTY(QAbstractState* initialState READ initialState WRITE setInitialState)
+ Q_PROPERTY(QAbstractState* errorState READ errorState WRITE setErrorState)
+ Q_PROPERTY(ChildMode childMode READ childMode WRITE setChildMode)
+ Q_ENUMS(ChildMode)
public:
- enum Type {
- Normal,
- ParallelGroup
- };
-
- enum HistoryType {
- ShallowHistory,
- DeepHistory
+ enum ChildMode {
+ ExclusiveStates,
+ ParallelStates
};
QState(QState *parent = 0);
- QState(Type type, QState *parent = 0);
+ QState(ChildMode childMode, QState *parent = 0);
~QState();
QAbstractState *errorState() const;
void setErrorState(QAbstractState *state);
- void addTransition(QAbstractTransition *transition);
+ QAbstractTransition *addTransition(QAbstractTransition *transition);
QSignalTransition *addTransition(QObject *sender, const char *signal, QAbstractState *target);
QAbstractTransition *addTransition(QAbstractState *target);
- QStateFinishedTransition *addFinishedTransition(QAbstractState *target);
void removeTransition(QAbstractTransition *transition);
- QList<QAbstractTransition*> transitions() const;
-
- QHistoryState *addHistoryState(HistoryType type = ShallowHistory);
QAbstractState *initialState() const;
void setInitialState(QAbstractState *state);
+ ChildMode childMode() const;
+ void setChildMode(ChildMode mode);
+
+ void assignProperty(QObject *object, const char *name,
+ const QVariant &value);
+
+Q_SIGNALS:
+ void finished();
+ void polished();
+
protected:
- void onEntry();
- void onExit();
+ void onEntry(QEvent *event);
+ void onExit(QEvent *event);
bool event(QEvent *e);