aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipe_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-11-04 10:49:42 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-11-06 10:17:22 +0000
commit430fe83ecb7106118cbebd735637aee9e9253914 (patch)
treec27f1c2a5ae6a2b740467375439d8eac021e06e0 /src/quicktemplates2/qquickswipe_p.h
parent6470a54ed34523822c50ac846a17a9f76564cf58 (diff)
Re-order all revisioned members and add explanatory comments
We've come to realize that even though it's tempting to group similar properties together, organizing the API so that revisions are grouped together makes future maintenance more pleasant. It's a lot easier to to see what was added and when. Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswipe_p.h')
-rw-r--r--src/quicktemplates2/qquickswipe_p.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/quicktemplates2/qquickswipe_p.h b/src/quicktemplates2/qquickswipe_p.h
index 62b0e903..20e38e90 100644
--- a/src/quicktemplates2/qquickswipe_p.h
+++ b/src/quicktemplates2/qquickswipe_p.h
@@ -64,13 +64,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipe : public QObject
Q_OBJECT
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)
+ // 2.2 (Qt 5.9)
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION 2
Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION 2
public:
@@ -82,9 +83,6 @@ public:
bool isComplete() const;
void setComplete(bool complete);
- bool isEnabled() const;
- void setEnabled(bool enabled);
-
QQmlComponent *left() const;
void setLeft(QQmlComponent *left);
@@ -103,25 +101,33 @@ public:
QQuickItem *rightItem() const;
void setRightItem(QQuickItem *item);
+ // 2.1 (Qt 5.8)
+ Q_REVISION(1) Q_INVOKABLE void close();
+
+ // 2.2 (Qt 5.9)
+ bool isEnabled() const;
+ void setEnabled(bool enabled);
+
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();
+ // 2.1 (Qt 5.8)
+ /*Q_REVISION(1)*/ void completed();
+ // 2.2 (Qt 5.9)
+ /*Q_REVISION(2)*/ void opened();
+ /*Q_REVISION(2)*/ void closed();
+ /*Q_REVISION(2)*/ void enabledChanged();
/*Q_REVISION(2)*/ void transitionChanged();
private: