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 | #ifndef CONTAINERWIDGER_TASKMENU_H |
30 | #define |
31 | |
32 | #include <qdesigner_taskmenu_p.h> |
33 | #include <shared_enums_p.h> |
34 | |
35 | #include <extensionfactory_p.h> |
36 | |
37 | #include <QtCore/qpointer.h> |
38 | |
39 | QT_BEGIN_NAMESPACE |
40 | |
41 | class QDesignerFormWindowInterface; |
42 | class QDesignerFormEditorInterface; |
43 | class QDesignerContainerExtension; |
44 | class QAction; |
45 | class QMdiArea; |
46 | class ; |
47 | class QWizard; |
48 | |
49 | namespace qdesigner_internal { |
50 | |
51 | class ; |
52 | |
53 | // ContainerWidgetTaskMenu: Task menu for containers with extension |
54 | |
55 | class : public QDesignerTaskMenu |
56 | { |
57 | Q_OBJECT |
58 | public: |
59 | explicit (QWidget *widget, ContainerType type, QObject *parent = nullptr); |
60 | () override; |
61 | |
62 | QAction *() const override; |
63 | QList<QAction*> () const override; |
64 | |
65 | private slots: |
66 | void (); |
67 | void (); |
68 | void (); |
69 | |
70 | protected: |
71 | QDesignerContainerExtension *() const; |
72 | QList<QAction*> &() { return m_taskActions; } |
73 | int () const; |
74 | |
75 | private: |
76 | QDesignerFormWindowInterface *() const; |
77 | |
78 | private: |
79 | static QString (ContainerType ct, int index, int count); |
80 | bool canDeletePage() const; |
81 | |
82 | const ContainerType ; |
83 | QWidget *; |
84 | QDesignerFormEditorInterface *; |
85 | PromotionTaskMenu *; |
86 | QAction *; |
87 | QMenu *; |
88 | QList<QAction*> ; |
89 | QAction *; |
90 | QAction *; |
91 | QAction *; |
92 | }; |
93 | |
94 | // WizardContainerWidgetTaskMenu: Provide next/back since QWizard |
95 | // has modes in which the "Back" button is not visible. |
96 | |
97 | class : public ContainerWidgetTaskMenu { |
98 | Q_OBJECT |
99 | public: |
100 | explicit (QWizard *w, QObject *parent = nullptr); |
101 | |
102 | QList<QAction*> () const override; |
103 | |
104 | private: |
105 | QAction *; |
106 | QAction *; |
107 | }; |
108 | |
109 | |
110 | // MdiContainerWidgetTaskMenu: Provide tile/cascade for MDI containers in addition |
111 | |
112 | class : public ContainerWidgetTaskMenu { |
113 | Q_OBJECT |
114 | public: |
115 | explicit (QMdiArea *m, QObject *parent = nullptr); |
116 | |
117 | QList<QAction*> () const override; |
118 | private: |
119 | void (); |
120 | |
121 | QAction * = nullptr; |
122 | QAction * = nullptr; |
123 | QAction * = nullptr; |
124 | QAction * = nullptr; |
125 | }; |
126 | |
127 | class : public QExtensionFactory |
128 | { |
129 | Q_OBJECT |
130 | public: |
131 | explicit (QDesignerFormEditorInterface *core, QExtensionManager *extensionManager = nullptr); |
132 | |
133 | protected: |
134 | QObject *(QObject *object, const QString &iid, QObject *parent) const override; |
135 | |
136 | private: |
137 | QDesignerFormEditorInterface *; |
138 | }; |
139 | |
140 | } // namespace qdesigner_internal |
141 | |
142 | QT_END_NAMESPACE |
143 | |
144 | #endif // CONTAINERWIDGER_TASKMENU_H |
145 | |