Computer Assited Medical Intervention Tool Kit  version 4.1
qteditorfactory.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 **
6 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 **
8 ** This file is part of a Qt Solutions component.
9 **
10 ** You may use this file under the terms of the BSD license as follows:
11 **
12 ** "Redistribution and use in source and binary forms, with or without
13 ** modification, are permitted provided that the following conditions are
14 ** met:
15 ** * Redistributions of source code must retain the above copyright
16 ** notice, this list of conditions and the following disclaimer.
17 ** * Redistributions in binary form must reproduce the above copyright
18 ** notice, this list of conditions and the following disclaimer in
19 ** the documentation and/or other materials provided with the
20 ** distribution.
21 ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
22 ** the names of its contributors may be used to endorse or promote
23 ** products derived from this software without specific prior written
24 ** permission.
25 **
26 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
37 **
38 ****************************************************************************/
39 
40 
41 #ifndef QTEDITORFACTORY_H
42 #define QTEDITORFACTORY_H
43 
44 #include "qtpropertymanager.h"
45 
46 #if QT_VERSION >= 0x040400
47 QT_BEGIN_NAMESPACE
48 #endif
49 
51 
60  Q_OBJECT
61 public:
62  QtSpinBoxFactory(QObject* parent = nullptr);
63  ~QtSpinBoxFactory() override;
64 protected:
65  void connectPropertyManager(QtIntPropertyManager* manager) override;
66  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
67  QWidget* parent) override;
68  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
69 private:
71  Q_DECLARE_PRIVATE(QtSpinBoxFactory)
72  Q_DISABLE_COPY(QtSpinBoxFactory)
73  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
74  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
75  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
76  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
77  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
78 };
79 
81 
83  Q_OBJECT
84 public:
85  QtSliderFactory(QObject* parent = nullptr);
86  ~QtSliderFactory() override;
87 protected:
88  void connectPropertyManager(QtIntPropertyManager* manager) override;
89  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
90  QWidget* parent) override;
91  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
92 private:
94  Q_DECLARE_PRIVATE(QtSliderFactory)
95  Q_DISABLE_COPY(QtSliderFactory)
96  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
97  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
98  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
99  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
100  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
101 };
102 
104 
106  Q_OBJECT
107 public:
108  QtScrollBarFactory(QObject* parent = nullptr);
109  ~QtScrollBarFactory() override;
110 protected:
111  void connectPropertyManager(QtIntPropertyManager* manager) override;
112  QWidget* createEditor(QtIntPropertyManager* manager, QtProperty* property,
113  QWidget* parent) override;
114  void disconnectPropertyManager(QtIntPropertyManager* manager) override;
115 private:
117  Q_DECLARE_PRIVATE(QtScrollBarFactory)
118  Q_DISABLE_COPY(QtScrollBarFactory)
119  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
120  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, int, int))
121  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, int))
122  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
123  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
124 };
125 
127 
129  Q_OBJECT
130 public:
131  QtCheckBoxFactory(QObject* parent = nullptr);
132  ~QtCheckBoxFactory() override;
133 protected:
134  void connectPropertyManager(QtBoolPropertyManager* manager) override;
135  QWidget* createEditor(QtBoolPropertyManager* manager, QtProperty* property,
136  QWidget* parent) override;
137  void disconnectPropertyManager(QtBoolPropertyManager* manager) override;
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 
150  Q_OBJECT
151 public:
152  QtDoubleSpinBoxFactory(QObject* parent = nullptr);
153  ~QtDoubleSpinBoxFactory() override;
154 protected:
155  void connectPropertyManager(QtDoublePropertyManager* manager) override;
156  QWidget* createEditor(QtDoublePropertyManager* manager, QtProperty* property,
157  QWidget* parent) override;
158  void disconnectPropertyManager(QtDoublePropertyManager* manager) override;
159 private:
161  Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory)
162  Q_DISABLE_COPY(QtDoubleSpinBoxFactory)
163  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, double))
164  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*, double, double))
165  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty*, double))
166  Q_PRIVATE_SLOT(d_func(), void slotDecimalsChanged(QtProperty*, int))
167  Q_PRIVATE_SLOT(d_func(), void slotSetValue(double))
168  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
169 };
170 
172 
174  Q_OBJECT
175 public:
176  QtLineEditFactory(QObject* parent = nullptr);
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 slotSetValue(const QString&))
191  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
192 };
193 
195 
197  Q_OBJECT
198 public:
199  QtDateEditFactory(QObject* parent = nullptr);
200  ~QtDateEditFactory() override;
201 protected:
202  void connectPropertyManager(QtDatePropertyManager* manager) override;
203  QWidget* createEditor(QtDatePropertyManager* manager, QtProperty* property,
204  QWidget* parent) override;
205  void disconnectPropertyManager(QtDatePropertyManager* manager) override;
206 private:
208  Q_DECLARE_PRIVATE(QtDateEditFactory)
209  Q_DISABLE_COPY(QtDateEditFactory)
210  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QDate&))
211  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty*,
212  const QDate&, const QDate&))
213  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDate&))
214  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
215 };
216 
218 
220  Q_OBJECT
221 public:
222  QtTimeEditFactory(QObject* parent = nullptr);
223  ~QtTimeEditFactory() override;
224 protected:
225  void connectPropertyManager(QtTimePropertyManager* manager) override;
226  QWidget* createEditor(QtTimePropertyManager* manager, QtProperty* property,
227  QWidget* parent) override;
228  void disconnectPropertyManager(QtTimePropertyManager* manager) override;
229 private:
231  Q_DECLARE_PRIVATE(QtTimeEditFactory)
232  Q_DISABLE_COPY(QtTimeEditFactory)
233  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QTime&))
234  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QTime&))
235  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
236 };
237 
239 
241  Q_OBJECT
242 public:
243  QtDateTimeEditFactory(QObject* parent = nullptr);
244  ~QtDateTimeEditFactory() override;
245 protected:
246  void connectPropertyManager(QtDateTimePropertyManager* manager) override;
247  QWidget* createEditor(QtDateTimePropertyManager* manager, QtProperty* property,
248  QWidget* parent) override;
250 private:
252  Q_DECLARE_PRIVATE(QtDateTimeEditFactory)
253  Q_DISABLE_COPY(QtDateTimeEditFactory)
254  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QDateTime&))
255  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDateTime&))
256  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
257 };
258 
260 
262  Q_OBJECT
263 public:
264  QtKeySequenceEditorFactory(QObject* parent = nullptr);
265  ~QtKeySequenceEditorFactory() override;
266 protected:
268  QWidget* createEditor(QtKeySequencePropertyManager* manager, QtProperty* property,
269  QWidget* parent) override;
271 private:
273  Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory)
274  Q_DISABLE_COPY(QtKeySequenceEditorFactory)
275  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QKeySequence&))
276  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QKeySequence&))
277  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
278 };
279 
281 
283  Q_OBJECT
284 public:
285  QtCharEditorFactory(QObject* parent = nullptr);
286  ~QtCharEditorFactory() override;
287 protected:
288  void connectPropertyManager(QtCharPropertyManager* manager) override;
289  QWidget* createEditor(QtCharPropertyManager* manager, QtProperty* property,
290  QWidget* parent) override;
291  void disconnectPropertyManager(QtCharPropertyManager* manager) override;
292 private:
294  Q_DECLARE_PRIVATE(QtCharEditorFactory)
295  Q_DISABLE_COPY(QtCharEditorFactory)
296  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QChar&))
297  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QChar&))
298  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
299 };
300 
302 
304  Q_OBJECT
305 public:
306  QtEnumEditorFactory(QObject* parent = nullptr);
307  ~QtEnumEditorFactory() override;
308 protected:
309  void connectPropertyManager(QtEnumPropertyManager* manager) override;
310  QWidget* createEditor(QtEnumPropertyManager* manager, QtProperty* property,
311  QWidget* parent) override;
312  void disconnectPropertyManager(QtEnumPropertyManager* manager) override;
313 private:
315  Q_DECLARE_PRIVATE(QtEnumEditorFactory)
316  Q_DISABLE_COPY(QtEnumEditorFactory)
317  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, int))
318  Q_PRIVATE_SLOT(d_func(), void slotEnumNamesChanged(QtProperty*,
319  const QStringList&))
320  Q_PRIVATE_SLOT(d_func(), void slotEnumIconsChanged(QtProperty*,
321  const QMap<int, QIcon>&))
322  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
323  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
324 };
325 
327 
329  Q_OBJECT
330 public:
331  QtCursorEditorFactory(QObject* parent = nullptr);
332  ~QtCursorEditorFactory() override;
333 protected:
334  void connectPropertyManager(QtCursorPropertyManager* manager) override;
335  QWidget* createEditor(QtCursorPropertyManager* manager, QtProperty* property,
336  QWidget* parent) override;
337  void disconnectPropertyManager(QtCursorPropertyManager* manager) override;
338 private:
340  Q_DECLARE_PRIVATE(QtCursorEditorFactory)
341  Q_DISABLE_COPY(QtCursorEditorFactory)
342  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QCursor&))
343  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty*, int))
344  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
345 };
346 
348 
350  Q_OBJECT
351 public:
352  QtColorEditorFactory(QObject* parent = nullptr);
353  ~QtColorEditorFactory() override;
354 protected:
355  void connectPropertyManager(QtColorPropertyManager* manager) override;
356  QWidget* createEditor(QtColorPropertyManager* manager, QtProperty* property,
357  QWidget* parent) override;
358  void disconnectPropertyManager(QtColorPropertyManager* manager) override;
359 private:
361  Q_DECLARE_PRIVATE(QtColorEditorFactory)
362  Q_DISABLE_COPY(QtColorEditorFactory)
363  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QColor&))
364  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
365  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QColor&))
366 };
367 
369 
371  Q_OBJECT
372 public:
373  QtFontEditorFactory(QObject* parent = nullptr);
374  ~QtFontEditorFactory() override;
375 protected:
376  void connectPropertyManager(QtFontPropertyManager* manager) override;
377  QWidget* createEditor(QtFontPropertyManager* manager, QtProperty* property,
378  QWidget* parent) override;
379  void disconnectPropertyManager(QtFontPropertyManager* manager) override;
380 private:
382  Q_DECLARE_PRIVATE(QtFontEditorFactory)
383  Q_DISABLE_COPY(QtFontEditorFactory)
384  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty*, const QFont&))
385  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject*))
386  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont&))
387 };
388 
389 #if QT_VERSION >= 0x040400
390 QT_END_NAMESPACE
391 #endif
392 
393 #endif
The QtDoublePropertyManager provides and manages double properties.
Definition: qtpropertymanager.h:155
QtCharEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:293
Definition: qteditorfactory.cpp:1178
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition: qteditorfactory.h:173
QtCursorEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:339
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition: qteditorfactory.h:261
Definition: qteditorfactory.cpp:2423
Definition: qteditorfactory.cpp:2205
Definition: qteditorfactory.cpp:1387
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition: qteditorfactory.h:240
QtDoubleSpinBoxFactoryPrivate * d_ptr
Definition: qteditorfactory.h:160
QtLineEditFactoryPrivate * d_ptr
Definition: qteditorfactory.h:184
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition: qtpropertymanager.h:306
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition: qteditorfactory.h:128
QtDateEditFactoryPrivate * d_ptr
Definition: qteditorfactory.h:207
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition: qteditorfactory.h:219
QtFontEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:381
The QtStringPropertyManager provides and manages QString properties.
Definition: qtpropertymanager.h:194
The QtCharPropertyManager provides and manages QChar properties.
Definition: qtpropertymanager.h:330
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition: qteditorfactory.h:149
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:203
The QtFontPropertyManager provides and manages QFont properties.
Definition: qtpropertymanager.h:703
The QtIntPropertyManager provides and manages int properties.
Definition: qtpropertymanager.h:91
QtScrollBarFactoryPrivate * d_ptr
Definition: qteditorfactory.h:116
The QtCursorPropertyManager provides and manages QCursor properties.
Definition: qtpropertymanager.h:767
The QtTimePropertyManager provides and manages QTime properties.
Definition: qtpropertymanager.h:258
Definition: qteditorfactory.cpp:1944
Definition: qteditorfactory.cpp:1664
The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManag...
Definition: qteditorfactory.h:105
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:370
QtTimeEditFactoryPrivate * d_ptr
Definition: qteditorfactory.h:230
Definition: qteditorfactory.cpp:692
QtSliderFactoryPrivate * d_ptr
Definition: qteditorfactory.h:93
The QtDatePropertyManager provides and manages QDate properties.
Definition: qtpropertymanager.h:228
QtKeySequenceEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:272
The QtColorPropertyManager provides and manages QColor properties.
Definition: qtpropertymanager.h:738
Definition: qteditorfactory.cpp:589
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition: qteditorfactory.h:328
QtSpinBoxFactoryPrivate * d_ptr
Definition: qteditorfactory.h:70
Definition: qteditorfactory.cpp:876
The QtBoolPropertyManager class provides and manages boolean properties.
Definition: qtpropertymanager.h:127
Definition: qteditorfactory.cpp:143
Definition: qteditorfactory.cpp:1281
Definition: qteditorfactory.cpp:294
QtCheckBoxFactoryPrivate * d_ptr
Definition: qteditorfactory.h:139
The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManage...
Definition: qteditorfactory.h:349
The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager...
Definition: qteditorfactory.h:282
Definition: qteditorfactory.cpp:1047
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:59
Definition: qteditorfactory.cpp:442
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:282
The description of this class will come soon !
Definition: qteditorfactory.h:59
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:206
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:113
virtual void disconnectPropertyManager(PropertyManager *manager)=0
QtColorEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:360
QtDateTimeEditFactoryPrivate * d_ptr
Definition: qteditorfactory.h:251
virtual void connectPropertyManager(PropertyManager *manager)=0
The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager obj...
Definition: qteditorfactory.h:82
Definition: qteditorfactory.cpp:1770
The QtEnumPropertyManager provides and manages enum properties.
Definition: qtpropertymanager.h:611
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition: qteditorfactory.h:196
QtEnumEditorFactoryPrivate * d_ptr
Definition: qteditorfactory.h:314
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition: qteditorfactory.h:303