summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstate_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-06-25 05:03:26 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-06-25 05:03:26 (GMT)
commit9f020f8a737ee27cf5b7ce4a41e579a6872d9954 (patch)
tree514d8d1635f9f75ddd7332f81b64fd2683e68fa8 /src/declarative/util/qmlstate_p.h
parent83449457780f4321595ec5f15056474cc22061da (diff)
downloadQt-9f020f8a737ee27cf5b7ce4a41e579a6872d9954.zip
Qt-9f020f8a737ee27cf5b7ce4a41e579a6872d9954.tar.gz
Qt-9f020f8a737ee27cf5b7ce4a41e579a6872d9954.tar.bz2
A little cleanup
Diffstat (limited to 'src/declarative/util/qmlstate_p.h')
-rw-r--r--src/declarative/util/qmlstate_p.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/declarative/util/qmlstate_p.h b/src/declarative/util/qmlstate_p.h
index da8fdcd..7fcbcd7 100644
--- a/src/declarative/util/qmlstate_p.h
+++ b/src/declarative/util/qmlstate_p.h
@@ -48,6 +48,29 @@
QT_BEGIN_NAMESPACE
+class SimpleAction
+{
+public:
+ enum State { StartState, EndState };
+ SimpleAction(const Action &a, State state = StartState) : bv(0)
+ {
+ property = a.property;
+ if (state == StartState) {
+ value = a.fromValue;
+ binding = a.fromBinding;
+ } else {
+ value = a.toValue;
+ binding = a.toBinding;
+ }
+ bv = a.bv;
+ }
+
+ QmlMetaProperty property;
+ QVariant value;
+ QString binding;
+ QmlBindableValue *bv;
+};
+
class QmlStatePrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QmlState)
@@ -56,13 +79,15 @@ public:
QmlStatePrivate()
: when(0), transition(0), inState(false), group(0) {}
+ typedef QList<SimpleAction> SimpleActionList;
+
QString name;
QmlBindableValue *when;
QmlConcreteList<QmlStateOperation *> operations;
QmlTransition *transition;
- QmlStateOperation::RevertActionList revertList;
+ SimpleActionList revertList;
QList<QmlMetaProperty> reverting;
- QmlStateOperation::RevertActionList completeList;
+ SimpleActionList completeList;
QmlStateOperation::ActionList bindingsList;
QString extends;
mutable bool inState;