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 QQUICKMENUBAR_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 <QtQuickTemplates2/private/qquickcontainer_p.h> |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class ; |
23 | class ; |
24 | |
25 | class Q_QUICKTEMPLATES2_PRIVATE_EXPORT : public QQuickContainer |
26 | { |
27 | Q_OBJECT |
28 | Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) |
29 | Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL) |
30 | Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL) |
31 | QML_NAMED_ELEMENT(MenuBar) |
32 | QML_ADDED_IN_VERSION(2, 3) |
33 | |
34 | public: |
35 | explicit (QQuickItem *parent = nullptr); |
36 | |
37 | QQmlComponent *() const; |
38 | void (QQmlComponent *delegate); |
39 | |
40 | Q_INVOKABLE QQuickMenu *(int index) const; |
41 | Q_INVOKABLE void (QQuickMenu *); |
42 | Q_INVOKABLE void (int index, QQuickMenu *); |
43 | Q_INVOKABLE void (QQuickMenu *); |
44 | Q_INVOKABLE QQuickMenu *(int index); |
45 | |
46 | Q_SIGNALS: |
47 | void (); |
48 | void (); |
49 | |
50 | protected: |
51 | bool (QObject *object, QEvent *event) override; |
52 | void (QKeyEvent *event) override; |
53 | void (QKeyEvent *event) override; |
54 | void (QHoverEvent *event) override; |
55 | |
56 | bool (QQuickItem *item) const override; |
57 | void (QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) override; |
58 | void (int index, QQuickItem *item) override; |
59 | void (int index, QQuickItem *item) override; |
60 | void (int index, QQuickItem *item) override; |
61 | |
62 | QFont () const override; |
63 | |
64 | #if QT_CONFIG(accessibility) |
65 | QAccessible::Role () const override; |
66 | #endif |
67 | |
68 | private: |
69 | Q_DISABLE_COPY() |
70 | Q_DECLARE_PRIVATE(QQuickMenuBar) |
71 | }; |
72 | |
73 | QT_END_NAMESPACE |
74 | |
75 | QML_DECLARE_TYPE(QQuickMenuBar) |
76 | |
77 | #endif // QQUICKMENUBAR_P_H |
78 | |