1 | // Copyright (C) 2022 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 QQUICKLABSPLATFORMMENUBAR_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/qobject.h> |
19 | #include <QtQml/qqmlparserstatus.h> |
20 | #include <QtQml/qqmllist.h> |
21 | #include <QtQml/qqml.h> |
22 | #include <QtCore/private/qglobal_p.h> |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class QWindow; |
27 | class ; |
28 | class ; |
29 | |
30 | class : public QObject, public QQmlParserStatus |
31 | { |
32 | Q_OBJECT |
33 | QML_NAMED_ELEMENT(MenuBar) |
34 | Q_INTERFACES(QQmlParserStatus) |
35 | Q_PROPERTY(QQmlListProperty<QObject> data READ data FINAL) |
36 | Q_PROPERTY(QQmlListProperty<QQuickLabsPlatformMenu> menus READ menus NOTIFY menusChanged FINAL) |
37 | Q_PROPERTY(QWindow *window READ window WRITE setWindow NOTIFY windowChanged FINAL) |
38 | Q_CLASSINFO("DefaultProperty" , "data" ) |
39 | |
40 | public: |
41 | explicit (QObject *parent = nullptr); |
42 | (); |
43 | |
44 | QPlatformMenuBar *handle() const; |
45 | |
46 | QQmlListProperty<QObject> (); |
47 | QQmlListProperty<QQuickLabsPlatformMenu> (); |
48 | |
49 | QWindow *() const; |
50 | void (QWindow *window); |
51 | |
52 | Q_INVOKABLE void (QQuickLabsPlatformMenu *); |
53 | Q_INVOKABLE void (int index, QQuickLabsPlatformMenu *); |
54 | Q_INVOKABLE void (QQuickLabsPlatformMenu *); |
55 | Q_INVOKABLE void (); |
56 | |
57 | Q_SIGNALS: |
58 | void (); |
59 | void (); |
60 | |
61 | protected: |
62 | void () override; |
63 | void () override; |
64 | |
65 | QWindow *() const; |
66 | |
67 | static void (QQmlListProperty<QObject> *property, QObject *object); |
68 | static qsizetype (QQmlListProperty<QObject> *property); |
69 | static QObject *(QQmlListProperty<QObject> *property, qsizetype index); |
70 | static void (QQmlListProperty<QObject> *property); |
71 | |
72 | static void (QQmlListProperty<QQuickLabsPlatformMenu> *property, QQuickLabsPlatformMenu *); |
73 | static qsizetype (QQmlListProperty<QQuickLabsPlatformMenu> *property); |
74 | static QQuickLabsPlatformMenu *(QQmlListProperty<QQuickLabsPlatformMenu> *property, qsizetype index); |
75 | static void (QQmlListProperty<QQuickLabsPlatformMenu> *property); |
76 | |
77 | private: |
78 | bool ; |
79 | QWindow *; |
80 | QList<QObject *> ; |
81 | QList<QQuickLabsPlatformMenu *> ; |
82 | QPlatformMenuBar *m_handle; |
83 | }; |
84 | |
85 | QT_END_NAMESPACE |
86 | |
87 | #endif // QQUICKLABSPLATFORMMENUBAR_P_H |
88 | |