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  ** 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 #pragma GCC system_header
41 #pragma GCC diagnostic ignored "-Wswitch-default"
42 #pragma GCC diagnostic ignored "-Wfloat-equal"
43 #pragma GCC diagnostic ignored "-Wshadow"
44 
45 
46 #ifndef QTPROPERTYMANAGER_H
47 #define QTPROPERTYMANAGER_H
48 
49 #include <QtCore/QLocale>
50 #include <QtCore/QDateTime>
51 #include <QtCore/QMetaEnum>
52 #include <QLineEdit>
53 #include <QtGui/QIcon>
54 #include <climits>
55 
56 #include "qtpropertybrowser.h"
57 
58 #if QT_VERSION >= 0x040400
59 QT_BEGIN_NAMESPACE
60 #endif
61 
62 class QDate;
63 class QTime;
64 class QDateTime;
65 class QLocale;
66 
67  template <class PrivateData, class Value>
68 static void setSimpleMinimumData(PrivateData *data, const Value &minVal)
69 {
70  data->minVal = minVal;
71  if (data->maxVal < data->minVal)
72  data->maxVal = data->minVal;
73 
74  if (data->val < data->minVal)
75  data->val = data->minVal;
76 }
77 
78  template <class PrivateData, class Value>
79 static void setSimpleMaximumData(PrivateData *data, const Value &maxVal)
80 {
81  data->maxVal = maxVal;
82  if (data->minVal > data->maxVal)
83  data->minVal = data->maxVal;
84 
85  if (data->val > data->maxVal)
86  data->val = data->maxVal;
87 }
88  template <class PrivateData, class Value>
89 static void setSizeMinimumData(PrivateData *data, const Value &newMinVal)
90 {
91  data->minVal = newMinVal;
92  if (data->maxVal.width() < data->minVal.width())
93  data->maxVal.setWidth(data->minVal.width());
94  if (data->maxVal.height() < data->minVal.height())
95  data->maxVal.setHeight(data->minVal.height());
96 
97  if (data->val.width() < data->minVal.width())
98  data->val.setWidth(data->minVal.width());
99  if (data->val.height() < data->minVal.height())
100  data->val.setHeight(data->minVal.height());
101 }
102 
103  template <class PrivateData, class Value>
104 static void setSizeMaximumData(PrivateData *data, const Value &newMaxVal)
105 {
106  data->maxVal = newMaxVal;
107  if (data->minVal.width() > data->maxVal.width())
108  data->minVal.setWidth(data->maxVal.width());
109  if (data->minVal.height() > data->maxVal.height())
110  data->minVal.setHeight(data->maxVal.height());
111 
112  if (data->val.width() > data->maxVal.width())
113  data->val.setWidth(data->maxVal.width());
114  if (data->val.height() > data->maxVal.height())
115  data->val.setHeight(data->maxVal.height());
116 }
117 
118 
121 {
122  Q_OBJECT
123  public:
124  explicit QtGroupPropertyManager(QObject *parent = 0);
126 
127  protected:
128  virtual bool hasValue(const QtProperty *property) const;
129 
130  virtual void initializeProperty(QtProperty *property);
131  virtual void uninitializeProperty(QtProperty *property);
132 };
133 
135 
136 
139 {
140  Q_OBJECT
141  public:
142  explicit QtIntPropertyManager(QObject *parent = 0);
144 
145  int value(const QtProperty *property) const;
146  int minimum(const QtProperty *property) const;
147  int maximum(const QtProperty *property) const;
148  int singleStep(const QtProperty *property) const;
149 
150  public Q_SLOTS:
151  void setValue(QtProperty *property, int val);
152  void setMinimum(QtProperty *property, int minVal);
153  void setMaximum(QtProperty *property, int maxVal);
154  void setRange(QtProperty *property, int minVal, int maxVal);
155  void setSingleStep(QtProperty *property, int step);
156  Q_SIGNALS:
157  void valueChanged(QtProperty *property, int val);
158  void rangeChanged(QtProperty *property, int minVal, int maxVal);
159  void singleStepChanged(QtProperty *property, int step);
160  protected:
161  QString valueText(const QtProperty *property) const;
162  virtual void initializeProperty(QtProperty *property);
163  virtual void uninitializeProperty(QtProperty *property);
164  private:
166  Q_DECLARE_PRIVATE(QtIntPropertyManager)
167  Q_DISABLE_COPY(QtIntPropertyManager)
168 };
170 {
171  QtIntPropertyManager *q_ptr;
172  Q_DECLARE_PUBLIC(QtIntPropertyManager)
173  public:
174  QtIntPropertyManagerPrivate() : q_ptr(NULL) {}
175 
176  struct Data
177  {
178  Data() : val(0), minVal(-INT_MAX), maxVal(INT_MAX), singleStep(1) {}
179  int val;
180  int minVal;
181  int maxVal;
182  int singleStep;
183  int minimumValue() const { return minVal; }
184  int maximumValue() const { return maxVal; }
185  void setMinimumValue(int newMinVal) { setSimpleMinimumData(this,
186  newMinVal); }
187  void setMaximumValue(int newMaxVal) { setSimpleMaximumData(this,
188  newMaxVal); }
189  };
190 
191  typedef QMap<const QtProperty *, Data> PropertyValueMap;
192  PropertyValueMap m_values;
193 };
194 
196 
197 
200 {
201  Q_OBJECT
202  public:
203  explicit QtBoolPropertyManager(QObject *parent = 0);
205 
206  bool value(const QtProperty *property) const;
207 
208  public Q_SLOTS:
209  void setValue(QtProperty *property, bool val);
210  Q_SIGNALS:
211  void valueChanged(QtProperty *property, bool val);
212  protected:
213  QString valueText(const QtProperty *property) const;
214  QIcon valueIcon(const QtProperty *property) const;
215  virtual void initializeProperty(QtProperty *property);
216  virtual void uninitializeProperty(QtProperty *property);
217  private:
219  Q_DECLARE_PRIVATE(QtBoolPropertyManager)
220  Q_DISABLE_COPY(QtBoolPropertyManager)
221 };
222 
224 {
225  QtBoolPropertyManager *q_ptr;
226  Q_DECLARE_PUBLIC(QtBoolPropertyManager)
227  public:
229  QMap<const QtProperty *, bool> m_values;
230 };
231 
232 
234 
235 
238 {
239  Q_OBJECT
240  public:
241  explicit QtDoublePropertyManager(QObject *parent = 0);
243 
244  double value(const QtProperty *property) const;
245  double minimum(const QtProperty *property) const;
246  double maximum(const QtProperty *property) const;
247  double singleStep(const QtProperty *property) const;
248  int decimals(const QtProperty *property) const;
249 
250  public Q_SLOTS:
251  void setValue(QtProperty *property, double val);
252  void setMinimum(QtProperty *property, double minVal);
253  void setMaximum(QtProperty *property, double maxVal);
254  void setRange(QtProperty *property, double minVal, double maxVal);
255  void setSingleStep(QtProperty *property, double step);
256  void setDecimals(QtProperty *property, int prec);
257  Q_SIGNALS:
258  void valueChanged(QtProperty *property, double val);
259  void rangeChanged(QtProperty *property, double minVal, double maxVal);
260  void singleStepChanged(QtProperty *property, double step);
261  void decimalsChanged(QtProperty *property, int prec);
262  protected:
263  QString valueText(const QtProperty *property) const;
264  virtual void initializeProperty(QtProperty *property);
265  virtual void uninitializeProperty(QtProperty *property);
266  private:
268  Q_DECLARE_PRIVATE(QtDoublePropertyManager)
269  Q_DISABLE_COPY(QtDoublePropertyManager)
270 };
272 {
274  Q_DECLARE_PUBLIC(QtDoublePropertyManager)
275  public:
277  struct Data
278  {
279  Data() : val(0), minVal(-INT_MAX), maxVal(INT_MAX), singleStep(1),
280  decimals(2) {}
281  double val;
282  double minVal;
283  double maxVal;
284  double singleStep;
285  int decimals;
286  double minimumValue() const { return minVal; }
287  double maximumValue() const { return maxVal; }
288  void setMinimumValue(double newMinVal) { setSimpleMinimumData(this,
289  newMinVal); }
290  void setMaximumValue(double newMaxVal) { setSimpleMaximumData(this,
291  newMaxVal); }
292  };
293 
294  typedef QMap<const QtProperty *, Data> PropertyValueMap;
295  PropertyValueMap m_values;
296 };
298 
299 
302 {
303  Q_OBJECT
304  public:
305  explicit QtStringPropertyManager(QObject *parent = 0);
307 
308  QString value(const QtProperty *property) const;
309  QRegExp regExp(const QtProperty *property) const;
310  EchoMode echoMode(const QtProperty *property) const;
311 
312  public Q_SLOTS:
313  void setValue(QtProperty *property, const QString &val);
314  void setRegExp(QtProperty *property, const QRegExp &regExp);
315  void setEchoMode(QtProperty *property, EchoMode echoMode);
316  Q_SIGNALS:
317  void valueChanged(QtProperty *property, const QString &val);
318  void regExpChanged(QtProperty *property, const QRegExp &regExp);
319  void echoModeChanged(QtProperty *property, const int);
320  protected:
321  QString valueText(const QtProperty *property) const;
322  QString displayText(const QtProperty *property) const;
323  virtual void initializeProperty(QtProperty *property);
324  virtual void uninitializeProperty(QtProperty *property);
325  private:
327  Q_DECLARE_PRIVATE(QtStringPropertyManager)
328  Q_DISABLE_COPY(QtStringPropertyManager)
329 };
330 
332 {
334  Q_DECLARE_PUBLIC(QtStringPropertyManager)
335  public:
337 
338  struct Data
339  {
340  Data() : regExp(QString(QLatin1Char('*')), Qt::CaseSensitive,
341  QRegExp::Wildcard), echoMode(QLineEdit::Normal)
342  {
343  }
344  QString val;
345  QRegExp regExp;
346  int echoMode;
347  };
348 
349  typedef QMap<const QtProperty *, Data> PropertyValueMap;
350  QMap<const QtProperty *, Data> m_values;
351 };
353 
354 
357 {
358  Q_OBJECT
359  public:
360  explicit QtDatePropertyManager(QObject *parent = 0);
362 
363  QDate value(const QtProperty *property) const;
364  QDate minimum(const QtProperty *property) const;
365  QDate maximum(const QtProperty *property) const;
366 
367  public Q_SLOTS:
368  void setValue(QtProperty *property, const QDate &val);
369  void setMinimum(QtProperty *property, const QDate &minVal);
370  void setMaximum(QtProperty *property, const QDate &maxVal);
371  void setRange(QtProperty *property, const QDate &minVal,
372  const QDate &maxVal);
373  Q_SIGNALS:
374  void valueChanged(QtProperty *property, const QDate &val);
375  void rangeChanged(QtProperty *property, const QDate &minVal,
376  const QDate &maxVal);
377  protected:
378  QString valueText(const QtProperty *property) const;
379  virtual void initializeProperty(QtProperty *property);
380  virtual void uninitializeProperty(QtProperty *property);
381  private:
383  Q_DECLARE_PRIVATE(QtDatePropertyManager)
384  Q_DISABLE_COPY(QtDatePropertyManager)
385 };
387 {
388  QtDatePropertyManager *q_ptr;
389  Q_DECLARE_PUBLIC(QtDatePropertyManager)
390  public:
391  QtDatePropertyManagerPrivate() : q_ptr(NULL) {}
392  struct Data
393  {
394  Data() : val(QDate::currentDate()), minVal(QDate(1752, 9, 14)),
395  maxVal(QDate(7999, 12, 31)) {}
396  QDate val;
397  QDate minVal;
398  QDate maxVal;
399  QDate minimumValue() const { return minVal; }
400  QDate maximumValue() const { return maxVal; }
401  void setMinimumValue(const QDate &newMinVal) { setSimpleMinimumData(this,
402  newMinVal); }
403  void setMaximumValue(const QDate &newMaxVal) { setSimpleMaximumData(this,
404  newMaxVal); }
405  };
406 
407  QString m_format;
408 
409  typedef QMap<const QtProperty *, Data> PropertyValueMap;
410  QMap<const QtProperty *, Data> m_values;
411 };
413 
414 
417 {
418  Q_OBJECT
419  public:
420  explicit QtTimePropertyManager(QObject *parent = 0);
422 
423  QTime value(const QtProperty *property) const;
424 
425  public Q_SLOTS:
426  void setValue(QtProperty *property, const QTime &val);
427  Q_SIGNALS:
428  void valueChanged(QtProperty *property, const QTime &val);
429  protected:
430  QString valueText(const QtProperty *property) const;
431  virtual void initializeProperty(QtProperty *property);
432  virtual void uninitializeProperty(QtProperty *property);
433  private:
435  Q_DECLARE_PRIVATE(QtTimePropertyManager)
436  Q_DISABLE_COPY(QtTimePropertyManager)
437 };
439 {
440  QtTimePropertyManager *q_ptr;
441  Q_DECLARE_PUBLIC(QtTimePropertyManager)
442  public:
443  QtTimePropertyManagerPrivate() : q_ptr(NULL) {}
444  QString m_format;
445 
446  typedef QMap<const QtProperty *, QTime> PropertyValueMap;
447  PropertyValueMap m_values;
448 };
449 
450 
452 
453 
456 {
457  Q_OBJECT
458  public:
459  explicit QtDateTimePropertyManager(QObject *parent = 0);
461 
462  QDateTime value(const QtProperty *property) const;
463 
464  public Q_SLOTS:
465  void setValue(QtProperty *property, const QDateTime &val);
466  Q_SIGNALS:
467  void valueChanged(QtProperty *property, const QDateTime &val);
468  protected:
469  QString valueText(const QtProperty *property) const;
470  virtual void initializeProperty(QtProperty *property);
471  virtual void uninitializeProperty(QtProperty *property);
472  private:
474  Q_DECLARE_PRIVATE(QtDateTimePropertyManager)
475  Q_DISABLE_COPY(QtDateTimePropertyManager)
476 };
478 {
480  Q_DECLARE_PUBLIC(QtDateTimePropertyManager)
481  public:
483  QString m_format;
484 
485  typedef QMap<const QtProperty *, QDateTime> PropertyValueMap;
486  PropertyValueMap m_values;
487 };
488 
489 
491 
492 
495 {
496  Q_OBJECT
497  public:
498  explicit QtKeySequencePropertyManager(QObject *parent = 0);
500 
501  QKeySequence value(const QtProperty *property) const;
502 
503  public Q_SLOTS:
504  void setValue(QtProperty *property, const QKeySequence &val);
505  Q_SIGNALS:
506  void valueChanged(QtProperty *property, const QKeySequence &val);
507  protected:
508  QString valueText(const QtProperty *property) const;
509  virtual void initializeProperty(QtProperty *property);
510  virtual void uninitializeProperty(QtProperty *property);
511  private:
513  Q_DECLARE_PRIVATE(QtKeySequencePropertyManager)
514  Q_DISABLE_COPY(QtKeySequencePropertyManager)
515 };
517 {
519  Q_DECLARE_PUBLIC(QtKeySequencePropertyManager)
520  public:
522  QString m_format;
523 
524  typedef QMap<const QtProperty *, QKeySequence> PropertyValueMap;
525  PropertyValueMap m_values;
526 };
527 
528 
530 
531 
534 {
535  Q_OBJECT
536  public:
537  explicit QtCharPropertyManager(QObject *parent = 0);
539 
540  QChar value(const QtProperty *property) const;
541 
542  public Q_SLOTS:
543  void setValue(QtProperty *property, const QChar &val);
544  Q_SIGNALS:
545  void valueChanged(QtProperty *property, const QChar &val);
546  protected:
547  QString valueText(const QtProperty *property) const;
548  virtual void initializeProperty(QtProperty *property);
549  virtual void uninitializeProperty(QtProperty *property);
550  private:
552  Q_DECLARE_PRIVATE(QtCharPropertyManager)
553  Q_DISABLE_COPY(QtCharPropertyManager)
554 };
556 {
557  QtCharPropertyManager *q_ptr;
558  Q_DECLARE_PUBLIC(QtCharPropertyManager)
559  public:
560  QtCharPropertyManagerPrivate() : q_ptr(NULL) {}
561  typedef QMap<const QtProperty *, QChar> PropertyValueMap;
562  PropertyValueMap m_values;
563 };
564 
565 
568 
569 
572 {
573  Q_OBJECT
574  public:
575  explicit QtLocalePropertyManager(QObject *parent = 0);
577 
578  QtEnumPropertyManager *subEnumPropertyManager() const;
579 
580  QLocale value(const QtProperty *property) const;
581 
582  public Q_SLOTS:
583  void setValue(QtProperty *property, const QLocale &val);
584  Q_SIGNALS:
585  void valueChanged(QtProperty *property, const QLocale &val);
586  protected:
587  QString valueText(const QtProperty *property) const;
588  virtual void initializeProperty(QtProperty *property);
589  virtual void uninitializeProperty(QtProperty *property);
590  private:
592  Q_DECLARE_PRIVATE(QtLocalePropertyManager)
593  Q_DISABLE_COPY(QtLocalePropertyManager)
594  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
595  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
596 };
597 
599 {
601  Q_DECLARE_PUBLIC(QtLocalePropertyManager)
602  public:
603 
605 
606  void slotEnumChanged(QtProperty *property, int value);
607  void slotPropertyDestroyed(QtProperty *property);
608 
609  typedef QMap<const QtProperty *, QLocale> PropertyValueMap;
610  PropertyValueMap m_values;
611 
612  QtEnumPropertyManager *m_enumPropertyManager;
613 
614  QMap<const QtProperty *, QtProperty *> m_propertyToLanguage;
615  QMap<const QtProperty *, QtProperty *> m_propertyToCountry;
616 
617  QMap<const QtProperty *, QtProperty *> m_languageToProperty;
618  QMap<const QtProperty *, QtProperty *> m_countryToProperty;
619 };
620 
621 
622 
624 
625 
628 {
629  Q_OBJECT
630  public:
631  explicit QtPointPropertyManager(QObject *parent = 0);
633 
634  QtIntPropertyManager *subIntPropertyManager() const;
635 
636  QPoint value(const QtProperty *property) const;
637 
638  public Q_SLOTS:
639  void setValue(QtProperty *property, const QPoint &val);
640  Q_SIGNALS:
641  void valueChanged(QtProperty *property, const QPoint &val);
642  protected:
643  QString valueText(const QtProperty *property) const;
644  virtual void initializeProperty(QtProperty *property);
645  virtual void uninitializeProperty(QtProperty *property);
646  private:
648  Q_DECLARE_PRIVATE(QtPointPropertyManager)
649  Q_DISABLE_COPY(QtPointPropertyManager)
650  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
651  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
652 };
653 
655 {
656  QtPointPropertyManager *q_ptr;
657  Q_DECLARE_PUBLIC(QtPointPropertyManager)
658  public:
660  : q_ptr(NULL), m_intPropertyManager(NULL) {}
661  void slotIntChanged(QtProperty *property, int value);
662  void slotPropertyDestroyed(QtProperty *property);
663 
664  typedef QMap<const QtProperty *, QPoint> PropertyValueMap;
665  PropertyValueMap m_values;
666 
667  QtIntPropertyManager *m_intPropertyManager;
668 
669  QMap<const QtProperty *, QtProperty *> m_propertyToX;
670  QMap<const QtProperty *, QtProperty *> m_propertyToY;
671 
672  QMap<const QtProperty *, QtProperty *> m_xToProperty;
673  QMap<const QtProperty *, QtProperty *> m_yToProperty;
674 };
675 
677 
678 
681 {
682  Q_OBJECT
683  public:
684  explicit QtPointFPropertyManager(QObject *parent = 0);
686 
687  QtDoublePropertyManager *subDoublePropertyManager() const;
688 
689  QPointF value(const QtProperty *property) const;
690  int decimals(const QtProperty *property) const;
691 
692  public Q_SLOTS:
693  void setValue(QtProperty *property, const QPointF &val);
694  void setDecimals(QtProperty *property, int prec);
695  Q_SIGNALS:
696  void valueChanged(QtProperty *property, const QPointF &val);
697  void decimalsChanged(QtProperty *property, int prec);
698  protected:
699  QString valueText(const QtProperty *property) const;
700  virtual void initializeProperty(QtProperty *property);
701  virtual void uninitializeProperty(QtProperty *property);
702  private:
704  Q_DECLARE_PRIVATE(QtPointFPropertyManager)
705  Q_DISABLE_COPY(QtPointFPropertyManager)
706  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
707  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
708 };
710 {
712  Q_DECLARE_PUBLIC(QtPointFPropertyManager)
713  public:
715  : q_ptr(NULL), m_doublePropertyManager(NULL) {}
716  struct Data
717  {
718  Data() : decimals(2) {}
719  QPointF val;
720  int decimals;
721  };
722 
723  void slotDoubleChanged(QtProperty *property, double value);
724  void slotPropertyDestroyed(QtProperty *property);
725 
726  typedef QMap<const QtProperty *, Data> PropertyValueMap;
727  PropertyValueMap m_values;
728 
729  QtDoublePropertyManager *m_doublePropertyManager;
730 
731  QMap<const QtProperty *, QtProperty *> m_propertyToX;
732  QMap<const QtProperty *, QtProperty *> m_propertyToY;
733 
734  QMap<const QtProperty *, QtProperty *> m_xToProperty;
735  QMap<const QtProperty *, QtProperty *> m_yToProperty;
736 };
737 
739 
740 
743 {
744  Q_OBJECT
745  public:
746  explicit QtSizePropertyManager(QObject *parent = 0);
748 
749  QtIntPropertyManager *subIntPropertyManager() const;
750 
751  QSize value(const QtProperty *property) const;
752  QSize minimum(const QtProperty *property) const;
753  QSize maximum(const QtProperty *property) const;
754 
755  public Q_SLOTS:
756  void setValue(QtProperty *property, const QSize &val);
757  void setMinimum(QtProperty *property, const QSize &minVal);
758  void setMaximum(QtProperty *property, const QSize &maxVal);
759  void setRange(QtProperty *property, const QSize &minVal,
760  const QSize &maxVal);
761  Q_SIGNALS:
762  void valueChanged(QtProperty *property, const QSize &val);
763  void rangeChanged(QtProperty *property, const QSize &minVal,
764  const QSize &maxVal);
765  protected:
766  QString valueText(const QtProperty *property) const;
767  virtual void initializeProperty(QtProperty *property);
768  virtual void uninitializeProperty(QtProperty *property);
769  private:
771  Q_DECLARE_PRIVATE(QtSizePropertyManager)
772  Q_DISABLE_COPY(QtSizePropertyManager)
773  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
774  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
775 };
776 
778 {
779  QtSizePropertyManager *q_ptr;
780  Q_DECLARE_PUBLIC(QtSizePropertyManager)
781  public:
783  : q_ptr(NULL), m_intPropertyManager(NULL) {}
784  void slotIntChanged(QtProperty *property, int value);
785  void slotPropertyDestroyed(QtProperty *property);
786  void setValue(QtProperty *property, const QSize &val);
787  void setRange(QtProperty *property,
788  const QSize &minVal, const QSize &maxVal, const QSize &val);
789 
790  struct Data
791  {
792  Data() : val(QSize(0, 0)), minVal(QSize(0, 0)), maxVal(QSize(INT_MAX,
793  INT_MAX)) {}
794  QSize val;
795  QSize minVal;
796  QSize maxVal;
797  QSize minimumValue() const { return minVal; }
798  QSize maximumValue() const { return maxVal; }
799  void setMinimumValue(const QSize &newMinVal) { setSizeMinimumData(this,
800  newMinVal); }
801  void setMaximumValue(const QSize &newMaxVal) { setSizeMaximumData(this,
802  newMaxVal); }
803  };
804 
805  typedef QMap<const QtProperty *, Data> PropertyValueMap;
806  PropertyValueMap m_values;
807 
808  QtIntPropertyManager *m_intPropertyManager;
809 
810  QMap<const QtProperty *, QtProperty *> m_propertyToW;
811  QMap<const QtProperty *, QtProperty *> m_propertyToH;
812 
813  QMap<const QtProperty *, QtProperty *> m_wToProperty;
814  QMap<const QtProperty *, QtProperty *> m_hToProperty;
815 };
816 
818 
819 
822 {
823  Q_OBJECT
824  public:
825  explicit QtSizeFPropertyManager(QObject *parent = 0);
827 
828  QtDoublePropertyManager *subDoublePropertyManager() const;
829 
830  QSizeF value(const QtProperty *property) const;
831  QSizeF minimum(const QtProperty *property) const;
832  QSizeF maximum(const QtProperty *property) const;
833  int decimals(const QtProperty *property) const;
834 
835  public Q_SLOTS:
836  void setValue(QtProperty *property, const QSizeF &val);
837  void setMinimum(QtProperty *property, const QSizeF &minVal);
838  void setMaximum(QtProperty *property, const QSizeF &maxVal);
839  void setRange(QtProperty *property, const QSizeF &minVal,
840  const QSizeF &maxVal);
841  void setDecimals(QtProperty *property, int prec);
842  Q_SIGNALS:
843  void valueChanged(QtProperty *property, const QSizeF &val);
844  void rangeChanged(QtProperty *property, const QSizeF &minVal,
845  const QSizeF &maxVal);
846  void decimalsChanged(QtProperty *property, int prec);
847  protected:
848  QString valueText(const QtProperty *property) const;
849  virtual void initializeProperty(QtProperty *property);
850  virtual void uninitializeProperty(QtProperty *property);
851  private:
853  Q_DECLARE_PRIVATE(QtSizeFPropertyManager)
854  Q_DISABLE_COPY(QtSizeFPropertyManager)
855  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
856  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
857 };
858 
860 {
861  QtSizeFPropertyManager *q_ptr;
862  Q_DECLARE_PUBLIC(QtSizeFPropertyManager)
863  public:
865  : q_ptr(NULL), m_doublePropertyManager(NULL) {}
866  void slotDoubleChanged(QtProperty *property, double value);
867  void slotPropertyDestroyed(QtProperty *property);
868  void setValue(QtProperty *property, const QSizeF &val);
869  void setRange(QtProperty *property,
870  const QSizeF &minVal, const QSizeF &maxVal, const QSizeF &val);
871 
872  struct Data
873  {
874  Data() : val(QSizeF(0, 0)), minVal(QSizeF(0, 0)), maxVal(QSizeF(INT_MAX,
875  INT_MAX)), decimals(2) {}
876  QSizeF val;
877  QSizeF minVal;
878  QSizeF maxVal;
879  int decimals;
880  QSizeF minimumValue() const { return minVal; }
881  QSizeF maximumValue() const { return maxVal; }
882  void setMinimumValue(const QSizeF &newMinVal) { setSizeMinimumData(this,
883  newMinVal); }
884  void setMaximumValue(const QSizeF &newMaxVal) { setSizeMaximumData(this,
885  newMaxVal); }
886  };
887 
888  typedef QMap<const QtProperty *, Data> PropertyValueMap;
889  PropertyValueMap m_values;
890 
891  QtDoublePropertyManager *m_doublePropertyManager;
892 
893  QMap<const QtProperty *, QtProperty *> m_propertyToW;
894  QMap<const QtProperty *, QtProperty *> m_propertyToH;
895 
896  QMap<const QtProperty *, QtProperty *> m_wToProperty;
897  QMap<const QtProperty *, QtProperty *> m_hToProperty;
898 };
899 
901 
902 
905 {
906  Q_OBJECT
907  public:
908  explicit QtRectPropertyManager(QObject *parent = 0);
910 
911  QtIntPropertyManager *subIntPropertyManager() const;
912 
913  QRect value(const QtProperty *property) const;
914  QRect constraint(const QtProperty *property) const;
915 
916  public Q_SLOTS:
917  void setValue(QtProperty *property, const QRect &val);
918  void setConstraint(QtProperty *property, const QRect &constraint);
919  Q_SIGNALS:
920  void valueChanged(QtProperty *property, const QRect &val);
921  void constraintChanged(QtProperty *property, const QRect &constraint);
922  protected:
923  QString valueText(const QtProperty *property) const;
924  virtual void initializeProperty(QtProperty *property);
925  virtual void uninitializeProperty(QtProperty *property);
926  private:
928  Q_DECLARE_PRIVATE(QtRectPropertyManager)
929  Q_DISABLE_COPY(QtRectPropertyManager)
930  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
931  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
932 };
933 
935 {
936  QtRectPropertyManager *q_ptr;
937  Q_DECLARE_PUBLIC(QtRectPropertyManager)
938  public:
940  : q_ptr(NULL), m_intPropertyManager(NULL) {}
941 
942  void slotIntChanged(QtProperty *property, int value);
943  void slotPropertyDestroyed(QtProperty *property);
944  void setConstraint(QtProperty *property, const QRect &constraint,
945  const QRect &val);
946 
947  struct Data
948  {
949  Data() : val(0, 0, 0, 0) {}
950  QRect val;
951  QRect constraint;
952  };
953 
954  typedef QMap<const QtProperty *, Data> PropertyValueMap;
955  PropertyValueMap m_values;
956 
957  QtIntPropertyManager *m_intPropertyManager;
958 
959  QMap<const QtProperty *, QtProperty *> m_propertyToX;
960  QMap<const QtProperty *, QtProperty *> m_propertyToY;
961  QMap<const QtProperty *, QtProperty *> m_propertyToW;
962  QMap<const QtProperty *, QtProperty *> m_propertyToH;
963 
964  QMap<const QtProperty *, QtProperty *> m_xToProperty;
965  QMap<const QtProperty *, QtProperty *> m_yToProperty;
966  QMap<const QtProperty *, QtProperty *> m_wToProperty;
967  QMap<const QtProperty *, QtProperty *> m_hToProperty;
968 };
969 
971 
972 
975 {
976  Q_OBJECT
977  public:
978  explicit QtRectFPropertyManager(QObject *parent = 0);
980 
981  QtDoublePropertyManager *subDoublePropertyManager() const;
982 
983  QRectF value(const QtProperty *property) const;
984  QRectF constraint(const QtProperty *property) const;
985  int decimals(const QtProperty *property) const;
986 
987  public Q_SLOTS:
988  void setValue(QtProperty *property, const QRectF &val);
989  void setConstraint(QtProperty *property, const QRectF &constraint);
990  void setDecimals(QtProperty *property, int prec);
991  Q_SIGNALS:
992  void valueChanged(QtProperty *property, const QRectF &val);
993  void constraintChanged(QtProperty *property, const QRectF &constraint);
994  void decimalsChanged(QtProperty *property, int prec);
995  protected:
996  QString valueText(const QtProperty *property) const;
997  virtual void initializeProperty(QtProperty *property);
998  virtual void uninitializeProperty(QtProperty *property);
999  private:
1001  Q_DECLARE_PRIVATE(QtRectFPropertyManager)
1002  Q_DISABLE_COPY(QtRectFPropertyManager)
1003  Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double))
1004  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
1005 };
1006 
1008 {
1009  QtRectFPropertyManager *q_ptr;
1010  Q_DECLARE_PUBLIC(QtRectFPropertyManager)
1011  public:
1013  : q_ptr(NULL), m_doublePropertyManager(NULL) {}
1014  void slotDoubleChanged(QtProperty *property, double value);
1015  void slotPropertyDestroyed(QtProperty *property);
1016  void setConstraint(QtProperty *property, const QRectF &constraint,
1017  const QRectF &val);
1018 
1019  struct Data
1020  {
1021  Data() : val(0, 0, 0, 0), decimals(2) {}
1022  QRectF val;
1023  QRectF constraint;
1024  int decimals;
1025  };
1026 
1027  typedef QMap<const QtProperty *, Data> PropertyValueMap;
1028  PropertyValueMap m_values;
1029 
1030  QtDoublePropertyManager *m_doublePropertyManager;
1031 
1032  QMap<const QtProperty *, QtProperty *> m_propertyToX;
1033  QMap<const QtProperty *, QtProperty *> m_propertyToY;
1034  QMap<const QtProperty *, QtProperty *> m_propertyToW;
1035  QMap<const QtProperty *, QtProperty *> m_propertyToH;
1036 
1037  QMap<const QtProperty *, QtProperty *> m_xToProperty;
1038  QMap<const QtProperty *, QtProperty *> m_yToProperty;
1039  QMap<const QtProperty *, QtProperty *> m_wToProperty;
1040  QMap<const QtProperty *, QtProperty *> m_hToProperty;
1041 };
1042 
1044 
1045 
1048 {
1049  Q_OBJECT
1050  public:
1051  explicit QtEnumPropertyManager(QObject *parent = 0);
1053 
1054  int value(const QtProperty *property) const;
1055  QStringList enumNames(const QtProperty *property) const;
1056  QMap<int, QIcon> enumIcons(const QtProperty *property) const;
1057 
1058  public Q_SLOTS:
1059  void setValue(QtProperty *property, int val);
1060  void setEnumNames(QtProperty *property, const QStringList &names);
1061  void setEnumIcons(QtProperty *property, const QMap<int, QIcon> &icons);
1062  Q_SIGNALS:
1063  void valueChanged(QtProperty *property, int val);
1064  void enumNamesChanged(QtProperty *property, const QStringList &names);
1065  void enumIconsChanged(QtProperty *property, const QMap<int, QIcon> &icons);
1066  protected:
1067  QString valueText(const QtProperty *property) const;
1068  QIcon valueIcon(const QtProperty *property) const;
1069  virtual void initializeProperty(QtProperty *property);
1070  virtual void uninitializeProperty(QtProperty *property);
1071  private:
1073  Q_DECLARE_PRIVATE(QtEnumPropertyManager)
1074  Q_DISABLE_COPY(QtEnumPropertyManager)
1075 };
1076 
1078 {
1079  QtEnumPropertyManager *q_ptr;
1080  Q_DECLARE_PUBLIC(QtEnumPropertyManager)
1081  public:
1082  QtEnumPropertyManagerPrivate() : q_ptr(NULL) {}
1083 
1084  struct Data
1085  {
1086  Data() : val(-1) {}
1087  int val;
1088  QStringList enumNames;
1089  QMap<int, QIcon> enumIcons;
1090  };
1091 
1092  typedef QMap<const QtProperty *, Data> PropertyValueMap;
1093  PropertyValueMap m_values;
1094 };
1095 
1097 
1098 
1101 {
1102  Q_OBJECT
1103  public:
1104  explicit QtFlagPropertyManager(QObject *parent = 0);
1106 
1107  QtBoolPropertyManager *subBoolPropertyManager() const;
1108 
1109  int value(const QtProperty *property) const;
1110  QStringList flagNames(const QtProperty *property) const;
1111 
1112  public Q_SLOTS:
1113  void setValue(QtProperty *property, int val);
1114  void setFlagNames(QtProperty *property, const QStringList &names);
1115  Q_SIGNALS:
1116  void valueChanged(QtProperty *property, int val);
1117  void flagNamesChanged(QtProperty *property, const QStringList &names);
1118  protected:
1119  QString valueText(const QtProperty *property) const;
1120  virtual void initializeProperty(QtProperty *property);
1121  virtual void uninitializeProperty(QtProperty *property);
1122  private:
1124  Q_DECLARE_PRIVATE(QtFlagPropertyManager)
1125  Q_DISABLE_COPY(QtFlagPropertyManager)
1126  Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
1127  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
1128 };
1129 
1131 {
1132  QtFlagPropertyManager *q_ptr;
1133  Q_DECLARE_PUBLIC(QtFlagPropertyManager)
1134  public:
1136  : q_ptr(NULL), m_boolPropertyManager(NULL) {}
1137  void slotBoolChanged(QtProperty *property, bool value);
1138  void slotPropertyDestroyed(QtProperty *property);
1139 
1140  struct Data
1141  {
1142  Data() : val(-1) {}
1143  int val;
1144  QStringList flagNames;
1145  };
1146 
1147  typedef QMap<const QtProperty *, Data> PropertyValueMap;
1148  PropertyValueMap m_values;
1149 
1150  QtBoolPropertyManager *m_boolPropertyManager;
1151 
1152  QMap<const QtProperty *, QList<QtProperty *> > m_propertyToFlags;
1153 
1154  QMap<const QtProperty *, QtProperty *> m_flagToProperty;
1155 };
1156 
1158 
1159 
1162 {
1163  Q_OBJECT
1164  public:
1165  explicit QtSizePolicyPropertyManager(QObject *parent = 0);
1167 
1168  QtIntPropertyManager *subIntPropertyManager() const;
1169  QtEnumPropertyManager *subEnumPropertyManager() const;
1170 
1171  QSizePolicy value(const QtProperty *property) const;
1172 
1173  public Q_SLOTS:
1174  void setValue(QtProperty *property, const QSizePolicy &val);
1175  Q_SIGNALS:
1176  void valueChanged(QtProperty *property, const QSizePolicy &val);
1177  protected:
1178  QString valueText(const QtProperty *property) const;
1179  virtual void initializeProperty(QtProperty *property);
1180  virtual void uninitializeProperty(QtProperty *property);
1181  private:
1183  Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager)
1184  Q_DISABLE_COPY(QtSizePolicyPropertyManager)
1185  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
1186  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
1187  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
1188 };
1189 
1191 {
1193  Q_DECLARE_PUBLIC(QtSizePolicyPropertyManager)
1194  public:
1195 
1197 
1198  void slotIntChanged(QtProperty *property, int value);
1199  void slotEnumChanged(QtProperty *property, int value);
1200  void slotPropertyDestroyed(QtProperty *property);
1201 
1202  typedef QMap<const QtProperty *, QSizePolicy> PropertyValueMap;
1203  PropertyValueMap m_values;
1204 
1205  QtIntPropertyManager *m_intPropertyManager;
1206  QtEnumPropertyManager *m_enumPropertyManager;
1207 
1208  QMap<const QtProperty *, QtProperty *> m_propertyToHPolicy;
1209  QMap<const QtProperty *, QtProperty *> m_propertyToVPolicy;
1210  QMap<const QtProperty *, QtProperty *> m_propertyToHStretch;
1211  QMap<const QtProperty *, QtProperty *> m_propertyToVStretch;
1212 
1213  QMap<const QtProperty *, QtProperty *> m_hPolicyToProperty;
1214  QMap<const QtProperty *, QtProperty *> m_vPolicyToProperty;
1215  QMap<const QtProperty *, QtProperty *> m_hStretchToProperty;
1216  QMap<const QtProperty *, QtProperty *> m_vStretchToProperty;
1217 };
1218 
1220 
1221 
1224 {
1225  Q_OBJECT
1226  public:
1227  explicit QtFontPropertyManager(QObject *parent = 0);
1229 
1230  QtIntPropertyManager *subIntPropertyManager() const;
1231  QtEnumPropertyManager *subEnumPropertyManager() const;
1232  QtBoolPropertyManager *subBoolPropertyManager() const;
1233 
1234  QFont value(const QtProperty *property) const;
1235 
1236  public Q_SLOTS:
1237  void setValue(QtProperty *property, const QFont &val);
1238  Q_SIGNALS:
1239  void valueChanged(QtProperty *property, const QFont &val);
1240  protected:
1241  QString valueText(const QtProperty *property) const;
1242  QIcon valueIcon(const QtProperty *property) const;
1243  virtual void initializeProperty(QtProperty *property);
1244  virtual void uninitializeProperty(QtProperty *property);
1245  private:
1247  Q_DECLARE_PRIVATE(QtFontPropertyManager)
1248  Q_DISABLE_COPY(QtFontPropertyManager)
1249  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
1250  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
1251  Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool))
1252  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
1253  Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseChanged())
1254  Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseDelayedChange())
1255 };
1256 
1258 {
1259  QtFontPropertyManager *q_ptr;
1260  Q_DECLARE_PUBLIC(QtFontPropertyManager)
1261  public:
1262 
1264 
1265  void slotIntChanged(QtProperty *property, int value);
1266  void slotEnumChanged(QtProperty *property, int value);
1267  void slotBoolChanged(QtProperty *property, bool value);
1268  void slotPropertyDestroyed(QtProperty *property);
1269  void slotFontDatabaseChanged();
1270  void slotFontDatabaseDelayedChange();
1271 
1272  QStringList m_familyNames;
1273 
1274  typedef QMap<const QtProperty *, QFont> PropertyValueMap;
1275  PropertyValueMap m_values;
1276 
1277  QtIntPropertyManager *m_intPropertyManager;
1278  QtEnumPropertyManager *m_enumPropertyManager;
1279  QtBoolPropertyManager *m_boolPropertyManager;
1280 
1281  QMap<const QtProperty *, QtProperty *> m_propertyToFamily;
1282  QMap<const QtProperty *, QtProperty *> m_propertyToPointSize;
1283  QMap<const QtProperty *, QtProperty *> m_propertyToBold;
1284  QMap<const QtProperty *, QtProperty *> m_propertyToItalic;
1285  QMap<const QtProperty *, QtProperty *> m_propertyToUnderline;
1286  QMap<const QtProperty *, QtProperty *> m_propertyToStrikeOut;
1287  QMap<const QtProperty *, QtProperty *> m_propertyToKerning;
1288 
1289  QMap<const QtProperty *, QtProperty *> m_familyToProperty;
1290  QMap<const QtProperty *, QtProperty *> m_pointSizeToProperty;
1291  QMap<const QtProperty *, QtProperty *> m_boldToProperty;
1292  QMap<const QtProperty *, QtProperty *> m_italicToProperty;
1293  QMap<const QtProperty *, QtProperty *> m_underlineToProperty;
1294  QMap<const QtProperty *, QtProperty *> m_strikeOutToProperty;
1295  QMap<const QtProperty *, QtProperty *> m_kerningToProperty;
1296 
1297  bool m_settingValue;
1298  QTimer *m_fontDatabaseChangeTimer;
1299 };
1300 
1302 
1303 
1306 {
1307  Q_OBJECT
1308  public:
1309  explicit QtColorPropertyManager(QObject *parent = 0);
1311 
1312  QtIntPropertyManager *subIntPropertyManager() const;
1313 
1314  QColor value(const QtProperty *property) const;
1315 
1316  public Q_SLOTS:
1317  void setValue(QtProperty *property, const QColor &val);
1318  Q_SIGNALS:
1319  void valueChanged(QtProperty *property, const QColor &val);
1320  protected:
1321  QString valueText(const QtProperty *property) const;
1322  QIcon valueIcon(const QtProperty *property) const;
1323  virtual void initializeProperty(QtProperty *property);
1324  virtual void uninitializeProperty(QtProperty *property);
1325  private:
1327  Q_DECLARE_PRIVATE(QtColorPropertyManager)
1328  Q_DISABLE_COPY(QtColorPropertyManager)
1329  Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int))
1330  Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *))
1331 };
1332 
1334 {
1335  QtColorPropertyManager *q_ptr;
1336  Q_DECLARE_PUBLIC(QtColorPropertyManager)
1337  public:
1339  : q_ptr(NULL), m_intPropertyManager(NULL) {}
1340  void slotIntChanged(QtProperty *property, int value);
1341  void slotPropertyDestroyed(QtProperty *property);
1342 
1343  typedef QMap<const QtProperty *, QColor> PropertyValueMap;
1344  PropertyValueMap m_values;
1345 
1346  QtIntPropertyManager *m_intPropertyManager;
1347 
1348  QMap<const QtProperty *, QtProperty *> m_propertyToR;
1349  QMap<const QtProperty *, QtProperty *> m_propertyToG;
1350  QMap<const QtProperty *, QtProperty *> m_propertyToB;
1351  QMap<const QtProperty *, QtProperty *> m_propertyToA;
1352 
1353  QMap<const QtProperty *, QtProperty *> m_rToProperty;
1354  QMap<const QtProperty *, QtProperty *> m_gToProperty;
1355  QMap<const QtProperty *, QtProperty *> m_bToProperty;
1356  QMap<const QtProperty *, QtProperty *> m_aToProperty;
1357 };
1358 
1360 
1361 
1364 {
1365  Q_OBJECT
1366  public:
1367  explicit QtCursorPropertyManager(QObject *parent = 0);
1369 
1370 #ifndef QT_NO_CURSOR
1371  QCursor value(const QtProperty *property) const;
1372 #endif
1373 
1374  public Q_SLOTS:
1375  void setValue(QtProperty *property, const QCursor &val);
1376  Q_SIGNALS:
1377  void valueChanged(QtProperty *property, const QCursor &val);
1378  protected:
1379  QString valueText(const QtProperty *property) const;
1380  QIcon valueIcon(const QtProperty *property) const;
1381  virtual void initializeProperty(QtProperty *property);
1382  virtual void uninitializeProperty(QtProperty *property);
1383  private:
1385  Q_DECLARE_PRIVATE(QtCursorPropertyManager)
1386  Q_DISABLE_COPY(QtCursorPropertyManager)
1387 };
1388 
1390 {
1391  QtCursorPropertyManager *q_ptr;
1392  Q_DECLARE_PUBLIC(QtCursorPropertyManager)
1393  public:
1394  QtCursorPropertyManagerPrivate() : q_ptr(NULL) {}
1395  typedef QMap<const QtProperty *, QCursor> PropertyValueMap;
1396  PropertyValueMap m_values;
1397 };
1398 
1400 {
1401  public:
1403 
1404  QStringList policyEnumNames() const { return m_policyEnumNames; }
1405  QStringList languageEnumNames() const { return m_languageEnumNames; }
1406  QStringList countryEnumNames(QLocale::Language language) const
1407  { return m_countryEnumNames.value(language); }
1408 
1409  QSizePolicy::Policy indexToSizePolicy(int index) const;
1410  int sizePolicyToIndex(QSizePolicy::Policy policy) const;
1411 
1412  void indexToLocale(int languageIndex, int countryIndex,
1413  QLocale::Language *language, QLocale::Country *country) const;
1414  void localeToIndex(QLocale::Language language, QLocale::Country country,
1415  int *languageIndex, int *countryIndex) const;
1416 
1417  private:
1418  void initLocale();
1419 
1420  QStringList m_policyEnumNames;
1421  QStringList m_languageEnumNames;
1422  QMap<QLocale::Language, QStringList> m_countryEnumNames;
1423  QMap<int, QLocale::Language> m_indexToLanguage;
1424  QMap<QLocale::Language, int> m_languageToIndex;
1425  QMap<int, QMap<int, QLocale::Country> > m_indexToCountry;
1426  QMap<QLocale::Language, QMap<QLocale::Country, int> > m_countryToIndex;
1427  QMetaEnum m_policyEnum;
1428 };
1429 
1431 : public QObject
1432 {
1433  Q_OBJECT
1434  Q_PROPERTY(QSizePolicy::Policy policy READ policy)
1435  public:
1436  QSizePolicy::Policy policy() const { return QSizePolicy::Ignored; }
1437  private:
1438  explicit QtMetaEnumWrapper(QObject *parent) : QObject(parent) {}
1439 };
1440 
1441 
1442 #if QT_VERSION >= 0x040400
1443 QT_END_NAMESPACE
1444 #endif
1445 
1446 #endif
Definition: qtpropertymanager.h:438
Definition: qtpropertymanager.h:169
Definition: qtpropertymanager.h:236
static void setSizeMinimumData(PrivateData *data, const Value &newMinVal)
Definition: qtpropertymanager.h:89
Definition: qtpropertymanager.h:1430
Definition: qtpropertymanager.h:903
Definition: qtpropertymanager.h:679
Definition: qtpropertymanager.h:654
int sizePolicyToIndex(QSizePolicy::Policy policy) const
Definition: qtpropertymanager.h:1099
static void setSimpleMinimumData(PrivateData *data, const Value &minVal)
Definition: qtpropertymanager.h:68
Definition: qtpropertymanager.h:1333
Definition: qtpropertymanager.h:570
Definition: qtpropertybrowser.h:141
Definition: qtpropertymanager.h:386
void localeToIndex(QLocale::Language language, QLocale::Country country, int *languageIndex, int *countryIndex) const
Definition: qtpropertymanager.h:493
Definition: qtpropertymanager.h:626
Definition: qtpropertymanager.h:777
virtual QString valueText(const QtProperty *property) const
Definition: qtpropertymanager.h:516
Definition: qtpropertymanager.h:934
Definition: qtpropertymanager.h:709
Definition: qtpropertymanager.h:300
Definition: qtpropertymanager.h:532
virtual EchoMode echoMode(const QtProperty *) const
Definition: qtpropertymanager.h:1222
static void setSizeMaximumData(PrivateData *data, const Value &newMaxVal)
Definition: qtpropertymanager.h:104
Definition: qtpropertymanager.h:137
Definition: qtpropertymanager.h:1362
virtual QString displayText(const QtProperty *property) const
Definition: qtpropertymanager.h:415
QSizePolicy::Policy indexToSizePolicy(int index) const
QSizePolicy::Policy policy() const
Definition: qtpropertymanager.h:1436
Definition: qtpropertymanager.h:1389
virtual QIcon valueIcon(const QtProperty *property) const
Definition: qtpropertymanager.h:1160
Definition: qtpropertymanager.h:741
Definition: qtpropertymanager.h:1007
static void setSimpleMaximumData(PrivateData *data, const Value &maxVal)
Definition: qtpropertymanager.h:79
Definition: qtpropertymanager.h:119
Definition: qtpropertymanager.h:355
Definition: qtpropertymanager.h:1304
Definition: qtpropertymanager.h:331
Definition: qtpropertymanager.h:820
Definition: qtpropertymanager.h:198
Definition: qtpropertymanager.h:271
virtual void uninitializeProperty(QtProperty *property)
QStringList countryEnumNames(QLocale::Language language) const
Definition: qtpropertymanager.h:1406
Definition: qtpropertymanager.h:555
virtual void initializeProperty(QtProperty *property)=0
Definition: qtpropertymanager.h:1257
QStringList languageEnumNames() const
Definition: qtpropertymanager.h:1405
#define NULL
Definition: CommonTypes.hh:30
Definition: qtpropertymanager.h:223
void indexToLocale(int languageIndex, int countryIndex, QLocale::Language *language, QLocale::Country *country) const
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:68
virtual bool hasValue(const QtProperty *property) const
Definition: qtpropertymanager.h:1130
Definition: qtpropertymanager.h:859
Definition: qtpropertymanager.h:454
Definition: qtpropertymanager.h:1399
Definition: qtpropertybrowser.h:77
Definition: qtpropertymanager.h:477
QLineEdit::EchoMode EchoMode
Definition: qtpropertybrowser.h:71
Definition: qtpropertymanager.h:1046
Definition: qtpropertymanager.h:1077
Definition: qtpropertymanager.h:1190
QStringList policyEnumNames() const
Definition: qtpropertymanager.h:1404
Definition: qtpropertymanager.h:973
Definition: qtpropertymanager.h:598