itom
Loading...
Searching...
No Matches
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
50QT_BEGIN_NAMESPACE
51#endif
52
54
55class ITOMWIDGETS_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
56{
57 Q_OBJECT
58public:
59 QtSpinBoxFactory(QObject *parent = 0);
61protected:
63 QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
64 QWidget *parent);
66private:
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
79class ITOMWIDGETS_EXPORT QtSliderFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
80{
81 Q_OBJECT
82public:
83 QtSliderFactory(QObject *parent = 0);
85protected:
87 QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
88 QWidget *parent);
90private:
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
103class ITOMWIDGETS_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory<QtIntPropertyManager>
104{
105 Q_OBJECT
106public:
107 QtScrollBarFactory(QObject *parent = 0);
109protected:
111 QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
112 QWidget *parent);
114private:
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
127class ITOMWIDGETS_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory<QtBoolPropertyManager>
128{
129 Q_OBJECT
130public:
131 QtCheckBoxFactory(QObject *parent = 0);
133protected:
135 QWidget *createEditor(QtBoolPropertyManager *manager, QtProperty *property,
136 QWidget *parent);
138private:
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
149class ITOMWIDGETS_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory<QtDoublePropertyManager>
150{
151 Q_OBJECT
152public:
153 QtDoubleSpinBoxFactory(QObject *parent = 0);
155protected:
157 QWidget *createEditor(QtDoublePropertyManager *manager, QtProperty *property,
158 QWidget *parent);
160private:
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
174class ITOMWIDGETS_EXPORT QtLineEditFactory : public QtAbstractEditorFactory<QtStringPropertyManager>
175{
176 Q_OBJECT
177public:
178 QtLineEditFactory(QObject *parent = 0);
180protected:
182 QWidget *createEditor(QtStringPropertyManager *manager, QtProperty *property,
183 QWidget *parent);
185private:
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 QRegularExpression &))
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
198class ITOMWIDGETS_EXPORT QtDateEditFactory : public QtAbstractEditorFactory<QtDatePropertyManager>
199{
200 Q_OBJECT
201public:
202 QtDateEditFactory(QObject *parent = 0);
204protected:
206 QWidget *createEditor(QtDatePropertyManager *manager, QtProperty *property,
207 QWidget *parent);
209private:
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
222class ITOMWIDGETS_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory<QtTimePropertyManager>
223{
224 Q_OBJECT
225public:
226 QtTimeEditFactory(QObject *parent = 0);
228protected:
230 QWidget *createEditor(QtTimePropertyManager *manager, QtProperty *property,
231 QWidget *parent);
233private:
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
244class ITOMWIDGETS_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory<QtDateTimePropertyManager>
245{
246 Q_OBJECT
247public:
248 QtDateTimeEditFactory(QObject *parent = 0);
250protected:
252 QWidget *createEditor(QtDateTimePropertyManager *manager, QtProperty *property,
253 QWidget *parent);
255private:
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
266class ITOMWIDGETS_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory<QtKeySequencePropertyManager>
267{
268 Q_OBJECT
269public:
270 QtKeySequenceEditorFactory(QObject *parent = 0);
272protected:
274 QWidget *createEditor(QtKeySequencePropertyManager *manager, QtProperty *property,
275 QWidget *parent);
277private:
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
288class ITOMWIDGETS_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory<QtCharPropertyManager>
289{
290 Q_OBJECT
291public:
292 QtCharEditorFactory(QObject *parent = 0);
294protected:
296 QWidget *createEditor(QtCharPropertyManager *manager, QtProperty *property,
297 QWidget *parent);
299private:
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
310class ITOMWIDGETS_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory<QtEnumPropertyManager>
311{
312 Q_OBJECT
313public:
314 QtEnumEditorFactory(QObject *parent = 0);
316protected:
318 QWidget *createEditor(QtEnumPropertyManager *manager, QtProperty *property,
319 QWidget *parent);
321private:
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
336class ITOMWIDGETS_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory<QtCursorPropertyManager>
337{
338 Q_OBJECT
339public:
340 QtCursorEditorFactory(QObject *parent = 0);
342protected:
344 QWidget *createEditor(QtCursorPropertyManager *manager, QtProperty *property,
345 QWidget *parent);
347private:
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
358class ITOMWIDGETS_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory<QtColorPropertyManager>
359{
360 Q_OBJECT
361public:
362 QtColorEditorFactory(QObject *parent = 0);
364protected:
366 QWidget *createEditor(QtColorPropertyManager *manager, QtProperty *property,
367 QWidget *parent);
369private:
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
380class ITOMWIDGETS_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory<QtFontPropertyManager>
381{
382 Q_OBJECT
383public:
384 QtFontEditorFactory(QObject *parent = 0);
386protected:
388 QWidget *createEditor(QtFontPropertyManager *manager, QtProperty *property,
389 QWidget *parent);
391private:
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
401QT_END_NAMESPACE
402#endif
403
404#endif
The QtAbstractEditorFactory is the base template class for editor factories.
Definition qtpropertybrowser.h:154
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition qtpropertybrowser.h:157
virtual void disconnectPropertyManager(PropertyManager *manager)=0
virtual void connectPropertyManager(PropertyManager *manager)=0
The QtBoolPropertyManager class provides and manages boolean properties.
Definition qtpropertymanager.h:110
The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager...
Definition qteditorfactory.h:289
Definition qteditorfactory.cpp:1722
The QtCharPropertyManager provides and manages QChar properties.
Definition qtpropertymanager.h:311
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition qteditorfactory.h:128
Definition qteditorfactory.cpp:605
The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManage...
Definition qteditorfactory.h:359
Definition qteditorfactory.cpp:2280
The QtColorPropertyManager provides and manages QColor properties.
Definition qtpropertymanager.h:765
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition qteditorfactory.h:337
Definition qteditorfactory.cpp:2009
The QtCursorPropertyManager provides and manages QCursor properties.
Definition qtpropertymanager.h:795
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition qteditorfactory.h:199
Definition qteditorfactory.cpp:1076
The QtDatePropertyManager provides and manages QDate properties.
Definition qtpropertymanager.h:205
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition qteditorfactory.h:245
Definition qteditorfactory.cpp:1321
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition qtpropertymanager.h:261
The QtDoublePropertyManager provides and manages double properties.
Definition qtpropertymanager.h:136
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition qteditorfactory.h:150
Definition qteditorfactory.cpp:714
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition qteditorfactory.h:311
Definition qteditorfactory.cpp:1834
The QtEnumPropertyManager provides and manages enum properties.
Definition qtpropertymanager.h:634
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition qteditorfactory.h:381
Definition qteditorfactory.cpp:2502
The QtFontPropertyManager provides and manages QFont properties.
Definition qtpropertymanager.h:729
The QtIntPropertyManager provides and manages int properties.
Definition qtpropertymanager.h:76
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition qteditorfactory.h:267
Definition qteditorfactory.cpp:1433
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition qtpropertymanager.h:286
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition qteditorfactory.h:175
Definition qteditorfactory.cpp:902
The QtProperty class encapsulates an instance of a property.
Definition qtpropertybrowser.h:61
The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManag...
Definition qteditorfactory.h:104
Definition qteditorfactory.cpp:453
The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager obj...
Definition qteditorfactory.h:80
Definition qteditorfactory.cpp:300
The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager o...
Definition qteditorfactory.cpp:144
The QtStringPropertyManager provides and manages QString properties.
Definition qtpropertymanager.h:173
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition qteditorfactory.h:223
Definition qteditorfactory.cpp:1212
The QtTimePropertyManager provides and manages QTime properties.
Definition qtpropertymanager.h:236