Computer Assited Medical Intervention Tool Kit
version 4.1
|
The QtAbstractEditorFactoryBase provides an interface for editor factories. More...
#include <qtpropertybrowser.h>
Inherits QObject.
Inherited by QtAbstractEditorFactory< PropertyManager >, QtAbstractEditorFactory< DecoratedDoublePropertyManager >, QtAbstractEditorFactory< QtBoolPropertyManager >, QtAbstractEditorFactory< QtCharPropertyManager >, QtAbstractEditorFactory< QtColorPropertyManager >, QtAbstractEditorFactory< QtCursorPropertyManager >, QtAbstractEditorFactory< QtDatePropertyManager >, QtAbstractEditorFactory< QtDateTimePropertyManager >, QtAbstractEditorFactory< QtDoublePropertyManager >, QtAbstractEditorFactory< QtEnumPropertyManager >, QtAbstractEditorFactory< QtFontPropertyManager >, QtAbstractEditorFactory< QtIntPropertyManager >, QtAbstractEditorFactory< QtKeySequencePropertyManager >, QtAbstractEditorFactory< QtStringPropertyManager >, QtAbstractEditorFactory< QtTimePropertyManager >, and QtAbstractEditorFactory< QtVariantPropertyManager >.
Public Member Functions | |
virtual QWidget * | createEditor (QtProperty *property, QWidget *parent)=0 |
Protected Slots | |
virtual void | managerDestroyed (QObject *manager)=0 |
Protected Member Functions | |
virtual void | breakConnection (QtAbstractPropertyManager *manager)=0 |
QtAbstractEditorFactoryBase (QObject *parent=nullptr) | |
Friends | |
class | QtAbstractPropertyBrowser |
The QtAbstractEditorFactoryBase provides an interface for editor factories.
An editor factory is a class that is able to create an editing widget of a specified type (e.g. line edits or comboboxes) for a given QtProperty object, and it is used in conjunction with the QtAbstractPropertyManager and QtAbstractPropertyBrowser classes.
When using a property browser widget, the properties are created and managed by implementations of the QtAbstractPropertyManager class. To ensure that the properties' values will be displayed using suitable editing widgets, the managers are associated with objects of QtAbstractEditorFactory subclasses. The property browser will use these associations to determine which factories it should use to create the preferred editing widgets.
Typically, an editor factory is created by subclassing the QtAbstractEditorFactory template class which inherits QtAbstractEditorFactoryBase. But note that several ready-made implementations are available:
QtCheckBoxFactory QtDateEditFactory QtDateTimeEditFactory QtDoubleSpinBoxFactory QtEnumEditorFactory QtLineEditFactory QtScrollBarFactory QtSliderFactory QtSpinBoxFactory QtTimeEditFactory QtVariantEditorFactory
|
inlineexplicitprotected |
Creates an abstract editor factory with the given parent.
|
protectedpure virtual |
Detaches property manager from factory. This method is reimplemented in QtAbstractEditorFactory template subclass. You don't need to reimplement it in your subclasses. Instead implement more convenient QtAbstractEditorFactory::disconnectPropertyManager() which gives you access to particular manager subclass.
Implemented in QtAbstractEditorFactory< PropertyManager >, QtAbstractEditorFactory< QtCharPropertyManager >, QtAbstractEditorFactory< QtDatePropertyManager >, QtAbstractEditorFactory< QtBoolPropertyManager >, QtAbstractEditorFactory< DecoratedDoublePropertyManager >, QtAbstractEditorFactory< QtColorPropertyManager >, QtAbstractEditorFactory< QtKeySequencePropertyManager >, QtAbstractEditorFactory< QtDateTimePropertyManager >, QtAbstractEditorFactory< QtDoublePropertyManager >, QtAbstractEditorFactory< QtTimePropertyManager >, QtAbstractEditorFactory< QtVariantPropertyManager >, QtAbstractEditorFactory< QtCursorPropertyManager >, QtAbstractEditorFactory< QtEnumPropertyManager >, QtAbstractEditorFactory< QtIntPropertyManager >, QtAbstractEditorFactory< QtFontPropertyManager >, and QtAbstractEditorFactory< QtStringPropertyManager >.
Referenced by QtAbstractPropertyBrowser::unsetFactoryForManager().
|
pure virtual |
Creates an editing widget (with the given parent) for the given property.
This function is reimplemented in QtAbstractEditorFactory template class which also provides a pure virtual convenience overload of this function enabling access to the property's manager.
Implemented in QtAbstractEditorFactory< PropertyManager >, QtAbstractEditorFactory< QtCharPropertyManager >, QtAbstractEditorFactory< QtDatePropertyManager >, QtAbstractEditorFactory< QtBoolPropertyManager >, QtAbstractEditorFactory< DecoratedDoublePropertyManager >, QtAbstractEditorFactory< QtColorPropertyManager >, QtAbstractEditorFactory< QtKeySequencePropertyManager >, QtAbstractEditorFactory< QtDateTimePropertyManager >, QtAbstractEditorFactory< QtDoublePropertyManager >, QtAbstractEditorFactory< QtTimePropertyManager >, QtAbstractEditorFactory< QtVariantPropertyManager >, QtAbstractEditorFactory< QtCursorPropertyManager >, QtAbstractEditorFactory< QtEnumPropertyManager >, QtAbstractEditorFactory< QtIntPropertyManager >, QtAbstractEditorFactory< QtFontPropertyManager >, and QtAbstractEditorFactory< QtStringPropertyManager >.
Referenced by DecoratedDoubleSpinBoxFactory::createEditor(), QtVariantEditorFactory::createEditor(), QtCursorEditorFactory::createEditor(), and QtAbstractPropertyBrowser::createEditor().
|
protectedpure virtualslot |
This method is called when property manager is being destroyed. Basically it notifies factory not to produce editors for properties owned by manager. You don't need to reimplement it in your subclass. This method is implemented in QtAbstractEditorFactory template subclass.
Implemented in QtAbstractEditorFactory< PropertyManager >, QtAbstractEditorFactory< QtCharPropertyManager >, QtAbstractEditorFactory< QtDatePropertyManager >, QtAbstractEditorFactory< QtBoolPropertyManager >, QtAbstractEditorFactory< DecoratedDoublePropertyManager >, QtAbstractEditorFactory< QtColorPropertyManager >, QtAbstractEditorFactory< QtKeySequencePropertyManager >, QtAbstractEditorFactory< QtDateTimePropertyManager >, QtAbstractEditorFactory< QtDoublePropertyManager >, QtAbstractEditorFactory< QtTimePropertyManager >, QtAbstractEditorFactory< QtVariantPropertyManager >, QtAbstractEditorFactory< QtCursorPropertyManager >, QtAbstractEditorFactory< QtEnumPropertyManager >, QtAbstractEditorFactory< QtIntPropertyManager >, QtAbstractEditorFactory< QtFontPropertyManager >, and QtAbstractEditorFactory< QtStringPropertyManager >.
|
friend |