26 #ifndef OBJECTCONTROLLER_H 27 #define OBJECTCONTROLLER_H 31 #include <QtVariantProperty> 35 #include <QPushButton> 36 #include <QVBoxLayout> 37 #include <QScrollArea> 185 void setObject ( QObject *
object );
188 QObject *object()
const;
191 void setAutoUpdateProperty(
bool);
195 void setViewMode (
ViewMode viewMode );
221 Q_PRIVATE_SLOT ( d_func(),
void saveChange (
QtProperty *,
const QVariant & ) )
222 Q_PRIVATE_SLOT ( d_func(),
void valueChanged (
QtProperty *,
const QVariant & ) )
245 void addClassProperties (
const QMetaObject *metaObject );
246 void addDynamicProperties ( QObject *edited );
247 void updateClassProperties (
const QMetaObject *metaObject,
bool recursive );
248 void updateDynamicProperties (
const QObject * edited);
249 void saveExpandedState();
250 void restoreExpandedState();
251 void valueChanged (
QtProperty *property,
const QVariant value );
253 void saveChange (
QtProperty *property,
const QVariant &value );
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;
261 bool isPowerOf2 (
int value )
const;
300 QtVariantProperty * buildQtVariantProperty(QString name, QMetaType::Type type, QVariant value,
bool isReadable,
bool isWritable,
bool isEnumType,
bool isFlagType,
bool isDesignable, QMetaEnum * metaEnum = NULL);
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
Definition: qtpropertybrowser.h:256
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition: qtvariantproperty.h:83
QtVariantPropertyManager * m_readOnlyManager
the property manager for the read only property
Definition: ObjectController.h:296
QMap< QtProperty *, bool > m_propertyToExpanded
TODO doc.
Definition: ObjectController.h:281
Definition: ObjectController.h:240
Definition: Action.cpp:40
Definition: objectcontroller.cpp:50
QtVariantPropertyManager * m_manager
the main property manager (does not include the read only property)
Definition: ObjectController.h:293
QVBoxLayout * layout
layout which will contains the propertybrowser and, in view mode GROUPBOX and BUTTON, the scroll
Definition: ObjectController.h:233
QObject * m_object
the currently edited object
Definition: ObjectController.h:264
The property browser can be shown like a QListView.
Definition: ObjectController.h:173
#define CAMITK_API
Definition: CamiTKAPI.h:49
QMap< QtProperty *, int > m_dynamicPropertyToIndex
map from the dynamic property to the idx in the dynamic property
Definition: ObjectController.h:278
QMap< QString, QtProperty * > groupProperties
map of all the QtProperty that are top-level groups
Definition: ObjectController.h:303
QScrollArea * scroll
scroll add to navigate in the property browser
Definition: ObjectController.h:236
QList< QtProperty * > m_topLevelProperties
TODO doc.
Definition: ObjectController.h:284
It is like the TREE but with a delimitation to indicate the arborescence of the property type...
Definition: ObjectController.h:174
ObjectControllerPrivate * d_ptr
private object controller wich contains pointer about object, browser and more
Definition: ObjectController.h:216
QMap< QtProperty *, QVariant > saveChangeValue
when a property is modified by the user, the change is stored here (until applyChange is called) ...
Definition: ObjectController.h:287
The description of this class will come soon !
Definition: qtvariantproperty.h:64
QMap< QtProperty *, int > m_classPropertyToIndex
map from the class property to the index in the meta object
Definition: ObjectController.h:271
QtAbstractPropertyBrowser * m_browser
the browser where all properties are shown to the user
Definition: ObjectController.h:290
The description of this class will come soon !
Definition: qtpropertybrowser.h:74
ViewMode
The property browser can be shown in different view mode.
Definition: ObjectController.h:172
QMap< const QMetaObject *, QMap< int, QtVariantProperty * > > m_classToIndexToProperty
Each meta object have a map to get the property by its index.
Definition: ObjectController.h:273
The object controller class.
Definition: ObjectController.h:162
QMap< int, QtVariantProperty * > m_indexToDynamicProperty
map from idx of the dynamic property to the property
Definition: ObjectController.h:276
ObjectController * q_ptr
Definition: ObjectController.h:241