QtVariantEditorFactory Class Reference

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

#include <ArmarXGui/libraries/qtpropertybrowser/src/qtvariantproperty.h>

+ Inheritance diagram for QtVariantEditorFactory:

Public Member Functions

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

Protected Member Functions

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

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:

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

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

Definition at line 162 of file qtvariantproperty.h.

Constructor & Destructor Documentation

◆ QtVariantEditorFactory()

QtVariantEditorFactory ( QObject *  parent = 0)

Creates a factory with the given parent.

Definition at line 2452 of file qtvariantproperty.cpp.

+ Here is the call graph for this function:

◆ ~QtVariantEditorFactory()

~QtVariantEditorFactory ( )
override

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

Definition at line 2515 of file qtvariantproperty.cpp.

Member Function Documentation

◆ connectPropertyManager()

void connectPropertyManager ( QtVariantPropertyManager manager)
overrideprotectedvirtual

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 >.

Definition at line 2525 of file qtvariantproperty.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createEditor()

QWidget * createEditor ( QtVariantPropertyManager manager,
QtProperty property,
QWidget *  parent 
)
overrideprotectedvirtual

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 >.

Definition at line 2717 of file qtvariantproperty.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disconnectPropertyManager()

void disconnectPropertyManager ( QtVariantPropertyManager manager)
overrideprotectedvirtual

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 >.

Definition at line 2736 of file qtvariantproperty.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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