42#ifndef QTVARIANTPROPERTY_H
43#define QTVARIANTPROPERTY_H
45#include "qtpropertybrowser.h"
46#include <QtCore/QVariant>
49#if QT_VERSION >= 0x040400
53typedef QMap<int, QIcon> QtIconMap;
62 QVariant value()
const;
63 QVariant attributeValue(
const QString &attribute)
const;
64 int valueType()
const;
65 int propertyType()
const;
67 void setValue(
const QVariant &value);
68 void setAttribute(
const QString &attribute,
const QVariant &value);
85 virtual QtVariantProperty *addProperty(
int propertyType,
const QString &name = QString());
87 int propertyType(
const QtProperty *property)
const;
88 int valueType(
const QtProperty *property)
const;
91 virtual bool isPropertyTypeSupported(
int propertyType)
const;
92 virtual int valueType(
int propertyType)
const;
93 virtual QStringList attributes(
int propertyType)
const;
94 virtual int attributeType(
int propertyType,
const QString &attribute)
const;
96 virtual QVariant value(
const QtProperty *property)
const;
97 virtual QVariant attributeValue(
const QtProperty *property,
const QString &attribute)
const;
99 static int enumTypeId();
100 static int flagTypeId();
101 static int groupTypeId();
102 static int iconMapTypeId();
104 virtual void setValue(
QtProperty *property,
const QVariant &val);
105 virtual void setAttribute(
QtProperty *property,
106 const QString &attribute,
const QVariant &value);
110 const QString &attribute,
const QVariant &val);
115 virtual void initializeProperty(
QtProperty *property);
116 virtual void uninitializeProperty(
QtProperty *property);
120 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
int))
121 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
int,
int))
122 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty *,
int))
123 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
double))
124 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
double,
double))
125 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty *,
double))
126 Q_PRIVATE_SLOT(d_func(),
void slotDecimalsChanged(
QtProperty *,
int))
127 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
bool))
128 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QString &))
129 Q_PRIVATE_SLOT(d_func(),
void slotRegExpChanged(
QtProperty *,
const QRegularExpression&))
130 Q_PRIVATE_SLOT(d_func(),
void slotEchoModeChanged(
QtProperty *,
int))
131 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QDate &))
132 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QDate &,
const QDate &))
133 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QTime &))
134 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QDateTime &))
135 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QKeySequence &))
136 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QChar &))
137 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QLocale &))
138 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QPoint &))
139 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QPointF &))
140 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSize &))
141 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QSize &,
const QSize &))
142 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSizeF &))
143 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty *,
const QSizeF &,
const QSizeF &))
144 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QRect &))
145 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QRect &))
146 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QMargins &))
147 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QMargins &))
148#if QT_VERSION >= 0x050300
149 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QMarginsF &))
150 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QMarginsF &))
152 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QRectF &))
153 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty *,
const QRectF &))
154 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QColor &))
155 Q_PRIVATE_SLOT(d_func(),
void slotEnumNamesChanged(
QtProperty *,
const QStringList &))
156 Q_PRIVATE_SLOT(d_func(),
void slotEnumIconsChanged(
QtProperty *,
const QMap<int, QIcon> &))
157 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QSizePolicy &))
158 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QFont &))
159 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty *,
const QCursor &))
160 Q_PRIVATE_SLOT(d_func(),
void slotFlagNamesChanged(
QtProperty *,
const QStringList &))
187#if QT_VERSION >= 0x040400
191Q_DECLARE_METATYPE(QIcon)
192Q_DECLARE_METATYPE(QtIconMap)
The QtAbstractEditorFactory is the base template class for editor factories.
Definition qtpropertybrowser.h:154
The QtAbstractPropertyManager provides an interface for property managers.
Definition qtpropertybrowser.h:102
The QtProperty class encapsulates an instance of a property.
Definition qtpropertybrowser.h:61
bool hasValue() const
Definition qtpropertybrowser.cpp:272
QIcon valueIcon() const
Definition qtpropertybrowser.cpp:285
QString valueText() const
Definition qtpropertybrowser.cpp:298
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition qtvariantproperty.h:171
Definition qtvariantproperty.cpp:1980
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition qtvariantproperty.h:59
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition qtvariantproperty.h:79
void valueChanged(QtProperty *property, const QVariant &val)
void attributeChanged(QtProperty *property, const QString &attribute, const QVariant &val)
Definition qtvariantproperty.cpp:304
Definition qtvariantproperty.cpp:154