1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the tools applications of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QTPROPERTYMANAGER_H
41#define QTPROPERTYMANAGER_H
42
43#include "qtpropertybrowser.h"
44
45QT_BEGIN_NAMESPACE
46
47class QDate;
48class QTime;
49class QDateTime;
50class QLocale;
51
52class QtGroupPropertyManager : public QtAbstractPropertyManager
53{
54 Q_OBJECT
55public:
56 QtGroupPropertyManager(QObject *parent = 0);
57 ~QtGroupPropertyManager();
58
59protected:
60 virtual bool hasValue(const QtProperty *property) const;
61
62 virtual void initializeProperty(QtProperty *property);
63 virtual void uninitializeProperty(QtProperty *property);
64};
65
66class QtIntPropertyManagerPrivate;
67
68class QtIntPropertyManager : public QtAbstractPropertyManager
69{
70 Q_OBJECT
71public:
72 QtIntPropertyManager(QObject *parent = 0);
73 ~QtIntPropertyManager();
74
75 int value(const QtProperty *property) const;
76 int minimum(const QtProperty *property) const;
77 int maximum(const QtProperty *property) const;
78 int singleStep(const QtProperty *property) const;
79
80public Q_SLOTS:
81 void setValue(QtProperty *property, int val);
82 void setMinimum(QtProperty *property, int minVal);
83 void setMaximum(QtProperty *property, int maxVal);
84 void setRange(QtProperty *property, int minVal, int maxVal);
85 void setSingleStep(QtProperty *property, int step);
86Q_SIGNALS:
87 void valueChanged(QtProperty *property, int val);
88 void rangeChanged(QtProperty *property, int minVal, int maxVal);
89 void singleStepChanged(QtProperty *property, int step);
90protected:
91 QString valueText(const QtProperty *property) const;
92 virtual void initializeProperty(QtProperty *property);
93 virtual void uninitializeProperty(QtProperty *property);
94private:
95 QScopedPointer<QtIntPropertyManagerPrivate> d_ptr;
96 Q_DECLARE_PRIVATE(QtIntPropertyManager)
97 Q_DISABLE_COPY_MOVE(QtIntPropertyManager)
98};
99
100class QtBoolPropertyManagerPrivate;
101
102class QtBoolPropertyManager : public QtAbstractPropertyManager
103{
104 Q_OBJECT
105public:
106 QtBoolPropertyManager(QObject *parent = 0);
107 ~QtBoolPropertyManager();
108
109 bool value(const QtProperty *property) const;
110
111public Q_SLOTS:
112 void setValue(QtProperty *property, bool val);
113Q_SIGNALS:
114 void valueChanged(QtProperty *property, bool val);
115protected:
116 QString valueText(const QtProperty *property) const;
117 QIcon valueIcon(const QtProperty *property) const;
118 virtual void initializeProperty(QtProperty *property);
119 virtual void uninitializeProperty(QtProperty *property);
120private:
121 QScopedPointer<QtBoolPropertyManagerPrivate> d_ptr;
122 Q_DECLARE_PRIVATE(QtBoolPropertyManager)
123 Q_DISABLE_COPY_MOVE(QtBoolPropertyManager)
124};
125
126class QtDoublePropertyManagerPrivate;
127
128class QtDoublePropertyManager : public QtAbstractPropertyManager
129{
130 Q_OBJECT
131public:
132 QtDoublePropertyManager(QObject *parent = 0);
133 ~QtDoublePropertyManager();
134
135 double value(const QtProperty *property) const;
136 double minimum(const QtProperty *property) const;
137 double maximum(const QtProperty *property) const;
138 double singleStep(const QtProperty *property) const;
139 int decimals(const QtProperty *property) const;
140
141public Q_SLOTS:
142 void setValue(QtProperty *property, double val);
143 void setMinimum(QtProperty *property, double minVal);
144 void setMaximum(QtProperty *property, double maxVal);
145 void setRange(QtProperty *property, double minVal, double maxVal);
146 void setSingleStep(QtProperty *property, double step);
147 void setDecimals(QtProperty *property, int prec);
148Q_SIGNALS:
149 void valueChanged(QtProperty *property, double val);
150 void rangeChanged(QtProperty *property, double minVal, double maxVal);
151 void singleStepChanged(QtProperty *property, double step);
152 void decimalsChanged(QtProperty *property, int prec);
153protected:
154 QString valueText(const QtProperty *property) const;
155 virtual void initializeProperty(QtProperty *property);
156 virtual void uninitializeProperty(QtProperty *property);
157private:
158 QScopedPointer<QtDoublePropertyManagerPrivate> d_ptr;
159 Q_DECLARE_PRIVATE(QtDoublePropertyManager)
160 Q_DISABLE_COPY_MOVE(QtDoublePropertyManager)
161};
162
163class QtStringPropertyManagerPrivate;
164
165class QtStringPropertyManager : public QtAbstractPropertyManager
166{
167 Q_OBJECT
168public:
169 QtStringPropertyManager(QObject *parent = 0);
170 ~QtStringPropertyManager();
171
172 QString value(const QtProperty *property) const;
173 QRegExp regExp(const QtProperty *property) const;
174
175public Q_SLOTS:
176 void setValue(QtProperty *property, const QString &val);
177 void setRegExp(QtProperty *property, const QRegExp &regExp);
178Q_SIGNALS:
179 void valueChanged(QtProperty *property, const QString &val);
180 void regExpChanged(QtProperty *property, const QRegExp &regExp);
181protected:
182 QString valueText(const QtProperty *property) const;
183 virtual void initializeProperty(QtProperty *property);
184 virtual void uninitializeProperty(QtProperty *property);
185private:
186 QScopedPointer<QtStringPropertyManagerPrivate> d_ptr;
187 Q_DECLARE_PRIVATE(QtStringPropertyManager)
188 Q_DISABLE_COPY_MOVE(QtStringPropertyManager)
189};
190
191class QtDatePropertyManagerPrivate;
192
193class QtDatePropertyManager : public QtAbstractPropertyManager
194{
195 Q_OBJECT
196public:
197 QtDatePropertyManager(QObject *parent = 0);
198 ~QtDatePropertyManager();
199
200 QDate value(const QtProperty *property) const;
201 QDate minimum(const QtProperty *property) const;
202 QDate maximum(const QtProperty *property) const;
203
204public Q_SLOTS:
205 void setValue(QtProperty *property, const QDate &val);
206 void setMinimum(QtProperty *property, const QDate &minVal);
207 void setMaximum(QtProperty *property, const QDate &maxVal);
208 void setRange(QtProperty *property, const QDate &minVal, const QDate &maxVal);
209Q_SIGNALS:
210 void valueChanged(QtProperty *property, const QDate &val);
211 void rangeChanged(QtProperty *property, const QDate &minVal, const QDate &maxVal);
212protected:
213 QString valueText(const QtProperty *property) const;
214 virtual void initializeProperty(QtProperty *property);
215 virtual void uninitializeProperty(QtProperty *property);
216private:
217 QScopedPointer<QtDatePropertyManagerPrivate> d_ptr;
218 Q_DECLARE_PRIVATE(QtDatePropertyManager)
219 Q_DISABLE_COPY_MOVE(QtDatePropertyManager)
220};
221
222class QtTimePropertyManagerPrivate;
223
224class QtTimePropertyManager : public QtAbstractPropertyManager
225{
226 Q_OBJECT
227public:
228 QtTimePropertyManager(QObject *parent = 0);
229 ~QtTimePropertyManager();
230
231 QTime value(const QtProperty *property) const;
232
233public Q_SLOTS:
234 void setValue(QtProperty *property, const QTime &val);
235Q_SIGNALS:
236 void valueChanged(QtProperty *property, const QTime &val);
237protected:
238 QString valueText(const QtProperty *property) const;
239 virtual void initializeProperty(QtProperty *property);
240 virtual void uninitializeProperty(QtProperty *property);
241private:
242 QScopedPointer<QtTimePropertyManagerPrivate> d_ptr;
243 Q_DECLARE_PRIVATE(QtTimePropertyManager)
244 Q_DISABLE_COPY_MOVE(QtTimePropertyManager)
245};
246
247class QtDateTimePropertyManagerPrivate;
248
249class QtDateTimePropertyManager : public QtAbstractPropertyManager
250{
251 Q_OBJECT
252public:
253 QtDateTimePropertyManager(QObject *parent = 0);
254 ~QtDateTimePropertyManager();
255
256 QDateTime value(const QtProperty *property) const;
257
258public Q_SLOTS:
259 void setValue(QtProperty *property, const QDateTime &val);
260Q_SIGNALS:
261 void valueChanged(QtProperty *property, const QDateTime &val);
262protected:
263 QString valueText(const QtProperty *property) const;
264 virtual void initializeProperty(QtProperty *property);
265 virtual void uninitializeProperty(QtProperty *property);
266private:
267 QScopedPointer<QtDateTimePropertyManagerPrivate> d_ptr;
268 Q_DECLARE_PRIVATE(QtDateTimePropertyManager)
269 Q_DISABLE_COPY_MOVE(QtDateTimePropertyManager)
270};
271
272class QtKeySequencePropertyManagerPrivate;
273
274class QtKeySequencePropertyManager : public QtAbstractPropertyManager
275{
276 Q_OBJECT
277public:
278 QtKeySequencePropertyManager(QObject *parent = 0);
279 ~QtKeySequencePropertyManager();
280
281 QKeySequence value(const QtProperty *property) const;
282
283public Q_SLOTS:
284 void setValue(QtProperty *property, const QKeySequence &val);
285Q_SIGNALS:
286 void valueChanged(QtProperty *property, const QKeySequence &val);
287protected:
288 QString valueText(const QtProperty *property) const;
289 virtual void initializeProperty(QtProperty *property);
290 virtual void uninitializeProperty(QtProperty *property);
291private:
292 QScopedPointer<QtKeySequencePropertyManagerPrivate> d_ptr;
293 Q_DECLARE_PRIVATE(QtKeySequencePropertyManager)
294 Q_DISABLE_COPY_MOVE(QtKeySequencePropertyManager)
295};
296
297class QtCharPropertyManagerPrivate;
298
299class QtCharPropertyManager : public QtAbstractPropertyManager
300{
301 Q_OBJECT
302public:
303 QtCharPropertyManager(QObject *parent = 0);
304 ~QtCharPropertyManager();
305
306 QChar value(const QtProperty *property) const;
307
308public Q_SLOTS:
309 void setValue(QtProperty *property, const QChar &val);
310Q_SIGNALS:
311 void valueChanged(QtProperty *property, const QChar &val);
312protected:
313 QString valueText(const QtProperty *property) const;
314 virtual void initializeProperty(QtProperty *property);
315 virtual void uninitializeProperty(QtProperty *property);
316private:
317 QScopedPointer<QtCharPropertyManagerPrivate> d_ptr;
318 Q_DECLARE_PRIVATE(QtCharPropertyManager)
319 Q_DISABLE_COPY_MOVE(QtCharPropertyManager)
320};
321
322class QtEnumPropertyManager;
323class QtLocalePropertyManagerPrivate;
324
325class QtLocalePropertyManager : public QtAbstractPropertyManager
326{
327 Q_OBJECT
328public:
329 QtLocalePropertyManager(QObject *parent = 0);
330 ~QtLocalePropertyManager();
331
332 QtEnumPropertyManager *subEnumPropertyManager() const;
333
334 QLocale value(const QtProperty *property) const;
335
336public Q_SLOTS:
337 void setValue(QtProperty *property, const QLocale &val);
338Q_SIGNALS:
339 void valueChanged(QtProperty *property, const QLocale &val);
340protected:
341 QString valueText(const QtProperty *property) const;
342 virtual void initializeProperty(QtProperty *property);
343 virtual void uninitializeProperty(QtProperty *property);
344private:
345 QScopedPointer<QtLocalePropertyManagerPrivate> d_ptr;
346 Q_DECLARE_PRIVATE(QtLocalePropertyManager)
347 Q_DISABLE_COPY_MOVE(QtLocalePropertyManager)
348 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
349 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
350};
351
352class QtPointPropertyManagerPrivate;
353
354class QtPointPropertyManager : public QtAbstractPropertyManager
355{
356 Q_OBJECT
357public:
358 QtPointPropertyManager(QObject *parent = 0);
359 ~QtPointPropertyManager();
360
361 QtIntPropertyManager *subIntPropertyManager() const;
362
363 QPoint value(const QtProperty *property) const;
364
365public Q_SLOTS:
366 void setValue(QtProperty *property, const QPoint &val);
367Q_SIGNALS:
368 void valueChanged(QtProperty *property, const QPoint &val);
369protected:
370 QString valueText(const QtProperty *property) const;
371 virtual void initializeProperty(QtProperty *property);
372 virtual void uninitializeProperty(QtProperty *property);
373private:
374 QScopedPointer<QtPointPropertyManagerPrivate> d_ptr;
375 Q_DECLARE_PRIVATE(QtPointPropertyManager)
376 Q_DISABLE_COPY_MOVE(QtPointPropertyManager)
377 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
378 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
379};
380
381class QtPointFPropertyManagerPrivate;
382
383class QtPointFPropertyManager : public QtAbstractPropertyManager
384{
385 Q_OBJECT
386public:
387 QtPointFPropertyManager(QObject *parent = 0);
388 ~QtPointFPropertyManager();
389
390 QtDoublePropertyManager *subDoublePropertyManager() const;
391
392 QPointF value(const QtProperty *property) const;
393 int decimals(const QtProperty *property) const;
394
395public Q_SLOTS:
396 void setValue(QtProperty *property, const QPointF &val);
397 void setDecimals(QtProperty *property, int prec);
398Q_SIGNALS:
399 void valueChanged(QtProperty *property, const QPointF &val);
400 void decimalsChanged(QtProperty *property, int prec);
401protected:
402 QString valueText(const QtProperty *property) const;
403 virtual void initializeProperty(QtProperty *property);
404 virtual void uninitializeProperty(QtProperty *property);
405private:
406 QScopedPointer<QtPointFPropertyManagerPrivate> d_ptr;
407 Q_DECLARE_PRIVATE(QtPointFPropertyManager)
408 Q_DISABLE_COPY_MOVE(QtPointFPropertyManager)
409 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
410 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
411};
412
413class QtSizePropertyManagerPrivate;
414
415class QtSizePropertyManager : public QtAbstractPropertyManager
416{
417 Q_OBJECT
418public:
419 QtSizePropertyManager(QObject *parent = 0);
420 ~QtSizePropertyManager();
421
422 QtIntPropertyManager *subIntPropertyManager() const;
423
424 QSize value(const QtProperty *property) const;
425 QSize minimum(const QtProperty *property) const;
426 QSize maximum(const QtProperty *property) const;
427
428public Q_SLOTS:
429 void setValue(QtProperty *property, const QSize &val);
430 void setMinimum(QtProperty *property, const QSize &minVal);
431 void setMaximum(QtProperty *property, const QSize &maxVal);
432 void setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal);
433Q_SIGNALS:
434 void valueChanged(QtProperty *property, const QSize &val);
435 void rangeChanged(QtProperty *property, const QSize &minVal, const QSize &maxVal);
436protected:
437 QString valueText(const QtProperty *property) const;
438 virtual void initializeProperty(QtProperty *property);
439 virtual void uninitializeProperty(QtProperty *property);
440private:
441 QScopedPointer<QtSizePropertyManagerPrivate> d_ptr;
442 Q_DECLARE_PRIVATE(QtSizePropertyManager)
443 Q_DISABLE_COPY_MOVE(QtSizePropertyManager)
444 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
445 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
446};
447
448class QtSizeFPropertyManagerPrivate;
449
450class QtSizeFPropertyManager : public QtAbstractPropertyManager
451{
452 Q_OBJECT
453public:
454 QtSizeFPropertyManager(QObject *parent = 0);
455 ~QtSizeFPropertyManager();
456
457 QtDoublePropertyManager *subDoublePropertyManager() const;
458
459 QSizeF value(const QtProperty *property) const;
460 QSizeF minimum(const QtProperty *property) const;
461 QSizeF maximum(const QtProperty *property) const;
462 int decimals(const QtProperty *property) const;
463
464public Q_SLOTS:
465 void setValue(QtProperty *property, const QSizeF &val);
466 void setMinimum(QtProperty *property, const QSizeF &minVal);
467 void setMaximum(QtProperty *property, const QSizeF &maxVal);
468 void setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal);
469 void setDecimals(QtProperty *property, int prec);
470Q_SIGNALS:
471 void valueChanged(QtProperty *property, const QSizeF &val);
472 void rangeChanged(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal);
473 void decimalsChanged(QtProperty *property, int prec);
474protected:
475 QString valueText(const QtProperty *property) const;
476 virtual void initializeProperty(QtProperty *property);
477 virtual void uninitializeProperty(QtProperty *property);
478private:
479 QScopedPointer<QtSizeFPropertyManagerPrivate> d_ptr;
480 Q_DECLARE_PRIVATE(QtSizeFPropertyManager)
481 Q_DISABLE_COPY_MOVE(QtSizeFPropertyManager)
482 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
483 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
484};
485
486class QtRectPropertyManagerPrivate;
487
488class QtRectPropertyManager : public QtAbstractPropertyManager
489{
490 Q_OBJECT
491public:
492 QtRectPropertyManager(QObject *parent = 0);
493 ~QtRectPropertyManager();
494
495 QtIntPropertyManager *subIntPropertyManager() const;
496
497 QRect value(const QtProperty *property) const;
498 QRect constraint(const QtProperty *property) const;
499
500public Q_SLOTS:
501 void setValue(QtProperty *property, const QRect &val);
502 void setConstraint(QtProperty *property, const QRect &constraint);
503Q_SIGNALS:
504 void valueChanged(QtProperty *property, const QRect &val);
505 void constraintChanged(QtProperty *property, const QRect &constraint);
506protected:
507 QString valueText(const QtProperty *property) const;
508 virtual void initializeProperty(QtProperty *property);
509 virtual void uninitializeProperty(QtProperty *property);
510private:
511 QScopedPointer<QtRectPropertyManagerPrivate> d_ptr;
512 Q_DECLARE_PRIVATE(QtRectPropertyManager)
513 Q_DISABLE_COPY_MOVE(QtRectPropertyManager)
514 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
515 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
516};
517
518class QtRectFPropertyManagerPrivate;
519
520class QtRectFPropertyManager : public QtAbstractPropertyManager
521{
522 Q_OBJECT
523public:
524 QtRectFPropertyManager(QObject *parent = 0);
525 ~QtRectFPropertyManager();
526
527 QtDoublePropertyManager *subDoublePropertyManager() const;
528
529 QRectF value(const QtProperty *property) const;
530 QRectF constraint(const QtProperty *property) const;
531 int decimals(const QtProperty *property) const;
532
533public Q_SLOTS:
534 void setValue(QtProperty *property, const QRectF &val);
535 void setConstraint(QtProperty *property, const QRectF &constraint);
536 void setDecimals(QtProperty *property, int prec);
537Q_SIGNALS:
538 void valueChanged(QtProperty *property, const QRectF &val);
539 void constraintChanged(QtProperty *property, const QRectF &constraint);
540 void decimalsChanged(QtProperty *property, int prec);
541protected:
542 QString valueText(const QtProperty *property) const;
543 virtual void initializeProperty(QtProperty *property);
544 virtual void uninitializeProperty(QtProperty *property);
545private:
546 QScopedPointer<QtRectFPropertyManagerPrivate> d_ptr;
547 Q_DECLARE_PRIVATE(QtRectFPropertyManager)
548 Q_DISABLE_COPY_MOVE(QtRectFPropertyManager)
549 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
550 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
551};
552
553class QtEnumPropertyManagerPrivate;
554
555class QtEnumPropertyManager : public QtAbstractPropertyManager
556{
557 Q_OBJECT
558public:
559 QtEnumPropertyManager(QObject *parent = 0);
560 ~QtEnumPropertyManager();
561
562 int value(const QtProperty *property) const;
563 QStringList enumNames(const QtProperty *property) const;
564 QMap<int, QIcon> enumIcons(const QtProperty *property) const;
565
566public Q_SLOTS:
567 void setValue(QtProperty *property, int val);
568 void setEnumNames(QtProperty *property, const QStringList &names);
569 void setEnumIcons(QtProperty *property, const QMap<int, QIcon> &icons);
570Q_SIGNALS:
571 void valueChanged(QtProperty *property, int val);
572 void enumNamesChanged(QtProperty *property, const QStringList &names);
573 void enumIconsChanged(QtProperty *property, const QMap<int, QIcon> &icons);
574protected:
575 QString valueText(const QtProperty *property) const;
576 QIcon valueIcon(const QtProperty *property) const;
577 virtual void initializeProperty(QtProperty *property);
578 virtual void uninitializeProperty(QtProperty *property);
579private:
580 QScopedPointer<QtEnumPropertyManagerPrivate> d_ptr;
581 Q_DECLARE_PRIVATE(QtEnumPropertyManager)
582 Q_DISABLE_COPY_MOVE(QtEnumPropertyManager)
583};
584
585class QtFlagPropertyManagerPrivate;
586
587class QtFlagPropertyManager : public QtAbstractPropertyManager
588{
589 Q_OBJECT
590public:
591 QtFlagPropertyManager(QObject *parent = 0);
592 ~QtFlagPropertyManager();
593
594 QtBoolPropertyManager *subBoolPropertyManager() const;
595
596 int value(const QtProperty *property) const;
597 QStringList flagNames(const QtProperty *property) const;
598
599public Q_SLOTS:
600 void setValue(QtProperty *property, int val);
601 void setFlagNames(QtProperty *property, const QStringList &names);
602Q_SIGNALS:
603 void valueChanged(QtProperty *property, int val);
604 void flagNamesChanged(QtProperty *property, const QStringList &names);
605protected:
606 QString valueText(const QtProperty *property) const;
607 virtual void initializeProperty(QtProperty *property);
608 virtual void uninitializeProperty(QtProperty *property);
609private:
610 QScopedPointer<QtFlagPropertyManagerPrivate> d_ptr;
611 Q_DECLARE_PRIVATE(QtFlagPropertyManager)
612 Q_DISABLE_COPY_MOVE(QtFlagPropertyManager)
613 Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
614 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
615};
616
617class QtSizePolicyPropertyManagerPrivate;
618
619class QtSizePolicyPropertyManager : public QtAbstractPropertyManager
620{
621 Q_OBJECT
622public:
623 QtSizePolicyPropertyManager(QObject *parent = 0);
624 ~QtSizePolicyPropertyManager();
625
626 QtIntPropertyManager *subIntPropertyManager() const;
627 QtEnumPropertyManager *subEnumPropertyManager() const;
628
629 QSizePolicy value(const QtProperty *property) const;
630
631public Q_SLOTS:
632 void setValue(QtProperty *property, const QSizePolicy &val);
633Q_SIGNALS:
634 void valueChanged(QtProperty *property, const QSizePolicy &val);
635protected:
636 QString valueText(const QtProperty *property) const;
637 virtual void initializeProperty(QtProperty *property);
638 virtual void uninitializeProperty(QtProperty *property);
639private:
640 QScopedPointer<QtSizePolicyPropertyManagerPrivate> d_ptr;
641 Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager)
642 Q_DISABLE_COPY_MOVE(QtSizePolicyPropertyManager)
643 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
644 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
645 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
646};
647
648class QtFontPropertyManagerPrivate;
649
650class QtFontPropertyManager : public QtAbstractPropertyManager
651{
652 Q_OBJECT
653public:
654 QtFontPropertyManager(QObject *parent = 0);
655 ~QtFontPropertyManager();
656
657 QtIntPropertyManager *subIntPropertyManager() const;
658 QtEnumPropertyManager *subEnumPropertyManager() const;
659 QtBoolPropertyManager *subBoolPropertyManager() const;
660
661 QFont value(const QtProperty *property) const;
662
663public Q_SLOTS:
664 void setValue(QtProperty *property, const QFont &val);
665Q_SIGNALS:
666 void valueChanged(QtProperty *property, const QFont &val);
667protected:
668 QString valueText(const QtProperty *property) const;
669 QIcon valueIcon(const QtProperty *property) const;
670 virtual void initializeProperty(QtProperty *property);
671 virtual void uninitializeProperty(QtProperty *property);
672private:
673 QScopedPointer<QtFontPropertyManagerPrivate> d_ptr;
674 Q_DECLARE_PRIVATE(QtFontPropertyManager)
675 Q_DISABLE_COPY_MOVE(QtFontPropertyManager)
676 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
677 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
678 Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
679 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
680 Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseChanged())
681 Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseDelayedChange())
682};
683
684class QtColorPropertyManagerPrivate;
685
686class QtColorPropertyManager : public QtAbstractPropertyManager
687{
688 Q_OBJECT
689public:
690 QtColorPropertyManager(QObject *parent = 0);
691 ~QtColorPropertyManager();
692
693 QtIntPropertyManager *subIntPropertyManager() const;
694
695 QColor value(const QtProperty *property) const;
696
697public Q_SLOTS:
698 void setValue(QtProperty *property, const QColor &val);
699Q_SIGNALS:
700 void valueChanged(QtProperty *property, const QColor &val);
701protected:
702 QString valueText(const QtProperty *property) const;
703 QIcon valueIcon(const QtProperty *property) const;
704 virtual void initializeProperty(QtProperty *property);
705 virtual void uninitializeProperty(QtProperty *property);
706private:
707 QScopedPointer<QtColorPropertyManagerPrivate> d_ptr;
708 Q_DECLARE_PRIVATE(QtColorPropertyManager)
709 Q_DISABLE_COPY_MOVE(QtColorPropertyManager)
710 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
711 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
712};
713
714class QtCursorPropertyManagerPrivate;
715
716class QtCursorPropertyManager : public QtAbstractPropertyManager
717{
718 Q_OBJECT
719public:
720 QtCursorPropertyManager(QObject *parent = 0);
721 ~QtCursorPropertyManager();
722
723#ifndef QT_NO_CURSOR
724 QCursor value(const QtProperty *property) const;
725#endif
726
727public Q_SLOTS:
728 void setValue(QtProperty *property, const QCursor &val);
729Q_SIGNALS:
730 void valueChanged(QtProperty *property, const QCursor &val);
731protected:
732 QString valueText(const QtProperty *property) const;
733 QIcon valueIcon(const QtProperty *property) const;
734 virtual void initializeProperty(QtProperty *property);
735 virtual void uninitializeProperty(QtProperty *property);
736private:
737 QScopedPointer<QtCursorPropertyManagerPrivate> d_ptr;
738 Q_DECLARE_PRIVATE(QtCursorPropertyManager)
739 Q_DISABLE_COPY_MOVE(QtCursorPropertyManager)
740};
741
742QT_END_NAMESPACE
743
744#endif
745

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