1 | // Copyright (C) 2017 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQUICKSCROLLVIEW_P_H |
5 | #define QQUICKSCROLLVIEW_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtQuickTemplates2/private/qquickpane_p.h> |
19 | #include <QtQml/qqmllist.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QQuickScrollViewPrivate; |
24 | |
25 | class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollView : public QQuickPane |
26 | { |
27 | Q_OBJECT |
28 | QML_NAMED_ELEMENT(ScrollView) |
29 | QML_ADDED_IN_VERSION(2, 2) |
30 | Q_PROPERTY(qreal effectiveScrollBarWidth READ effectiveScrollBarWidth NOTIFY effectiveScrollBarWidthChanged FINAL REVISION(6, 6)) |
31 | Q_PROPERTY(qreal effectiveScrollBarHeight READ effectiveScrollBarHeight NOTIFY effectiveScrollBarHeightChanged FINAL REVISION(6, 6)) |
32 | |
33 | public: |
34 | explicit QQuickScrollView(QQuickItem *parent = nullptr); |
35 | ~QQuickScrollView(); |
36 | qreal effectiveScrollBarWidth(); |
37 | qreal effectiveScrollBarHeight(); |
38 | |
39 | protected: |
40 | bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; |
41 | bool eventFilter(QObject *object, QEvent *event) override; |
42 | void keyPressEvent(QKeyEvent *event) override; |
43 | |
44 | void componentComplete() override; |
45 | void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; |
46 | void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override; |
47 | |
48 | #if QT_CONFIG(accessibility) |
49 | QAccessible::Role accessibleRole() const override; |
50 | #endif |
51 | |
52 | Q_SIGNALS: |
53 | Q_REVISION(6, 6) void effectiveScrollBarWidthChanged(); |
54 | Q_REVISION(6, 6) void effectiveScrollBarHeightChanged(); |
55 | |
56 | private: |
57 | Q_DISABLE_COPY(QQuickScrollView) |
58 | Q_DECLARE_PRIVATE(QQuickScrollView) |
59 | }; |
60 | |
61 | QT_END_NAMESPACE |
62 | |
63 | QML_DECLARE_TYPE(QQuickScrollView) |
64 | |
65 | #endif // QQUICKSCROLLVIEW_P_H |
66 | |