Computer Assited Medical Intervention Tool Kit  version 5.0
QtAbstractPropertyManager Class Referenceabstract

The QtAbstractPropertyManager provides an interface for property managers. More...

#include <qtpropertybrowser.h>

+ Inheritance diagram for QtAbstractPropertyManager:
+ Collaboration diagram for QtAbstractPropertyManager:

Signals

void propertyChanged (QtProperty *property)
 
void propertyDestroyed (QtProperty *property)
 
void propertyInserted (QtProperty *property, QtProperty *parent, QtProperty *after)
 
void propertyRemoved (QtProperty *property, QtProperty *parent)
 

Public Member Functions

QtPropertyaddProperty (const QString &name=QString())
 
void clear () const
 
QSet< QtProperty * > properties () const
 
 QtAbstractPropertyManager (QObject *parent=nullptr)
 
 ~QtAbstractPropertyManager () override
 

Protected Member Functions

virtual QtPropertycreateProperty ()
 
virtual QString displayText (const QtProperty *property) const
 
virtual EchoMode echoMode (const QtProperty *) const
 
virtual bool hasValue (const QtProperty *property) const
 
virtual void initializeProperty (QtProperty *property)=0
 
virtual void uninitializeProperty (QtProperty *property)
 
virtual QIcon valueIcon (const QtProperty *property) const
 
virtual QString valueText (const QtProperty *property) const
 

Private Attributes

QtAbstractPropertyManagerPrivated_ptr
 

Friends

class QtProperty
 

Detailed Description

The QtAbstractPropertyManager provides an interface for property managers.

A manager can create and manage properties of a given type, and is used in conjunction with the QtAbstractPropertyBrowser class.

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.

The QtAbstractPropertyManager class provides common functionality like creating a property using the addProperty() function, and retrieving the properties created by the manager using the properties() function. The class also provides signals that are emitted when the manager's properties change: propertyInserted(), propertyRemoved(), propertyChanged() and propertyDestroyed().

QtAbstractPropertyManager subclasses are supposed to provide their own type specific API. Note that several ready-made implementations are available:

\list \o QtBoolPropertyManager \o QtColorPropertyManager \o QtDatePropertyManager \o QtDateTimePropertyManager \o QtDoublePropertyManager \o QtEnumPropertyManager \o QtFlagPropertyManager \o QtFontPropertyManager \o QtGroupPropertyManager \o QtIntPropertyManager \o QtPointPropertyManager \o QtRectPropertyManager \o QtSizePropertyManager \o QtSizePolicyPropertyManager \o QtStringPropertyManager \o QtTimePropertyManager \o QtVariantPropertyManager \endlist

See also
QtAbstractEditorFactoryBase, QtAbstractPropertyBrowser, QtProperty

Constructor & Destructor Documentation

◆ QtAbstractPropertyManager()

QtAbstractPropertyManager::QtAbstractPropertyManager ( QObject *  parent = nullptr)
explicit

Creates an abstract property manager with the given parent.

References d_ptr, and QtAbstractPropertyManagerPrivate::q_ptr.

◆ ~QtAbstractPropertyManager()

QtAbstractPropertyManager::~QtAbstractPropertyManager ( )
override

Destroys the manager. All properties created by the manager are destroyed.

References clear(), and d_ptr.

+ Here is the call graph for this function:

Member Function Documentation

◆ addProperty()

QtProperty * QtAbstractPropertyManager::addProperty ( const QString &  name = QString())

◆ clear()

void QtAbstractPropertyManager::clear ( ) const

Destroys all the properties that this manager has created.

See also
propertyDestroyed(), uninitializeProperty()

References properties().

Referenced by ~QtAbstractPropertyManager(), QtBoolPropertyManager::~QtBoolPropertyManager(), QtCharPropertyManager::~QtCharPropertyManager(), QtColorPropertyManager::~QtColorPropertyManager(), QtCursorPropertyManager::~QtCursorPropertyManager(), QtDatePropertyManager::~QtDatePropertyManager(), QtDateTimePropertyManager::~QtDateTimePropertyManager(), QtDoublePropertyManager::~QtDoublePropertyManager(), QtEnumPropertyManager::~QtEnumPropertyManager(), QtFlagPropertyManager::~QtFlagPropertyManager(), QtFontPropertyManager::~QtFontPropertyManager(), QtIntPropertyManager::~QtIntPropertyManager(), QtKeySequencePropertyManager::~QtKeySequencePropertyManager(), QtLocalePropertyManager::~QtLocalePropertyManager(), QtPointFPropertyManager::~QtPointFPropertyManager(), QtPointPropertyManager::~QtPointPropertyManager(), QtRectFPropertyManager::~QtRectFPropertyManager(), QtRectPropertyManager::~QtRectPropertyManager(), QtSizeFPropertyManager::~QtSizeFPropertyManager(), QtSizePolicyPropertyManager::~QtSizePolicyPropertyManager(), QtSizePropertyManager::~QtSizePropertyManager(), QtStringPropertyManager::~QtStringPropertyManager(), QtTimePropertyManager::~QtTimePropertyManager(), QtVariantPropertyManager::~QtVariantPropertyManager(), and QtVector3DPropertyManager::~QtVector3DPropertyManager().

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

