aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestate_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativestate_p_p.h')
-rw-r--r--src/declarative/util/qdeclarativestate_p_p.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h
index ec18f59b08..011498048f 100644
--- a/src/declarative/util/qdeclarativestate_p_p.h
+++ b/src/declarative/util/qdeclarativestate_p_p.h
@@ -236,6 +236,29 @@ public:
return list->at(index);
}
+ //### should use same "guarded" approach as above
+ QList<QDeclarativeStateChange*> stateChanges;
+ static void stateChanges_append(QDeclarativeListProperty<QDeclarativeStateChange> *prop, QDeclarativeStateChange *change) {
+ QList<QDeclarativeStateChange*> *list = static_cast<QList<QDeclarativeStateChange*> *>(prop->data);
+ change->setState(qobject_cast<QDeclarativeState*>(prop->object));
+ list->append(change);
+ }
+ static void stateChanges_clear(QDeclarativeListProperty<QDeclarativeStateChange> *prop) {
+ QList<QDeclarativeStateChange*> *list = static_cast<QList<QDeclarativeStateChange*> *>(prop->data);
+ QMutableListIterator<QDeclarativeStateChange*> listIterator(*list);
+ while(listIterator.hasNext())
+ listIterator.next()->setState(0);
+ list->clear();
+ }
+ static int stateChanges_count(QDeclarativeListProperty<QDeclarativeStateChange> *prop) {
+ QList<QDeclarativeStateChange*> *list = static_cast<QList<QDeclarativeStateChange*> *>(prop->data);
+ return list->count();
+ }
+ static QDeclarativeStateChange *stateChanges_at(QDeclarativeListProperty<QDeclarativeStateChange> *prop, int index) {
+ QList<QDeclarativeStateChange*> *list = static_cast<QList<QDeclarativeStateChange*> *>(prop->data);
+ return list->at(index);
+ }
+
QDeclarativeTransitionManager transitionManager;
SimpleActionList revertList;