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