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