Computer Assited Medical Intervention Tool Kit  version 4.1
qtpropertymanager.h
Go to the documentation of this file.
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 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
11 ** Contact: http://www.qt-project.org/legal
12 **
13 ** This file is part of the Qt Solutions component.
14 **
15 ** You may use this file under the terms of the BSD license as follows:
16 **
17 ** "Redistribution and use in source and binary forms, with or without
18 ** modification, are permitted provided that the following conditions are
19 ** met:
20 ** * Redistributions of source code must retain the above copyright
21 ** notice, this list of conditions and the following disclaimer.
22 ** * Redistributions in binary form must reproduce the above copyright
23 ** notice, this list of conditions and the following disclaimer in
24 ** the documentation and/or other materials provided with the
25 ** distribution.
26 ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
27 ** the names of its contributors may be used to endorse or promote
28 ** products derived from this software without specific prior written
29 ** permission.
30 ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
31 ** of its contributors may be used to endorse or promote products derived
32 ** from this software without specific prior written permission.
33 **
34 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
41 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
42 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
45 **
46 ****************************************************************************/
47 
48 
49 #ifndef QTPROPERTYMANAGER_H
50 #define QTPROPERTYMANAGER_H
51 
52 #include "qtpropertybrowser.h"
53 #include <QPushButton>
54 #include <QLineEdit>
55 
56 #if QT_VERSION >= 0x040400
57 QT_BEGIN_NAMESPACE
58 #endif
59 
60 class QDate;
61 class QTime;
62 class QDateTime;
63 class QLocale;
64 
73  Q_OBJECT
74 public:
75  QtGroupPropertyManager(QObject* parent = nullptr);
76 
80  ~QtGroupPropertyManager() override = default;
81 
82 protected:
83  bool hasValue(const QtProperty* property) const override;
84 
85  void initializeProperty(QtProperty* property) override;
86  void uninitializeProperty(QtProperty* property) override;
87 };
88 
90 
92  Q_OBJECT
93 public:
94  QtIntPropertyManager(QObject* parent = nullptr);
95  ~QtIntPropertyManager() override;
96 
97  int value(const QtProperty* property) const;
98  int minimum(const QtProperty* property) const;
99  int maximum(const QtProperty* property) const;
100  int singleStep(const QtProperty* property) const;
101  bool isReadOnly(const QtProperty* property) const;
102 
103 public Q_SLOTS:
104  void setValue(QtProperty* property, int val);
105  void setMinimum(QtProperty* property, int minVal);
106  void setMaximum(QtProperty* property, int maxVal);
107  void setRange(QtProperty* property, int minVal, int maxVal);
108  void setSingleStep(QtProperty* property, int step);
109  void setReadOnly(QtProperty* property, bool readOnly);
110 Q_SIGNALS:
111  void valueChanged(QtProperty* property, int val);
112  void rangeChanged(QtProperty* property, int minVal, int maxVal);
113  void singleStepChanged(QtProperty* property, int step);
114  void readOnlyChanged(QtProperty* property, bool readOnly);
115 protected:
116  QString valueText(const QtProperty* property) const override;
117  void initializeProperty(QtProperty* property) override;
118  void uninitializeProperty(QtProperty* property) override;
119 private:
121  Q_DECLARE_PRIVATE(QtIntPropertyManager)
122  Q_DISABLE_COPY(QtIntPropertyManager)
123 };
124 
126 
128  Q_OBJECT
129 public:
130  QtBoolPropertyManager(QObject* parent = nullptr);
131  ~QtBoolPropertyManager() override;
132 
133  bool value(const QtProperty* property) const;
134  bool textVisible(const QtProperty* property) const;
135 
136 public Q_SLOTS:
137  void setValue(QtProperty* property, bool val);
138  void setTextVisible(QtProperty* property, bool textVisible);
139 Q_SIGNALS:
140  void valueChanged(QtProperty* property, bool val);
141  void textVisibleChanged(QtProperty* property, bool);
142 protected:
143  QString valueText(const QtProperty* property) const override;
144  QIcon valueIcon(const QtProperty* property) const override;
145  void initializeProperty(QtProperty* property) override;
146  void uninitializeProperty(QtProperty* property) override;
147 private:
149  Q_DECLARE_PRIVATE(QtBoolPropertyManager)
150  Q_DISABLE_COPY(QtBoolPropertyManager)
151 };
152 
154 
156  Q_OBJECT
157 public:
158  QtDoublePropertyManager(QObject* parent = nullptr);
159  ~QtDoublePropertyManager() override;
160 
161  double value(const QtProperty* property) const;
162  double minimum(const QtProperty* property) const;
163  double maximum(const QtProperty* property) const;
164  double singleStep(const QtProperty* property) const;
165  int decimals(const QtProperty* property) const;
166  bool isReadOnly(const QtProperty* property) const;
167 
168 public Q_SLOTS:
169  void setValue(QtProperty* property, double val);
170  void setMinimum(QtProperty* property, double minVal);
171  void setMaximum(QtProperty* property, double maxVal);
172  void setRange(QtProperty* property, double minVal, double maxVal);
173  void setSingleStep(QtProperty* property, double step);
174  void setDecimals(QtProperty* property, int prec);
175  void setReadOnly(QtProperty* property, bool readOnly);
176 Q_SIGNALS:
177  void valueChanged(QtProperty* property, double val);
178  void rangeChanged(QtProperty* property, double minVal, double maxVal);
179  void singleStepChanged(QtProperty* property, double step);
180  void decimalsChanged(QtProperty* property, int prec);
181  void readOnlyChanged(QtProperty* property, bool readOnly);
182 protected:
183  QString valueText(const QtProperty* property) const override;
184  void initializeProperty(QtProperty* property) override;
185  void uninitializeProperty(QtProperty* property) override;
186 private:
188  Q_DECLARE_PRIVATE(QtDoublePropertyManager)
189  Q_DISABLE_COPY(QtDoublePropertyManager)
190 };
191 
193 
195  Q_OBJECT
196 public:
197  QtStringPropertyManager(QObject* parent = nullptr);
198  ~QtStringPropertyManager() override;
199 
200  QString value(const QtProperty* property) const;
201  QRegExp regExp(const QtProperty* property) const;
202  EchoMode echoMode(const QtProperty* property) const override;
203  bool isReadOnly(const QtProperty* property) const;
204 
205 public Q_SLOTS:
206  void setValue(QtProperty* property, const QString& val);
207  void setRegExp(QtProperty* property, const QRegExp& regExp);
208  void setEchoMode(QtProperty* property, EchoMode echoMode);
209  void setReadOnly(QtProperty* property, bool readOnly);
210 Q_SIGNALS:
211  void valueChanged(QtProperty* property, const QString& val);
212  void regExpChanged(QtProperty* property, const QRegExp& regExp);
213  void echoModeChanged(QtProperty* property, const int);
214  void readOnlyChanged(QtProperty* property, bool);
215 protected:
216  QString valueText(const QtProperty* property) const override;
217  QString displayText(const QtProperty* property) const override;
218  void initializeProperty(QtProperty* property) override;
219  void uninitializeProperty(QtProperty* property) override;
220 private:
222  Q_DECLARE_PRIVATE(QtStringPropertyManager)
223  Q_DISABLE_COPY(QtStringPropertyManager)
224 };
225 
227 
229  Q_OBJECT
230 public:
231  QtDatePropertyManager(QObject* parent = nullptr);
232  ~QtDatePropertyManager() override;
233 
234  QDate value(const QtProperty* property) const;
235  QDate minimum(const QtProperty* property) const;
236  QDate maximum(const QtProperty* property) const;
237 
238 public Q_SLOTS:
239  void setValue(QtProperty* property, const QDate& val);
240  void setMinimum(QtProperty* property, const QDate& minVal);
241  void setMaximum(QtProperty* property, const QDate& maxVal);
242  void setRange(QtProperty* property, const QDate& minVal, const QDate& maxVal);
243 Q_SIGNALS:
244  void valueChanged(QtProperty* property, const QDate& val);
245  void rangeChanged(QtProperty* property, const QDate& minVal, const QDate& maxVal);
246 protected:
247  QString valueText(const QtProperty* property) const override;
248  void initializeProperty(QtProperty* property) override;
249  void uninitializeProperty(QtProperty* property) override;
250 private:
252  Q_DECLARE_PRIVATE(QtDatePropertyManager)
253  Q_DISABLE_COPY(QtDatePropertyManager)
254 };
255 
257 
259  Q_OBJECT
260 public:
261  QtTimePropertyManager(QObject* parent = nullptr);
262  ~QtTimePropertyManager() override;
263 
264  QTime value(const QtProperty* property) const;
265 
266 public Q_SLOTS:
267  void setValue(QtProperty* property, const QTime& val);
268 Q_SIGNALS:
269  void valueChanged(QtProperty* property, const QTime& val);
270 protected:
271  QString valueText(const QtProperty* property) const override;
272  void initializeProperty(QtProperty* property) override;
273  void uninitializeProperty(QtProperty* property) override;
274 private:
276  Q_DECLARE_PRIVATE(QtTimePropertyManager)
277  Q_DISABLE_COPY(QtTimePropertyManager)
278 };
279 
281 
283  Q_OBJECT
284 public:
285  QtDateTimePropertyManager(QObject* parent = nullptr);
286  ~QtDateTimePropertyManager() override;
287 
288  QDateTime value(const QtProperty* property) const;
289 
290 public Q_SLOTS:
291  void setValue(QtProperty* property, const QDateTime& val);
292 Q_SIGNALS:
293  void valueChanged(QtProperty* property, const QDateTime& val);
294 protected:
295  QString valueText(const QtProperty* property) const override;
296  void initializeProperty(QtProperty* property) override;
297  void uninitializeProperty(QtProperty* property) override;
298 private:
300  Q_DECLARE_PRIVATE(QtDateTimePropertyManager)
301  Q_DISABLE_COPY(QtDateTimePropertyManager)
302 };
303 
305 
307  Q_OBJECT
308 public:
309  QtKeySequencePropertyManager(QObject* parent = nullptr);
310  ~QtKeySequencePropertyManager() override;
311 
312  QKeySequence value(const QtProperty* property) const;
313 
314 public Q_SLOTS:
315  void setValue(QtProperty* property, const QKeySequence& val);
316 Q_SIGNALS:
317  void valueChanged(QtProperty* property, const QKeySequence& val);
318 protected:
319  QString valueText(const QtProperty* property) const override;
320  void initializeProperty(QtProperty* property) override;
321  void uninitializeProperty(QtProperty* property) override;
322 private:
324  Q_DECLARE_PRIVATE(QtKeySequencePropertyManager)
325  Q_DISABLE_COPY(QtKeySequencePropertyManager)
326 };
327 
329 
331  Q_OBJECT
332 public:
333  QtCharPropertyManager(QObject* parent = nullptr);
334  ~QtCharPropertyManager() override;
335 
336  QChar value(const QtProperty* property) const;
337 
338 public Q_SLOTS:
339  void setValue(QtProperty* property, const QChar& val);
340 Q_SIGNALS:
341  void valueChanged(QtProperty* property, const QChar& val);
342 protected:
343  QString valueText(const QtProperty* property) const override;
344  void initializeProperty(QtProperty* property) override;
345  void uninitializeProperty(QtProperty* property) override;
346 private:
348  Q_DECLARE_PRIVATE(QtCharPropertyManager)
349  Q_DISABLE_COPY(QtCharPropertyManager)
350 };
351 
354 
356  Q_OBJECT
357 public:
358  QtLocalePropertyManager(QObject* parent = nullptr);
359  ~QtLocalePropertyManager() override;
360 
361  QtEnumPropertyManager* subEnumPropertyManager() const;
362 
363  QLocale value(const QtProperty* property) const;
364 
365 public Q_SLOTS:
366  void setValue(QtProperty* property, const QLocale& val);
367 Q_SIGNALS:
368  void valueChanged(QtProperty* property, const QLocale& val);
369 protected:
370  QString valueText(const QtProperty* property) const override;
371  void initializeProperty(QtProperty* property) override;
372  void uninitializeProperty(QtProperty* property) override;
373 private:
375  Q_DECLARE_PRIVATE(QtLocalePropertyManager)
376  Q_DISABLE_COPY(QtLocalePropertyManager)
377  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty*, int))
378  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
379 };
380 
382 
384  Q_OBJECT
385 public:
386  QtPointPropertyManager(QObject* parent = nullptr);
387  ~QtPointPropertyManager() override;
388 
389  QtIntPropertyManager* subIntPropertyManager() const;
390 
391  QPoint value(const QtProperty* property) const;
392 
393 public Q_SLOTS:
394  void setValue(QtProperty* property, const QPoint& val);
395 Q_SIGNALS:
396  void valueChanged(QtProperty* property, const QPoint& val);
397 protected:
398  QString valueText(const QtProperty* property) const override;
399  void initializeProperty(QtProperty* property) override;
400  void uninitializeProperty(QtProperty* property) override;
401 private:
403  Q_DECLARE_PRIVATE(QtPointPropertyManager)
404  Q_DISABLE_COPY(QtPointPropertyManager)
405  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
406  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
407 };
408 
410 
412  Q_OBJECT
413 public:
414  QtPointFPropertyManager(QObject* parent = nullptr);
415  ~QtPointFPropertyManager() override;
416 
417  QtDoublePropertyManager* subDoublePropertyManager() const;
418 
419  QPointF value(const QtProperty* property) const;
420  int decimals(const QtProperty* property) const;
421 
422 public Q_SLOTS:
423  void setValue(QtProperty* property, const QPointF& val);
424  void setDecimals(QtProperty* property, int prec);
425 Q_SIGNALS:
426  void valueChanged(QtProperty* property, const QPointF& val);
427  void decimalsChanged(QtProperty* property, int prec);
428 protected:
429  QString valueText(const QtProperty* property) const override;
430  void initializeProperty(QtProperty* property) override;
431  void uninitializeProperty(QtProperty* property) override;
432 private:
434  Q_DECLARE_PRIVATE(QtPointFPropertyManager)
435  Q_DISABLE_COPY(QtPointFPropertyManager)
436  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty*, double))
437  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
438 };
439 
441 
443  Q_OBJECT
444 public:
445  QtSizePropertyManager(QObject* parent = nullptr);
446  ~QtSizePropertyManager() override;
447 
448  QtIntPropertyManager* subIntPropertyManager() const;
449 
450  QSize value(const QtProperty* property) const;
451  QSize minimum(const QtProperty* property) const;
452  QSize maximum(const QtProperty* property) const;
453 
454 public Q_SLOTS:
455  void setValue(QtProperty* property, const QSize& val);
456  void setMinimum(QtProperty* property, const QSize& minVal);
457  void setMaximum(QtProperty* property, const QSize& maxVal);
458  void setRange(QtProperty* property, const QSize& minVal, const QSize& maxVal);
459 Q_SIGNALS:
460  void valueChanged(QtProperty* property, const QSize& val);
461  void rangeChanged(QtProperty* property, const QSize& minVal, const QSize& maxVal);
462 protected:
463  QString valueText(const QtProperty* property) const override;
464  void initializeProperty(QtProperty* property) override;
465  void uninitializeProperty(QtProperty* property) override;
466 private:
468  Q_DECLARE_PRIVATE(QtSizePropertyManager)
469  Q_DISABLE_COPY(QtSizePropertyManager)
470  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
471  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
472 };
473 
475 
477  Q_OBJECT
478 public:
479  QtSizeFPropertyManager(QObject* parent = nullptr);
480  ~QtSizeFPropertyManager() override;
481 
482  QtDoublePropertyManager* subDoublePropertyManager() const;
483 
484  QSizeF value(const QtProperty* property) const;
485  QSizeF minimum(const QtProperty* property) const;
486  QSizeF maximum(const QtProperty* property) const;
487  int decimals(const QtProperty* property) const;
488 
489 public Q_SLOTS:
490  void setValue(QtProperty* property, const QSizeF& val);
491  void setMinimum(QtProperty* property, const QSizeF& minVal);
492  void setMaximum(QtProperty* property, const QSizeF& maxVal);
493  void setRange(QtProperty* property, const QSizeF& minVal, const QSizeF& maxVal);
494  void setDecimals(QtProperty* property, int prec);
495 Q_SIGNALS:
496  void valueChanged(QtProperty* property, const QSizeF& val);
497  void rangeChanged(QtProperty* property, const QSizeF& minVal, const QSizeF& maxVal);
498  void decimalsChanged(QtProperty* property, int prec);
499 protected:
500  QString valueText(const QtProperty* property) const override;
501  void initializeProperty(QtProperty* property) override;
502  void uninitializeProperty(QtProperty* property) override;
503 private:
505  Q_DECLARE_PRIVATE(QtSizeFPropertyManager)
506  Q_DISABLE_COPY(QtSizeFPropertyManager)
507  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty*, double))
508  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
509 };
510 
512 
514  Q_OBJECT
515 public:
516  QtRectPropertyManager(QObject* parent = nullptr);
517  ~QtRectPropertyManager() override;
518 
519  QtIntPropertyManager* subIntPropertyManager() const;
520 
521  QRect value(const QtProperty* property) const;
522  QRect constraint(const QtProperty* property) const;
523 
524 public Q_SLOTS:
525  void setValue(QtProperty* property, const QRect& val);
526  void setConstraint(QtProperty* property, const QRect& constraint);
527 Q_SIGNALS:
528  void valueChanged(QtProperty* property, const QRect& val);
529  void constraintChanged(QtProperty* property, const QRect& constraint);
530 protected:
531  QString valueText(const QtProperty* property) const override;
532  void initializeProperty(QtProperty* property) override;
533  void uninitializeProperty(QtProperty* property) override;
534 private:
536  Q_DECLARE_PRIVATE(QtRectPropertyManager)
537  Q_DISABLE_COPY(QtRectPropertyManager)
538  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
539  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
540 };
541 
543 
545  Q_OBJECT
546 public:
547  QtRectFPropertyManager(QObject* parent = nullptr);
548  ~QtRectFPropertyManager() override;
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 override;
566  void initializeProperty(QtProperty* property) override;
567  void uninitializeProperty(QtProperty* property) override;
568 private:
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 
578 class QVector3D;
579 
581  Q_OBJECT
582 public:
583  QtVector3DPropertyManager(QObject* parent = nullptr);
584  ~QtVector3DPropertyManager() override;
585 
586  QtDoublePropertyManager* subDoublePropertyManager() const;
587 
588  QVector3D value(const QtProperty* property) const;
589  int decimals(const QtProperty* property) const;
590 
591 public Q_SLOTS:
592  void setValue(QtProperty* property, const QVector3D& val);
593  void setDecimals(QtProperty* property, int prec);
594 Q_SIGNALS:
595  void valueChanged(QtProperty* property, const QVector3D& val);
596  void decimalsChanged(QtProperty* property, int prec);
597 protected:
598  QString valueText(const QtProperty* property) const override;
599  void initializeProperty(QtProperty* property) override;
600  void uninitializeProperty(QtProperty* property) override;
601 private:
603  Q_DECLARE_PRIVATE(QtVector3DPropertyManager)
604  Q_DISABLE_COPY(QtVector3DPropertyManager)
605  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty*, double))
606  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
607 };
608 
610 
612  Q_OBJECT
613 public:
614  QtEnumPropertyManager(QObject* parent = nullptr);
615  ~QtEnumPropertyManager() override;
616 
617  int value(const QtProperty* property) const;
618  QStringList enumNames(const QtProperty* property) const;
619  QMap<int, QIcon> enumIcons(const QtProperty* property) const;
620 
621 public Q_SLOTS:
622  void setValue(QtProperty* property, int val);
623  void setEnumNames(QtProperty* property, const QStringList& names);
624  void setEnumIcons(QtProperty* property, const QMap<int, QIcon>& icons);
625 Q_SIGNALS:
626  void valueChanged(QtProperty* property, int val);
627  void enumNamesChanged(QtProperty* property, const QStringList& names);
628  void enumIconsChanged(QtProperty* property, const QMap<int, QIcon>& icons);
629 protected:
630  QString valueText(const QtProperty* property) const override;
631  QIcon valueIcon(const QtProperty* property) const override;
632  void initializeProperty(QtProperty* property) override;
633  void uninitializeProperty(QtProperty* property) override;
634 private:
636  Q_DECLARE_PRIVATE(QtEnumPropertyManager)
637  Q_DISABLE_COPY(QtEnumPropertyManager)
638 };
639 
641 
643  Q_OBJECT
644 public:
645  QtFlagPropertyManager(QObject* parent = nullptr);
646  ~QtFlagPropertyManager() override;
647 
648  QtBoolPropertyManager* subBoolPropertyManager() const;
649 
650  int value(const QtProperty* property) const;
651  QStringList flagNames(const QtProperty* property) const;
652 
653 public Q_SLOTS:
654  void setValue(QtProperty* property, int val);
655  void setFlagNames(QtProperty* property, const QStringList& names);
656 Q_SIGNALS:
657  void valueChanged(QtProperty* property, int val);
658  void flagNamesChanged(QtProperty* property, const QStringList& names);
659 protected:
660  QString valueText(const QtProperty* property) const override;
661  void initializeProperty(QtProperty* property) override;
662  void uninitializeProperty(QtProperty* property) override;
663 private:
665  Q_DECLARE_PRIVATE(QtFlagPropertyManager)
666  Q_DISABLE_COPY(QtFlagPropertyManager)
667  Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty*, bool))
668  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
669 };
670 
672 
674  Q_OBJECT
675 public:
676  QtSizePolicyPropertyManager(QObject* parent = nullptr);
677  ~QtSizePolicyPropertyManager() override;
678 
679  QtIntPropertyManager* subIntPropertyManager() const;
680  QtEnumPropertyManager* subEnumPropertyManager() const;
681 
682  QSizePolicy value(const QtProperty* property) const;
683 
684 public Q_SLOTS:
685  void setValue(QtProperty* property, const QSizePolicy& val);
686 Q_SIGNALS:
687  void valueChanged(QtProperty* property, const QSizePolicy& val);
688 protected:
689  QString valueText(const QtProperty* property) const override;
690  void initializeProperty(QtProperty* property) override;
691  void uninitializeProperty(QtProperty* property) override;
692 private:
694  Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager)
695  Q_DISABLE_COPY(QtSizePolicyPropertyManager)
696  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
697  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty*, int))
698  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
699 };
700 
702 
704  Q_OBJECT
705 public:
706  QtFontPropertyManager(QObject* parent = nullptr);
707  ~QtFontPropertyManager() override;
708 
709  QtIntPropertyManager* subIntPropertyManager() const;
710  QtEnumPropertyManager* subEnumPropertyManager() const;
711  QtBoolPropertyManager* subBoolPropertyManager() const;
712 
713  QFont value(const QtProperty* property) const;
714 
715 public Q_SLOTS:
716  void setValue(QtProperty* property, const QFont& val);
717 Q_SIGNALS:
718  void valueChanged(QtProperty* property, const QFont& val);
719 protected:
720  QString valueText(const QtProperty* property) const override;
721  QIcon valueIcon(const QtProperty* property) const override;
722  void initializeProperty(QtProperty* property) override;
723  void uninitializeProperty(QtProperty* property) override;
724 private:
726  Q_DECLARE_PRIVATE(QtFontPropertyManager)
727  Q_DISABLE_COPY(QtFontPropertyManager)
728  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
729  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty*, int))
730  Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty*, bool))
731  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
732  Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseChanged())
733  Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseDelayedChange())
734 };
735 
737 
739  Q_OBJECT
740 public:
741  QtColorPropertyManager(QObject* parent = nullptr);
742  ~QtColorPropertyManager() override;
743 
744  QtIntPropertyManager* subIntPropertyManager() const;
745 
746  QColor value(const QtProperty* property) const;
747 
748 public Q_SLOTS:
749  void setValue(QtProperty* property, const QColor& val);
750 Q_SIGNALS:
751  void valueChanged(QtProperty* property, const QColor& val);
752 protected:
753  QString valueText(const QtProperty* property) const override;
754  QIcon valueIcon(const QtProperty* property) const override;
755  void initializeProperty(QtProperty* property) override;
756  void uninitializeProperty(QtProperty* property) override;
757 private:
758  QtColorPropertyManagerPrivate* d_ptr;
759  Q_DECLARE_PRIVATE(QtColorPropertyManager)
760  Q_DISABLE_COPY(QtColorPropertyManager)
761  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty*, int))
762  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty*))
763 };
764 
766 
767 class QT_QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager {
768  Q_OBJECT
769 public:
770  QtCursorPropertyManager(QObject* parent = nullptr);
771  ~QtCursorPropertyManager() override;
772 
773 #ifndef QT_NO_CURSOR
774  QCursor value(const QtProperty* property) const;
775 #endif
776 
777 public Q_SLOTS:
778  void setValue(QtProperty* property, const QCursor& val);
779 Q_SIGNALS:
780  void valueChanged(QtProperty* property, const QCursor& val);
781 protected:
782  QString valueText(const QtProperty* property) const override;
783  QIcon valueIcon(const QtProperty* property) const override;
784  void initializeProperty(QtProperty* property) override;
785  void uninitializeProperty(QtProperty* property) override;
786 private:
788  Q_DECLARE_PRIVATE(QtCursorPropertyManager)
789  Q_DISABLE_COPY(QtCursorPropertyManager)
790 };
791 
792 #if QT_VERSION >= 0x040400
793 QT_END_NAMESPACE
794 #endif
795 
796 #endif
Definition: qtpropertymanager.cpp:2035
Definition: qtpropertymanager.cpp:639
The QtDoublePropertyManager provides and manages double properties.
Definition: qtpropertymanager.h:155
QtDatePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:251
The QtRectPropertyManager provides and manages QRect properties.
Definition: qtpropertymanager.h:513
The QtPointFPropertyManager provides and manages QPointF properties.
Definition: qtpropertymanager.h:411
Definition: qtpropertymanager.cpp:2695
QtRectFPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:569
The QtFlagPropertyManager provides and manages flag properties.
Definition: qtpropertymanager.h:642
QtDoublePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:187
QtTimePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:275
virtual EchoMode echoMode(const QtProperty *) const
Definition: qtpropertybrowser.cpp:735
Definition: qtpropertymanager.cpp:6465
The QtLocalePropertyManager provides and manages QLocale properties.
Definition: qtpropertymanager.h:355
QtPointPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:402
The QtAbstractPropertyManager provides an interface for property managers.
Definition: qtpropertybrowser.h:153
Definition: qtpropertymanager.cpp:1808
QtDateTimePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:299
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition: qtpropertymanager.h:306
The QtPointPropertyManager provides and manages QPoint properties.
Definition: qtpropertymanager.h:383
Definition: qtpropertymanager.cpp:3172
QtFlagPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:664
Definition: qtpropertymanager.cpp:2251
Definition: qtpropertymanager.cpp:3902
Definition: qtpropertymanager.cpp:2901
The QtStringPropertyManager provides and manages QString properties.
Definition: qtpropertymanager.h:194
The QtCharPropertyManager provides and manages QChar properties.
Definition: qtpropertymanager.h:330
QtEnumPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:635
QtIntPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:120
The QtFontPropertyManager provides and manages QFont properties.
Definition: qtpropertymanager.h:703
The QtIntPropertyManager provides and manages int properties.
Definition: qtpropertymanager.h:91
The QtCursorPropertyManager provides and manages QCursor properties.
Definition: qtpropertymanager.h:767
The QtTimePropertyManager provides and manages QTime properties.
Definition: qtpropertymanager.h:258
virtual QString displayText(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:722
QtSizeFPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:504
QtVector3DPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:602
QtCursorPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:787
Definition: qtpropertymanager.cpp:6764
virtual void initializeProperty(QtProperty *property)=0
The QtSizePolicyPropertyManager provides and manages QSizePolicy properties.
Definition: qtpropertymanager.h:673
The QtSizePropertyManager provides and manages QSize properties.
Definition: qtpropertymanager.h:442
Definition: qtpropertymanager.cpp:4314
The QtVector3DPropertyManager provides and manages QVector3D properties.
Definition: qtpropertymanager.h:580
The description of this class will come soon !
Definition: qtpropertymanager.h:72
The QtDatePropertyManager provides and manages QDate properties.
Definition: qtpropertymanager.h:228
virtual void uninitializeProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:799
The QtColorPropertyManager provides and manages QColor properties.
Definition: qtpropertymanager.h:738
virtual bool hasValue(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:680
Definition: qtpropertymanager.cpp:1304
QtSizePolicyPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:693
The QtSizeFPropertyManager provides and manages QSizeF properties.
Definition: qtpropertymanager.h:476
The QtBoolPropertyManager class provides and manages boolean properties.
Definition: qtpropertymanager.h:127
Definition: qtpropertymanager.cpp:937
Definition: qtpropertymanager.cpp:2354
QtKeySequencePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:323
Definition: qtpropertymanager.cpp:5988
QtStringPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:221
Definition: qtpropertymanager.cpp:4790
QtFontPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:725
Definition: qtpropertymanager.cpp:1629
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:59
Definition: qtpropertymanager.cpp:5347
Definition: qtpropertymanager.cpp:3508
QtLocalePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:374
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:282
QtCharPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:347
virtual QString valueText(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:708
QtColorPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:758
QtSizePropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:467
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:113
Definition: qtpropertymanager.cpp:2144
virtual QIcon valueIcon(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:694
QtRectPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:535
QLineEdit::EchoMode EchoMode
Definition: qtpropertybrowser.h:62
The QtEnumPropertyManager provides and manages enum properties.
Definition: qtpropertymanager.h:611
Definition: qtpropertymanager.cpp:5079
Definition: qtpropertymanager.cpp:5672
QtBoolPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:148
QtPointFPropertyManagerPrivate * d_ptr
Definition: qtpropertymanager.h:433
The QtRectFPropertyManager provides and manages QRectF properties.
Definition: qtpropertymanager.h:544
Definition: qtpropertymanager.cpp:2456