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

Public Member Functions | Protected Member Functions | Private Attributes | Friends

QtVariantProperty Class Reference

The QtVariantProperty class is a convenience class handling QVariant based properties. More...

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

List of all members.

Public Member Functions

void addSubProperty (QtProperty *property)
QVariant attributeValue (const QString &attribute) const
bool hasValue () const
void insertSubProperty (QtProperty *property, QtProperty *afterProperty)
bool isEnabled () const
bool isModified () const
QtAbstractPropertyManagerpropertyManager () const
QString propertyName () const
int propertyType () const
void removeSubProperty (QtProperty *property)
void setAttribute (const QString &attribute, const QVariant &value)
void setEnabled (bool enable)
void setModified (bool modified)
void setPropertyName (const QString &text)
void setStatusTip (const QString &text)
void setToolTip (const QString &text)
void setValue (const QVariant &value)
void setWhatsThis (const QString &text)
QString statusTip () const
QList< QtProperty * > subProperties () const
QString toolTip () const
QVariant value () const
QIcon valueIcon () const
QString valueText () const
int valueType () const
QString whatsThis () const
 ~QtVariantProperty ()

Protected Member Functions

void propertyChanged ()
 QtVariantProperty (QtVariantPropertyManager *manager)

Private Attributes

QtVariantPropertyPrivated_ptr

Friends

class QtVariantPropertyManager

Detailed Description

The QtVariantProperty class is a convenience class handling QVariant based properties.

QtVariantProperty provides additional API: A property's type, value type, attribute values and current value can easily be retrieved using the propertyType(), valueType(), attributeValue() and value() functions respectively. In addition, the attribute values and the current value can be set using the corresponding setValue() and setAttribute() functions.

For example, instead of writing:

        QtVariantPropertyManager *variantPropertyManager;
        QtProperty *property;

        variantPropertyManager->setValue(property, 10);

you can write:

        QtVariantPropertyManager *variantPropertyManager;
        QtVariantProperty *property;

        property->setValue(10);

QtVariantProperty instances can only be created by the QtVariantPropertyManager class.

See also:
QtProperty, QtVariantPropertyManager, QtVariantEditorFactory

Definition at line 104 of file qtvariantproperty.h.


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

Generated by  Doxygen 1.6.0   Back to index