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

source code of qttools/src/shared/qtpropertybrowser/qteditorfactory.h