summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstateoperations.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-23 03:20:21 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-23 03:20:21 (GMT)
commit1245e7cce64d46600b2535bc7d36474f8ba382e2 (patch)
tree7dffcccbb6d3e6412432ca605e4a654a92fbe0d8 /src/declarative/util/qmlstateoperations.h
parente9dde8b58f6a741c10d8b28a463c467f256bdd8f (diff)
downloadQt-1245e7cce64d46600b2535bc7d36474f8ba382e2.zip
Qt-1245e7cce64d46600b2535bc7d36474f8ba382e2.tar.gz
Qt-1245e7cce64d46600b2535bc7d36474f8ba382e2.tar.bz2
Add SetAnchors.
SetAnchors allows setting and resetting anchors in a state change.
Diffstat (limited to 'src/declarative/util/qmlstateoperations.h')
-rw-r--r--src/declarative/util/qmlstateoperations.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/declarative/util/qmlstateoperations.h b/src/declarative/util/qmlstateoperations.h
index 67cd1cf..c4e1539 100644
--- a/src/declarative/util/qmlstateoperations.h
+++ b/src/declarative/util/qmlstateoperations.h
@@ -44,6 +44,7 @@
#include <QtDeclarative/qmlstate.h>
#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qfxanchors.h>
QT_BEGIN_HEADER
@@ -101,10 +102,58 @@ public:
virtual void execute();
};
+class QmlSetAnchorsPrivate;
+class Q_DECLARATIVE_EXPORT QmlSetAnchors : public QmlStateOperation, public ActionEvent
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlSetAnchors)
+
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QFxItem *target READ object WRITE setObject)
+ Q_PROPERTY(QString reset READ reset WRITE setReset)
+ Q_PROPERTY(QFxAnchorLine left READ left WRITE setLeft)
+ Q_PROPERTY(QFxAnchorLine right READ right WRITE setRight)
+ Q_PROPERTY(QFxAnchorLine top READ top WRITE setTop)
+ Q_PROPERTY(QFxAnchorLine bottom READ bottom WRITE setBottom)
+
+public:
+ QmlSetAnchors(QObject *parent=0);
+ ~QmlSetAnchors();
+
+ virtual ActionList actions();
+
+ QString name() const;
+ void setName(const QString &);
+
+ QFxItem *object() const;
+ void setObject(QFxItem *);
+
+ QString reset() const;
+ void setReset(const QString &);
+
+ QFxAnchorLine left() const;
+ void setLeft(const QFxAnchorLine &edge);
+
+ QFxAnchorLine right() const;
+ void setRight(const QFxAnchorLine &edge);
+
+ QFxAnchorLine top() const;
+ void setTop(const QFxAnchorLine &edge);
+
+ QFxAnchorLine bottom() const;
+ void setBottom(const QFxAnchorLine &edge);
+
+ virtual void execute();
+ virtual bool isReversable();
+ virtual void reverse();
+ virtual QString typeName() const;
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlParentChange)
QML_DECLARE_TYPE(QmlRunScript)
+QML_DECLARE_TYPE(QmlSetAnchors)
QT_END_HEADER