Logo Search packages:      
Sourcecode: qsapecng version File versions  Download package

Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

QtVariantPropertyManager Class Reference

The QtVariantPropertyManager class provides and manages QVariant based properties. More...

Inheritance diagram for QtVariantPropertyManager:
Inheritance graph
[legend]
Collaboration diagram for QtVariantPropertyManager:
Collaboration graph
[legend]

List of all members.

Public Slots

virtual void setAttribute (QtProperty *property, const QString &attribute, const QVariant &value)
virtual void setValue (QtProperty *property, const QVariant &val)

Signals

void attributeChanged (QtProperty *property, const QString &attribute, const QVariant &val)
void propertyChanged (QtProperty *property)
void propertyDestroyed (QtProperty *property)
void propertyInserted (QtProperty *property, QtProperty *parent, QtProperty *after)
void propertyRemoved (QtProperty *property, QtProperty *parent)
void valueChanged (QtProperty *property, const QVariant &val)

Public Member Functions

virtual QtVariantPropertyaddProperty (int propertyType, const QString &name=QString())
QtPropertyaddProperty (const QString &name=QString())
virtual QStringList attributes (int propertyType) const
virtual int attributeType (int propertyType, const QString &attribute) const
virtual QVariant attributeValue (const QtProperty *property, const QString &attribute) const
void clear () const
virtual bool isPropertyTypeSupported (int propertyType) const
QSet< QtProperty * > properties () const
int propertyType (const QtProperty *property) const
 QtVariantPropertyManager (QObject *parent=0)
virtual QVariant value (const QtProperty *property) const
virtual int valueType (int propertyType) const
int valueType (const QtProperty *property) const
QtVariantPropertyvariantProperty (const QtProperty *property) const
 ~QtVariantPropertyManager ()

Static Public Member Functions

static int enumTypeId ()
static int flagTypeId ()
static int groupTypeId ()
static int iconMapTypeId ()

Protected Member Functions

virtual QtPropertycreateProperty ()
virtual bool hasValue (const QtProperty *property) const
virtual void initializeProperty (QtProperty *property)
virtual void uninitializeProperty (QtProperty *property)
QIcon valueIcon (const QtProperty *property) const
QString valueText (const QtProperty *property) const

