41 #ifndef QTEDITORFACTORY_H
42 #define QTEDITORFACTORY_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>
65 #if QT_VERSION >= 0x040400
71 template <
class Editor>
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 *))
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 *))
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 *))
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 *))
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 *))
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 *))
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 *))
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 *))
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 *))
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 *))
450 bool event(QEvent *e);
452 void slotClearChar();
454 void handleKeyEvent(QKeyEvent *e);
457 QLineEdit *m_lineEdit;
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 *))
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 *))
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 *))
592 void buttonClicked();
596 QLabel *m_pixmapLabel;
598 QToolButton *m_button;
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 &))
651 void buttonClicked();
655 QLabel *m_pixmapLabel;
657 QToolButton *m_button;
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 &))
692 #if QT_VERSION >= 0x040400
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
Definition: qteditorfactory.h:662
void slotSetValue(const QColor &value)
Definition: qteditorfactory.cpp:2059
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
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 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 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 slotEchoModeChanged(QtProperty *, int)
Definition: qteditorfactory.cpp:850
bool m_updatingEnum
Definition: qteditorfactory.h:551
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:205
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
Definition: qteditorfactory.h:462
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:672
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
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
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
void slotSetValue(int value)
Definition: qteditorfactory.cpp:1722
QMap< QtProperty *, QList< QWidget * > > m_enumToEditors
Definition: qteditorfactory.h:549
The QtDateTimePropertyManager provides and manages QDateTime properties.
Definition: qtpropertymanager.h:494
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
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 ®Exp)
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