|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
26 #ifndef OBJECTCONTROLLER_H
27 #define OBJECTCONTROLLER_H
31 #include <QtVariantProperty>
35 #include <QPushButton>
36 #include <QScrollArea>
37 #include <QVBoxLayout>
185 void setObject(QObject*
object);
188 QObject* object()
const;
191 void setAutoUpdateProperty(
bool);
221 Q_PRIVATE_SLOT(d_func(),
void saveChange(
QtProperty*,
const QVariant&))
222 Q_PRIVATE_SLOT(d_func(),
void valueChanged(
QtProperty*,
const QVariant&))
256 int enumToInt(
const QMetaEnum& metaEnum,
int enumValue)
const;
257 int intToEnum(
const QMetaEnum& metaEnum,
int intValue)
const;
258 int flagToInt(
const QMetaEnum& metaEnum,
int flagValue)
const;
259 int intToFlag(
const QMetaEnum& metaEnum,
int intValue)
const;
260 bool isSubValue(
int value,
int subValue)
const;
300 QtVariantProperty*
buildQtVariantProperty(QString name, QMetaType::Type type, QVariant value,
bool isReadable,
bool isWritable,
bool isEnumType,
bool isFlagType,
bool isDesignable, QMetaEnum* metaEnum = NULL);
ObjectController * q_ptr
Definition: ObjectController.h:264
int enumToInt(const QMetaEnum &metaEnum, int enumValue) const
Definition: ObjectController.cpp:69
QMap< int, QtVariantProperty * > m_indexToDynamicProperty
map from idx of the dynamic property to the property
Definition: ObjectController.h:299
QMap< QString, QtProperty * > groupProperties
map of all the QtProperty that are top-level groups
Definition: ObjectController.h:326
Definition: ObjectController.h:263
void valueChanged(QtProperty *property, const QVariant value)
Definition: ObjectController.cpp:493
void addClassProperties(const QMetaObject *metaObject)
Definition: ObjectController.cpp:314
QMap< QtProperty *, int > m_dynamicPropertyToIndex
map from the dynamic property to the idx in the dynamic property
Definition: ObjectController.h:301
QMap< QtProperty *, QVariant > saveChangeValue
when a property is modified by the user, the change is stored here (until applyChange is called)
Definition: ObjectController.h:310
Definition: objectcontroller.h:47
void saveExpandedState()
Definition: ObjectController.cpp:485
QtVariantPropertyManager * m_manager
the main property manager (does not include the read only property)
Definition: ObjectController.h:316
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
Definition: qtpropertybrowser.h:301
QMap< const QMetaObject *, QMap< int, QtVariantProperty * > > m_classToIndexToProperty
Each meta object have a map to get the property by its index.
Definition: ObjectController.h:296
bool isSubValue(int value, int subValue) const
Definition: ObjectController.cpp:108
ViewMode
Definition: ObjectController.h:194
void saveChange(QtProperty *property, const QVariant &value)
Definition: ObjectController.cpp:528
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition: qtvariantproperty.h:119
int intToFlag(const QMetaEnum &metaEnum, int intValue) const
Definition: ObjectController.cpp:165
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:113
QtVariantPropertyManager * m_readOnlyManager
the property manager for the read only property
Definition: ObjectController.h:319
QtAbstractPropertyBrowser * m_browser
the browser where all properties are shown to the user
Definition: ObjectController.h:313
bool isPowerOf2(int value) const
Definition: ObjectController.cpp:129
void applyChange()
Definition: ObjectController.cpp:532
QObject * m_object
the currently edited object
Definition: ObjectController.h:287
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition: qtvariantproperty.h:97
int flagToInt(const QMetaEnum &metaEnum, int flagValue) const
Definition: ObjectController.cpp:141
The object controller class.
Definition: ObjectController.h:185
void updateDynamicProperties(const QObject *edited)
Definition: ObjectController.cpp:362
QMap< QtProperty *, bool > m_propertyToExpanded
TODO doc.
Definition: ObjectController.h:304
void addDynamicProperties(QObject *edited)
Definition: ObjectController.cpp:384
QList< QtProperty * > m_topLevelProperties
TODO doc.
Definition: ObjectController.h:307
Definition: objectcontroller.cpp:50
QMap< QtProperty *, int > m_classPropertyToIndex
map from the class property to the index in the meta object
Definition: ObjectController.h:294
int intToEnum(const QMetaEnum &metaEnum, int intValue) const
Definition: ObjectController.cpp:88
void updateClassProperties(const QMetaObject *metaObject, bool recursive)
Definition: ObjectController.cpp:198
void restoreExpandedState()
Definition: ObjectController.cpp:489
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...
Definition: ObjectController.cpp:230
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: Action.cpp:35