Computer Assited Medical Intervention Tool Kit  version 4.1
Public Member Functions | Public Attributes | Private Attributes | List of all members
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=NULL)
 build a QtVariantProperty from name, type, property...etc... More...
 
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 More...
 
QtAbstractPropertyBrowserm_browser
 the browser where all properties are shown to the user More...
 
QMap< QtProperty *, int > m_classPropertyToIndex
 map from the class property to the index in the meta object More...
 
QMap< const QMetaObject *, QMap< int, QtVariantProperty * > > m_classToIndexToProperty
 Each meta object have a map to get the property by its index. More...
 
QMap< QtProperty *, int > m_dynamicPropertyToIndex
 map from the dynamic property to the idx in the dynamic property More...
 
QMap< int, QtVariantProperty * > m_indexToDynamicProperty
 map from idx of the dynamic property to the property More...
 
QtVariantPropertyManagerm_manager
 the main property manager (does not include the read only property) More...
 
QObject * m_object
 the currently edited object More...
 
QMap< QtProperty *, bool > m_propertyToExpanded
 TODO doc. More...
 
QtVariantPropertyManagerm_readOnlyManager
 the property manager for the read only property More...
 
QList< QtProperty * > m_topLevelProperties
 TODO doc. More...
 
QMap< QtProperty *, QVariant > saveChangeValue
 when a property is modified by the user, the change is stored here (until applyChange is called) More...
 

Private Attributes

ObjectControllerq_ptr
 

Member Function Documentation

◆ addClassProperties()

void ObjectControllerPrivate::addClassProperties ( const QMetaObject *  metaObject)

◆ addDynamicProperties()

void ObjectControllerPrivate::addDynamicProperties ( QObject *  edited)

◆ applyChange()

void ObjectControllerPrivate::applyChange ( )

◆ buildQtVariantProperty()

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

◆ 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(), and camitk::ObjectController::setObject().

◆ m_browser

QtAbstractPropertyBrowser* camitk::ObjectControllerPrivate::m_browser

◆ 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

◆ m_object

QObject* camitk::ObjectControllerPrivate::m_object

◆ 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(), and camitk::ObjectController::ObjectController().

◆ m_topLevelProperties

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

◆ q_ptr

ObjectController* camitk::ObjectControllerPrivate::q_ptr
private

◆ 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(), camitk::ObjectController::isModified(), camitk::ObjectController::revert(), saveChange(), and camitk::ObjectController::setObject().


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