Computer Assited Medical Intervention Tool Kit  version 4.1
Classes | Public Slots | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
VariantManager Class Reference

Inherits QtVariantPropertyManager.

Classes

struct  Data
 

Public Slots

virtual void setValue (QtProperty *property, const QVariant &val)
 
- Public Slots inherited from QtVariantPropertyManager
virtual void setAttribute (QtProperty *property, const QString &attribute, const QVariant &value)
 
virtual void setAttribute (QtProperty *property, const QString &attribute, const QMap< int, QIcon > &value)
 
virtual void setValue (QtProperty *property, const QVariant &val)
 

Public Member Functions

virtual bool isPropertyTypeSupported (int propertyType) const
 
virtual QVariant value (const QtProperty *property) const
 
QString valueText (const QtProperty *property) const
 
virtual int valueType (int propertyType) const
 
 VariantManager (QObject *parent=0)
 
 ~VariantManager ()
 
- Public Member Functions inherited from QtVariantPropertyManager
virtual QtVariantPropertyaddProperty (int propertyType, const QString &name=QString())
 
virtual QStringList attributes (int propertyType) const
 
virtual int attributeType (int propertyType, const QString &attribute) const
 
virtual QVariant attributeValue (const QtProperty *property, const QString &attribute) const
 
int propertyType (const QtProperty *property) const
 
 QtVariantPropertyManager (QObject *parent=nullptr)
 
int valueType (const QtProperty *property) const
 
QtVariantPropertyvariantProperty (const QtProperty *property) const
 
 ~QtVariantPropertyManager () override
 
- Public Member Functions inherited from QtAbstractPropertyManager
QtPropertyaddProperty (const QString &name=QString())
 
void clear () const
 
QSet< QtProperty * > properties () const
 
 QtAbstractPropertyManager (QObject *parent=nullptr)
 
 ~QtAbstractPropertyManager () override
 

Protected Member Functions

virtual void initializeProperty (QtProperty *property)
 
virtual void uninitializeProperty (QtProperty *property)
 
- Protected Member Functions inherited from QtVariantPropertyManager
QtPropertycreateProperty () override
 
bool hasValue (const QtProperty *property) const override
 
void initializeProperty (QtProperty *property) override
 
void uninitializeProperty (QtProperty *property) override
 
QIcon valueIcon (const QtProperty *property) const override
 
QString valueText (const QtProperty *property) const override
 
- Protected Member Functions inherited from QtAbstractPropertyManager
virtual QString displayText (const QtProperty *property) const
 
virtual EchoMode echoMode (const QtProperty *) const
 

Private Slots

void slotPropertyDestroyed (QtProperty *property)
 
void slotValueChanged (QtProperty *property, const QVariant &value)
 

Private Attributes

QMap< const QtProperty *, DatapropertyToData
 
QMap< const QtProperty *, QtProperty * > xToProperty
 
QMap< const QtProperty *, QtProperty * > yToProperty
 

Additional Inherited Members

- Signals inherited from QtVariantPropertyManager
void attributeChanged (QtProperty *property, const QString &attribute, const QVariant &val)
 
void valueChanged (QtProperty *property, const QVariant &val)
 
- Signals inherited from QtAbstractPropertyManager
void propertyChanged (QtProperty *property)
 
void propertyDestroyed (QtProperty *property)
 
void propertyInserted (QtProperty *property, QtProperty *parent, QtProperty *after)
 
void propertyRemoved (QtProperty *property, QtProperty *parent)
 
- Static Public Member Functions inherited from QtVariantPropertyManager
static int enumTypeId ()
 
static int flagTypeId ()
 
static int groupTypeId ()
 
static int iconMapTypeId ()
 

Constructor & Destructor Documentation

◆ VariantManager()

VariantManager::VariantManager ( QObject *  parent = 0)

◆ ~VariantManager()

VariantManager::~VariantManager ( )

Member Function Documentation

◆ initializeProperty()

void VariantManager::initializeProperty ( QtProperty property)
protectedvirtual

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()

Implements QtAbstractPropertyManager.

References QtVariantPropertyManager::addProperty(), QtVariantPropertyManager::initializeProperty(), propertyToData, QtVariantPropertyManager::propertyType(), QtProperty::setPropertyName(), VariantManager::Data::value, VariantManager::Data::x, xToProperty, VariantManager::Data::y, and yToProperty.

◆ isPropertyTypeSupported()

bool VariantManager::isPropertyTypeSupported ( int  propertyType) const
virtual

Returns true if the given propertyType is supported by this variant manager; otherwise false.

See also
propertyType()

Reimplemented from QtVariantPropertyManager.

References QtVariantPropertyManager::isPropertyTypeSupported().

◆ setValue

void VariantManager::setValue ( QtProperty property,
const QVariant &  val 
)
virtualslot

◆ slotPropertyDestroyed

void VariantManager::slotPropertyDestroyed ( QtProperty property)
privateslot

References propertyToData, xToProperty, and yToProperty.

Referenced by VariantManager().

◆ slotValueChanged

void VariantManager::slotValueChanged ( QtProperty property,
const QVariant &  value 
)
privateslot

References setValue(), value(), xToProperty, and yToProperty.

Referenced by VariantManager().

◆ uninitializeProperty()

void VariantManager::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 from QtAbstractPropertyManager.

References propertyToData, QtVariantPropertyManager::uninitializeProperty(), VariantManager::Data::x, xToProperty, VariantManager::Data::y, and yToProperty.

◆ value()

QVariant VariantManager::value ( const QtProperty property) const
virtual

Returns the given property's value.

If the given property is not managed by this manager, this function returns an invalid variant.

See also
setValue()

Reimplemented from QtVariantPropertyManager.

References propertyToData, and QtVariantPropertyManager::value().

Referenced by slotValueChanged().

◆ valueText()

QString VariantManager::valueText ( const QtProperty property) const
virtual

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

References propertyToData, and QtVariantPropertyManager::valueText().

◆ valueType()

int VariantManager::valueType ( int  propertyType) const
virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the value type associated with the given propertyType.

Reimplemented from QtVariantPropertyManager.

References QtVariantPropertyManager::valueType().

Member Data Documentation

◆ propertyToData

QMap<const QtProperty*, Data> VariantManager::propertyToData
private

◆ xToProperty

QMap<const QtProperty*, QtProperty*> VariantManager::xToProperty
private

◆ yToProperty

QMap<const QtProperty*, QtProperty*> VariantManager::yToProperty
private

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