Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickscrollindicator_p.h
Go to the documentation of this file.
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 QQUICKSCROLLINDICATOR_P_H
5#define QQUICKSCROLLINDICATOR_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/qquickcontrol_p.h>
19
21
22class QQuickFlickable;
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickScrollIndicator : public QQuickControl
27{
29 Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL)
30 Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
31 Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
32 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
33 // 2.3 (Qt 5.10)
34 Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
35 Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
36 // 2.4 (Qt 5.11)
37 Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
38 Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
39 Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
40 QML_NAMED_ELEMENT(ScrollIndicator)
43
44public:
45 explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
46
47 static QQuickScrollIndicatorAttached *qmlAttachedProperties(QObject *object);
48
49 qreal size() const;
50 qreal position() const;
51
52 bool isActive() const;
53 void setActive(bool active);
54
55 Qt::Orientation orientation() const;
56 void setOrientation(Qt::Orientation orientation);
57
58 // 2.3 (Qt 5.10)
59 bool isHorizontal() const;
60 bool isVertical() const;
61
62 // 2.4 (Qt 5.11)
63 qreal minimumSize() const;
64 void setMinimumSize(qreal minimumSize);
65
66 qreal visualSize() const;
67 qreal visualPosition() const;
68
69public Q_SLOTS:
70 void setSize(qreal size);
72
74 void sizeChanged();
75 void positionChanged();
76 void activeChanged();
77 void orientationChanged();
78 // 2.4 (Qt 5.11)
79 Q_REVISION(2, 4) void minimumSizeChanged();
80 Q_REVISION(2, 4) void visualSizeChanged();
81 Q_REVISION(2, 4) void visualPositionChanged();
82
83protected:
84#if QT_CONFIG(quicktemplates2_multitouch)
85 void touchEvent(QTouchEvent *event) override;
86#endif
87
88#if QT_CONFIG(accessibility)
89 QAccessible::Role accessibleRole() const override;
90#endif
91
92private:
93 Q_DISABLE_COPY(QQuickScrollIndicator)
94 Q_DECLARE_PRIVATE(QQuickScrollIndicator)
95};
96
98
99class Q_QUICKTEMPLATES2_EXPORT QQuickScrollIndicatorAttached : public QObject
100{
102 Q_PROPERTY(QQuickScrollIndicator *horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged FINAL)
103 Q_PROPERTY(QQuickScrollIndicator *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL)
104
105public:
108
109 QQuickScrollIndicator *horizontal() const;
110 void setHorizontal(QQuickScrollIndicator *horizontal);
111
112 QQuickScrollIndicator *vertical() const;
113 void setVertical(QQuickScrollIndicator *vertical);
114
116 void horizontalChanged();
117 void verticalChanged();
118
119private:
120 Q_DISABLE_COPY(QQuickScrollIndicatorAttached)
121 Q_DECLARE_PRIVATE(QQuickScrollIndicatorAttached)
122};
123
125
126#endif // QQUICKSCROLLINDICATOR_P_H
bool isActive
\inmodule QtCore
Definition qobject.h:103
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
Combined button and popup list for selecting options.
Definition qcompare.h:63
n void setPosition(void) \n\
GLenum GLuint GLintptr GLsizeiptr size
[1]
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit