41 #ifndef QTVARIANTPROPERTY_H 42 #define QTVARIANTPROPERTY_H 45 #include <QtCore/QVariant> 46 #include <QtGui/QIcon> 48 #if QT_VERSION >= 0x040400 98 QVariant value()
const;
99 QVariant attributeValue(
const QString& attribute)
const;
100 int valueType()
const;
101 int propertyType()
const;
103 void setValue(
const QVariant& value);
104 void setAttribute(
const QString& attribute,
const QVariant& value);
106 virtual void setAttribute(
const QString& attribute,
const QMap<int, QIcon>& value);
125 int propertyType(
const QtProperty* property)
const;
126 int valueType(
const QtProperty* property)
const;
129 virtual bool isPropertyTypeSupported(
int propertyType)
const;
130 virtual int valueType(
int propertyType)
const;
131 virtual QStringList attributes(
int propertyType)
const;
132 virtual int attributeType(
int propertyType,
const QString& attribute)
const;
134 virtual QVariant value(
const QtProperty* property)
const;
135 virtual QVariant attributeValue(
const QtProperty* property,
const QString& attribute)
const;
137 static int enumTypeId();
138 static int flagTypeId();
139 static int groupTypeId();
140 static int iconMapTypeId();
142 virtual void setValue(
QtProperty* property,
const QVariant& val);
143 virtual void setAttribute(
QtProperty* property,
144 const QString& attribute,
const QVariant& value);
146 virtual void setAttribute(
QtProperty* property,
147 const QString& attribute,
const QMap<int, QIcon>& value);
149 void valueChanged(
QtProperty* property,
const QVariant& val);
151 const QString& attribute,
const QVariant& val);
161 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
int))
162 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty*,
int,
int))
163 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty*,
int))
164 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
double))
165 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty*,
double,
double))
166 Q_PRIVATE_SLOT(d_func(),
void slotSingleStepChanged(
QtProperty*,
double))
167 Q_PRIVATE_SLOT(d_func(),
void slotDecimalsChanged(
QtProperty*,
int))
168 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
bool))
169 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QString&))
170 Q_PRIVATE_SLOT(d_func(),
void slotRegExpChanged(
QtProperty*,
const QRegExp&))
171 Q_PRIVATE_SLOT(d_func(),
void slotEchoModeChanged(
QtProperty*,
int))
172 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QDate&))
173 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty*,
const QDate&,
const QDate&))
174 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QTime&))
175 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QDateTime&))
176 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QKeySequence&))
177 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QChar&))
178 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QLocale&))
179 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QPoint&))
180 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QPointF&))
181 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QVector3D&))
182 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QSize&))
183 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty*,
const QSize&,
const QSize&))
184 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QSizeF&))
185 Q_PRIVATE_SLOT(d_func(),
void slotRangeChanged(
QtProperty*,
const QSizeF&,
const QSizeF&))
186 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QRect&))
187 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty*,
const QRect&))
188 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QRectF&))
189 Q_PRIVATE_SLOT(d_func(),
void slotConstraintChanged(
QtProperty*,
const QRectF&))
190 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QColor&))
191 Q_PRIVATE_SLOT(d_func(),
void slotEnumNamesChanged(
QtProperty*,
const QStringList&))
192 Q_PRIVATE_SLOT(d_func(),
void slotEnumIconsChanged(
QtProperty*,
const QMap<int, QIcon>&))
193 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QSizePolicy&))
194 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QFont&))
195 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QCursor&))
196 Q_PRIVATE_SLOT(d_func(),
void slotFlagNamesChanged(
QtProperty*,
const QStringList&))
214 QWidget* parent)
override;
222 #if QT_VERSION >= 0x040400 226 Q_DECLARE_METATYPE(QIcon)
virtual QtProperty * createProperty()
Definition: qtpropertybrowser.cpp:767
QtVariantPropertyPrivate * d_ptr
Definition: qtvariantproperty.h:112
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition: qtvariantproperty.h:117
The QtAbstractPropertyManager provides an interface for property managers.
Definition: qtpropertybrowser.h:153
The QtAbstractEditorFactory is the base template class for editor factories.
Definition: qtpropertybrowser.h:203
QtProperty * addProperty(const QString &name=QString())
Definition: qtpropertybrowser.cpp:748
virtual void initializeProperty(QtProperty *property)=0
Definition: qtvariantproperty.cpp:290
virtual void uninitializeProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:799
virtual bool hasValue(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:680
QtVariantEditorFactoryPrivate * d_ptr
Definition: qtvariantproperty.h:217
QMap< int, QIcon > QtIconMap
Definition: qtvariantproperty.h:52
Definition: qtvariantproperty.cpp:2027
Definition: qtvariantproperty.cpp:139
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:59
QtVariantPropertyManagerPrivate * d_ptr
Definition: qtvariantproperty.h:160
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition: qtvariantproperty.h:95
virtual QString valueText(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:708
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:206
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:113
virtual void disconnectPropertyManager(PropertyManager *manager)=0
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition: qtvariantproperty.h:206
virtual void connectPropertyManager(PropertyManager *manager)=0
virtual QIcon valueIcon(const QtProperty *property) const
Definition: qtpropertybrowser.cpp:694