diff options
Diffstat (limited to 'src/quicktemplates2/qquickscrollview_p.h')
-rw-r--r-- | src/quicktemplates2/qquickscrollview_p.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/quicktemplates2/qquickscrollview_p.h b/src/quicktemplates2/qquickscrollview_p.h index 136260c2..2b8d260e 100644 --- a/src/quicktemplates2/qquickscrollview_p.h +++ b/src/quicktemplates2/qquickscrollview_p.h @@ -48,39 +48,20 @@ // We mean it. // -#include <QtQuickTemplates2/private/qquickcontrol_p.h> +#include <QtQuickTemplates2/private/qquickpane_p.h> #include <QtQml/qqmllist.h> QT_BEGIN_NAMESPACE class QQuickScrollViewPrivate; -class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollView : public QQuickControl +class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollView : public QQuickPane { Q_OBJECT - Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL) - Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL) - Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL) - Q_PROPERTY(QQmlListProperty<QQuickItem> contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL) - Q_CLASSINFO("DefaultProperty", "contentData") public: explicit QQuickScrollView(QQuickItem *parent = nullptr); - qreal contentWidth() const; - void setContentWidth(qreal width); - - qreal contentHeight() const; - void setContentHeight(qreal height); - - QQmlListProperty<QObject> contentData(); - QQmlListProperty<QQuickItem> contentChildren(); - -Q_SIGNALS: - void contentWidthChanged(); - void contentHeightChanged(); - void contentChildrenChanged(); - protected: bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; bool eventFilter(QObject *object, QEvent *event) override; @@ -88,6 +69,7 @@ protected: void componentComplete() override; void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override; #if QT_CONFIG(accessibility) QAccessible::Role accessibleRole() const override; |