1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 The Qt Company Ltd. |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the Qt Designer of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
21 | ** included in the packaging of this file. Please review the following |
22 | ** information to ensure the GNU General Public License requirements will |
23 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
24 | ** |
25 | ** $QT_END_LICENSE$ |
26 | ** |
27 | ****************************************************************************/ |
28 | |
29 | // |
30 | // W A R N I N G |
31 | // ------------- |
32 | // |
33 | // This file is not part of the Qt API. It exists for the convenience |
34 | // of Qt Designer. This header |
35 | // file may change from version to version without notice, or even be removed. |
36 | // |
37 | // We mean it. |
38 | // |
39 | |
40 | #ifndef QDESIGNER_MENUBAR_H |
41 | #define |
42 | |
43 | #include "shared_global_p.h" |
44 | |
45 | #include <QtWidgets/qaction.h> |
46 | #include <QtWidgets/qmenubar.h> |
47 | |
48 | #include <QtCore/qpointer.h> |
49 | #include <QtCore/qmimedata.h> |
50 | |
51 | QT_BEGIN_NAMESPACE |
52 | |
53 | class QDesignerFormWindowInterface; |
54 | class QDesignerActionProviderExtension; |
55 | |
56 | class QLineEdit; |
57 | class QMimeData; |
58 | |
59 | namespace qdesigner_internal { |
60 | class ; |
61 | |
62 | class : public QAction |
63 | { |
64 | Q_OBJECT |
65 | public: |
66 | (QObject *parent = nullptr); |
67 | () override; |
68 | }; |
69 | |
70 | } // namespace qdesigner_internal |
71 | |
72 | class QDESIGNER_SHARED_EXPORT : public QMenuBar |
73 | { |
74 | Q_OBJECT |
75 | public: |
76 | (QWidget *parent = nullptr); |
77 | () override; |
78 | |
79 | bool (QObject *object, QEvent *event) override; |
80 | |
81 | QDesignerFormWindowInterface *() const; |
82 | QDesignerActionProviderExtension *(); |
83 | |
84 | void (); |
85 | bool () const; |
86 | |
87 | void (bool ctrl = false); |
88 | void (bool ctrl = false); |
89 | void (); |
90 | void (); |
91 | |
92 | // Helpers for MenuTaskMenu/MenuBarTaskMenu extensions |
93 | QList<QAction *> (); |
94 | void (QAction *action); |
95 | |
96 | private slots: |
97 | void (); |
98 | void (); |
99 | |
100 | protected: |
101 | void (QActionEvent *event) override; |
102 | void (QDragEnterEvent *event) override; |
103 | void (QDragMoveEvent *event) override; |
104 | void (QDragLeaveEvent *event) override; |
105 | void (QDropEvent *event) override; |
106 | void (QPaintEvent *event) override; |
107 | void (QFocusEvent *event) override; |
108 | void (QKeyEvent *event) override; |
109 | void (QKeyEvent *event) override; |
110 | |
111 | bool handleEvent(QWidget *widget, QEvent *event); |
112 | bool handleMouseDoubleClickEvent(QWidget *widget, QMouseEvent *event); |
113 | bool handleMousePressEvent(QWidget *widget, QMouseEvent *event); |
114 | bool handleMouseReleaseEvent(QWidget *widget, QMouseEvent *event); |
115 | bool handleMouseMoveEvent(QWidget *widget, QMouseEvent *event); |
116 | bool handleContextMenuEvent(QWidget *widget, QContextMenuEvent *event); |
117 | bool handleKeyPressEvent(QWidget *widget, QKeyEvent *event); |
118 | |
119 | void (const QPoint &pos); |
120 | |
121 | enum { , , }; |
122 | ActionDragCheck (QAction *action) const; |
123 | |
124 | void (const QPoint &pos); |
125 | int (const QPoint &pos) const; |
126 | |
127 | QAction *() const; |
128 | int () const; |
129 | |
130 | enum { |
131 | = 0, |
132 | |
133 | }; |
134 | |
135 | void (); |
136 | void (LeaveEditMode mode); |
137 | void (); |
138 | |
139 | void (int index = -1); |
140 | void (int index = -1); |
141 | |
142 | QAction *(int index) const; |
143 | |
144 | bool (int a, int b); |
145 | |
146 | private: |
147 | void (bool selectAction); |
148 | void (bool ctrl); |
149 | void (bool ctrl); |
150 | |
151 | QAction *; |
152 | QPointer<QMenu> ; |
153 | QPoint ; |
154 | int = 0; |
155 | QLineEdit *; |
156 | bool = false; |
157 | int = -1; |
158 | QPointer<QWidget> ; |
159 | qdesigner_internal::PromotionTaskMenu* ; |
160 | }; |
161 | |
162 | QT_END_NAMESPACE |
163 | |
164 | #endif // QDESIGNER_MENUBAR_H |
165 | |