qteditorfactory.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the Qt Solutions component.
7 **
8 ** $QT_BEGIN_LICENSE:BSD$
9 ** You may use this file under the terms of the BSD license as follows:
10 **
11 ** "Redistribution and use in source and binary forms, with or without
12 ** modification, are permitted provided that the following conditions are
13 ** met:
14 ** * Redistributions of source code must retain the above copyright
15 ** notice, this list of conditions and the following disclaimer.
16 ** * Redistributions in binary form must reproduce the above copyright
17 ** notice, this list of conditions and the following disclaimer in
18 ** the documentation and/or other materials provided with the
19 ** distribution.
20 ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
21 ** of its contributors may be used to endorse or promote products derived
22 ** from this software without specific prior written permission.
23 **
24 **
25 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
36 **
37 ** $QT_END_LICENSE$
38 **
39 ****************************************************************************/
40 
41 
42 #pragma once
43 
44 #include "qtpropertymanager.h"
45 
46 QT_BEGIN_NAMESPACE
47 
49 
51 {
52  Q_OBJECT
53 public:
54  QtSpinBoxFactory(QObject* parent = 0);
55  ~QtSpinBoxFactory() override;
56 protected:
57  void connectPropertyManager(QtIntPropertyManager* manager) override;
58  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
59  QWidget* parent) override;
60  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
61 private:
63  Q_DECLARE_PRIVATE(QtSpinBoxFactory)
64  Q_DISABLE_COPY(QtSpinBoxFactory)
65  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
66  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
67  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
68  Q_PRIVATE_SLOT(d_func(), void slotReadOnlyChanged(QtProperty*, bool))
69  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
70  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
71 };
72 
74 
76 {
77  Q_OBJECT
78 public:
79  QtSliderFactory(QObject* parent = 0);
80  ~QtSliderFactory() override;
81 protected:
82  void connectPropertyManager(QtIntPropertyManager* manager) override;
83  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
84  QWidget* parent) override;
85  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
86 private:
88  Q_DECLARE_PRIVATE(QtSliderFactory)
89  Q_DISABLE_COPY(QtSliderFactory)
90  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
91  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
92  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
93  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
94  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
95 };
96 
98 
100 {
101  Q_OBJECT
102 public:
103  QtScrollBarFactory(QObject* parent = 0);
104  ~QtScrollBarFactory() override;
105 protected:
106  void connectPropertyManager(QtIntPropertyManager* manager) override;
107  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
108  QWidget* parent) override;
109  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
110 private:
112  Q_DECLARE_PRIVATE(QtScrollBarFactory)
113  Q_DISABLE_COPY(QtScrollBarFactory)
114  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
115  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
116  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
117  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
118  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
119 };
120 
122 
124 {
125  Q_OBJECT
126 public:
127  QtCheckBoxFactory(QObject* parent = 0);
128  ~QtCheckBoxFactory() override;
129 protected:
130  void connectPropertyManager(QtBoolPropertyManager* manager) override;
131  QWidget* createEditor(QtBoolPropertyManager* manager, QtProperty* property,
132  QWidget* parent) override;
133  void disconnectPropertyManager(QtBoolPropertyManager* manager) override;
134 private:
136  Q_DECLARE_PRIVATE(QtCheckBoxFactory)
137  Q_DISABLE_COPY(QtCheckBoxFactory)
138  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, bool))
139  Q_PRIVATE_SLOT(d_func(), void slotTextVisibleChanged(QtProperty*, bool))
140  Q_PRIVATE_SLOT(d_func(), void slotSetValue(bool))
141  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
142 };
143 
145 
147 {
148  Q_OBJECT
149 public:
150  QtDoubleSpinBoxFactory(QObject* parent = 0);
151  ~QtDoubleSpinBoxFactory() override;
152 protected:
153  void connectPropertyManager(QtDoublePropertyManager* manager) override;
154  QWidget* createEditor(QtDoublePropertyManager* manager, QtProperty* property,
155  QWidget* parent) override;
156  void disconnectPropertyManager(QtDoublePropertyManager* manager) override;
157 private:
159  Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory)
160  Q_DISABLE_COPY(QtDoubleSpinBoxFactory)
161  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, double))
162  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, double, double))
163  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, double))
164  Q_PRIVATE_SLOT(d_func(), void slotDecimalsChanged(QtProperty*, int))
165  Q_PRIVATE_SLOT(d_func(), void slotReadOnlyChanged(QtProperty*, bool))
166  Q_PRIVATE_SLOT(d_func(), void slotSetValue(double))
167  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
168 };
169 
171 
173 {
174  Q_OBJECT
175 public:
176  QtLineEditFactory(QObject* parent = 0);
177  ~QtLineEditFactory() override;
178 protected:
179  void connectPropertyManager(QtStringPropertyManager* manager) override;
180  QWidget* createEditor(QtStringPropertyManager* manager, QtProperty* property,
181  QWidget* parent) override;
182  void disconnectPropertyManager(QtStringPropertyManager* manager) override;
183 private:
185  Q_DECLARE_PRIVATE(QtLineEditFactory)
186  Q_DISABLE_COPY(QtLineEditFactory)
187  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QString&))
188  Q_PRIVATE_SLOT(d_func(), void slotRegExpChanged(QtProperty*, const QRegExp&))
189  Q_PRIVATE_SLOT(d_func(), void slotEchoModeChanged(QtProperty*, int))
190  Q_PRIVATE_SLOT(d_func(), void slotReadOnlyChanged(QtProperty*, bool))
191  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString&))
192  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
193 };
194 
196 
198 {
199  Q_OBJECT
200 public:
201  QtDateEditFactory(QObject* parent = 0);
202  ~QtDateEditFactory() override;
203 protected:
204  void connectPropertyManager(QtDatePropertyManager* manager) override;
205  QWidget* createEditor(QtDatePropertyManager* manager, QtProperty* property,
206  QWidget* parent) override;
207  void disconnectPropertyManager(QtDatePropertyManager* manager) override;
208 private:
210  Q_DECLARE_PRIVATE(QtDateEditFactory)
211  Q_DISABLE_COPY(QtDateEditFactory)
212  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QDate&))
213  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*,
214  const QDate&, const QDate&))
215  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDate&))
216  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
217 };
218 
220 
222 {
223  Q_OBJECT
224 public:
225  QtTimeEditFactory(QObject* parent = 0);
226  ~QtTimeEditFactory() override;
227 protected:
228  void connectPropertyManager(QtTimePropertyManager* manager) override;
229  QWidget* createEditor(QtTimePropertyManager* manager, QtProperty* property,
230  QWidget* parent) override;
231  void disconnectPropertyManager(QtTimePropertyManager* manager) override;
232 private:
234  Q_DECLARE_PRIVATE(QtTimeEditFactory)
235  Q_DISABLE_COPY(QtTimeEditFactory)
236  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QTime&))
237  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QTime&))
238  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
239 };
240 
242 
244 {
245  Q_OBJECT
246 public:
247  QtDateTimeEditFactory(QObject* parent = 0);
248  ~QtDateTimeEditFactory() override;
249 protected:
250  void connectPropertyManager(QtDateTimePropertyManager* manager) override;
251  QWidget* createEditor(QtDateTimePropertyManager* manager, QtProperty* property,
252  QWidget* parent) override;
254 private:
256  Q_DECLARE_PRIVATE(QtDateTimeEditFactory)
257  Q_DISABLE_COPY(QtDateTimeEditFactory)
258  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QDateTime&))
259  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDateTime&))
260  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
261 };
262 
264 
266 {
267  Q_OBJECT
268 public:
269  QtKeySequenceEditorFactory(QObject* parent = 0);
270  ~QtKeySequenceEditorFactory() override;
271 protected:
273  QWidget* createEditor(QtKeySequencePropertyManager* manager, QtProperty* property,
274  QWidget* parent) override;
276 private:
278  Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory)
279  Q_DISABLE_COPY(QtKeySequenceEditorFactory)
280  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QKeySequence&))
281  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QKeySequence&))
282  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
283 };
284 
286 
288 {
289  Q_OBJECT
290 public:
291  QtCharEditorFactory(QObject* parent = 0);
292  ~QtCharEditorFactory() override;
293 protected:
294  void connectPropertyManager(QtCharPropertyManager* manager) override;
295  QWidget* createEditor(QtCharPropertyManager* manager, QtProperty* property,
296  QWidget* parent) override;
297  void disconnectPropertyManager(QtCharPropertyManager* manager) override;
298 private:
300  Q_DECLARE_PRIVATE(QtCharEditorFactory)
301  Q_DISABLE_COPY(QtCharEditorFactory)
302  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QChar&))
303  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QChar&))
304  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
305 };
306 
308 
310 {
311  Q_OBJECT
312 public:
313  QtEnumEditorFactory(QObject* parent = 0);
314  ~QtEnumEditorFactory() override;
315 protected:
316  void connectPropertyManager(QtEnumPropertyManager* manager) override;
317  QWidget* createEditor(QtEnumPropertyManager* manager, QtProperty* property,
318  QWidget* parent) override;
319  void disconnectPropertyManager(QtEnumPropertyManager* manager) override;
320 private:
322  Q_DECLARE_PRIVATE(QtEnumEditorFactory)
323  Q_DISABLE_COPY(QtEnumEditorFactory)
324  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
325  Q_PRIVATE_SLOT(d_func(), void slotEnumNamesChanged(QtProperty*,
326  const QStringList&))
327  Q_PRIVATE_SLOT(d_func(), void slotEnumIconsChanged(QtProperty*,
328  const QMap<int, QIcon>&))
329  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
330  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
331 };
332 
334 
336 {
337  Q_OBJECT
338 public:
339  QtCursorEditorFactory(QObject* parent = 0);
340  ~QtCursorEditorFactory() override;
341 protected:
342  void connectPropertyManager(QtCursorPropertyManager* manager) override;
343  QWidget* createEditor(QtCursorPropertyManager* manager, QtProperty* property,
344  QWidget* parent) override;
345  void disconnectPropertyManager(QtCursorPropertyManager* manager) override;
346 private:
348  Q_DECLARE_PRIVATE(QtCursorEditorFactory)
349  Q_DISABLE_COPY(QtCursorEditorFactory)
350  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QCursor&))
351  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty*, int))
352  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
353 };
354 
356 
358 {
359  Q_OBJECT
360 public:
361  QtColorEditorFactory(QObject* parent = 0);
362  ~QtColorEditorFactory() override;
363 protected:
364  void connectPropertyManager(QtColorPropertyManager* manager) override;
365  QWidget* createEditor(QtColorPropertyManager* manager, QtProperty* property,
366  QWidget* parent) override;
367  void disconnectPropertyManager(QtColorPropertyManager* manager) override;
368 private:
370  Q_DECLARE_PRIVATE(QtColorEditorFactory)
371  Q_DISABLE_COPY(QtColorEditorFactory)
372  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QColor&))
373  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
374  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QColor&))
375 };
376 
378 
380 {
381  Q_OBJECT
382 public:
383  QtFontEditorFactory(QObject* parent = 0);
384  ~QtFontEditorFactory() override;
385 protected:
386  void connectPropertyManager(QtFontPropertyManager* manager) override;
387  QWidget* createEditor(QtFontPropertyManager* manager, QtProperty* property,
388  QWidget* parent) override;
389  void disconnectPropertyManager(QtFontPropertyManager* manager) override;
390 private:
392  Q_DECLARE_PRIVATE(QtFontEditorFactory)
393  Q_DISABLE_COPY(QtFontEditorFactory)
394  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QFont&))
395  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
396  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont&))
397 };
398 
399 QT_END_NAMESPACE
400 
QtKeySequenceEditorFactoryPrivate
Definition: qteditorfactory.cpp:1762
QtAbstractEditorFactory::disconnectPropertyManager
virtual void disconnectPropertyManager(PropertyManager *manager)=0
QtCursorEditorFactoryPrivate
Definition: qteditorfactory.cpp:2425
QtSpinBoxFactoryPrivate
Definition: qteditorfactory.cpp:159
QtDoubleSpinBoxFactoryPrivate
Definition: qteditorfactory.cpp:871
QtIntPropertyManager
The QtIntPropertyManager provides and manages int properties.
Definition: qtpropertymanager.h:70
QtAbstractEditorFactory::createEditor
QWidget * createEditor(QtProperty *property, QWidget *parent) override
Definition: qtpropertybrowser.h:168
QtColorEditorFactory
The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManage...
Definition: qteditorfactory.h:357
QtLineEditFactoryPrivate
Definition: qteditorfactory.cpp:1122
QtDateTimeEditFactory
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition: qteditorfactory.h:243
QtCharEditorFactory
The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager...
Definition: qteditorfactory.h:287
QT_QTPROPERTYBROWSER_EXPORT
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:63
QtDateEditFactoryPrivate
Definition: qteditorfactory.cpp:1366
QtSliderFactoryPrivate
Definition: qteditorfactory.cpp:372
QtCursorEditorFactory
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition: qteditorfactory.h:335
QtStringPropertyManager
The QtStringPropertyManager provides and manages QString properties.
Definition: qtpropertymanager.h:176
QtDoubleSpinBoxFactory
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition: qteditorfactory.h:146
QtScrollBarFactoryPrivate
Definition: qteditorfactory.cpp:549
QtProperty
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:71
QtTimePropertyManager
The QtTimePropertyManager provides and manages QTime properties.
Definition: qtpropertymanager.h:244
QtColorEditorFactoryPrivate
Definition: qteditorfactory.cpp:2731
QtEnumEditorFactoryPrivate
Definition: qteditorfactory.cpp:2214
QtFontPropertyManager
The QtFontPropertyManager provides and manages QFont properties.
Definition: qtpropertymanager.h:670
QtDatePropertyManager
The QtDatePropertyManager provides and manages QDate properties.
Definition: qtpropertymanager.h:213
QtCharPropertyManager
The QtCharPropertyManager provides and manages QChar properties.
Definition: qtpropertymanager.h:319
QtScrollBarFactory
The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManag...
Definition: qteditorfactory.h:99
QtAbstractEditorFactory::connectPropertyManager
virtual void connectPropertyManager(PropertyManager *manager)=0
QtFontEditorFactory
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:379
QtSpinBoxFactory
The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager o...
Definition: qteditorfactory.h:50
QtDateEditFactory
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition: qteditorfactory.h:197
QtDoublePropertyManager
The QtDoublePropertyManager provides and manages double properties.
Definition: qtpropertymanager.h:136
QtAbstractEditorFactory
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:164
QtBoolPropertyManager
The QtBoolPropertyManager class provides and manages boolean properties.
Definition: qtpropertymanager.h:107
QtTimeEditFactoryPrivate
Definition: qteditorfactory.cpp:1520
QtLineEditFactory
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition: qteditorfactory.h:172
QtFontEditorFactoryPrivate
Definition: qteditorfactory.cpp:2995
QtDateTimePropertyManager
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:269
QtKeySequenceEditorFactory
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition: qteditorfactory.h:265
QtCursorPropertyManager
The QtCursorPropertyManager provides and manages QCursor properties.
Definition: qtpropertymanager.h:736
QtEnumPropertyManager
The QtEnumPropertyManager provides and manages enum properties.
Definition: qtpropertymanager.h:575
QtCheckBoxFactory
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition: qteditorfactory.h:123
QtKeySequencePropertyManager
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition: qtpropertymanager.h:294
QtTimeEditFactory
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition: qteditorfactory.h:221
QtDateTimeEditFactoryPrivate
Definition: qteditorfactory.cpp:1640
QtSliderFactory
The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager obj...
Definition: qteditorfactory.h:75
QtCheckBoxFactoryPrivate
Definition: qteditorfactory.cpp:723
QtEnumEditorFactory
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition: qteditorfactory.h:309
QtCharEditorFactoryPrivate
Definition: qteditorfactory.cpp:2092
qtpropertymanager.h
QtColorPropertyManager
The QtColorPropertyManager provides and manages QColor properties.
Definition: qtpropertymanager.h:706