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
qquickswipeview_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 QQUICKSWIPEVIEW_P_H
5#define QQUICKSWIPEVIEW_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/qquickcontainer_p.h>
19
20QT_REQUIRE_CONFIG(quicktemplates2_container);
21
23
26
27class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeView : public QQuickContainer
28{
30 // 2.1 (Qt 5.8)
31 Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 1))
32 // 2.2 (Qt 5.9)
33 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION(2, 2))
34 // 2.3 (Qt 5.10)
35 Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
36 Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
37 QML_NAMED_ELEMENT(SwipeView)
40
41public:
42 explicit QQuickSwipeView(QQuickItem *parent = nullptr);
43
44 static QQuickSwipeViewAttached *qmlAttachedProperties(QObject *object);
45
46 // 2.1 (Qt 5.8)
47 bool isInteractive() const;
48 void setInteractive(bool interactive);
49
50 // 2.2 (Qt 5.9)
51 Qt::Orientation orientation() const;
52 void setOrientation(Qt::Orientation orientation);
53
54 // 2.3 (Qt 5.10)
55 bool isHorizontal() const;
56 bool isVertical() const;
57
59 // 2.1 (Qt 5.8)
60 Q_REVISION(2, 1) void interactiveChanged();
61 // 2.2 (Qt 5.9)
62 Q_REVISION(2, 2) void orientationChanged();
63
64protected:
65 void componentComplete() override;
66 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
67 void itemAdded(int index, QQuickItem *item) override;
68 void itemMoved(int index, QQuickItem *item) override;
69 void itemRemoved(int index, QQuickItem *item) override;
70
71#if QT_CONFIG(accessibility)
72 QAccessible::Role accessibleRole() const override;
73#endif
74
75private:
76 Q_DISABLE_COPY(QQuickSwipeView)
77 Q_DECLARE_PRIVATE(QQuickSwipeView)
78};
79
81
82class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeViewAttached : public QObject
83{
85 Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL)
86 Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL)
87 Q_PROPERTY(QQuickSwipeView *view READ view NOTIFY viewChanged FINAL)
88 // 2.1 (Qt 5.8)
89 Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION(2, 1))
90 Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION(2, 1))
91
92public:
93 explicit QQuickSwipeViewAttached(QObject *parent = nullptr);
94
95 int index() const;
96 bool isCurrentItem() const;
97 QQuickSwipeView *view() const;
98
99 // 2.1 (Qt 5.8)
100 bool isNextItem() const;
101 bool isPreviousItem() const;
102
104 void indexChanged();
105 void isCurrentItemChanged();
106 void viewChanged();
107 // 2.1 (Qt 5.8)
108 /*Q_REVISION(2, 1)*/ void isNextItemChanged();
109 /*Q_REVISION(2, 1)*/ void isPreviousItemChanged();
110
111private:
112 Q_DISABLE_COPY(QQuickSwipeViewAttached)
113 Q_DECLARE_PRIVATE(QQuickSwipeViewAttached)
114};
115
117
118#endif // QQUICKSWIPEVIEW_P_H
\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
Enables the user to navigate pages by swiping sideways.
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
Definition qcompare.h:63
GLuint index
[2]
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SIGNALS
#define explicit
QGraphicsItem * item
QQuickView * view
[0]