itom  4.1.0
qteditorfactory.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 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 #ifndef QTEDITORFACTORY_H
43 #define QTEDITORFACTORY_H
44 
45 #include "qtpropertymanager.h"
46 
47 #include "../commonWidgets.h"
48 
49 #if QT_VERSION >= 0x040400
50 QT_BEGIN_NAMESPACE
51 #endif
52 
54 
55 class ITOMWIDGETS_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
56 {
57  Q_OBJECT
58 public:
59  QtSpinBoxFactory(QObject *parent = 0);
61 protected:
63  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
64  QWidget *parent);
66 private:
68  Q_DECLARE_PRIVATE(QtSpinBoxFactory)
69  Q_DISABLE_COPY(QtSpinBoxFactory)
70  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
71  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
72  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
73  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
74  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
75 };
76 
78 
79 class ITOMWIDGETS_EXPORT QtSliderFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
80 {
81  Q_OBJECT
82 public:
83  QtSliderFactory(QObject *parent = 0);
84  ~QtSliderFactory();
85 protected:
87  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
88  QWidget *parent);
90 private:
92  Q_DECLARE_PRIVATE(QtSliderFactory)
93  Q_DISABLE_COPY(QtSliderFactory)
94  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
95  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
96  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
97  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
98  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
99 };
100 
102 
103 class ITOMWIDGETS_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
104 {
105  Q_OBJECT
106 public:
107  QtScrollBarFactory(QObject *parent = 0);
109 protected:
111  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
112  QWidget *parent);
114 private:
116  Q_DECLARE_PRIVATE(QtScrollBarFactory)
117  Q_DISABLE_COPY(QtScrollBarFactory)
118  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
119  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
120  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
121  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
122  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
123 };
124 
126 
127 class ITOMWIDGETS_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory<QtBoolPropertyManager>
128 {
129  Q_OBJECT
130 public:
131  QtCheckBoxFactory(QObject *parent = 0);
133 protected:
135  QWidget *createEditor(QtBoolPropertyManager *manager, QtProperty *property,
136  QWidget *parent);
138 private:
140  Q_DECLARE_PRIVATE(QtCheckBoxFactory)
141  Q_DISABLE_COPY(QtCheckBoxFactory)
142  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool))
143  Q_PRIVATE_SLOT(d_func(), void slotSetValue(bool))
144  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
145 };
146 
148 
149 class ITOMWIDGETS_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory<QtDoublePropertyManager>
150 {
151  Q_OBJECT
152 public:
153  QtDoubleSpinBoxFactory(QObject *parent = 0);
155 protected:
157  QWidget *createEditor(QtDoublePropertyManager *manager, QtProperty *property,
158  QWidget *parent);
160 private:
162  Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory)
163  Q_DISABLE_COPY(QtDoubleSpinBoxFactory)
164  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double))
165  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, double, double))
166  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, double))
167  Q_PRIVATE_SLOT(d_func(), void slotDecimalsChanged(QtProperty *, int))
168  Q_PRIVATE_SLOT(d_func(), void slotSetValue(double))
169  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
170 };
171 
173 
174 class ITOMWIDGETS_EXPORT QtLineEditFactory : public QtAbstractEditorFactory<QtStringPropertyManager>
175 {
176  Q_OBJECT
177 public:
178  QtLineEditFactory(QObject *parent = 0);
180 protected:
182  QWidget *createEditor(QtStringPropertyManager *manager, QtProperty *property,
183  QWidget *parent);
185 private:
187  Q_DECLARE_PRIVATE(QtLineEditFactory)
188  Q_DISABLE_COPY(QtLineEditFactory)
189  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &))
190  Q_PRIVATE_SLOT(d_func(), void slotRegExpChanged(QtProperty *, const QRegExp &))
191  Q_PRIVATE_SLOT(d_func(), void slotEchoModeChanged(QtProperty *, int))
192  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &))
193  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
194 };
195 
197 
198 class ITOMWIDGETS_EXPORT QtDateEditFactory : public QtAbstractEditorFactory<QtDatePropertyManager>
199 {
200  Q_OBJECT
201 public:
202  QtDateEditFactory(QObject *parent = 0);
204 protected:
206  QWidget *createEditor(QtDatePropertyManager *manager, QtProperty *property,
207  QWidget *parent);
209 private:
211  Q_DECLARE_PRIVATE(QtDateEditFactory)
212  Q_DISABLE_COPY(QtDateEditFactory)
213  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &))
214  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *,
215  const QDate &, const QDate &))
216  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDate &))
217  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
218 };
219 
221 
222 class ITOMWIDGETS_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory<QtTimePropertyManager>
223 {
224  Q_OBJECT
225 public:
226  QtTimeEditFactory(QObject *parent = 0);
228 protected:
230  QWidget *createEditor(QtTimePropertyManager *manager, QtProperty *property,
231  QWidget *parent);
233 private:
235  Q_DECLARE_PRIVATE(QtTimeEditFactory)
236  Q_DISABLE_COPY(QtTimeEditFactory)
237  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &))
238  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QTime &))
239  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
240 };
241 
243 
244 class ITOMWIDGETS_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory<QtDateTimePropertyManager>
245 {
246  Q_OBJECT
247 public:
248  QtDateTimeEditFactory(QObject *parent = 0);
250 protected:
252  QWidget *createEditor(QtDateTimePropertyManager *manager, QtProperty *property,
253  QWidget *parent);
255 private:
257  Q_DECLARE_PRIVATE(QtDateTimeEditFactory)
258  Q_DISABLE_COPY(QtDateTimeEditFactory)
259  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &))
260  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDateTime &))
261  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
262 };
263 
265 
266 class ITOMWIDGETS_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory<QtKeySequencePropertyManager>
267 {
268  Q_OBJECT
269 public:
270  QtKeySequenceEditorFactory(QObject *parent = 0);
272 protected:
274  QWidget *createEditor(QtKeySequencePropertyManager *manager, QtProperty *property,
275  QWidget *parent);
277 private:
279  Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory)
280  Q_DISABLE_COPY(QtKeySequenceEditorFactory)
281  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &))
282  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QKeySequence &))
283  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
284 };
285 
287 
288 class ITOMWIDGETS_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory<QtCharPropertyManager>
289 {
290  Q_OBJECT
291 public:
292  QtCharEditorFactory(QObject *parent = 0);
294 protected:
296  QWidget *createEditor(QtCharPropertyManager *manager, QtProperty *property,
297  QWidget *parent);
299 private:
301  Q_DECLARE_PRIVATE(QtCharEditorFactory)
302  Q_DISABLE_COPY(QtCharEditorFactory)
303  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &))
304  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QChar &))
305  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
306 };
307 
309 
310 class ITOMWIDGETS_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory<QtEnumPropertyManager>
311 {
312  Q_OBJECT
313 public:
314  QtEnumEditorFactory(QObject *parent = 0);
316 protected:
318  QWidget *createEditor(QtEnumPropertyManager *manager, QtProperty *property,
319  QWidget *parent);
321 private:
323  Q_DECLARE_PRIVATE(QtEnumEditorFactory)
324  Q_DISABLE_COPY(QtEnumEditorFactory)
325  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
326  Q_PRIVATE_SLOT(d_func(), void slotEnumNamesChanged(QtProperty *,
327  const QStringList &))
328  Q_PRIVATE_SLOT(d_func(), void slotEnumIconsChanged(QtProperty *,
329  const QMap<int, QIcon> &))
330  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
331  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
332 };
333 
335 
336 class ITOMWIDGETS_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory<QtCursorPropertyManager>
337 {
338  Q_OBJECT
339 public:
340  QtCursorEditorFactory(QObject *parent = 0);
342 protected:
344  QWidget *createEditor(QtCursorPropertyManager *manager, QtProperty *property,
345  QWidget *parent);
347 private:
349  Q_DECLARE_PRIVATE(QtCursorEditorFactory)
350  Q_DISABLE_COPY(QtCursorEditorFactory)
351  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &))
352  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
353  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
354 };
355 
357 
358 class ITOMWIDGETS_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory<QtColorPropertyManager>
359 {
360  Q_OBJECT
361 public:
362  QtColorEditorFactory(QObject *parent = 0);
364 protected:
366  QWidget *createEditor(QtColorPropertyManager *manager, QtProperty *property,
367  QWidget *parent);
369 private:
371  Q_DECLARE_PRIVATE(QtColorEditorFactory)
372  Q_DISABLE_COPY(QtColorEditorFactory)
373  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &))
374  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
375  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QColor &))
376 };
377 
379 
380 class ITOMWIDGETS_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory<QtFontPropertyManager>
381 {
382  Q_OBJECT
383 public:
384  QtFontEditorFactory(QObject *parent = 0);
386 protected:
388  QWidget *createEditor(QtFontPropertyManager *manager, QtProperty *property,
389  QWidget *parent);
391 private:
393  Q_DECLARE_PRIVATE(QtFontEditorFactory)
394  Q_DISABLE_COPY(QtFontEditorFactory)
395  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &))
396  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
397  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont &))
398 };
399 
400 #if QT_VERSION >= 0x040400
401 QT_END_NAMESPACE
402 #endif
403 
404 #endif
Definition: qteditorfactory.cpp:713
Definition: qteditorfactory.cpp:604
Definition: qteditorfactory.cpp:2500
The QtStringPropertyManager provides and manages QString properties.
Definition: qtpropertymanager.h:172
The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManag...
Definition: qteditorfactory.h:103
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition: qteditorfactory.h:244
Definition: qteditorfactory.cpp:452
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition: qteditorfactory.h:266
Definition: qteditorfactory.cpp:143
Definition: qteditorfactory.cpp:1431
The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManage...
Definition: qteditorfactory.h:358
The QtBoolPropertyManager class provides and manages boolean properties.
Definition: qtpropertymanager.h:109
virtual void connectPropertyManager(PropertyManager *manager)=0
The QtDatePropertyManager provides and manages QDate properties.
Definition: qtpropertymanager.h:204
The QtCharPropertyManager provides and manages QChar properties.
Definition: qtpropertymanager.h:310
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition: qteditorfactory.h:198
Definition: qteditorfactory.cpp:1319
Definition: qteditorfactory.h:55
virtual void disconnectPropertyManager(PropertyManager *manager)=0
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:260
The QtTimePropertyManager provides and manages QTime properties.
Definition: qtpropertymanager.h:235
Definition: qteditorfactory.cpp:1832
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition: qteditorfactory.h:310
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition: qteditorfactory.h:174
The QtCursorPropertyManager provides and manages QCursor properties.
Definition: qtpropertymanager.h:794
The QtColorPropertyManager provides and manages QColor properties.
Definition: qtpropertymanager.h:764
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:380
The QtEnumPropertyManager provides and manages enum properties.
Definition: qtpropertymanager.h:633
Definition: qteditorfactory.cpp:901
The QtFontPropertyManager provides and manages QFont properties.
Definition: qtpropertymanager.h:728
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:157
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition: qtpropertymanager.h:285
Definition: qteditorfactory.cpp:1074
The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager obj...
Definition: qteditorfactory.h:79
Definition: qteditorfactory.cpp:2007
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition: qteditorfactory.h:149
The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager...
Definition: qteditorfactory.h:288
Definition: qteditorfactory.cpp:1720
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition: qteditorfactory.h:222
Definition: qteditorfactory.cpp:1210
Definition: qteditorfactory.cpp:299
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition: qteditorfactory.h:127
The QtIntPropertyManager provides and manages int properties.
Definition: qtpropertymanager.h:75
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:60
The QtDoublePropertyManager provides and manages double properties.
Definition: qtpropertymanager.h:135
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:153
Definition: qteditorfactory.cpp:2278
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition: qteditorfactory.h:336