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 QQUICKMENUITEM_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/qquickabstractbutton_p.h> |
19 | #include <QtQmlModels/private/qtqmlmodelsglobal_p.h> |
20 | |
21 | QT_REQUIRE_CONFIG(qml_object_model); |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class ; |
26 | class ; |
27 | |
28 | class Q_QUICKTEMPLATES2_EXPORT : public QQuickAbstractButton |
29 | { |
30 | Q_OBJECT |
31 | Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL) |
32 | // 2.3 (Qt 5.10) |
33 | Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION(2, 3)) |
34 | Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION(2, 3)) |
35 | Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION(2, 3)) |
36 | Q_PROPERTY(qreal implicitTextPadding READ implicitTextPadding WRITE setImplicitTextPadding NOTIFY implicitTextPaddingChanged REVISION(6, 8)) |
37 | Q_PROPERTY(qreal textPadding READ textPadding NOTIFY textPaddingChanged REVISION(6, 8)) |
38 | Q_CLASSINFO("DeferredPropertyNames" , "arrow,background,contentItem,indicator" ) |
39 | QML_NAMED_ELEMENT(MenuItem) |
40 | QML_ADDED_IN_VERSION(2, 0) |
41 | |
42 | public: |
43 | explicit (QQuickItem *parent = nullptr); |
44 | |
45 | bool () const; |
46 | void (bool highlighted); |
47 | |
48 | // 2.3 (Qt 5.10) |
49 | QQuickItem *() const; |
50 | void (QQuickItem *arrow); |
51 | |
52 | QQuickMenu *() const; |
53 | QQuickMenu *() const; |
54 | |
55 | qreal () const; |
56 | qreal () const; |
57 | void (qreal newImplicitTextPadding); |
58 | |
59 | Q_SIGNALS: |
60 | void (); |
61 | void (); |
62 | // 2.3 (Qt 5.10) |
63 | Q_REVISION(2, 3) void (); |
64 | Q_REVISION(2, 3) void (); |
65 | Q_REVISION(2, 3) void (); |
66 | Q_REVISION(6, 8) void (); |
67 | Q_REVISION(6, 8) void (); |
68 | |
69 | protected: |
70 | void () override; |
71 | |
72 | QFont () const override; |
73 | |
74 | #if QT_CONFIG(accessibility) |
75 | QAccessible::Role () const override; |
76 | #endif |
77 | |
78 | private: |
79 | Q_DISABLE_COPY() |
80 | Q_DECLARE_PRIVATE(QQuickMenuItem) |
81 | }; |
82 | |
83 | #ifndef QT_NO_DEBUG_STREAM |
84 | Q_QUICKTEMPLATES2_EXPORT QDebug (QDebug debug, const QQuickMenuItem *); |
85 | #endif |
86 | |
87 | QT_END_NAMESPACE |
88 | |
89 | #endif // QQUICKMENUITEM_P_H |
90 | |