itom
Loading...
Searching...
No Matches
qtpropertymanager.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 QTPROPERTYMANAGER_H
43#define QTPROPERTYMANAGER_H
44
45#include "qtpropertybrowser.h"
46#include <QLineEdit>
47
48#include "../commonWidgets.h"
49
50#if QT_VERSION >= 0x040400
51QT_BEGIN_NAMESPACE
52#endif
53
54class QDate;
55class QTime;
56class QDateTime;
57class QLocale;
58
59class ITOMWIDGETS_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager
60{
61 Q_OBJECT
62public:
63 QtGroupPropertyManager(QObject *parent = 0);
65
66protected:
67 virtual bool hasValue(const QtProperty *property) const;
68
69 virtual void initializeProperty(QtProperty *property);
70 virtual void uninitializeProperty(QtProperty *property);
71};
72
74
75class ITOMWIDGETS_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager
76{
77 Q_OBJECT
78public:
79 QtIntPropertyManager(QObject *parent = 0);
81
82 int value(const QtProperty *property) const;
83 int minimum(const QtProperty *property) const;
84 int maximum(const QtProperty *property) const;
85 int singleStep(const QtProperty *property) const;
86
87public Q_SLOTS:
88 void setValue(QtProperty *property, int val);
89 void setMinimum(QtProperty *property, int minVal);
90 void setMaximum(QtProperty *property, int maxVal);
91 void setRange(QtProperty *property, int minVal, int maxVal);
92 void setSingleStep(QtProperty *property, int step);
93Q_SIGNALS:
94 void valueChanged(QtProperty *property, int val);
95 void rangeChanged(QtProperty *property, int minVal, int maxVal);
96 void singleStepChanged(QtProperty *property, int step);
97protected:
98 QString valueText(const QtProperty *property) const;
99 virtual void initializeProperty(QtProperty *property);
100 virtual void uninitializeProperty(QtProperty *property);
101private:
103 Q_DECLARE_PRIVATE(QtIntPropertyManager)
104 Q_DISABLE_COPY(QtIntPropertyManager)
105};
106
108
109class ITOMWIDGETS_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager
110{
111 Q_OBJECT
112public:
113 QtBoolPropertyManager(QObject *parent = 0);
115
116 bool value(const QtProperty *property) const;
117
118public Q_SLOTS:
119 void setValue(QtProperty *property, bool val);
120Q_SIGNALS:
121 void valueChanged(QtProperty *property, bool val);
122protected:
123 QString valueText(const QtProperty *property) const;
124 QIcon valueIcon(const QtProperty *property) const;
125 virtual void initializeProperty(QtProperty *property);
126 virtual void uninitializeProperty(QtProperty *property);
127private:
129 Q_DECLARE_PRIVATE(QtBoolPropertyManager)
130 Q_DISABLE_COPY(QtBoolPropertyManager)
131};
132
134
135class ITOMWIDGETS_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager
136{
137 Q_OBJECT
138public:
139 QtDoublePropertyManager(QObject *parent = 0);
141
142 double value(const QtProperty *property) const;
143 double minimum(const QtProperty *property) const;
144 double maximum(const QtProperty *property) const;
145 double singleStep(const QtProperty *property) const;
146 int decimals(const QtProperty *property) const;
147
148public Q_SLOTS:
149 void setValue(QtProperty *property, double val);
150 void setMinimum(QtProperty *property, double minVal);
151 void setMaximum(QtProperty *property, double maxVal);
152 void setRange(QtProperty *property, double minVal, double maxVal);
153 void setSingleStep(QtProperty *property, double step);
154 void setDecimals(QtProperty *property, int prec);
155Q_SIGNALS:
156 void valueChanged(QtProperty *property, double val);
157 void rangeChanged(QtProperty *property, double minVal, double maxVal);
158 void singleStepChanged(QtProperty *property, double step);
159 void decimalsChanged(QtProperty *property, int prec);
160protected:
161 QString valueText(const QtProperty *property) const;
162 virtual void initializeProperty(QtProperty *property);
163 virtual void uninitializeProperty(QtProperty *property);
164private:
166 Q_DECLARE_PRIVATE(QtDoublePropertyManager)
167 Q_DISABLE_COPY(QtDoublePropertyManager)
168};
169
171
172class ITOMWIDGETS_EXPORT QtStringPropertyManager : public QtAbstractPropertyManager
173{
174 Q_OBJECT
175public:
176 QtStringPropertyManager(QObject *parent = 0);
178
179 QString value(const QtProperty *property) const;
180 QRegularExpression regExp(const QtProperty *property) const;
181 EchoMode echoMode(const QtProperty *property) const;
182
183public Q_SLOTS:
184 void setValue(QtProperty *property, const QString &val);
185 void setRegExp(QtProperty *property, const QRegularExpression&regExp);
186 void setEchoMode(QtProperty *property, EchoMode echoMode);
187Q_SIGNALS:
188 void valueChanged(QtProperty *property, const QString &val);
189 void regExpChanged(QtProperty *property, const QRegularExpression&regExp);
190 void echoModeChanged(QtProperty *property, const int);
191protected:
192 QString valueText(const QtProperty *property) const;
193 QString displayText(const QtProperty *property) const;
194 virtual void initializeProperty(QtProperty *property);
195 virtual void uninitializeProperty(QtProperty *property);
196private:
198 Q_DECLARE_PRIVATE(QtStringPropertyManager)
199 Q_DISABLE_COPY(QtStringPropertyManager)
200};
201
203
204class ITOMWIDGETS_EXPORT QtDatePropertyManager : public QtAbstractPropertyManager
205{
206 Q_OBJECT
207public:
208 QtDatePropertyManager(QObject *parent = 0);
210
211 QDate value(const QtProperty *property) const;
212 QDate minimum(const QtProperty *property) const;
213 QDate maximum(const QtProperty *property) const;
214
215public Q_SLOTS:
216 void setValue(QtProperty *property, const QDate &val);
217 void setMinimum(QtProperty *property, const QDate &minVal);
218 void setMaximum(QtProperty *property, const QDate &maxVal);
219 void setRange(QtProperty *property, const QDate &minVal, const QDate &maxVal);
220Q_SIGNALS:
221 void valueChanged(QtProperty *property, const QDate &val);
222 void rangeChanged(QtProperty *property, const QDate &minVal, const QDate &maxVal);
223protected:
224 QString valueText(const QtProperty *property) const;
225 virtual void initializeProperty(QtProperty *property);
226 virtual void uninitializeProperty(QtProperty *property);
227private:
229 Q_DECLARE_PRIVATE(QtDatePropertyManager)
230 Q_DISABLE_COPY(QtDatePropertyManager)
231};
232
234
235class ITOMWIDGETS_EXPORT QtTimePropertyManager : public QtAbstractPropertyManager
236{
237 Q_OBJECT
238public:
239 QtTimePropertyManager(QObject *parent = 0);
241
242 QTime value(const QtProperty *property) const;
243
244public Q_SLOTS:
245 void setValue(QtProperty *property, const QTime &val);
246Q_SIGNALS:
247 void valueChanged(QtProperty *property, const QTime &val);
248protected:
249 QString valueText(const QtProperty *property) const;
250 virtual void initializeProperty(QtProperty *property);
251 virtual void uninitializeProperty(QtProperty *property);
252private:
254 Q_DECLARE_PRIVATE(QtTimePropertyManager)
255 Q_DISABLE_COPY(QtTimePropertyManager)
256};
257
259
261{
262 Q_OBJECT
263public:
264 QtDateTimePropertyManager(QObject *parent = 0);
266
267 QDateTime value(const QtProperty *property) const;
268
269public Q_SLOTS:
270 void setValue(QtProperty *property, const QDateTime &val);
271Q_SIGNALS:
272 void valueChanged(QtProperty *property, const QDateTime &val);
273protected:
274 QString valueText(const QtProperty *property) const;
275 virtual void initializeProperty(QtProperty *property);
276 virtual void uninitializeProperty(QtProperty *property);
277private:
279 Q_DECLARE_PRIVATE(QtDateTimePropertyManager)
280 Q_DISABLE_COPY(QtDateTimePropertyManager)
281};
282
284
286{
287 Q_OBJECT
288public:
289 QtKeySequencePropertyManager(QObject *parent = 0);
291
292 QKeySequence value(const QtProperty *property) const;
293
294public Q_SLOTS:
295 void setValue(QtProperty *property, const QKeySequence &val);
296Q_SIGNALS:
297 void valueChanged(QtProperty *property, const QKeySequence &val);
298protected:
299 QString valueText(const QtProperty *property) const;
300 virtual void initializeProperty(QtProperty *property);
301 virtual void uninitializeProperty(QtProperty *property);
302private:
304 Q_DECLARE_PRIVATE(QtKeySequencePropertyManager)
305 Q_DISABLE_COPY(QtKeySequencePropertyManager)
306};
307
309
310class ITOMWIDGETS_EXPORT QtCharPropertyManager : public QtAbstractPropertyManager
311{
312 Q_OBJECT
313public:
314 QtCharPropertyManager(QObject *parent = 0);
316
317 QChar value(const QtProperty *property) const;
318
319public Q_SLOTS:
320 void setValue(QtProperty *property, const QChar &val);
321Q_SIGNALS:
322 void valueChanged(QtProperty *property, const QChar &val);
323protected:
324 QString valueText(const QtProperty *property) const;
325 virtual void initializeProperty(QtProperty *property);
326 virtual void uninitializeProperty(QtProperty *property);
327private:
329 Q_DECLARE_PRIVATE(QtCharPropertyManager)
330 Q_DISABLE_COPY(QtCharPropertyManager)
331};
332
335
336class ITOMWIDGETS_EXPORT QtLocalePropertyManager : public QtAbstractPropertyManager
337{
338 Q_OBJECT
339public:
340 QtLocalePropertyManager(QObject *parent = 0);
342
343 QtEnumPropertyManager *subEnumPropertyManager() const;
344
345 QLocale value(const QtProperty *property) const;
346
347public Q_SLOTS:
348 void setValue(QtProperty *property, const QLocale &val);
349Q_SIGNALS:
350 void valueChanged(QtProperty *property, const QLocale &val);
351protected:
352 QString valueText(const QtProperty *property) const;
353 virtual void initializeProperty(QtProperty *property);
354 virtual void uninitializeProperty(QtProperty *property);
355private:
357 Q_DECLARE_PRIVATE(QtLocalePropertyManager)
358 Q_DISABLE_COPY(QtLocalePropertyManager)
359 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
360 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
361};
362
364
365class ITOMWIDGETS_EXPORT QtPointPropertyManager : public QtAbstractPropertyManager
366{
367 Q_OBJECT
368public:
369 QtPointPropertyManager(QObject *parent = 0);
371
372 QtIntPropertyManager *subIntPropertyManager() const;
373
374 QPoint value(const QtProperty *property) const;
375
376public Q_SLOTS:
377 void setValue(QtProperty *property, const QPoint &val);
378Q_SIGNALS:
379 void valueChanged(QtProperty *property, const QPoint &val);
380protected:
381 QString valueText(const QtProperty *property) const;
382 virtual void initializeProperty(QtProperty *property);
383 virtual void uninitializeProperty(QtProperty *property);
384private:
386 Q_DECLARE_PRIVATE(QtPointPropertyManager)
387 Q_DISABLE_COPY(QtPointPropertyManager)
388 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
389 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
390};
391
393
394class ITOMWIDGETS_EXPORT QtPointFPropertyManager : public QtAbstractPropertyManager
395{
396 Q_OBJECT
397public:
398 QtPointFPropertyManager(QObject *parent = 0);
400
401 QtDoublePropertyManager *subDoublePropertyManager() const;
402
403 QPointF value(const QtProperty *property) const;
404 int decimals(const QtProperty *property) const;
405
406public Q_SLOTS:
407 void setValue(QtProperty *property, const QPointF &val);
408 void setDecimals(QtProperty *property, int prec);
409Q_SIGNALS:
410 void valueChanged(QtProperty *property, const QPointF &val);
411 void decimalsChanged(QtProperty *property, int prec);
412protected:
413 QString valueText(const QtProperty *property) const;
414 virtual void initializeProperty(QtProperty *property);
415 virtual void uninitializeProperty(QtProperty *property);
416private:
418 Q_DECLARE_PRIVATE(QtPointFPropertyManager)
419 Q_DISABLE_COPY(QtPointFPropertyManager)
420 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
421 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
422};
423
425
426class ITOMWIDGETS_EXPORT QtSizePropertyManager : public QtAbstractPropertyManager
427{
428 Q_OBJECT
429public:
430 QtSizePropertyManager(QObject *parent = 0);
432
433 QtIntPropertyManager *subIntPropertyManager() const;
434
435 QSize value(const QtProperty *property) const;
436 QSize minimum(const QtProperty *property) const;
437 QSize maximum(const QtProperty *property) const;
438
439public Q_SLOTS:
440 void setValue(QtProperty *property, const QSize &val);
441 void setMinimum(QtProperty *property, const QSize &minVal);
442 void setMaximum(QtProperty *property, const QSize &maxVal);
443 void setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal);
444Q_SIGNALS:
445 void valueChanged(QtProperty *property, const QSize &val);
446 void rangeChanged(QtProperty *property, const QSize &minVal, const QSize &maxVal);
447protected:
448 QString valueText(const QtProperty *property) const;
449 virtual void initializeProperty(QtProperty *property);
450 virtual void uninitializeProperty(QtProperty *property);
451private:
453 Q_DECLARE_PRIVATE(QtSizePropertyManager)
454 Q_DISABLE_COPY(QtSizePropertyManager)
455 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
456 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
457};
458
460
461class ITOMWIDGETS_EXPORT QtSizeFPropertyManager : public QtAbstractPropertyManager
462{
463 Q_OBJECT
464public:
465 QtSizeFPropertyManager(QObject *parent = 0);
467
468 QtDoublePropertyManager *subDoublePropertyManager() const;
469
470 QSizeF value(const QtProperty *property) const;
471 QSizeF minimum(const QtProperty *property) const;
472 QSizeF maximum(const QtProperty *property) const;
473 int decimals(const QtProperty *property) const;
474
475public Q_SLOTS:
476 void setValue(QtProperty *property, const QSizeF &val);
477 void setMinimum(QtProperty *property, const QSizeF &minVal);
478 void setMaximum(QtProperty *property, const QSizeF &maxVal);
479 void setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal);
480 void setDecimals(QtProperty *property, int prec);
481Q_SIGNALS:
482 void valueChanged(QtProperty *property, const QSizeF &val);
483 void rangeChanged(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal);
484 void decimalsChanged(QtProperty *property, int prec);
485protected:
486 QString valueText(const QtProperty *property) const;
487 virtual void initializeProperty(QtProperty *property);
488 virtual void uninitializeProperty(QtProperty *property);
489private:
491 Q_DECLARE_PRIVATE(QtSizeFPropertyManager)
492 Q_DISABLE_COPY(QtSizeFPropertyManager)
493 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
494 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
495};
496
498
499class ITOMWIDGETS_EXPORT QtRectPropertyManager : public QtAbstractPropertyManager
500{
501 Q_OBJECT
502public:
503 QtRectPropertyManager(QObject *parent = 0);
505
506 QtIntPropertyManager *subIntPropertyManager() const;
507
508 QRect value(const QtProperty *property) const;
509 QRect constraint(const QtProperty *property) const;
510
511public Q_SLOTS:
512 void setValue(QtProperty *property, const QRect &val);
513 void setConstraint(QtProperty *property, const QRect &constraint);
514Q_SIGNALS:
515 void valueChanged(QtProperty *property, const QRect &val);
516 void constraintChanged(QtProperty *property, const QRect &constraint);
517protected:
518 QString valueText(const QtProperty *property) const;
519 virtual void initializeProperty(QtProperty *property);
520 virtual void uninitializeProperty(QtProperty *property);
521private:
523 Q_DECLARE_PRIVATE(QtRectPropertyManager)
524 Q_DISABLE_COPY(QtRectPropertyManager)
525 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
526 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
527};
528
530
531class ITOMWIDGETS_EXPORT QtRectFPropertyManager : public QtAbstractPropertyManager
532{
533 Q_OBJECT
534public:
535 QtRectFPropertyManager(QObject *parent = 0);
537
538 QtDoublePropertyManager *subDoublePropertyManager() const;
539
540 QRectF value(const QtProperty *property) const;
541 QRectF constraint(const QtProperty *property) const;
542 int decimals(const QtProperty *property) const;
543
544public Q_SLOTS:
545 void setValue(QtProperty *property, const QRectF &val);
546 void setConstraint(QtProperty *property, const QRectF &constraint);
547 void setDecimals(QtProperty *property, int prec);
548Q_SIGNALS:
549 void valueChanged(QtProperty *property, const QRectF &val);
550 void constraintChanged(QtProperty *property, const QRectF &constraint);
551 void decimalsChanged(QtProperty *property, int prec);
552protected:
553 QString valueText(const QtProperty *property) const;
554 virtual void initializeProperty(QtProperty *property);
555 virtual void uninitializeProperty(QtProperty *property);
556private:
558 Q_DECLARE_PRIVATE(QtRectFPropertyManager)
559 Q_DISABLE_COPY(QtRectFPropertyManager)
560 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
561 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
562};
563
564
566
568{
569 Q_OBJECT
570public:
571 QtMarginsPropertyManager(QObject *parent = 0);
573
574 QtIntPropertyManager *subIntPropertyManager() const;
575
576 QMargins value(const QtProperty *property) const;
577 QMargins constraint(const QtProperty *property) const;
578
579public Q_SLOTS:
580 void setValue(QtProperty *property, const QMargins &val);
581 void setConstraint(QtProperty *property, const QMargins &constraint);
582Q_SIGNALS:
583 void valueChanged(QtProperty *property, const QMargins &val);
584 void constraintChanged(QtProperty *property, const QMargins &constraint);
585protected:
586 QString valueText(const QtProperty *property) const;
587 virtual void initializeProperty(QtProperty *property);
588 virtual void uninitializeProperty(QtProperty *property);
589private:
591 Q_DECLARE_PRIVATE(QtMarginsPropertyManager)
592 Q_DISABLE_COPY(QtMarginsPropertyManager)
593 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
594 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
595};
596
597#if QT_VERSION >= 0x050300
598class QtMarginsFPropertyManagerPrivate;
599
600class ITOMWIDGETS_EXPORT QtMarginsFPropertyManager : public QtAbstractPropertyManager
601{
602 Q_OBJECT
603public:
604 QtMarginsFPropertyManager(QObject *parent = 0);
605 ~QtMarginsFPropertyManager();
606
607 QtDoublePropertyManager *subDoublePropertyManager() const;
608
609 QMarginsF value(const QtProperty *property) const;
610 QMarginsF constraint(const QtProperty *property) const;
611
612public Q_SLOTS:
613 void setValue(QtProperty *property, const QMarginsF &val);
614 void setConstraint(QtProperty *property, const QMarginsF &constraint);
615Q_SIGNALS:
616 void valueChanged(QtProperty *property, const QMarginsF &val);
617 void constraintChanged(QtProperty *property, const QMarginsF &constraint);
618protected:
619 QString valueText(const QtProperty *property) const;
620 virtual void initializeProperty(QtProperty *property);
621 virtual void uninitializeProperty(QtProperty *property);
622private:
623 QtMarginsFPropertyManagerPrivate *d_ptr;
624 Q_DECLARE_PRIVATE(QtMarginsFPropertyManager)
625 Q_DISABLE_COPY(QtMarginsFPropertyManager)
626 Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
627 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
628};
629#endif //QT_VERSION >= 0x050300
630
632
633class ITOMWIDGETS_EXPORT QtEnumPropertyManager : public QtAbstractPropertyManager
634{
635 Q_OBJECT
636public:
637 QtEnumPropertyManager(QObject *parent = 0);
639
640 int value(const QtProperty *property) const;
641 QStringList enumNames(const QtProperty *property) const;
642 QMap<int, QIcon> enumIcons(const QtProperty *property) const;
643
644public Q_SLOTS:
645 void setValue(QtProperty *property, int val);
646 void setEnumNames(QtProperty *property, const QStringList &names);
647 void setEnumIcons(QtProperty *property, const QMap<int, QIcon> &icons);
648Q_SIGNALS:
649 void valueChanged(QtProperty *property, int val);
650 void enumNamesChanged(QtProperty *property, const QStringList &names);
651 void enumIconsChanged(QtProperty *property, const QMap<int, QIcon> &icons);
652protected:
653 QString valueText(const QtProperty *property) const;
654 QIcon valueIcon(const QtProperty *property) const;
655 virtual void initializeProperty(QtProperty *property);
656 virtual void uninitializeProperty(QtProperty *property);
657private:
659 Q_DECLARE_PRIVATE(QtEnumPropertyManager)
660 Q_DISABLE_COPY(QtEnumPropertyManager)
661};
662
664
665class ITOMWIDGETS_EXPORT QtFlagPropertyManager : public QtAbstractPropertyManager
666{
667 Q_OBJECT
668public:
669 QtFlagPropertyManager(QObject *parent = 0);
671
672 QtBoolPropertyManager *subBoolPropertyManager() const;
673
674 int value(const QtProperty *property) const;
675 QStringList flagNames(const QtProperty *property) const;
676
677public Q_SLOTS:
678 void setValue(QtProperty *property, int val);
679 void setFlagNames(QtProperty *property, const QStringList &names);
680Q_SIGNALS:
681 void valueChanged(QtProperty *property, int val);
682 void flagNamesChanged(QtProperty *property, const QStringList &names);
683protected:
684 QString valueText(const QtProperty *property) const;
685 virtual void initializeProperty(QtProperty *property);
686 virtual void uninitializeProperty(QtProperty *property);
687private:
689 Q_DECLARE_PRIVATE(QtFlagPropertyManager)
690 Q_DISABLE_COPY(QtFlagPropertyManager)
691 Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
692 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
693};
694
696
698{
699 Q_OBJECT
700public:
701 QtSizePolicyPropertyManager(QObject *parent = 0);
703
704 QtIntPropertyManager *subIntPropertyManager() const;
705 QtEnumPropertyManager *subEnumPropertyManager() const;
706
707 QSizePolicy value(const QtProperty *property) const;
708
709public Q_SLOTS:
710 void setValue(QtProperty *property, const QSizePolicy &val);
711Q_SIGNALS:
712 void valueChanged(QtProperty *property, const QSizePolicy &val);
713protected:
714 QString valueText(const QtProperty *property) const;
715 virtual void initializeProperty(QtProperty *property);
716 virtual void uninitializeProperty(QtProperty *property);
717private:
719 Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager)
720 Q_DISABLE_COPY(QtSizePolicyPropertyManager)
721 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
722 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
723 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
724};
725
727
728class ITOMWIDGETS_EXPORT QtFontPropertyManager : public QtAbstractPropertyManager
729{
730 Q_OBJECT
731public:
732 QtFontPropertyManager(QObject *parent = 0);
734
735 QtIntPropertyManager *subIntPropertyManager() const;
736 QtEnumPropertyManager *subEnumPropertyManager() const;
737 QtBoolPropertyManager *subBoolPropertyManager() const;
738
739 QFont value(const QtProperty *property) const;
740
741public Q_SLOTS:
742 void setValue(QtProperty *property, const QFont &val);
743Q_SIGNALS:
744 void valueChanged(QtProperty *property, const QFont &val);
745protected:
746 QString valueText(const QtProperty *property) const;
747 QIcon valueIcon(const QtProperty *property) const;
748 virtual void initializeProperty(QtProperty *property);
749 virtual void uninitializeProperty(QtProperty *property);
750private:
752 Q_DECLARE_PRIVATE(QtFontPropertyManager)
753 Q_DISABLE_COPY(QtFontPropertyManager)
754 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
755 Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
756 Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
757 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
758 Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseChanged())
759 Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseDelayedChange())
760};
761
763
764class ITOMWIDGETS_EXPORT QtColorPropertyManager : public QtAbstractPropertyManager
765{
766 Q_OBJECT
767public:
768 QtColorPropertyManager(QObject *parent = 0);
770
771 QtIntPropertyManager *subIntPropertyManager() const;
772
773 QColor value(const QtProperty *property) const;
774
775public Q_SLOTS:
776 void setValue(QtProperty *property, const QColor &val);
777Q_SIGNALS:
778 void valueChanged(QtProperty *property, const QColor &val);
779protected:
780 QString valueText(const QtProperty *property) const;
781 QIcon valueIcon(const QtProperty *property) const;
782 virtual void initializeProperty(QtProperty *property);
783 virtual void uninitializeProperty(QtProperty *property);
784private:
786 Q_DECLARE_PRIVATE(QtColorPropertyManager)
787 Q_DISABLE_COPY(QtColorPropertyManager)
788 Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
789 Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
790};
791
793
794class ITOMWIDGETS_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager
795{
796 Q_OBJECT
797public:
798 QtCursorPropertyManager(QObject *parent = 0);
800
801#ifndef QT_NO_CURSOR
802 QCursor value(const QtProperty *property) const;
803#endif
804
805public Q_SLOTS:
806 void setValue(QtProperty *property, const QCursor &val);
807Q_SIGNALS:
808 void valueChanged(QtProperty *property, const QCursor &val);
809protected:
810 QString valueText(const QtProperty *property) const;
811 QIcon valueIcon(const QtProperty *property) const;
812 virtual void initializeProperty(QtProperty *property);
813 virtual void uninitializeProperty(QtProperty *property);
814private:
816 Q_DECLARE_PRIVATE(QtCursorPropertyManager)
817 Q_DISABLE_COPY(QtCursorPropertyManager)
818};
819
820#if QT_VERSION >= 0x040400
821QT_END_NAMESPACE
822#endif
823
824#endif
The QtAbstractPropertyManager provides an interface for property managers.
Definition qtpropertybrowser.h:102
virtual EchoMode echoMode(const QtProperty *) const
Definition qtpropertybrowser.cpp:761
virtual void initializeProperty(QtProperty *property)=0
virtual QString displayText(const QtProperty *property) const
Definition qtpropertybrowser.cpp:747
virtual QIcon valueIcon(const QtProperty *property) const
Definition qtpropertybrowser.cpp:717
virtual bool hasValue(const QtProperty *property) const
Definition qtpropertybrowser.cpp:702
virtual QString valueText(const QtProperty *property) const
Definition qtpropertybrowser.cpp:732
virtual void uninitializeProperty(QtProperty *property)
Definition qtpropertybrowser.cpp:828
The QtBoolPropertyManager class provides and manages boolean properties.
Definition qtpropertymanager.h:110
void valueChanged(QtProperty *property, bool val)
Definition qtpropertymanager.cpp:1490
The QtCharPropertyManager provides and manages QChar properties.
Definition qtpropertymanager.h:311
void valueChanged(QtProperty *property, const QChar &val)
Definition qtpropertymanager.cpp:2218
The QtColorPropertyManager provides and manages QColor properties.
Definition qtpropertymanager.h:765
void valueChanged(QtProperty *property, const QColor &val)
Definition qtpropertymanager.cpp:6857
The QtCursorPropertyManager provides and manages QCursor properties.
Definition qtpropertymanager.h:795
void valueChanged(QtProperty *property, const QCursor &val)
Definition qtpropertymanager.cpp:7140
The QtDatePropertyManager provides and manages QDate properties.
Definition qtpropertymanager.h:205
void rangeChanged(QtProperty *property, const QDate &minVal, const QDate &maxVal)
void valueChanged(QtProperty *property, const QDate &val)
Definition qtpropertymanager.cpp:1646
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition qtpropertymanager.h:261
void valueChanged(QtProperty *property, const QDateTime &val)
Definition qtpropertymanager.cpp:1994
The QtDoublePropertyManager provides and manages double properties.
Definition qtpropertymanager.h:136
void valueChanged(QtProperty *property, double val)
void singleStepChanged(QtProperty *property, double step)
void decimalsChanged(QtProperty *property, int prec)
void rangeChanged(QtProperty *property, double minVal, double maxVal)
Definition qtpropertymanager.cpp:908
The QtEnumPropertyManager provides and manages enum properties.
Definition qtpropertymanager.h:634
void enumIconsChanged(QtProperty *property, const QMap< int, QIcon > &icons)
void enumNamesChanged(QtProperty *property, const QStringList &names)
void valueChanged(QtProperty *property, int val)
Definition qtpropertymanager.cpp:5461
The QtFlagPropertyManager provides and manages flag properties.
Definition qtpropertymanager.h:666
void flagNamesChanged(QtProperty *property, const QStringList &names)
void valueChanged(QtProperty *property, int val)
Definition qtpropertymanager.cpp:5730
The QtFontPropertyManager provides and manages QFont properties.
Definition qtpropertymanager.h:729
void valueChanged(QtProperty *property, const QFont &val)
Definition qtpropertymanager.cpp:6382
The QtGroupPropertyManager provides and manages group properties.
Definition qtpropertymanager.h:60
The QtIntPropertyManager provides and manages int properties.
Definition qtpropertymanager.h:76
void rangeChanged(QtProperty *property, int minVal, int maxVal)
void singleStepChanged(QtProperty *property, int step)
void valueChanged(QtProperty *property, int val)
Definition qtpropertymanager.cpp:632
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition qtpropertymanager.h:286
void valueChanged(QtProperty *property, const QKeySequence &val)
Definition qtpropertymanager.cpp:2108
The QtLocalePropertyManager provides and manages QLocale properties.
Definition qtpropertymanager.h:337
void valueChanged(QtProperty *property, const QLocale &val)
Definition qtpropertymanager.cpp:2327
The QtMarginsPropertyManager provides and manages QMargins properties.
Definition qtpropertymanager.h:568
Definition qtpropertymanager.cpp:4687
The QtPointFPropertyManager provides and manages QPointF properties.
Definition qtpropertymanager.h:395
void valueChanged(QtProperty *property, const QPointF &val)
void decimalsChanged(QtProperty *property, int prec)
Definition qtpropertymanager.cpp:2788
The QtPointPropertyManager provides and manages QPoint properties.
Definition qtpropertymanager.h:366
void valueChanged(QtProperty *property, const QPoint &val)
Definition qtpropertymanager.cpp:2576
The QtProperty class encapsulates an instance of a property.
Definition qtpropertybrowser.h:61
The QtRectFPropertyManager provides and manages QRectF properties.
Definition qtpropertymanager.h:532
void constraintChanged(QtProperty *property, const QRectF &constraint)
void decimalsChanged(QtProperty *property, int prec)
void valueChanged(QtProperty *property, const QRectF &val)
Definition qtpropertymanager.cpp:4216
The QtRectPropertyManager provides and manages QRect properties.
Definition qtpropertymanager.h:500
void constraintChanged(QtProperty *property, const QRect &constraint)
void valueChanged(QtProperty *property, const QRect &val)
Definition qtpropertymanager.cpp:3808
The QtSizeFPropertyManager provides and manages QSizeF properties.
Definition qtpropertymanager.h:462
void valueChanged(QtProperty *property, const QSizeF &val)
void rangeChanged(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal)
void decimalsChanged(QtProperty *property, int prec)
Definition qtpropertymanager.cpp:3408
The QtSizePolicyPropertyManager provides and manages QSizePolicy properties.
Definition qtpropertymanager.h:698
void valueChanged(QtProperty *property, const QSizePolicy &val)
Definition qtpropertymanager.cpp:6057
The QtSizePropertyManager provides and manages QSize properties.
Definition qtpropertymanager.h:427
void valueChanged(QtProperty *property, const QSize &val)
void rangeChanged(QtProperty *property, const QSize &minVal, const QSize &maxVal)
Definition qtpropertymanager.cpp:3064
The QtStringPropertyManager provides and manages QString properties.
Definition qtpropertymanager.h:173
void valueChanged(QtProperty *property, const QString &val)
void regExpChanged(QtProperty *property, const QRegularExpression &regExp)
Definition qtpropertymanager.cpp:1238
The QtTimePropertyManager provides and manages QTime properties.
Definition qtpropertymanager.h:236
void valueChanged(QtProperty *property, const QTime &val)
Definition qtpropertymanager.cpp:1878