Private Member Functions

 Q_PRIVATE_SLOT (d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void 
slotConstraintChanged (QtProperty *, const QRect &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void 
slotConstraintChanged (QtProperty *, const QRectF &)) Q_PRIVATE_SLOT(d_func()
void void void void void void slotDecimalsChanged (QtProperty *, int)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void 
slotEnumIconsChanged (QtProperty *, const QMap< int, QIcon > &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void 
slotEnumNamesChanged (QtProperty *, const QStringList &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void 
slotFlagNamesChanged (QtProperty *, const QStringList &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void 
slotPropertyInserted (QtProperty *, QtProperty *, QtProperty *)) Q_PRIVATE_SLOT(d_func()
void slotRangeChanged (QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func()
void void void void slotRangeChanged (QtProperty *, double, double)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void 
slotRangeChanged (QtProperty *, const QSize &, const QSize &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void 
slotRangeChanged (QtProperty *, const QSizeF &, const QSizeF &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void 
slotRangeChanged (QtProperty *, const QDate &, const QDate &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void 
slotRegExpChanged (QtProperty *, const QRegExp &)) Q_PRIVATE_SLOT(d_func()
void void void void void slotSingleStepChanged (QtProperty *, double)) Q_PRIVATE_SLOT(d_func()
void void slotSingleStepChanged (QtProperty *, int)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void 
slotValueChanged (QtProperty *, const QSize &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void 
slotValueChanged (QtProperty *, const QPointF &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void 
slotValueChanged (QtProperty *, const QPoint &)) Q_PRIVATE_SLOT(d_func()
void void void slotValueChanged (QtProperty *, double)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void 
slotValueChanged (QtProperty *, const QChar &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void 
slotValueChanged (QtProperty *, const QCursor &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void 
slotValueChanged (QtProperty *, const QFont &)) Q_PRIVATE_SLOT(d_func()
void void void void void void void slotValueChanged (QtProperty *, bool)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void void void void 
slotValueChanged (QtProperty *, const QSizePolicy &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void 
slotValueChanged (QtProperty *, const QTime &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void 
slotValueChanged (QtProperty *, const QRectF &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void 
slotValueChanged (QtProperty *, const QString &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void 
slotValueChanged (QtProperty *, const QKeySequence &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void 
slotValueChanged (QtProperty *, const QSizeF &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void 
slotValueChanged (QtProperty *, const QRect &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void 
slotValueChanged (QtProperty *, const QLocale &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void 
slotValueChanged (QtProperty *, const QDateTime &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void void void
void void void void void void
void void void void void void
void void void 
slotValueChanged (QtProperty *, const QColor &)) Q_PRIVATE_SLOT(d_func()
void void void void void void
void void void void 
slotValueChanged (QtProperty *, const QDate &)) Q_PRIVATE_SLOT(d_func()

Private Attributes

QtVariantPropertyManagerPrivated_ptr

Detailed Description

The QtVariantPropertyManager class provides and manages QVariant based properties.

QtVariantPropertyManager provides the addProperty() function which creates QtVariantProperty objects. The QtVariantProperty class is a convenience class handling QVariant based properties inheriting QtProperty. A QtProperty object created by a QtVariantPropertyManager instance can be converted into a QtVariantProperty object using the variantProperty() function.

The property's value can be retrieved using the value(), and set using the setValue() slot. In addition the property's type, and the type of its value, can be retrieved using the propertyType() and valueType() functions respectively.

A property's type is a QVariant::Type enumerator value, and usually a property's type is the same as its value type. But for some properties the types differ, for example for enums, flags and group types in which case QtVariantPropertyManager provides the enumTypeId(), flagTypeId() and groupTypeId() functions, respectively, to identify their property type (the value types are QVariant::Int for the enum and flag types, and QVariant::Invalid for the group type).

Use the isPropertyTypeSupported() function to check if a particular property type is supported. The currently supported property types are:

Property Type Property Type Id int QVariant::Int double QVariant::Double bool QVariant::Bool QString QVariant::String QDate QVariant::Date QTime QVariant::Time QDateTime QVariant::DateTime QKeySequence QVariant::KeySequence QChar QVariant::Char QLocale QVariant::Locale QPoint QVariant::Point QPointF QVariant::PointF QSize QVariant::Size QSizeF QVariant::SizeF QRect QVariant::Rect QRectF QVariant::RectF QColor QVariant::Color QSizePolicy QVariant::SizePolicy QFont QVariant::Font QCursor QVariant::Cursor enum enumTypeId() flag flagTypeId() group groupTypeId()

Each property type can provide additional attributes, e.g. QVariant::Int and QVariant::Double provides minimum and maximum values. The currently supported attributes are:

Property Type Attribute Name Attribute Type int minimum QVariant::Int maximum QVariant::Int singleStep QVariant::Int double minimum QVariant::Double maximum QVariant::Double singleStep QVariant::Double decimals QVariant::Int QString regExp QVariant::RegExp QDate minimum QVariant::Date maximum QVariant::Date QPointF decimals QVariant::Int QSize minimum QVariant::Size maximum QVariant::Size QSizeF minimum QVariant::SizeF maximum QVariant::SizeF decimals QVariant::Int QRect constraint QVariant::Rect QRectF constraint QVariant::RectF decimals QVariant::Int enum enumNames QVariant::StringList enumIcons iconMapTypeId() flag flagNames QVariant::StringList

The attributes for a given property type can be retrieved using the attributes() function. Each attribute has a value type which can be retrieved using the attributeType() function, and a value accessible through the attributeValue() function. In addition, the value can be set using the setAttribute() slot.

QtVariantManager also provides the valueChanged() signal which is emitted whenever a property created by this manager change, and the attributeChanged() signal which is emitted whenever an attribute of such a property changes.

See also:
QtVariantProperty, QtVariantEditorFactory

Definition at line 124 of file qtvariantproperty.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index