vizkit3d
qteditorfactory.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 
41 #ifndef QTEDITORFACTORY_H
42 #define QTEDITORFACTORY_H
43 
44 #include "qtpropertymanager.h"
45 #include "qtpropertybrowserutils.h"
46 #include <QtGui/QSpinBox>
47 #include <QtGui/QScrollBar>
48 #include <QtGui/QLabel>
49 #include <QtGui/QComboBox>
50 #include <QtGui/QAbstractItemView>
51 #include <QtGui/QLineEdit>
52 #include <QtGui/QDateTimeEdit>
53 #include <QtGui/QHBoxLayout>
54 #include <QtGui/QMenu>
55 #include <QtGui/QKeyEvent>
56 #include <QtGui/QApplication>
57 #include <QtGui/QToolButton>
58 #include <QtGui/QColorDialog>
59 #include <QtGui/QFontDialog>
60 #include <QtGui/QSpacerItem>
61 #include <QtGui/QStyleOption>
62 #include <QtGui/QPainter>
63 #include <QtCore/QMap>
64 
65 #if QT_VERSION >= 0x040400
66 QT_BEGIN_NAMESPACE
67 #endif
68 
69 class QtSpinBoxFactory;
70 
71 template <class Editor>
73 {
74 public:
75 
76  typedef QList<Editor *> EditorList;
77  typedef QMap<QtProperty *, EditorList> PropertyToEditorListMap;
78  typedef QMap<Editor *, QtProperty *> EditorToPropertyMap;
79 
80  Editor *createEditor(QtProperty *property, QWidget *parent);
81  void initializeEditor(QtProperty *property, Editor *e);
82  virtual void slotEditorDestroyed(QObject *object);
83 
86 
87  virtual ~EditorFactoryPrivate() {}
88 };
89 
91 {
92  QtSpinBoxFactory *q_ptr;
93  Q_DECLARE_PUBLIC(QtSpinBoxFactory)
94 public:
95 
96  void slotPropertyChanged(QtProperty *property, int value);
97  void slotRangeChanged(QtProperty *property, int min, int max);
98  void slotSingleStepChanged(QtProperty *property, int step);
99  void slotSetValue(int value);
100 };
101 
103 {
104  Q_OBJECT
105 public:
106  QtSpinBoxFactory(QObject *parent = 0);
107  virtual ~QtSpinBoxFactory();
108 protected:
110  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
111  QWidget *parent);
113 private:
115  Q_DECLARE_PRIVATE(QtSpinBoxFactory)
116  Q_DISABLE_COPY(QtSpinBoxFactory)
117  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
118  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
119  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
120  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
121  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
122 };
123 
124 class QtSliderFactory;
125 
127 {
128  QtSliderFactory *q_ptr;
129  Q_DECLARE_PUBLIC(QtSliderFactory)
130 public:
131  void slotPropertyChanged(QtProperty *property, int value);
132  void slotRangeChanged(QtProperty *property, int min, int max);
133  void slotSingleStepChanged(QtProperty *property, int step);
134  void slotSetValue(int value);
135 };
136 
138 {
139  Q_OBJECT
140 public:
141  QtSliderFactory(QObject *parent = 0);
142  virtual ~QtSliderFactory();
143 protected:
145  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
146  QWidget *parent);
148 private:
149  QtSliderFactoryPrivate *d_ptr;
150  Q_DECLARE_PRIVATE(QtSliderFactory)
151  Q_DISABLE_COPY(QtSliderFactory)
152  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
153  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
154  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
155  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
156  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
157 };
158 
159 class QtScrollBarFactory;
160 
162 {
163  QtScrollBarFactory *q_ptr;
164  Q_DECLARE_PUBLIC(QtScrollBarFactory)
165 public:
166  void slotPropertyChanged(QtProperty *property, int value);
167  void slotRangeChanged(QtProperty *property, int min, int max);
168  void slotSingleStepChanged(QtProperty *property, int step);
169  void slotSetValue(int value);
170 };
171 
173 {
174  Q_OBJECT
175 public:
176  QtScrollBarFactory(QObject *parent = 0);
177  virtual ~QtScrollBarFactory();
178 protected:
180  QWidget *createEditor(QtIntPropertyManager *manager, QtProperty *property,
181  QWidget *parent);
183 private:
185  Q_DECLARE_PRIVATE(QtScrollBarFactory)
186  Q_DISABLE_COPY(QtScrollBarFactory)
187  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
188  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
189  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
190  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
191  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
192 };
193 
194 class QtCheckBoxFactory;
195 
197 {
198  QtCheckBoxFactory *q_ptr;
199  Q_DECLARE_PUBLIC(QtCheckBoxFactory)
200 public:
201  void slotPropertyChanged(QtProperty *property, bool value);
202  void slotSetValue(bool value);
203 };
204 
206 {
207  Q_OBJECT
208 public:
209  QtCheckBoxFactory(QObject *parent = 0);
210  virtual ~QtCheckBoxFactory();
211 protected:
213  QWidget *createEditor(QtBoolPropertyManager *manager, QtProperty *property,
214  QWidget *parent);
216 private:
218  Q_DECLARE_PRIVATE(QtCheckBoxFactory)
219  Q_DISABLE_COPY(QtCheckBoxFactory)
220  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool))
221  Q_PRIVATE_SLOT(d_func(), void slotSetValue(bool))
222  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
223 };
224 
226 
228 {
229  QtDoubleSpinBoxFactory *q_ptr;
230  Q_DECLARE_PUBLIC(QtDoubleSpinBoxFactory)
231 public:
232 
233  void slotPropertyChanged(QtProperty *property, double value);
234  void slotRangeChanged(QtProperty *property, double min, double max);
235  void slotSingleStepChanged(QtProperty *property, double step);
236  void slotDecimalsChanged(QtProperty *property, int prec);
237  void slotSetValue(double value);
238 };
239 
241 {
242  Q_OBJECT
243 public:
244  QtDoubleSpinBoxFactory(QObject *parent = 0);
245  virtual ~QtDoubleSpinBoxFactory();
246 protected:
248  QWidget *createEditor(QtDoublePropertyManager *manager, QtProperty *property,
249  QWidget *parent);
251 private:
253  Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory)
254  Q_DISABLE_COPY(QtDoubleSpinBoxFactory)
255  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double))
256  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, double, double))
257  Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, double))
258  Q_PRIVATE_SLOT(d_func(), void slotDecimalsChanged(QtProperty *, int))
259  Q_PRIVATE_SLOT(d_func(), void slotSetValue(double))
260  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
261 };
262 
263 class QtLineEditFactory;
264 
266 {
267  QtLineEditFactory *q_ptr;
268  Q_DECLARE_PUBLIC(QtLineEditFactory)
269 public:
270 
271  void slotPropertyChanged(QtProperty *property, const QString &value);
272  void slotRegExpChanged(QtProperty *property, const QRegExp &regExp);
273  void slotEditFinished();
274  void slotEchoModeChanged(QtProperty *, int);
275 };
276 
278 {
279  Q_OBJECT
280 public:
281  QtLineEditFactory(QObject *parent = 0);
282  virtual ~QtLineEditFactory();
283 protected:
285  QWidget *createEditor(QtStringPropertyManager *manager, QtProperty *property,
286  QWidget *parent);
288 private:
290  Q_DECLARE_PRIVATE(QtLineEditFactory)
291  Q_DISABLE_COPY(QtLineEditFactory)
292  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &))
293  Q_PRIVATE_SLOT(d_func(), void slotRegExpChanged(QtProperty *, const QRegExp &))
294  Q_PRIVATE_SLOT(d_func(), void slotEchoModeChanged(QtProperty *, int))
295  Q_PRIVATE_SLOT(d_func(), void slotEditFinished())
296  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
297 };
298 
299 class QtDateEditFactory;
300 
302 {
303  QtDateEditFactory *q_ptr;
304  Q_DECLARE_PUBLIC(QtDateEditFactory)
305 public:
306 
307  void slotPropertyChanged(QtProperty *property, const QDate &value);
308  void slotRangeChanged(QtProperty *property, const QDate &min, const QDate &max);
309  void slotSetValue(const QDate &value);
310 };
311 
313 {
314  Q_OBJECT
315 public:
316  QtDateEditFactory(QObject *parent = 0);
317  virtual ~QtDateEditFactory();
318 protected:
320  QWidget *createEditor(QtDatePropertyManager *manager, QtProperty *property,
321  QWidget *parent);
323 private:
325  Q_DECLARE_PRIVATE(QtDateEditFactory)
326  Q_DISABLE_COPY(QtDateEditFactory)
327  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &))
328  Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *,
329  const QDate &, const QDate &))
330  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDate &))
331  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
332 };
333 
334 class QtTimeEditFactory;
335 
337 {
338  QtTimeEditFactory *q_ptr;
339  Q_DECLARE_PUBLIC(QtTimeEditFactory)
340 public:
341 
342  void slotPropertyChanged(QtProperty *property, const QTime &value);
343  void slotSetValue(const QTime &value);
344 };
345 
347 {
348  Q_OBJECT
349 public:
350  QtTimeEditFactory(QObject *parent = 0);
351  virtual ~QtTimeEditFactory();
352 protected:
354  QWidget *createEditor(QtTimePropertyManager *manager, QtProperty *property,
355  QWidget *parent);
357 private:
359  Q_DECLARE_PRIVATE(QtTimeEditFactory)
360  Q_DISABLE_COPY(QtTimeEditFactory)
361  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &))
362  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QTime &))
363  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
364 };
365 
367 
369 {
370  QtDateTimeEditFactory *q_ptr;
371  Q_DECLARE_PUBLIC(QtDateTimeEditFactory)
372 public:
373 
374  void slotPropertyChanged(QtProperty *property, const QDateTime &value);
375  void slotSetValue(const QDateTime &value);
376 
377 };
378 
379 
381 {
382  Q_OBJECT
383 public:
384  QtDateTimeEditFactory(QObject *parent = 0);
385  virtual ~QtDateTimeEditFactory();
386 protected:
388  QWidget *createEditor(QtDateTimePropertyManager *manager, QtProperty *property,
389  QWidget *parent);
391 private:
393  Q_DECLARE_PRIVATE(QtDateTimeEditFactory)
394  Q_DISABLE_COPY(QtDateTimeEditFactory)
395  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &))
396  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QDateTime &))
397  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
398 };
399 
401 
403 {
405  Q_DECLARE_PUBLIC(QtKeySequenceEditorFactory)
406 public:
407 
408  void slotPropertyChanged(QtProperty *property, const QKeySequence &value);
409  void slotSetValue(const QKeySequence &value);
410 };
411 
413 {
414  Q_OBJECT
415 public:
416  QtKeySequenceEditorFactory(QObject *parent = 0);
417  virtual ~QtKeySequenceEditorFactory();
418 protected:
420  QWidget *createEditor(QtKeySequencePropertyManager *manager, QtProperty *property,
421  QWidget *parent);
423 private:
425  Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory)
426  Q_DISABLE_COPY(QtKeySequenceEditorFactory)
427  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &))
428  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QKeySequence &))
429  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
430 };
431 
432 class QtCharEdit : public QWidget
433 {
434  Q_OBJECT
435 public:
436  QtCharEdit(QWidget *parent = 0);
437 
438  QChar value() const;
439  bool eventFilter(QObject *o, QEvent *e);
440 public Q_SLOTS:
441  void setValue(const QChar &value);
442 Q_SIGNALS:
443  void valueChanged(const QChar &value);
444 protected:
445  void focusInEvent(QFocusEvent *e);
446  void focusOutEvent(QFocusEvent *e);
447  void keyPressEvent(QKeyEvent *e);
448  void keyReleaseEvent(QKeyEvent *e);
449  void paintEvent(QPaintEvent *);
450  bool event(QEvent *e);
451 private slots:
452  void slotClearChar();
453 private:
454  void handleKeyEvent(QKeyEvent *e);
455 
456  QChar m_value;
457  QLineEdit *m_lineEdit;
458 };
459 
460 class QtCharEditorFactory;
461 
463 {
464  QtCharEditorFactory *q_ptr;
465  Q_DECLARE_PUBLIC(QtCharEditorFactory)
466 public:
467 
468  void slotPropertyChanged(QtProperty *property, const QChar &value);
469  void slotSetValue(const QChar &value);
470 
471 };
472 
474 {
475  Q_OBJECT
476 public:
477  QtCharEditorFactory(QObject *parent = 0);
478  virtual ~QtCharEditorFactory();
479 protected:
481  QWidget *createEditor(QtCharPropertyManager *manager, QtProperty *property,
482  QWidget *parent);
484 private:
486  Q_DECLARE_PRIVATE(QtCharEditorFactory)
487  Q_DISABLE_COPY(QtCharEditorFactory)
488  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &))
489  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QChar &))
490  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
491 };
492 
493 class QtEnumEditorFactory;
494 
496 {
497  QtEnumEditorFactory *q_ptr;
498  Q_DECLARE_PUBLIC(QtEnumEditorFactory)
499 public:
500 
501  void slotPropertyChanged(QtProperty *property, int value);
502  void slotEnumNamesChanged(QtProperty *property, const QStringList &);
503  void slotEnumIconsChanged(QtProperty *property, const QMap<int, QIcon> &);
504  void slotSetValue(int value);
505 };
506 
508 {
509  Q_OBJECT
510 public:
511  QtEnumEditorFactory(QObject *parent = 0);
512  virtual ~QtEnumEditorFactory();
513 protected:
515  QWidget *createEditor(QtEnumPropertyManager *manager, QtProperty *property,
516  QWidget *parent);
518 private:
520  Q_DECLARE_PRIVATE(QtEnumEditorFactory)
521  Q_DISABLE_COPY(QtEnumEditorFactory)
522  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int))
523  Q_PRIVATE_SLOT(d_func(), void slotEnumNamesChanged(QtProperty *,
524  const QStringList &))
525  Q_PRIVATE_SLOT(d_func(), void slotEnumIconsChanged(QtProperty *,
526  const QMap<int, QIcon> &))
527  Q_PRIVATE_SLOT(d_func(), void slotSetValue(int))
528  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
529 };
530 
532 
534 {
535  QtCursorEditorFactory *q_ptr;
536  Q_DECLARE_PUBLIC(QtCursorEditorFactory)
537 public:
539 
540  void slotPropertyChanged(QtProperty *property, const QCursor &cursor);
541  void slotEnumChanged(QtProperty *property, int value);
542  void slotEditorDestroyed(QObject *object);
543 
546 
547  QMap<QtProperty *, QtProperty *> m_propertyToEnum;
548  QMap<QtProperty *, QtProperty *> m_enumToProperty;
549  QMap<QtProperty *, QList<QWidget *> > m_enumToEditors;
550  QMap<QWidget *, QtProperty *> m_editorToEnum;
552 };
553 
555 {
556  Q_OBJECT
557 public:
558  QtCursorEditorFactory(QObject *parent = 0);
559  virtual ~QtCursorEditorFactory();
560 protected:
562  QWidget *createEditor(QtCursorPropertyManager *manager, QtProperty *property,
563  QWidget *parent);
565 private:
567  Q_DECLARE_PRIVATE(QtCursorEditorFactory)
568  Q_DISABLE_COPY(QtCursorEditorFactory)
569  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &))
570  Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int))
571  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
572 };
573 
574 class QtColorEditWidget : public QWidget {
575  Q_OBJECT
576 
577 public:
578  QtColorEditWidget(QWidget *parent);
579 
580  bool eventFilter(QObject *obj, QEvent *ev);
581 
582 public Q_SLOTS:
583  void setValue(const QColor &value);
584 
585 Q_SIGNALS:
586  void valueChanged(const QColor &value);
587 
588 protected:
589  void paintEvent(QPaintEvent *);
590 
591 private Q_SLOTS:
592  void buttonClicked();
593 
594 private:
595  QColor m_color;
596  QLabel *m_pixmapLabel;
597  QLabel *m_label;
598  QToolButton *m_button;
599 };
600 
602 
604 {
605  Q_OBJECT
606 public:
607  QtColorEditorFactory(QObject *parent = 0);
608  virtual ~QtColorEditorFactory();
609 protected:
611  QWidget *createEditor(QtColorPropertyManager *manager, QtProperty *property,
612  QWidget *parent);
614 private:
616  Q_DECLARE_PRIVATE(QtColorEditorFactory)
617  Q_DISABLE_COPY(QtColorEditorFactory)
618  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &))
619  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
620  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QColor &))
621 };
622 
623 class QtColorEditorFactoryPrivate : public EditorFactoryPrivate<QtColorEditWidget>
624 {
625  QtColorEditorFactory *q_ptr;
626  Q_DECLARE_PUBLIC(QtColorEditorFactory)
627 public:
628 
629  void slotPropertyChanged(QtProperty *property, const QColor &value);
630  void slotSetValue(const QColor &value);
631 };
632 
633 class QtFontEditWidget : public QWidget {
634  Q_OBJECT
635 
636 public:
637  QtFontEditWidget(QWidget *parent);
638 
639  bool eventFilter(QObject *obj, QEvent *ev);
640 
641 public Q_SLOTS:
642  void setValue(const QFont &value);
643 
644 Q_SIGNALS:
645  void valueChanged(const QFont &value);
646 
647 protected:
648  void paintEvent(QPaintEvent *);
649 
650 private Q_SLOTS:
651  void buttonClicked();
652 
653 private:
654  QFont m_font;
655  QLabel *m_pixmapLabel;
656  QLabel *m_label;
657  QToolButton *m_button;
658 };
659 
660 class QtFontEditorFactory;
661 
662 class QtFontEditorFactoryPrivate : public EditorFactoryPrivate<QtFontEditWidget>
663 {
664  QtFontEditorFactory *q_ptr;
665  Q_DECLARE_PUBLIC(QtFontEditorFactory)
666 public:
667 
668  void slotPropertyChanged(QtProperty *property, const QFont &value);
669  void slotSetValue(const QFont &value);
670 };
671 
673 {
674  Q_OBJECT
675 public:
676  QtFontEditorFactory(QObject *parent = 0);
677  virtual ~QtFontEditorFactory();
678 protected:
680  QWidget *createEditor(QtFontPropertyManager *manager, QtProperty *property,
681  QWidget *parent);
683 private:
685  Q_DECLARE_PRIVATE(QtFontEditorFactory)
686  Q_DISABLE_COPY(QtFontEditorFactory)
687  Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &))
688  Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
689  Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont &))
690 };
691 
692 #if QT_VERSION >= 0x040400
693 QT_END_NAMESPACE
694 #endif
695 
696 #endif
void slotSetValue(const QDateTime &value)
Definition: qteditorfactory.cpp:1213
void slotSetValue(const QDate &value)
Definition: qteditorfactory.cpp:1005
The QtDoublePropertyManager provides and manages double properties.
Definition: qtpropertymanager.h:300
Definition: qteditorfactory.h:336
QList< Editor * > EditorList
Definition: qteditorfactory.h:76
void slotEnumIconsChanged(QtProperty *property, const QMap< int, QIcon > &)
Definition: qteditorfactory.cpp:1699
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition: qteditorfactory.h:277
void slotSetValue(double value)
Definition: qteditorfactory.cpp:707
void slotDecimalsChanged(QtProperty *property, int prec)
Definition: qteditorfactory.cpp:687
void slotPropertyChanged(QtProperty *property, const QFont &value)
Definition: qteditorfactory.cpp:2234
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition: qteditorfactory.h:412
QtColorEditWidget(QWidget *parent)
Definition: qteditorfactory.cpp:1966
Definition: qteditorfactory.h:662
void slotSetValue(const QColor &value)
Definition: qteditorfactory.cpp:2059
void valueChanged(const QColor &value)
Definition: qteditorfactory.h:623
Definition: qteditorfactory.h:402
void slotPropertyChanged(QtProperty *property, const QCursor &cursor)
Definition: qteditorfactory.cpp:1826
void slotEnumNamesChanged(QtProperty *property, const QStringList &)
Definition: qteditorfactory.cpp:1673
virtual void slotEditorDestroyed(QObject *object)
Definition: qteditorfactory.cpp:85
QtCursorEditorFactoryPrivate()
Definition: qteditorfactory.cpp:1820
void slotRangeChanged(QtProperty *property, int min, int max)
Definition: qteditorfactory.cpp:406
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition: qteditorfactory.h:380
void initializeEditor(QtProperty *property, Editor *e)
Definition: qteditorfactory.cpp:75
void keyReleaseEvent(QKeyEvent *e)
Definition: qteditorfactory.cpp:1525
void slotRangeChanged(QtProperty *property, int min, int max)
Definition: qteditorfactory.cpp:121
void focusOutEvent(QFocusEvent *e)
Definition: qteditorfactory.cpp:1513
void setValue(const QColor &value)
Definition: qteditorfactory.cpp:1991
void slotSingleStepChanged(QtProperty *property, int step)
Definition: qteditorfactory.cpp:140
bool eventFilter(QObject *o, QEvent *e)
Definition: qteditorfactory.cpp:1417
Definition: qteditorfactory.h:432
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
Definition: qtpropertymanager.h:531
QtEnumEditorFactory * m_enumEditorFactory
Definition: qteditorfactory.h:544
void slotPropertyChanged(QtProperty *property, const QString &value)
Definition: qteditorfactory.cpp:810
void slotEditorDestroyed(QObject *object)
Definition: qteditorfactory.cpp:1854
QMap< QtProperty *, QtProperty * > m_propertyToEnum
Definition: qteditorfactory.h:547
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition: qteditorfactory.h:205
void slotPropertyChanged(QtProperty *property, int value)
Definition: qteditorfactory.cpp:392
void slotEnumChanged(QtProperty *property, int value)
Definition: qteditorfactory.cpp:1838
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition: qteditorfactory.h:346
QMap< QtProperty *, QtProperty * > m_enumToProperty
Definition: qteditorfactory.h:548
The QtStringPropertyManager provides and manages QString properties.
Definition: qtpropertymanager.h:357
void slotSetValue(const QTime &value)
Definition: qteditorfactory.cpp:1112
Editor * createEditor(QtProperty *property, QWidget *parent)
Definition: qteditorfactory.cpp:67
QMap< Editor *, QtProperty * > EditorToPropertyMap
Definition: qteditorfactory.h:78
void slotRangeChanged(QtProperty *property, int min, int max)
Definition: qteditorfactory.cpp:263
The QtCharPropertyManager provides and manages QChar properties.
Definition: qtpropertymanager.h:566
void slotRangeChanged(QtProperty *property, const QDate &min, const QDate &max)
Definition: qteditorfactory.cpp:985
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition: qteditorfactory.h:240
void valueChanged(const QFont &value)
void slotEchoModeChanged(QtProperty *, int)
Definition: qteditorfactory.cpp:850
bool m_updatingEnum
Definition: qteditorfactory.h:551
void paintEvent(QPaintEvent *)
Definition: qteditorfactory.cpp:2035
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:205
Definition: qteditorfactory.h:633
The QtFontPropertyManager provides and manages QFont properties.
Definition: qtpropertymanager.h:1246
The QtIntPropertyManager provides and manages int properties.
Definition: qtpropertymanager.h:207
QMap< QtProperty *, EditorList > PropertyToEditorListMap
Definition: qteditorfactory.h:77
bool event(QEvent *e)
Definition: qteditorfactory.cpp:1538
The QtCursorPropertyManager provides and manages QCursor properties.
Definition: qtpropertymanager.h:1348
The QtTimePropertyManager provides and manages QTime properties.
Definition: qtpropertymanager.h:457
Definition: qteditorfactory.h:533
bool eventFilter(QObject *obj, QEvent *ev)
Definition: qteditorfactory.cpp:2011
bool eventFilter(QObject *obj, QEvent *ev)
Definition: qteditorfactory.cpp:2198
Definition: qteditorfactory.h:462
The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManag...
Definition: qteditorfactory.h:172
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:672
QtFontEditWidget(QWidget *parent)
Definition: qteditorfactory.cpp:2140
void slotPropertyChanged(QtProperty *property, const QChar &value)
Definition: qteditorfactory.cpp:1556
Definition: qteditorfactory.h:227
void slotSetValue(bool value)
Definition: qteditorfactory.cpp:547
The QtDatePropertyManager provides and manages QDate properties.
Definition: qtpropertymanager.h:389
The QtColorPropertyManager provides and manages QColor properties.
Definition: qtpropertymanager.h:1307
QMap< QWidget *, QtProperty * > m_editorToEnum
Definition: qteditorfactory.h:550
void slotPropertyChanged(QtProperty *property, int value)
Definition: qteditorfactory.cpp:250
void slotPropertyChanged(QtProperty *property, const QColor &value)
Definition: qteditorfactory.cpp:2047
void slotEditFinished()
Definition: qteditorfactory.cpp:870
Definition: qteditorfactory.h:196
void slotSetValue(int value)
Definition: qteditorfactory.cpp:438
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition: qteditorfactory.h:554
Definition: qteditorfactory.h:265
void slotSingleStepChanged(QtProperty *property, int step)
Definition: qteditorfactory.cpp:282
The QtBoolPropertyManager class provides and manages boolean properties.
Definition: qtpropertymanager.h:250
void slotSetValue(const QKeySequence &value)
Definition: qteditorfactory.cpp:1316
void slotSetValue(const QFont &value)
Definition: qteditorfactory.cpp:2246
QtEnumPropertyManager * m_enumPropertyManager
Definition: qteditorfactory.h:545
QtCharEdit(QWidget *parent=0)
Definition: qteditorfactory.cpp:1404
Definition: qteditorfactory.h:90
Definition: qteditorfactory.h:368
Definition: qteditorfactory.h:126
QChar value() const
Definition: qteditorfactory.cpp:1501
void slotPropertyChanged(QtProperty *property, const QDateTime &value)
Definition: qteditorfactory.cpp:1198
The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManage...
Definition: qteditorfactory.h:603
The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager...
Definition: qteditorfactory.h:473
void slotSingleStepChanged(QtProperty *property, int step)
Definition: qteditorfactory.cpp:425
Definition: qteditorfactory.h:301
void setValue(const QChar &value)
Definition: qteditorfactory.cpp:1491
void slotPropertyChanged(QtProperty *property, const QTime &value)
Definition: qteditorfactory.cpp:1099
EditorToPropertyMap m_editorToProperty
Definition: qteditorfactory.h:85
virtual ~EditorFactoryPrivate()
Definition: qteditorfactory.h:87
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:66
Definition: qteditorfactory.h:72
Definition: qteditorfactory.h:161
void slotSetValue(int value)
Definition: qteditorfactory.cpp:1722
QMap< QtProperty *, QList< QWidget * > > m_enumToEditors
Definition: qteditorfactory.h:549
Definition: qteditorfactory.h:574
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:494
void setValue(const QFont &value)
Definition: qteditorfactory.cpp:2165
The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager o...
Definition: qteditorfactory.h:102
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:209
void slotSetValue(int value)
Definition: qteditorfactory.cpp:153
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:74
virtual void disconnectPropertyManager(PropertyManager *manager)=0
void slotPropertyChanged(QtProperty *property, bool value)
Definition: qteditorfactory.cpp:533
void valueChanged(const QChar &value)
void slotSetValue(const QChar &value)
Definition: qteditorfactory.cpp:1571
virtual void connectPropertyManager(PropertyManager *manager)=0
PropertyToEditorListMap m_createdEditors
Definition: qteditorfactory.h:84
The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager obj...
Definition: qteditorfactory.h:137
void slotSingleStepChanged(QtProperty *property, double step)
Definition: qteditorfactory.cpp:668
void slotPropertyChanged(QtProperty *property, int value)
Definition: qteditorfactory.cpp:1659
void slotPropertyChanged(QtProperty *property, const QKeySequence &value)
Definition: qteditorfactory.cpp:1301
void slotPropertyChanged(QtProperty *property, double value)
Definition: qteditorfactory.cpp:633
void slotSetValue(int value)
Definition: qteditorfactory.cpp:295
Definition: qteditorfactory.h:495
void focusInEvent(QFocusEvent *e)
Definition: qteditorfactory.cpp:1506
The QtEnumPropertyManager provides and manages enum properties.
Definition: qtpropertymanager.h:1053
void paintEvent(QPaintEvent *)
Definition: qteditorfactory.cpp:2222
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition: qteditorfactory.h:312
void slotPropertyChanged(QtProperty *property, const QDate &value)
Definition: qteditorfactory.cpp:972
void keyPressEvent(QKeyEvent *e)
Definition: qteditorfactory.cpp:1519
void slotRangeChanged(QtProperty *property, double min, double max)
Definition: qteditorfactory.cpp:647
void slotRegExpChanged(QtProperty *property, const QRegExp &regExp)
Definition: qteditorfactory.cpp:824
void paintEvent(QPaintEvent *)
Definition: qteditorfactory.cpp:1530
void slotPropertyChanged(QtProperty *property, int value)
Definition: qteditorfactory.cpp:106
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition: qteditorfactory.h:507