1 | // Copyright (C) 2020 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 QQUICKMENU_P_P_H |
5 | #define |
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 <QtCore/qlist.h> |
19 | #include <QtCore/qpointer.h> |
20 | |
21 | #include <QtGui/qpa/qplatformmenu.h> |
22 | |
23 | #include <QtQuickTemplates2/private/qquickmenu_p.h> |
24 | #include <QtQuickTemplates2/private/qquickpopup_p_p.h> |
25 | |
26 | QT_BEGIN_NAMESPACE |
27 | |
28 | class QQuickAction; |
29 | class QQmlComponent; |
30 | class QQmlObjectModel; |
31 | class ; |
32 | class ; |
33 | class ; |
34 | |
35 | class Q_QUICKTEMPLATES2_EXPORT : public QQuickPopupPrivate |
36 | { |
37 | public: |
38 | Q_DECLARE_PUBLIC(QQuickMenu) |
39 | |
40 | (); |
41 | |
42 | static QQuickMenuPrivate *(QQuickMenu *) |
43 | { |
44 | return menu->d_func(); |
45 | } |
46 | |
47 | void (); |
48 | |
49 | QPlatformMenu *nativeHandle(); |
50 | QPlatformMenu *maybeNativeHandle() const; |
51 | QQuickMenu *() const; |
52 | bool () const; |
53 | bool (); |
54 | void (); |
55 | void (); |
56 | void (); |
57 | static void (QQuickMenu *); |
58 | void (bool visible); |
59 | |
60 | QQuickItem *(int index) const; |
61 | void (int index, QQuickItem *item); |
62 | void maybeCreateAndInsertNativeItem(int index, QQuickItem *item); |
63 | void (int from, int to); |
64 | enum class { |
65 | , |
66 | |
67 | }; |
68 | void (int index, QQuickItem *item, |
69 | DestructionPolicy destructionPolicy = DestructionPolicy::DoNotDestroy); |
70 | void (int index); |
71 | void (); |
72 | |
73 | static void (QQuickMenu *); |
74 | |
75 | void () const; |
76 | |
77 | QQuickItem *(); |
78 | void (); |
79 | |
80 | QQuickItem *(QQuickMenu *); |
81 | QQuickItem *(QQuickAction *action); |
82 | |
83 | void (QQuickItem *item); |
84 | void (); |
85 | |
86 | void (QQuickItem *item, QQuickItem *child) override; |
87 | void (QQuickItem *item) override; |
88 | void (QQuickItem *item, QQuickItem *parent) override; |
89 | void (QQuickItem *item) override; |
90 | void (QQuickItem *, QQuickGeometryChange change, const QRectF &diff) override; |
91 | |
92 | QQuickPopupPositioner *() override; |
93 | bool () override; |
94 | bool () override; |
95 | bool (QQuickItem *item, const QPointF &point) const override; |
96 | bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp) override; |
97 | bool handleReleaseWithoutGrab(const QEventPoint &eventPoint) override; |
98 | |
99 | void (); |
100 | void (); |
101 | void (); |
102 | void (); |
103 | |
104 | QQuickMenu *() const; |
105 | void (QQuickMenu *parent); |
106 | void (); |
107 | |
108 | void (QKeyEvent *event); |
109 | |
110 | void (); |
111 | void (); |
112 | |
113 | void (int index, Qt::FocusReason reason); |
114 | bool (); |
115 | bool (); |
116 | |
117 | QQuickMenuItem *() const; |
118 | |
119 | static void (QQmlListProperty<QObject> *prop, QObject *obj); |
120 | static qsizetype (QQmlListProperty<QObject> *prop); |
121 | static QObject *(QQmlListProperty<QObject> *prop, qsizetype index); |
122 | static void (QQmlListProperty<QObject> *prop); |
123 | |
124 | QPalette () const override; |
125 | virtual QQuickPopup::PopupType () const override; |
126 | |
127 | bool = false; |
128 | bool = false; |
129 | int = 0; |
130 | int = -1; |
131 | qreal = 0; |
132 | qreal = 0; |
133 | QPointer<QQuickMenu> ; |
134 | QPointer<QQuickMenuItem> ; |
135 | QQuickItem * = nullptr; // TODO: cleanup |
136 | QList<QObject *> ; |
137 | QQmlObjectModel *; |
138 | QQmlComponent * = nullptr; |
139 | QString ; |
140 | QQuickIcon ; |
141 | |
142 | // For native menu support. |
143 | std::unique_ptr<QPlatformMenu> handle = nullptr; |
144 | QList<QQuickNativeMenuItem *> ; |
145 | QPointer<QQuickMenuBar> ; |
146 | qreal = 0; |
147 | }; |
148 | |
149 | QT_END_NAMESPACE |
150 | |
151 | #endif // QQUICKMENU_P_P_H |
152 | |