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 QTEDITORFACTORY_H |
5 | #define QTEDITORFACTORY_H |
6 | |
7 | #include "qtpropertymanager.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QRegularExpression; |
12 | |
13 | class QtSpinBoxFactoryPrivate; |
14 | |
15 | class QtSpinBoxFactory : public QtAbstractEditorFactory<QtIntPropertyManager> |
16 | { |
17 | Q_OBJECT |
18 | public: |
19 | QtSpinBoxFactory(QObject *parent = 0); |
20 | ~QtSpinBoxFactory(); |
21 | protected: |
22 | void connectPropertyManager(QtIntPropertyManager *manager) override; |
23 | QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property, |
24 | QWidget *parent) override; |
25 | void disconnectPropertyManager(QtIntPropertyManager *manager) override; |
26 | private: |
27 | QScopedPointer<QtSpinBoxFactoryPrivate> d_ptr; |
28 | Q_DECLARE_PRIVATE(QtSpinBoxFactory) |
29 | Q_DISABLE_COPY_MOVE(QtSpinBoxFactory) |
30 | }; |
31 | |
32 | class QtSliderFactoryPrivate; |
33 | |
34 | class QtSliderFactory : public QtAbstractEditorFactory<QtIntPropertyManager> |
35 | { |
36 | Q_OBJECT |
37 | public: |
38 | QtSliderFactory(QObject *parent = 0); |
39 | ~QtSliderFactory(); |
40 | protected: |
41 | void connectPropertyManager(QtIntPropertyManager *manager) override; |
42 | QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property, |
43 | QWidget *parent) override; |
44 | void disconnectPropertyManager(QtIntPropertyManager *manager) override; |
45 | private: |
46 | QScopedPointer<QtSliderFactoryPrivate> d_ptr; |
47 | Q_DECLARE_PRIVATE(QtSliderFactory) |
48 | Q_DISABLE_COPY_MOVE(QtSliderFactory) |
49 | }; |
50 | |
51 | class QtScrollBarFactoryPrivate; |
52 | |
53 | class QtScrollBarFactory : public QtAbstractEditorFactory<QtIntPropertyManager> |
54 | { |
55 | Q_OBJECT |
56 | public: |
57 | QtScrollBarFactory(QObject *parent = 0); |
58 | ~QtScrollBarFactory(); |
59 | protected: |
60 | void connectPropertyManager(QtIntPropertyManager *manager) override; |
61 | QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property, |
62 | QWidget *parent) override; |
63 | void disconnectPropertyManager(QtIntPropertyManager *manager) override; |
64 | private: |
65 | QScopedPointer<QtScrollBarFactoryPrivate> d_ptr; |
66 | Q_DECLARE_PRIVATE(QtScrollBarFactory) |
67 | Q_DISABLE_COPY_MOVE(QtScrollBarFactory) |
68 | }; |
69 | |
70 | class QtCheckBoxFactoryPrivate; |
71 | |
72 | class QtCheckBoxFactory : public QtAbstractEditorFactory<QtBoolPropertyManager> |
73 | { |
74 | Q_OBJECT |
75 | public: |
76 | QtCheckBoxFactory(QObject *parent = 0); |
77 | ~QtCheckBoxFactory(); |
78 | protected: |
79 | void connectPropertyManager(QtBoolPropertyManager *manager) override; |
80 | QWidget *createEditor(QtBoolPropertyManager *manager, QtProperty *property, |
81 | QWidget *parent) override; |
82 | void disconnectPropertyManager(QtBoolPropertyManager *manager) override; |
83 | private: |
84 | QScopedPointer<QtCheckBoxFactoryPrivate> d_ptr; |
85 | Q_DECLARE_PRIVATE(QtCheckBoxFactory) |
86 | Q_DISABLE_COPY_MOVE(QtCheckBoxFactory) |
87 | }; |
88 | |
89 | class QtDoubleSpinBoxFactoryPrivate; |
90 | |
91 | class QtDoubleSpinBoxFactory : public QtAbstractEditorFactory<QtDoublePropertyManager> |
92 | { |
93 | Q_OBJECT |
94 | public: |
95 | QtDoubleSpinBoxFactory(QObject *parent = 0); |
96 | ~QtDoubleSpinBoxFactory(); |
97 | protected: |
98 | void connectPropertyManager(QtDoublePropertyManager *manager) override; |
99 | QWidget *createEditor(QtDoublePropertyManager *manager, QtProperty *property, |
100 | QWidget *parent) override; |
101 | void disconnectPropertyManager(QtDoublePropertyManager *manager) override; |
102 | private: |
103 | QScopedPointer<QtDoubleSpinBoxFactoryPrivate> d_ptr; |
104 | Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) |
105 | Q_DISABLE_COPY_MOVE(QtDoubleSpinBoxFactory) |
106 | }; |
107 | |
108 | class QtLineEditFactoryPrivate; |
109 | |
110 | class QtLineEditFactory : public QtAbstractEditorFactory<QtStringPropertyManager> |
111 | { |
112 | Q_OBJECT |
113 | public: |
114 | QtLineEditFactory(QObject *parent = 0); |
115 | ~QtLineEditFactory(); |
116 | protected: |
117 | void connectPropertyManager(QtStringPropertyManager *manager) override; |
118 | QWidget *createEditor(QtStringPropertyManager *manager, QtProperty *property, |
119 | QWidget *parent) override; |
120 | void disconnectPropertyManager(QtStringPropertyManager *manager) override; |
121 | private: |
122 | QScopedPointer<QtLineEditFactoryPrivate> d_ptr; |
123 | Q_DECLARE_PRIVATE(QtLineEditFactory) |
124 | Q_DISABLE_COPY_MOVE(QtLineEditFactory) |
125 | }; |
126 | |
127 | class QtDateEditFactoryPrivate; |
128 | |
129 | class QtDateEditFactory : public QtAbstractEditorFactory<QtDatePropertyManager> |
130 | { |
131 | Q_OBJECT |
132 | public: |
133 | QtDateEditFactory(QObject *parent = 0); |
134 | ~QtDateEditFactory(); |
135 | protected: |
136 | void connectPropertyManager(QtDatePropertyManager *manager) override; |
137 | QWidget *createEditor(QtDatePropertyManager *manager, QtProperty *property, |
138 | QWidget *parent) override; |
139 | void disconnectPropertyManager(QtDatePropertyManager *manager) override; |
140 | private: |
141 | QScopedPointer<QtDateEditFactoryPrivate> d_ptr; |
142 | Q_DECLARE_PRIVATE(QtDateEditFactory) |
143 | Q_DISABLE_COPY_MOVE(QtDateEditFactory) |
144 | }; |
145 | |
146 | class QtTimeEditFactoryPrivate; |
147 | |
148 | class QtTimeEditFactory : public QtAbstractEditorFactory<QtTimePropertyManager> |
149 | { |
150 | Q_OBJECT |
151 | public: |
152 | QtTimeEditFactory(QObject *parent = 0); |
153 | ~QtTimeEditFactory(); |
154 | protected: |
155 | void connectPropertyManager(QtTimePropertyManager *manager) override; |
156 | QWidget *createEditor(QtTimePropertyManager *manager, QtProperty *property, |
157 | QWidget *parent) override; |
158 | void disconnectPropertyManager(QtTimePropertyManager *manager) override; |
159 | private: |
160 | QScopedPointer<QtTimeEditFactoryPrivate> d_ptr; |
161 | Q_DECLARE_PRIVATE(QtTimeEditFactory) |
162 | Q_DISABLE_COPY_MOVE(QtTimeEditFactory) |
163 | }; |
164 | |
165 | class QtDateTimeEditFactoryPrivate; |
166 | |
167 | class QtDateTimeEditFactory : public QtAbstractEditorFactory<QtDateTimePropertyManager> |
168 | { |
169 | Q_OBJECT |
170 | public: |
171 | QtDateTimeEditFactory(QObject *parent = 0); |
172 | ~QtDateTimeEditFactory(); |
173 | protected: |
174 | void connectPropertyManager(QtDateTimePropertyManager *manager) override; |
175 | QWidget *createEditor(QtDateTimePropertyManager *manager, QtProperty *property, |
176 | QWidget *parent) override; |
177 | void disconnectPropertyManager(QtDateTimePropertyManager *manager) override; |
178 | private: |
179 | QScopedPointer<QtDateTimeEditFactoryPrivate> d_ptr; |
180 | Q_DECLARE_PRIVATE(QtDateTimeEditFactory) |
181 | Q_DISABLE_COPY_MOVE(QtDateTimeEditFactory) |
182 | }; |
183 | |
184 | class QtKeySequenceEditorFactoryPrivate; |
185 | |
186 | class QtKeySequenceEditorFactory : public QtAbstractEditorFactory<QtKeySequencePropertyManager> |
187 | { |
188 | Q_OBJECT |
189 | public: |
190 | QtKeySequenceEditorFactory(QObject *parent = 0); |
191 | ~QtKeySequenceEditorFactory(); |
192 | protected: |
193 | void connectPropertyManager(QtKeySequencePropertyManager *manager) override; |
194 | QWidget *createEditor(QtKeySequencePropertyManager *manager, QtProperty *property, |
195 | QWidget *parent) override; |
196 | void disconnectPropertyManager(QtKeySequencePropertyManager *manager) override; |
197 | private: |
198 | QScopedPointer<QtKeySequenceEditorFactoryPrivate> d_ptr; |
199 | Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) |
200 | Q_DISABLE_COPY_MOVE(QtKeySequenceEditorFactory) |
201 | }; |
202 | |
203 | class QtCharEditorFactoryPrivate; |
204 | |
205 | class QtCharEditorFactory : public QtAbstractEditorFactory<QtCharPropertyManager> |
206 | { |
207 | Q_OBJECT |
208 | public: |
209 | QtCharEditorFactory(QObject *parent = 0); |
210 | ~QtCharEditorFactory(); |
211 | protected: |
212 | void connectPropertyManager(QtCharPropertyManager *manager) override; |
213 | QWidget *createEditor(QtCharPropertyManager *manager, QtProperty *property, |
214 | QWidget *parent) override; |
215 | void disconnectPropertyManager(QtCharPropertyManager *manager) override; |
216 | private: |
217 | QScopedPointer<QtCharEditorFactoryPrivate> d_ptr; |
218 | Q_DECLARE_PRIVATE(QtCharEditorFactory) |
219 | Q_DISABLE_COPY_MOVE(QtCharEditorFactory) |
220 | }; |
221 | |
222 | class QtEnumEditorFactoryPrivate; |
223 | |
224 | class QtEnumEditorFactory : public QtAbstractEditorFactory<QtEnumPropertyManager> |
225 | { |
226 | Q_OBJECT |
227 | public: |
228 | QtEnumEditorFactory(QObject *parent = 0); |
229 | ~QtEnumEditorFactory(); |
230 | protected: |
231 | void connectPropertyManager(QtEnumPropertyManager *manager) override; |
232 | QWidget *createEditor(QtEnumPropertyManager *manager, QtProperty *property, |
233 | QWidget *parent) override; |
234 | void disconnectPropertyManager(QtEnumPropertyManager *manager) override; |
235 | private: |
236 | QScopedPointer<QtEnumEditorFactoryPrivate> d_ptr; |
237 | Q_DECLARE_PRIVATE(QtEnumEditorFactory) |
238 | Q_DISABLE_COPY_MOVE(QtEnumEditorFactory) |
239 | }; |
240 | |
241 | class QtCursorEditorFactoryPrivate; |
242 | |
243 | class QtCursorEditorFactory : public QtAbstractEditorFactory<QtCursorPropertyManager> |
244 | { |
245 | Q_OBJECT |
246 | public: |
247 | QtCursorEditorFactory(QObject *parent = 0); |
248 | ~QtCursorEditorFactory(); |
249 | protected: |
250 | void connectPropertyManager(QtCursorPropertyManager *manager) override; |
251 | QWidget *createEditor(QtCursorPropertyManager *manager, QtProperty *property, |
252 | QWidget *parent) override; |
253 | void disconnectPropertyManager(QtCursorPropertyManager *manager) override; |
254 | private: |
255 | QScopedPointer<QtCursorEditorFactoryPrivate> d_ptr; |
256 | Q_DECLARE_PRIVATE(QtCursorEditorFactory) |
257 | Q_DISABLE_COPY_MOVE(QtCursorEditorFactory) |
258 | }; |
259 | |
260 | class QtColorEditorFactoryPrivate; |
261 | |
262 | class QtColorEditorFactory : public QtAbstractEditorFactory<QtColorPropertyManager> |
263 | { |
264 | Q_OBJECT |
265 | public: |
266 | QtColorEditorFactory(QObject *parent = 0); |
267 | ~QtColorEditorFactory(); |
268 | protected: |
269 | void connectPropertyManager(QtColorPropertyManager *manager) override; |
270 | QWidget *createEditor(QtColorPropertyManager *manager, QtProperty *property, |
271 | QWidget *parent) override; |
272 | void disconnectPropertyManager(QtColorPropertyManager *manager) override; |
273 | private: |
274 | QScopedPointer<QtColorEditorFactoryPrivate> d_ptr; |
275 | Q_DECLARE_PRIVATE(QtColorEditorFactory) |
276 | Q_DISABLE_COPY_MOVE(QtColorEditorFactory) |
277 | }; |
278 | |
279 | class QtFontEditorFactoryPrivate; |
280 | |
281 | class QtFontEditorFactory : public QtAbstractEditorFactory<QtFontPropertyManager> |
282 | { |
283 | Q_OBJECT |
284 | public: |
285 | QtFontEditorFactory(QObject *parent = 0); |
286 | ~QtFontEditorFactory(); |
287 | protected: |
288 | void connectPropertyManager(QtFontPropertyManager *manager) override; |
289 | QWidget *createEditor(QtFontPropertyManager *manager, QtProperty *property, |
290 | QWidget *parent) override; |
291 | void disconnectPropertyManager(QtFontPropertyManager *manager) override; |
292 | private: |
293 | QScopedPointer<QtFontEditorFactoryPrivate> d_ptr; |
294 | Q_DECLARE_PRIVATE(QtFontEditorFactory) |
295 | Q_DISABLE_COPY_MOVE(QtFontEditorFactory) |
296 | }; |
297 | |
298 | QT_END_NAMESPACE |
299 | |
300 | #endif |
301 | |