|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
40 #ifndef OBJECTCONTROLLER_H
41 #define OBJECTCONTROLLER_H
43 #include <QtGui/QWidget>
60 Q_PRIVATE_SLOT(d_func(),
void slotValueChanged(
QtProperty*,
const QVariant&))
QObject * m_object
Definition: objectcontroller.cpp:104
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
void setStatusTip(const QString &text)
Definition: qtpropertybrowser.cpp:318
void valueChanged(QtProperty *property, const QVariant value)
Definition: ObjectController.cpp:493
void addClassProperties(const QMetaObject *metaObject)
Definition: ObjectController.cpp:314
QMap< int, QIcon > getEnumIcons() const
get the enum icons
Definition: Property.cpp:148
void initViewMode()
initialize the view mode depending on currentViewMode
Definition: ObjectController.cpp:651
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
The description of this class will come soon !
Definition: qttreepropertybrowser.h:60
QMap< QtProperty *, bool > m_propertyToExpanded
Definition: objectcontroller.cpp:111
Definition: objectcontroller.h:47
void slotValueChanged(QtProperty *property, const QVariant &value)
Definition: objectcontroller.cpp:313
QtVariantPropertyManager * m_manager
Definition: objectcontroller.cpp:116
QString getGroupName() const
get this property subgroup's name
Definition: Property.cpp:158
void saveExpandedState()
Definition: ObjectController.cpp:485
~ObjectController() override
destructor of object controller
Definition: ObjectController.cpp:572
QtVariantPropertyManager * m_manager
the main property manager (does not include the read only property)
Definition: ObjectController.h:316
void setRootIsDecorated(bool show)
Definition: qttreepropertybrowser.cpp:789
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
void setEnabled(bool enable)
Definition: qtpropertybrowser.cpp:362
void updateClassProperties(const QMetaObject *metaObject, bool recursive)
Definition: objectcontroller.cpp:186
QMap< const QMetaObject *, QMap< int, QtVariantProperty * > > m_classToIndexToProperty
Definition: objectcontroller.cpp:109
ObjectControllerPrivate * d_ptr
Definition: objectcontroller.h:57
QMap< const QMetaObject *, QtProperty * > m_classToProperty
Definition: objectcontroller.cpp:106
bool isSubValue(int value, int subValue) const
Definition: ObjectController.cpp:108
static int enumTypeId()
Definition: qtvariantproperty.cpp:91
@ TREE
The property browser can be shown like a QListView.
Definition: ObjectController.h:195
QtBrowserItem * addProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:1771
ViewMode
Definition: ObjectController.h:194
void apply()
slot to apply change made by the user in the property editor
Definition: ObjectController.cpp:681
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
QVBoxLayout * layout
layout which will contains the propertybrowser and, in view mode GROUPBOX and BUTTON,...
Definition: ObjectController.h:256
static int flagTypeId()
Definition: qtvariantproperty.cpp:104
void addClassProperties(const QMetaObject *metaObject)
Definition: objectcontroller.cpp:221
QMap< QtProperty *, int > m_propertyToIndex
Definition: objectcontroller.cpp:108
void setObject(QObject *object)
Definition: objectcontroller.cpp:375
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
virtual QtVariantProperty * addProperty(int propertyType, const QString &name=QString())
Definition: qtvariantproperty.cpp:1321
QtAbstractPropertyBrowser * m_browser
the browser where all properties are shown to the user
Definition: ObjectController.h:313
void setFactoryForManager(PropertyManager *manager, QtAbstractEditorFactory< PropertyManager > *factory)
Definition: qtpropertybrowser.h:315
bool isPowerOf2(int value) const
Definition: ObjectController.cpp:129
void setWhatsThis(const QString &text)
Definition: qtpropertybrowser.cpp:332
void saveExpandedState()
Definition: objectcontroller.cpp:305
void applyChange()
Definition: ObjectController.cpp:532
QObject * m_object
the currently edited object
Definition: ObjectController.h:287
ObjectController * q_ptr
Definition: objectcontroller.cpp:88
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition: qtvariantproperty.h:97
void restoreExpandedState()
Definition: objectcontroller.cpp:309
int flagToInt(const QMetaEnum &metaEnum, int flagValue) const
Definition: ObjectController.cpp:141
void setObject(QObject *object)
mutatorMethod of the object at unroll in the property browser
Definition: ObjectController.cpp:576
void valueChanged(QtProperty *, const QVariant &)) ViewMode currentViewMode
variable to choose the type of property browser
The description of this class will come soon !
Definition: qtgroupboxpropertybrowser.h:59
QObject * object() const
accessorMethod of the object contains in the property browser
Definition: ObjectController.cpp:610
bool getReadOnly() const
Definition: Property.cpp:87
void setToolTip(const QString &text)
Definition: qtpropertybrowser.cpp:304
QtVariantPropertyManager * m_readOnlyManager
Definition: objectcontroller.cpp:117
QScrollArea * scroll
scroll add to navigate in the property browser
Definition: ObjectController.h:259
bool isModified()
call this to check if a modification was done
Definition: ObjectController.cpp:677
const char * description
Definition: applications/cepgenerator/main.cpp:38
int intToFlag(const QMetaEnum &metaEnum, int intValue) const
Definition: objectcontroller.cpp:160
void updateDynamicProperties(const QObject *edited)
Definition: ObjectController.cpp:362
ObjectController(QWidget *parent=0)
Definition: objectcontroller.cpp:339
QStringList getAttributeList()
returns the list of attribute names that are specific to this property
Definition: Property.cpp:178
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition: qtvariantproperty.h:212
void removeProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:1838
void setAutoUpdateProperty(bool)
if set, the properties are immediatly updated in the managed object (default false)
Definition: ObjectController.cpp:615
QString getEnumTypeName() const
Definition: Property.cpp:103
QtAbstractPropertyBrowser * m_browser
Definition: objectcontroller.cpp:115
void addDynamicProperties(QObject *edited)
Definition: ObjectController.cpp:384
@ Interactive
Definition: qttreepropertybrowser.h:72
ViewMode getViewMode() const
accessorMethod of the view mode
Definition: ObjectController.cpp:673
QList< QtProperty * > m_topLevelProperties
TODO doc.
Definition: ObjectController.h:307
int enumToInt(const QMetaEnum &metaEnum, int enumValue) const
Definition: objectcontroller.cpp:83
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
@ BUTTON
It is like the GROUPBOX but the buttons allow the user to control the comput display of arborescence.
Definition: ObjectController.h:197
void setValue(const QVariant &value)
Definition: qtvariantproperty.cpp:263
QObject * object() const
Definition: objectcontroller.cpp:400
QVariant getAttribute(QString attName)
get the current value of a given attribute, see setAttribute() if the attribute attName was never set...
Definition: Property.cpp:168
void setViewMode(ViewMode viewMode)
mutator Method of the view mode
Definition: ObjectController.cpp:626
ObjectControllerPrivate * d_ptr
private object controller wich contains pointer about object, browser and more
Definition: ObjectController.h:239
~ObjectController()
Definition: objectcontroller.cpp:371
ObjectController(QWidget *parent=nullptr, ViewMode viewMode=TREE)
constructor of object controller with in parameters the parent widget and the view mode (default : TR...
Definition: ObjectController.cpp:543
void revert()
slot to revert the values of all properties (revert to values in memory)
Definition: ObjectController.cpp:685
QList< QtProperty * > m_topLevelProperties
Definition: objectcontroller.cpp:113
@ GROUPBOX
It is like the TREE but with a delimitation to indicate the arborescence of the property type.
Definition: ObjectController.h:196
const QString & getDescription() const
get the description
Definition: Property.cpp:97
int intToEnum(const QMetaEnum &metaEnum, int intValue) const
Definition: ObjectController.cpp:88
void setAttribute(const QString &attribute, const QVariant &value)
Definition: qtvariantproperty.cpp:276
int intToEnum(const QMetaEnum &metaEnum, int intValue) const
Definition: objectcontroller.cpp:98
virtual bool isPropertyTypeSupported(int propertyType) const
Definition: qtvariantproperty.cpp:1300
int flagToInt(const QMetaEnum &metaEnum, int flagValue) const
Definition: objectcontroller.cpp:141
void updateClassProperties(const QMetaObject *metaObject, bool recursive)
Definition: ObjectController.cpp:198
void addSubProperty(QtProperty *property)
Definition: qtpropertybrowser.cpp:393
QVariant value() const
Definition: qtvariantproperty.cpp:213
static int groupTypeId()
Definition: qtvariantproperty.cpp:117
void restoreExpandedState()
Definition: ObjectController.cpp:489
bool isPowerOf2(int value) const
Definition: objectcontroller.cpp:131
bool isSubValue(int value, int subValue) const
Definition: objectcontroller.cpp:114
QMap< QtProperty *, const QMetaObject * > m_propertyToClass
Definition: objectcontroller.cpp:107
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
Definition: Action.cpp:35