◆ createProperty()

QtProperty * QtAbstractPropertyManager::createProperty ( )
protectedvirtual

Creates a property.

The base implementation produce QtProperty instances; Reimplement this function to make this manager produce objects of a QtProperty subclass.

See also
addProperty(), initializeProperty()

Reimplemented in QtVariantPropertyManager.

References QtProperty.

Referenced by addProperty().

+ Here is the caller graph for this function:

◆ displayText()

QString QtAbstractPropertyManager::displayText ( const QtProperty property) const
protectedvirtual

Returns a string representing the current state of the given property.

The default implementation of this function returns an empty string.

See also
QtProperty::valueText()

Reimplemented in QtStringPropertyManager.

Referenced by QtProperty::displayText().

+ Here is the caller graph for this function:

◆ echoMode()

EchoMode QtAbstractPropertyManager::echoMode ( const QtProperty property) const
protectedvirtual

Returns the echo mode representing the current state of the given property.

The default implementation of this function returns QLineEdit::Normal.

See also
QtProperty::valueText()

Reimplemented in QtStringPropertyManager.

◆ hasValue()

bool QtAbstractPropertyManager::hasValue ( const QtProperty property) const
protectedvirtual

Returns whether the given property has a value.

The default implementation of this function returns true.

See also
QtProperty::hasValue()

Reimplemented in QtVariantPropertyManager, and QtGroupPropertyManager.

Referenced by QtProperty::hasValue().

+ Here is the caller graph for this function:

◆ initializeProperty()

void QtAbstractPropertyManager::initializeProperty ( QtProperty property)
protectedpure virtual

This function is called whenever a new valid property pointer has been created, passing the pointer as parameter.

The purpose is to let the manager know that the property has been created so that it can provide additional attributes for the new property, e.g. QtIntPropertyManager adds
{QtIntPropertyManager::value()}{value},
{QtIntPropertyManager::minimum()}{minimum} and
{QtIntPropertyManager::maximum()}{maximum} attributes. Since each manager subclass adds type specific attributes, this function is pure virtual and must be reimplemented when deriving from the QtAbstractPropertyManager class.

See also
addProperty(), createProperty()

Implemented in QtCursorPropertyManager, QtColorPropertyManager, QtFontPropertyManager, QtSizePolicyPropertyManager, QtFlagPropertyManager, QtEnumPropertyManager, QtVector3DPropertyManager, QtRectFPropertyManager, QtRectPropertyManager, QtSizeFPropertyManager, QtSizePropertyManager, QtPointFPropertyManager, QtPointPropertyManager, QtLocalePropertyManager, QtCharPropertyManager, QtKeySequencePropertyManager, QtDateTimePropertyManager, QtTimePropertyManager, QtDatePropertyManager, QtStringPropertyManager, QtDoublePropertyManager, QtVariantPropertyManager, QtBoolPropertyManager, QtIntPropertyManager, QtGroupPropertyManager, DecoratedDoublePropertyManager, and VariantManager.

Referenced by addProperty().

+ Here is the caller graph for this function:

◆ properties()

QSet< QtProperty * > QtAbstractPropertyManager::properties ( ) const

Returns the set of properties created by this manager.

See also
addProperty()

References d_ptr, and QtAbstractPropertyManagerPrivate::m_properties.

Referenced by clear().

+ Here is the caller graph for this function:

◆ propertyChanged

void QtAbstractPropertyManager::propertyChanged ( QtProperty property)
signal

This signal is emitted whenever a property's data changes, passing a pointer to the property as parameter.

Note that signal is only emitted for properties that are created by this manager.

See also
QtAbstractPropertyBrowser::itemChanged()

