aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipeview_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-04-10 15:19:11 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-10 18:25:28 +0000
commitcea175fca9e07d4b8bbb47508c49a8dac554797b (patch)
treeabc6bb31a43047be8a7bf84b6c0ddd4aa5674231 /src/quicktemplates2/qquickswipeview_p.h
parent26f0a9d599baa1093e8ed26111fea7407e6c3f09 (diff)
SwipeView: add contentWidth and contentHeight
[ChangeLog][Controls][SwipeView] Added contentWidth and contentHeight properties. Change-Id: I9c37583cb5fcfb1af2d98d5d3753277e17e82608 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswipeview_p.h')
-rw-r--r--src/quicktemplates2/qquickswipeview_p.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h
index 03f6cefa..f19ccce2 100644
--- a/src/quicktemplates2/qquickswipeview_p.h
+++ b/src/quicktemplates2/qquickswipeview_p.h
@@ -65,6 +65,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeView : public QQuickContainer
// 2.3 (Qt 5.10)
Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ // 2.5 (Qt 5.12)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION 5)
public:
explicit QQuickSwipeView(QQuickItem *parent = nullptr);
@@ -83,11 +86,23 @@ public:
bool isHorizontal() const;
bool isVertical() const;
+ // 2.5 (Qt 5.12)
+ qreal contentWidth() const;
+ void setContentWidth(qreal width);
+ void resetContentWidth();
+
+ qreal contentHeight() const;
+ void setContentHeight(qreal height);
+ void resetContentHeight();
+
Q_SIGNALS:
// 2.1 (Qt 5.8)
Q_REVISION(1) void interactiveChanged();
// 2.2 (Qt 5.9)
Q_REVISION(2) void orientationChanged();
+ // 2.5 (Qt 5.12)
+ Q_REVISION(5) void contentWidthChanged();
+ Q_REVISION(5) void contentHeightChanged();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;