aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipedelegate_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-22 17:13:03 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-25 14:36:49 +0000
commite33443d9b8de1917d8d3b85f185bbb75b78dc448 (patch)
treeea3c80200476d61dc5601564ab858eb4eb1683c6 /src/quicktemplates2/qquickswipedelegate_p.h
parentd705558a28e013aea904214deb8f35c708b61ac3 (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/qquickswipedelegate_p.h')
-rw-r--r--src/quicktemplates2/qquickswipedelegate_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickswipedelegate_p.h b/src/quicktemplates2/qquickswipedelegate_p.h
index 16aa9837..5bb6f4c0 100644
--- a/src/quicktemplates2/qquickswipedelegate_p.h
+++ b/src/quicktemplates2/qquickswipedelegate_p.h
@@ -67,6 +67,9 @@ public:
QQuickSwipe *swipe() const;
+ enum Side { Left = 1, Right = -1 };
+ Q_ENUM(Side)
+
static QQuickSwipeDelegateAttached *qmlAttachedProperties(QObject *object);
protected:
@@ -112,5 +115,6 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickSwipeDelegate)
QML_DECLARE_TYPEINFO(QQuickSwipeDelegate, QML_HAS_ATTACHED_PROPERTIES)
+Q_DECLARE_METATYPE(QQuickSwipeDelegate::Side)
#endif // QQUICKSWIPEDELEGATE_P_H