Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickpageindicator_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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPAGEINDICATOR_P_H
6#define QQUICKPAGEINDICATOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickcontrol_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQmlComponent;
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickPageIndicator : public QQuickControl
27{
28 Q_OBJECT
29 Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged FINAL)
30 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
31 Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL)
32 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
33 QML_NAMED_ELEMENT(PageIndicator)
34 QML_ADDED_IN_VERSION(2, 0)
35
36public:
37 explicit QQuickPageIndicator(QQuickItem *parent = nullptr);
38 ~QQuickPageIndicator() override;
39
40 int count() const;
41 void setCount(int count);
42
43 int currentIndex() const;
44 void setCurrentIndex(int index);
45
46 bool isInteractive() const;
47 void setInteractive(bool interactive);
48
49 QQmlComponent *delegate() const;
50 void setDelegate(QQmlComponent *delegate);
51
52Q_SIGNALS:
53 void countChanged();
54 void currentIndexChanged();
55 void interactiveChanged();
56 void delegateChanged();
57
58protected:
59 void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
60
61#if QT_CONFIG(quicktemplates2_multitouch)
62 void touchEvent(QTouchEvent *event) override;
63#endif
64
65#if QT_CONFIG(accessibility)
66 QAccessible::Role accessibleRole() const override;
67#endif
68
69private:
70 Q_DISABLE_COPY(QQuickPageIndicator)
71 Q_DECLARE_PRIVATE(QQuickPageIndicator)
72};
73
74QT_END_NAMESPACE
75
76#endif // QQUICKPAGEINDICATOR_P_H
Indicates the currently active page.
void updatePressed(bool pressed, const QPointF &pos=QPointF())
bool handleRelease(const QPointF &point, ulong timestamp) override
bool handleMove(const QPointF &point, ulong timestamp) override
void setContextProperty(QQuickItem *item, const QString &name, const QVariant &value)
QQuickItem * itemAt(const QPointF &pos) const
void itemChildAdded(QQuickItem *, QQuickItem *child) override