diff options
Diffstat (limited to 'src/quicktemplates2/qquickswipe_p.h')
-rw-r--r-- | src/quicktemplates2/qquickswipe_p.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickswipe_p.h b/src/quicktemplates2/qquickswipe_p.h index ea2ec3c5..62b0e903 100644 --- a/src/quicktemplates2/qquickswipe_p.h +++ b/src/quicktemplates2/qquickswipe_p.h @@ -50,25 +50,28 @@ #include <QtCore/qobject.h> #include <QtQuickTemplates2/private/qtquicktemplates2global_p.h> +#include <QtQuickTemplates2/private/qquickswipedelegate_p.h> QT_BEGIN_NAMESPACE class QQmlComponent; class QQuickItem; -class QQuickSwipeDelegate; +class QQuickTransition; class QQuickSwipePrivate; class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipe : public QObject { Q_OBJECT - Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) Q_PROPERTY(bool complete READ isComplete NOTIFY completeChanged FINAL) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION 2 Q_PROPERTY(QQmlComponent *left READ left WRITE setLeft NOTIFY leftChanged FINAL) Q_PROPERTY(QQmlComponent *behind READ behind WRITE setBehind NOTIFY behindChanged FINAL) Q_PROPERTY(QQmlComponent *right READ right WRITE setRight NOTIFY rightChanged FINAL) Q_PROPERTY(QQuickItem *leftItem READ leftItem NOTIFY leftItemChanged FINAL) Q_PROPERTY(QQuickItem *behindItem READ behindItem NOTIFY behindItemChanged FINAL) Q_PROPERTY(QQuickItem *rightItem READ rightItem NOTIFY rightItemChanged FINAL) + Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION 2 public: explicit QQuickSwipe(QQuickSwipeDelegate *control); @@ -79,6 +82,9 @@ public: bool isComplete() const; void setComplete(bool complete); + bool isEnabled() const; + void setEnabled(bool enabled); + QQmlComponent *left() const; void setLeft(QQmlComponent *left); @@ -97,18 +103,26 @@ public: QQuickItem *rightItem() const; void setRightItem(QQuickItem *item); + QQuickTransition *transition() const; + void setTransition(QQuickTransition *transition); + + Q_REVISION(2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side); Q_REVISION(1) Q_INVOKABLE void close(); Q_SIGNALS: void positionChanged(); void completeChanged(); + /*Q_REVISION(2)*/ void enabledChanged(); /*Q_REVISION(1)*/ void completed(); + /*Q_REVISION(2)*/ void opened(); + /*Q_REVISION(2)*/ void closed(); void leftChanged(); void behindChanged(); void rightChanged(); void leftItemChanged(); void behindItemChanged(); void rightItemChanged(); + /*Q_REVISION(2)*/ void transitionChanged(); private: Q_DISABLE_COPY(QQuickSwipe) |