Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
camitk::ObjectControllerPrivate Class Reference

#include <ObjectController.h>

Public Member Functions

void addClassProperties (const QMetaObject *metaObject)
void addDynamicProperties (QObject *edited)
void applyChange ()
QtVariantPropertybuildQtVariantProperty (QString name, QMetaType::Type type, QVariant value, bool isReadable, bool isWritable, bool isEnumType, bool isFlagType, bool isDesignable, QMetaEnum *metaEnum=nullptr)
 build a QtVariantProperty from name, type, property...etc...
int enumToInt (const QMetaEnum &metaEnum, int enumValue) const
int flagToInt (const QMetaEnum &metaEnum, int flagValue) const
int intToEnum (const QMetaEnum &metaEnum, int intValue) const
int intToFlag (const QMetaEnum &metaEnum, int intValue) const
bool isPowerOf2 (int value) const
bool isSubValue (int value, int subValue) const
void restoreExpandedState ()
void saveChange (QtProperty *property, const QVariant &value)
void saveExpandedState ()
void updateClassProperties (const QMetaObject *metaObject, bool recursive)
void updateDynamicProperties (const QObject *edited)
void valueChanged (QtProperty *property, const QVariant value)

Public Attributes

QMap< QString, QtProperty * > groupProperties
 map of all the QtProperty that are top-level groups
QtAbstractPropertyBrowserm_browser
 the browser where all properties are shown to the user
QMap< QtProperty *, int > m_classPropertyToIndex
 map from the class property to the index in the meta object
QMap< const QMetaObject *, QMap< int, QtVariantProperty * > > m_classToIndexToProperty
 Each meta object have a map to get the property by its index.
QMap< QtProperty *, int > m_dynamicPropertyToIndex
 map from the dynamic property to the idx in the dynamic property
QMap< int, QtVariantProperty * > m_indexToDynamicProperty
 map from idx of the dynamic property to the property
QtVariantPropertyManagerm_manager
 the main property manager (does not include the read only property)
QObject * m_object
 the currently edited object
QMap< QtProperty *, bool > m_propertyToExpanded
 TODO doc.
QtVariantPropertyManagerm_readOnlyManager
 the property manager for the read only property
QList< QtProperty * > m_topLevelProperties
 TODO doc.
QMap< QtProperty *, QVariant > saveChangeValue
 when a property is modified by the user, the change is stored here (until applyChange is called)

Member Function Documentation

◆ addClassProperties()

void ObjectControllerPrivate::addClassProperties ( const QMetaObject * metaObject)

◆ addDynamicProperties()

◆ applyChange()

void ObjectControllerPrivate::applyChange ( )

References saveChangeValue, and valueChanged().

◆ buildQtVariantProperty()

QtVariantProperty * ObjectControllerPrivate::buildQtVariantProperty ( QString name,
QMetaType::Type type,
QVariant value,
bool isReadable,
bool isWritable,
bool isEnumType,
bool isFlagType,
bool isDesignable,
QMetaEnum * metaEnum = nullptr )

◆ enumToInt()

int ObjectControllerPrivate::enumToInt ( const QMetaEnum & metaEnum,
int enumValue ) const

◆ flagToInt()

int ObjectControllerPrivate::flagToInt ( const QMetaEnum & metaEnum,
int flagValue ) const

◆ intToEnum()

int ObjectControllerPrivate::intToEnum ( const QMetaEnum & metaEnum,
int intValue ) const

Referenced by valueChanged().

◆ intToFlag()

int ObjectControllerPrivate::intToFlag ( const QMetaEnum & metaEnum,
int intValue ) const

References isPowerOf2().

Referenced by valueChanged().

◆ isPowerOf2()

bool ObjectControllerPrivate::isPowerOf2 ( int value) const

◆ isSubValue()

bool ObjectControllerPrivate::isSubValue ( int value,
int subValue ) const

Referenced by flagToInt().

◆ restoreExpandedState()

void ObjectControllerPrivate::restoreExpandedState ( )

◆ saveChange()

void ObjectControllerPrivate::saveChange ( QtProperty * property,
const QVariant & value )

References saveChangeValue.

◆ saveExpandedState()

void ObjectControllerPrivate::saveExpandedState ( )

◆ updateClassProperties()

void ObjectControllerPrivate::updateClassProperties ( const QMetaObject * metaObject,
bool recursive )

◆ updateDynamicProperties()

void ObjectControllerPrivate::updateDynamicProperties ( const QObject * edited)

◆ valueChanged()

void ObjectControllerPrivate::valueChanged ( QtProperty * property,
const QVariant value )

Member Data Documentation

◆ groupProperties

QMap<QString, QtProperty*> camitk::ObjectControllerPrivate::groupProperties

map of all the QtProperty that are top-level groups

Referenced by addDynamicProperties().

◆ m_browser

QtAbstractPropertyBrowser* camitk::ObjectControllerPrivate::m_browser

the browser where all properties are shown to the user

Referenced by addClassProperties(), and addDynamicProperties().

◆ m_classPropertyToIndex

QMap<QtProperty*, int> camitk::ObjectControllerPrivate::m_classPropertyToIndex

map from the class property to the index in the meta object

Referenced by addClassProperties(), and valueChanged().

◆ m_classToIndexToProperty

QMap<const QMetaObject*, QMap<int, QtVariantProperty*> > camitk::ObjectControllerPrivate::m_classToIndexToProperty

Each meta object have a map to get the property by its index.

Referenced by addClassProperties(), and updateClassProperties().

◆ m_dynamicPropertyToIndex

QMap<QtProperty*, int> camitk::ObjectControllerPrivate::m_dynamicPropertyToIndex

map from the dynamic property to the idx in the dynamic property

Referenced by addDynamicProperties(), and valueChanged().

◆ m_indexToDynamicProperty

QMap<int, QtVariantProperty*> camitk::ObjectControllerPrivate::m_indexToDynamicProperty

map from idx of the dynamic property to the property

Referenced by addDynamicProperties(), and updateDynamicProperties().

◆ m_manager

QtVariantPropertyManager* camitk::ObjectControllerPrivate::m_manager

the main property manager (does not include the read only property)

Referenced by addDynamicProperties(), buildQtVariantProperty(), and updateDynamicProperties().

◆ m_object

QObject* camitk::ObjectControllerPrivate::m_object

the currently edited object

Referenced by addClassProperties(), updateClassProperties(), and valueChanged().

◆ m_propertyToExpanded

QMap<QtProperty*, bool> camitk::ObjectControllerPrivate::m_propertyToExpanded

TODO doc.

◆ m_readOnlyManager

QtVariantPropertyManager* camitk::ObjectControllerPrivate::m_readOnlyManager

the property manager for the read only property

Referenced by buildQtVariantProperty().

◆ m_topLevelProperties

QList<QtProperty*> camitk::ObjectControllerPrivate::m_topLevelProperties

TODO doc.

Referenced by addClassProperties(), and addDynamicProperties().

◆ saveChangeValue

QMap<QtProperty*, QVariant> camitk::ObjectControllerPrivate::saveChangeValue

when a property is modified by the user, the change is stored here (until applyChange is called)

Referenced by applyChange(), and saveChange().


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