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
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
4#ifndef QQUICKPAGEINDICATOR_P_H
5#define QQUICKPAGEINDICATOR_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 QQmlComponent;
24
25class Q_QUICKTEMPLATES2_EXPORT QQuickPageIndicator : public QQuickControl
26{
28 Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged FINAL)
29 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
30 Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL)
31 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
32 QML_NAMED_ELEMENT(PageIndicator)
34
35public:
36 explicit QQuickPageIndicator(QQuickItem *parent = nullptr);
37 ~QQuickPageIndicator() override;
38
39 int count() const;
40 void setCount(int count);
41
42 int currentIndex() const;
43 void setCurrentIndex(int index);
44
45 bool isInteractive() const;
46 void setInteractive(bool interactive);
47
48 QQmlComponent *delegate() const;
49 void setDelegate(QQmlComponent *delegate);
50
52 void countChanged();
53 void currentIndexChanged();
54 void interactiveChanged();
55 void delegateChanged();
56
57protected:
58 void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
59
60#if QT_CONFIG(quicktemplates2_multitouch)
61 void touchEvent(QTouchEvent *event) override;
62#endif
63
64#if QT_CONFIG(accessibility)
65 QAccessible::Role accessibleRole() const override;
66#endif
67
68private:
69 Q_DISABLE_COPY(QQuickPageIndicator)
70 Q_DECLARE_PRIVATE(QQuickPageIndicator)
71};
72
74
75#endif // QQUICKPAGEINDICATOR_P_H
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Indicates the currently active page.
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
Combined button and popup list for selecting options.
GLuint index
[2]
GLenum GLenum GLsizei count
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit