From 8eada7ae7d41a2d93142ea1a6454ab2bbb0998ed Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 30 Dec 2016 13:20:24 +0100 Subject: ListView: allow flicking to both directions Previously flicking was restricted to the orientation of the ListView. [ChangeLog][QtQuick][ListView] Made it possible to enable horizontal flicking in a vertical ListView, and vice versa. The only thing apps must do is to specify the desired flick direction and the content width (vertical ListView) or content height (horizontal ListView), which is not calculated by ListView. Change-Id: Ic370e57f5d18679940d48e7a2c20c200b2ef36d1 Task-number: QTBUG-52553 Task-number: QTBUG-56501 Reviewed-by: Robin Burchell Reviewed-by: Shawn Rutledge --- src/quick/items/qquicklistview_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items/qquicklistview_p.h') diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h index 3a871e88e9..dbed8dfed4 100644 --- a/src/quick/items/qquicklistview_p.h +++ b/src/quick/items/qquicklistview_p.h @@ -196,6 +196,8 @@ protected: void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; void geometryChanged(const QRectF &newGeometry,const QRectF &oldGeometry) Q_DECL_OVERRIDE; void initItem(int index, QObject *item) Q_DECL_OVERRIDE; + qreal maxYExtent() const Q_DECL_OVERRIDE; + qreal maxXExtent() const Q_DECL_OVERRIDE; }; class QQuickListViewAttached : public QQuickItemViewAttached -- cgit v1.2.3 From 7e7138517ed09363c98986e09ffd966548c27a88 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 17 Jan 2017 16:29:15 +0100 Subject: Item views: Q_DECL_OVERRIDE -> override Change-Id: I7dfbd5f47893a3244c96989ad7eea7e93ea28603 Reviewed-by: Robin Burchell Reviewed-by: Shawn Rutledge --- src/quick/items/qquicklistview_p.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/quick/items/qquicklistview_p.h') diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h index dbed8dfed4..f8db0f0f8f 100644 --- a/src/quick/items/qquicklistview_p.h +++ b/src/quick/items/qquicklistview_p.h @@ -146,7 +146,7 @@ public: QQuickViewSection *sectionCriteria(); QString currentSection() const; - void setHighlightFollowsCurrentItem(bool) Q_DECL_OVERRIDE; + void setHighlightFollowsCurrentItem(bool) override; qreal highlightMoveVelocity() const; void setHighlightMoveVelocity(qreal); @@ -157,7 +157,7 @@ public: int highlightResizeDuration() const; void setHighlightResizeDuration(int); - void setHighlightMoveDuration(int) Q_DECL_OVERRIDE; + void setHighlightMoveDuration(int) override; enum SnapMode { NoSnap, SnapToItem, SnapOneItem }; Q_ENUM(SnapMode) @@ -192,12 +192,12 @@ Q_SIGNALS: Q_REVISION(2) void footerPositioningChanged(); protected: - void viewportMoved(Qt::Orientations orient) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; - void geometryChanged(const QRectF &newGeometry,const QRectF &oldGeometry) Q_DECL_OVERRIDE; - void initItem(int index, QObject *item) Q_DECL_OVERRIDE; - qreal maxYExtent() const Q_DECL_OVERRIDE; - qreal maxXExtent() const Q_DECL_OVERRIDE; + void viewportMoved(Qt::Orientations orient) override; + void keyPressEvent(QKeyEvent *) override; + void geometryChanged(const QRectF &newGeometry,const QRectF &oldGeometry) override; + void initItem(int index, QObject *item) override; + qreal maxYExtent() const override; + qreal maxXExtent() const override; }; class QQuickListViewAttached : public QQuickItemViewAttached -- cgit v1.2.3