Referenced by QtAbstractPropertyManagerPrivate::propertyChanged(), QtRectPropertyManager::setConstraint(), QtRectFPropertyManager::setConstraint(), QtStringPropertyManager::setEchoMode(), QtEnumPropertyManager::setEnumIcons(), QtEnumPropertyManager::setEnumNames(), QtFlagPropertyManager::setFlagNames(), QtIntPropertyManager::setMaximum(), QtDoublePropertyManager::setMaximum(), QtDatePropertyManager::setMaximum(), QtSizePropertyManager::setMaximum(), QtSizeFPropertyManager::setMaximum(), QtIntPropertyManager::setMinimum(), QtDoublePropertyManager::setMinimum(), QtDatePropertyManager::setMinimum(), QtSizePropertyManager::setMinimum(), QtSizeFPropertyManager::setMinimum(), QtIntPropertyManager::setRange(), QtDoublePropertyManager::setRange(), QtDatePropertyManager::setRange(), QtSizePropertyManager::setRange(), QtSizeFPropertyManager::setRange(), QtIntPropertyManager::setReadOnly(), QtDoublePropertyManager::setReadOnly(), QtStringPropertyManager::setReadOnly(), DecoratedDoublePropertyManager::setSuffix(), QtBoolPropertyManager::setTextVisible(), VariantManager::setValue(), QtIntPropertyManager::setValue(), QtBoolPropertyManager::setValue(), QtDoublePropertyManager::setValue(), QtStringPropertyManager::setValue(), QtDatePropertyManager::setValue(), QtTimePropertyManager::setValue(), QtDateTimePropertyManager::setValue(), QtKeySequencePropertyManager::setValue(), QtCharPropertyManager::setValue(), QtLocalePropertyManager::setValue(), QtPointPropertyManager::setValue(), QtPointFPropertyManager::setValue(), QtSizePropertyManager::setValue(), QtSizeFPropertyManager::setValue(), QtRectPropertyManager::setValue(), QtRectFPropertyManager::setValue(), QtVector3DPropertyManager::setValue(), QtEnumPropertyManager::setValue(), QtFlagPropertyManager::setValue(), QtSizePolicyPropertyManager::setValue(), QtFontPropertyManager::setValue(), QtColorPropertyManager::setValue(), QtCursorPropertyManager::setValue(), and QtVariantPropertyManagerPrivate::valueChanged().

◆ propertyDestroyed

◆ propertyInserted

void QtAbstractPropertyManager::propertyInserted ( QtProperty newProperty,
QtProperty parentProperty,
QtProperty precedingProperty 
)
signal

This signal is emitted when a new subproperty is inserted into an existing property, passing pointers to the newProperty, parentProperty and precedingProperty as parameters.

If precedingProperty is 0, the newProperty was inserted at the beginning of the parentProperty's subproperties list.

Note that signal is emitted only if the parentProperty is created by this manager.

See also
QtAbstractPropertyBrowser::itemInserted()

Referenced by QtAbstractPropertyManagerPrivate::propertyInserted(), and QtVariantPropertyManager::QtVariantPropertyManager().

+ Here is the caller graph for this function:

◆ propertyRemoved

void QtAbstractPropertyManager::propertyRemoved ( QtProperty property,
QtProperty parent 
)
signal

This signal is emitted when a subproperty is removed, passing pointers to the removed property and the parent property as parameters.

Note that signal is emitted only when the parent property is created by this manager.

See also
QtAbstractPropertyBrowser::itemRemoved()

Referenced by QtAbstractPropertyManagerPrivate::propertyRemoved(), and QtVariantPropertyManager::QtVariantPropertyManager().

+ Here is the caller graph for this function:

◆ uninitializeProperty()

void QtAbstractPropertyManager::uninitializeProperty ( QtProperty property)
protectedvirtual

This function is called just before the specified property is destroyed.

The purpose is to let the property manager know that the property is being destroyed so that it can remove the property's additional attributes.

See also
clear(), propertyDestroyed()

Reimplemented in QtCursorPropertyManager, QtColorPropertyManager, QtFontPropertyManager, QtSizePolicyPropertyManager, QtFlagPropertyManager, QtEnumPropertyManager, QtVector3DPropertyManager, QtRectFPropertyManager, QtRectPropertyManager, QtSizeFPropertyManager, QtSizePropertyManager, QtPointFPropertyManager, QtPointPropertyManager, QtLocalePropertyManager, QtCharPropertyManager, QtKeySequencePropertyManager, QtDateTimePropertyManager, QtTimePropertyManager, QtDatePropertyManager, QtStringPropertyManager, QtDoublePropertyManager, QtVariantPropertyManager, QtBoolPropertyManager, QtIntPropertyManager, QtGroupPropertyManager, DecoratedDoublePropertyManager, and VariantManager.

Referenced by QtAbstractPropertyManagerPrivate::propertyDestroyed().

+ Here is the caller graph for this function:

◆ valueIcon()

QIcon QtAbstractPropertyManager::valueIcon ( const QtProperty property) const
protectedvirtual

Returns an icon representing the current state of the given property.

The default implementation of this function returns an invalid icon.

See also
QtProperty::valueIcon()

Reimplemented in QtCursorPropertyManager, QtColorPropertyManager, QtFontPropertyManager, QtEnumPropertyManager, QtVariantPropertyManager, and QtBoolPropertyManager.

Referenced by QtProperty::valueIcon().

+ Here is the caller graph for this function:

◆ valueText()

QString QtAbstractPropertyManager::valueText ( const QtProperty property) const
protectedvirtual

Friends And Related Function Documentation

◆ QtProperty

friend class QtProperty
friend

Referenced by createProperty().

Member Data Documentation

◆ d_ptr


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