diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-22 17:13:03 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-25 14:36:49 +0000 |
commit | e33443d9b8de1917d8d3b85f185bbb75b78dc448 (patch) | |
tree | ea3c80200476d61dc5601564ab858eb4eb1683c6 /src/quicktemplates2/qquickswipe_p.h | |
parent | d705558a28e013aea904214deb8f35c708b61ac3 (diff) |
Add SwipeDelegate::swipe.open()
This allows nice tricks, such as opening the swipe on click to expose
more details for clicked delegates.
[ChangeLog][Controls][SwipeDelegate] Added swipe.open(side) method that
can be used to programmatically open the side item on the specified
side, which can be either SwipeDelegate.Left or SwipeDelegate.Right.
Change-Id: I64000e41ef62e04bf11a3819e03353c3ae4690cb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswipe_p.h')
-rw-r--r-- | src/quicktemplates2/qquickswipe_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickswipe_p.h b/src/quicktemplates2/qquickswipe_p.h index 76472c67..30f49eb5 100644 --- a/src/quicktemplates2/qquickswipe_p.h +++ b/src/quicktemplates2/qquickswipe_p.h @@ -50,12 +50,12 @@ #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 QQuickSwipePrivate; class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipe : public QObject @@ -101,6 +101,7 @@ public: QQuickItem *rightItem() const; void setRightItem(QQuickItem *item); + Q_REVISION(2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side); Q_REVISION(1) Q_INVOKABLE void close(); Q_SIGNALS: |