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