itom  4.1.0
QtVariantEditorFactory Class Reference

The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager objects. More...

Inheritance diagram for QtVariantEditorFactory:
QtAbstractEditorFactory< QtVariantPropertyManager > QtAbstractEditorFactoryBase

Public Member Functions

 QtVariantEditorFactory (QObject *parent=0)
 
 ~QtVariantEditorFactory ()
 
- Public Member Functions inherited from QtAbstractEditorFactory< QtVariantPropertyManager >
 QtAbstractEditorFactory (QObject *parent)
 
QWidget * createEditor (QtProperty *property, QWidget *parent)
 
void addPropertyManager (QtVariantPropertyManager *manager)
 
void removePropertyManager (QtVariantPropertyManager *manager)
 
QSet< QtVariantPropertyManager * > propertyManagers () const
 
QtVariantPropertyManagerpropertyManager (QtProperty *property) const
 

Protected Member Functions

void connectPropertyManager (QtVariantPropertyManager *manager)
 
QWidget * createEditor (QtVariantPropertyManager *manager, QtProperty *property, QWidget *parent)
 
void disconnectPropertyManager (QtVariantPropertyManager *manager)
 
- Protected Member Functions inherited from QtAbstractEditorFactory< QtVariantPropertyManager >
void managerDestroyed (QObject *manager)
 
- Protected Member Functions inherited from QtAbstractEditorFactoryBase
 QtAbstractEditorFactoryBase (QObject *parent=0)
 

Private Attributes

QtVariantEditorFactoryPrivated_ptr
 

Additional Inherited Members

- Protected Slots inherited from QtAbstractEditorFactoryBase

Detailed Description

The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager objects.

The variant factory provides the following widgets for the specified property types:

Property Type Widget int QSpinBox double QDoubleSpinBox bool QCheckBox QString QLineEdit QDate QDateEdit QTime QTimeEdit QDateTime QDateTimeEdit QKeySequence customized editor QChar customized editor enum QComboBox QCursor QComboBox

Note that QtVariantPropertyManager supports several additional property types for which the QtVariantEditorFactory class does not provide editing widgets, e.g. QPoint and QSize. To provide widgets for other types using the variant approach, derive from the QtVariantEditorFactory class.

See also
QtAbstractEditorFactory, QtVariantPropertyManager

Constructor & Destructor Documentation

QtVariantEditorFactory::QtVariantEditorFactory ( QObject *  parent = 0)

Creates a factory with the given parent.

QtVariantEditorFactory::~QtVariantEditorFactory ( )

Destroys this factory, and all the widgets it has created.

Member Function Documentation

void QtVariantEditorFactory::connectPropertyManager ( QtVariantPropertyManager manager)
protectedvirtual

Connects this factory to the given manager's signals. The PropertyManager type is a template argument class, and represents the chosen QtAbstractPropertyManager subclass.

This function is used internally by the addPropertyManager() function, and makes it possible to update an editing widget when the associated property's data changes. This is typically done in custom slots responding to the signals emitted by the property's manager, e.g. QtIntPropertyManager::valueChanged() and QtIntPropertyManager::rangeChanged().

See also
propertyManagers(), disconnectPropertyManager()

Implements QtAbstractEditorFactory< QtVariantPropertyManager >.

QWidget * QtVariantEditorFactory::createEditor ( QtVariantPropertyManager manager,
QtProperty property,
QWidget *  parent 
)
protectedvirtual

Creates an editing widget with the given parent for the specified property created by the given manager. The PropertyManager type is a template argument class, and represents the chosen QtAbstractPropertyManager subclass.

This function must be implemented in derived classes: It is recommended to store a pointer to the widget and map it to the given property, since the widget must be updated whenever the associated property's data changes. This is typically done in custom slots responding to the signals emitted by the property's manager, e.g. QtIntPropertyManager::valueChanged() and QtIntPropertyManager::rangeChanged().

See also
connectPropertyManager()

Implements QtAbstractEditorFactory< QtVariantPropertyManager >.

void QtVariantEditorFactory::disconnectPropertyManager ( QtVariantPropertyManager manager)
protectedvirtual

Disconnects this factory from the given manager's signals. The PropertyManager type is a template argument class, and represents the chosen QtAbstractPropertyManager subclass.

This function is used internally by the removePropertyManager() function.

See also
propertyManagers(), connectPropertyManager()

Implements QtAbstractEditorFactory< QtVariantPropertyManager >.


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