1 | // Copyright (C) 2016 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 QMENUBAR_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 <QtWidgets/private/qtwidgetsglobal_p.h> |
19 | #include "QtWidgets/qstyleoption.h" |
20 | #include <private/qmenu_p.h> // Mac needs what in this file! |
21 | #include <qpa/qplatformmenu.h> |
22 | |
23 | QT_REQUIRE_CONFIG(menubar); |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | class ; |
28 | class : public QWidgetPrivate |
29 | { |
30 | Q_DECLARE_PUBLIC(QMenuBar) |
31 | public: |
32 | () : itemsDirty(0), currentAction(nullptr), mouseDown(0), |
33 | closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0), |
34 | doChildEffects(false), platformMenuBar(nullptr) |
35 | { } |
36 | |
37 | () |
38 | { |
39 | delete platformMenuBar; |
40 | } |
41 | |
42 | void (); |
43 | QAction *(const int start, const int increment) const; |
44 | |
45 | //item calculations |
46 | uint : 1; |
47 | |
48 | QList<int> ; |
49 | mutable QList<QRect> ; |
50 | void (int max_width, int start) const; |
51 | QRect (QAction *) const; |
52 | void (); |
53 | |
54 | //selection |
55 | QPointer<QAction>; |
56 | uint : 1, : 1, ; |
57 | QAction *(QPoint p) const; |
58 | void (QAction *, bool =false, bool =false); |
59 | void (QAction *, bool); |
60 | |
61 | //active popup state |
62 | uint : 1; |
63 | QPointer<QMenu> ; |
64 | |
65 | //keyboard mode for keyboard navigation |
66 | void (); |
67 | void (bool); |
68 | uint : 1, : 1; |
69 | QPointer<QWidget> ; |
70 | |
71 | //firing of events |
72 | void (QAction *, QAction::ActionEvent); |
73 | |
74 | void (); |
75 | void (); |
76 | void (int); |
77 | void (); |
78 | |
79 | //extra widgets in the menubar |
80 | QPointer<QWidget> , ; |
81 | QMenuBarExtension *; |
82 | bool (QAction *action); |
83 | |
84 | //menu fading/scrolling effects |
85 | bool ; |
86 | |
87 | QRect (bool) const; |
88 | |
89 | // reparenting |
90 | void handleReparent(); |
91 | QList<QPointer<QWidget>> ; |
92 | |
93 | QList<QAction*> ; |
94 | //default action |
95 | QPointer<QAction> ; |
96 | |
97 | QBasicTimer ; |
98 | QPlatformMenuBar *; |
99 | QPlatformMenu *(const QAction *action); |
100 | QPlatformMenu *(const QAction *action); |
101 | void (const QAction *e, QPlatformMenu *); |
102 | |
103 | inline int (QAction *act) const { return q_func()->actions().indexOf(t: act); } |
104 | }; |
105 | |
106 | QT_END_NAMESPACE |
107 | |
108 | #endif // QMENUBAR_P_H |
109 | |