41 #ifndef QTVARIANTPROPERTY_H
42 #define QTVARIANTPROPERTY_H
46 #include <QtCore/QVariant>
47 #include <QtGui/QIcon>
49 #if QT_VERSION >= 0x040400
153 QVariant value()
const;
154 QVariant attributeValue(
const QString &attribute)
const;
155 int valueType()
const;
156 int propertyType()
const;
158 void setValue(
const QVariant &value);
159 void setAttribute(
const QString &attribute,
const QVariant &value);
178 int propertyType(
const QtProperty *property)
const;
179 int valueType(
const QtProperty *property)
const;
182 virtual bool isPropertyTypeSupported(
int propertyType)
const;
183 virtual int valueType(
int propertyType)
const;
184 virtual QStringList attributes(
int propertyType)
const;
185 virtual int attributeType(
int propertyType,
const QString &attribute)
const;
187 virtual QVariant value(
const QtProperty *property)
const;
188 virtual QVariant attributeValue(
const QtProperty *property,
const QString &attribute)
const;
190 static int enumTypeId();
191 static int flagTypeId();
192 static int groupTypeId();
193 static int iconMapTypeId();
195 virtual void setValue(
QtProperty *property,
const QVariant &val);
196 virtual void setAttribute(
QtProperty *property,
197 const QString &attribute,
const QVariant &value);
199 void valueChanged(
QtProperty *property,
const QVariant &val);
201 const QString &attribute,
const QVariant &val);
211 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
int))
212 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
int,
int))
213 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty *,
int))
214 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
double))
215 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
double,
double))
216 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty *,
double))
217 Q_PRIVATE_SLOT(d_func(),
void slotDecimalsChanged(
QtProperty *,
int))
218 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
bool))
219 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QString &))
220 Q_PRIVATE_SLOT(d_func(),
void slotRegExpChanged(
QtProperty *,
const QRegExp &))
221 Q_PRIVATE_SLOT(d_func(),
void slotEchoModeChanged(
QtProperty *,
int))
222 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QDate &))
223 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QDate &,
const QDate &))
224 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QTime &))
225 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QDateTime &))
226 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QKeySequence &))
227 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QChar &))
228 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QLocale &))
229 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QPoint &))
230 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QPointF &))
231 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSize &))
232 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QSize &,
const QSize &))
233 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSizeF &))
234 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QSizeF &,
const QSizeF &))
235 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QRect &))
236 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QRect &))
237 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QRectF &))
238 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QRectF &))
239 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QColor &))
240 Q_PRIVATE_SLOT(d_func(),
void slotEnumNamesChanged(
QtProperty *,
const QStringList &))
241 Q_PRIVATE_SLOT(d_func(),
void slotEnumIconsChanged(
QtProperty *,
const QMap<int, QIcon> &))
242 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSizePolicy &))
243 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QFont &))
244 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QCursor &))
245 Q_PRIVATE_SLOT(d_func(),
void slotFlagNamesChanged(
QtProperty *,
const QStringList &))
296 #if QT_VERSION >= 0x040400
300 Q_DECLARE_METATYPE(QIcon)
QtLineEditFactory * m_lineEditFactory
Definition: qtvariantproperty.h:264
void slotValueChanged(QtProperty *property, int val)
Definition: qtvariantproperty.cpp:393
virtual QString valueText(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:700
const QString m_flagNamesAttribute
Definition: qtvariantproperty.h:142
void removeSubProperty(QtVariantProperty *property)
Definition: qtvariantproperty.cpp:342
The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyMana...
Definition: qteditorfactory.h:277
virtual QtProperty * createProperty()
Definition: qtpropertybrowser.cpp:763
QtFontEditorFactory * m_fontEditorFactory
Definition: qtvariantproperty.h:273
QtCursorEditorFactory * m_cursorEditorFactory
Definition: qtvariantproperty.h:271
The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequenceP...
Definition: qteditorfactory.h:412
void slotEnumChanged(QtProperty *property, int val)
QMap< int, QtAbstractEditorFactoryBase * > m_typeToFactory
Definition: qtvariantproperty.h:276
void slotEnumNamesChanged(QtProperty *property, const QStringList &enumNames)
Definition: qtvariantproperty.cpp:562
void slotDecimalsChanged(QtProperty *property, int prec)
Definition: qtvariantproperty.cpp:431
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition: qtvariantproperty.h:169
bool m_creatingSubProperties
Definition: qtvariantproperty.h:76
The QtAbstractPropertyManager provides an interface for property managers.
Definition: qtpropertybrowser.h:153
The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePr...
Definition: qteditorfactory.h:380
QtVariantProperty * createSubProperty(QtVariantProperty *parent, QtVariantProperty *after, QtProperty *internal)
Definition: qtvariantproperty.cpp:316
QtEnumEditorFactory * m_comboBoxFactory
Definition: qtvariantproperty.h:270
const QString m_enumNamesAttribute
Definition: qtvariantproperty.h:141
void slotSingleStepChanged(QtProperty *property, int step)
Definition: qtvariantproperty.cpp:406
QMap< int, QMap< QString, int > > m_typeToAttributeToAttributeType
Definition: qtvariantproperty.h:128
bool m_destroyingSubProperties
Definition: qtvariantproperty.h:77
void slotFlagChanged(QtProperty *property, int val)
The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManage...
Definition: qteditorfactory.h:205
The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManage...
Definition: qteditorfactory.h:346
int m_propertyType
Definition: qtvariantproperty.h:78
virtual bool hasValue(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:670
QMap< const QtProperty *, QPair< QtVariantProperty *, int > > m_propertyToType
Definition: qtvariantproperty.h:130
QtVariantPropertyPrivate(QtVariantPropertyManager *m)
Definition: qtvariantproperty.h:63
QMap< QtProperty *, QtVariantProperty * > m_internalToProperty
Definition: qtvariantproperty.h:135
The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePr...
Definition: qteditorfactory.h:240
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:205
void slotRegExpChanged(QtProperty *property, const QRegExp ®Exp)
Definition: qtvariantproperty.cpp:447
QtDateTimeEditFactory * m_dateTimeEditFactory
Definition: qtvariantproperty.h:267
const QString m_maximumAttribute
Definition: qtvariantproperty.h:143
QtProperty * addProperty(const QString &name=QString())
Definition: qtpropertybrowser.cpp:743
void slotEnumIconsChanged(QtProperty *property, const QMap< int, QIcon > &enumIcons)
Definition: qtvariantproperty.cpp:568
virtual void initializeProperty(QtProperty *property)=0
The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager o...
Definition: qteditorfactory.h:672
void slotPropertyRemoved(QtProperty *property, QtProperty *parent)
Definition: qtvariantproperty.cpp:373
Definition: qtvariantproperty.h:68
bool m_creatingProperty
Definition: qtvariantproperty.h:75
virtual void uninitializeProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:796
QtDateEditFactory * m_dateEditFactory
Definition: qtvariantproperty.h:265
void slotFlagNamesChanged(QtProperty *property, const QStringList &flagNames)
Definition: qtvariantproperty.cpp:594
const QString m_echoModeAttribute
Definition: qtvariantproperty.h:146
The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorProperty...
Definition: qteditorfactory.h:554
QMap< int, QIcon > QtIconMap
Definition: qtvariantproperty.h:53
QMap< QtAbstractEditorFactoryBase *, int > m_factoryToType
Definition: qtvariantproperty.h:275
void slotRangeChanged(QtProperty *property, int min, int max)
Definition: qtvariantproperty.cpp:398
QMap< const QtProperty *, QtProperty * > PropertyMap
Definition: qtvariantproperty.h:54
QMap< int, QtAbstractPropertyManager * > m_typeToPropertyManager
Definition: qtvariantproperty.h:127
QtColorEditorFactory * m_colorEditorFactory
Definition: qtvariantproperty.h:272
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
QtCharEditorFactory * m_charEditorFactory
Definition: qtvariantproperty.h:269
QtVariantPropertyManagerPrivate()
Definition: qtvariantproperty.cpp:287
Definition: qtvariantproperty.h:255
void slotConstraintChanged(QtProperty *property, const QRect &val)
Definition: qtvariantproperty.cpp:540
const QString m_singleStepAttribute
Definition: qtvariantproperty.h:138
Definition: qtvariantproperty.h:59
QtCheckBoxFactory * m_checkBoxFactory
Definition: qtvariantproperty.h:263
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:66
virtual QIcon valueIcon(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:685
void valueChanged(QtProperty *property, const QVariant &val)
Definition: qtvariantproperty.cpp:384
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition: qtvariantproperty.h:149
void slotEchoModeChanged(QtProperty *property, int)
Definition: qtvariantproperty.cpp:453
The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager o...
Definition: qteditorfactory.h:102
QtKeySequenceEditorFactory * m_keySequenceEditorFactory
Definition: qtvariantproperty.h:268
const QString m_constraintAttribute
Definition: qtvariantproperty.h:137
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:209
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:74
virtual void disconnectPropertyManager(PropertyManager *manager)=0
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition: qtvariantproperty.h:279
QtDoubleSpinBoxFactory * m_doubleSpinBoxFactory
Definition: qtvariantproperty.h:262
QtSpinBoxFactory * m_spinBoxFactory
Definition: qtvariantproperty.h:261
QtTimeEditFactory * m_timeEditFactory
Definition: qtvariantproperty.h:266
virtual void connectPropertyManager(PropertyManager *manager)=0
QtVariantPropertyManager * manager
Definition: qtvariantproperty.h:65
const QString m_regExpAttribute
Definition: qtvariantproperty.h:145
int internalPropertyToType(QtProperty *property) const
Definition: qtvariantproperty.cpp:301
QMap< int, int > m_typeToValueType
Definition: qtvariantproperty.h:132
void slotPropertyInserted(QtProperty *property, QtProperty *parent, QtProperty *after)
Definition: qtvariantproperty.cpp:353
const QString m_decimalsAttribute
Definition: qtvariantproperty.h:139
The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManage...
Definition: qteditorfactory.h:312
const QString m_minimumAttribute
Definition: qtvariantproperty.h:144
const QString m_enumIconsAttribute
Definition: qtvariantproperty.h:140
The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyMana...
Definition: qteditorfactory.h:507