Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (const QObject *edited)
void applyChange ()
QtVariantProperty * buildQtVariantProperty (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...
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

QtAbstractPropertyBrowser * m_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
QtVariantPropertyManager * m_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.
QtVariantPropertyManager * m_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)

Private Attributes

ObjectControllerq_ptr

Member Function Documentation

void camitk::ObjectControllerPrivate::addClassProperties ( const QMetaObject *  metaObject)
void camitk::ObjectControllerPrivate::addDynamicProperties ( const QObject *  edited)
void camitk::ObjectControllerPrivate::applyChange ( )
QtVariantProperty * camitk::ObjectControllerPrivate::buildQtVariantProperty ( 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...

References enumToInt(), flagToInt(), isPowerOf2(), m_manager, and m_readOnlyManager.

Referenced by addClassProperties(), and addDynamicProperties().

int camitk::ObjectControllerPrivate::enumToInt ( const QMetaEnum &  metaEnum,
int  enumValue 
) const
int camitk::ObjectControllerPrivate::flagToInt ( const QMetaEnum &  metaEnum,
int  flagValue 
) const
int camitk::ObjectControllerPrivate::intToEnum ( const QMetaEnum &  metaEnum,
int  intValue 
) const

Referenced by valueChanged().

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

References isPowerOf2().

Referenced by valueChanged().

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

Referenced by flagToInt().

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

References saveChangeValue.

void camitk::ObjectControllerPrivate::saveExpandedState ( )
void camitk::ObjectControllerPrivate::updateClassProperties ( const QMetaObject *  metaObject,
bool  recursive 
)
void camitk::ObjectControllerPrivate::updateDynamicProperties ( const QObject *  edited)

References m_indexToDynamicProperty, and m_manager.

Referenced by valueChanged().

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

Member Data Documentation

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

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

Referenced by addClassProperties(), and valueChanged().

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

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

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

Referenced by addDynamicProperties(), and valueChanged().

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

map from idx of the dynamic property to the property

Referenced by addDynamicProperties(), and updateDynamicProperties().

QtVariantPropertyManager* camitk::ObjectControllerPrivate::m_manager

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

Referenced by buildQtVariantProperty(), camitk::ObjectController::ObjectController(), camitk::ObjectController::setAutoUpdateProperty(), and updateDynamicProperties().

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

TODO doc.

QtVariantPropertyManager* camitk::ObjectControllerPrivate::m_readOnlyManager

the property manager for the read only property

Referenced by buildQtVariantProperty(), and camitk::ObjectController::ObjectController().

QList<QtProperty *> camitk::ObjectControllerPrivate::m_topLevelProperties
ObjectController* camitk::ObjectControllerPrivate::q_ptr
private
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: