Computer Assited Medical Intervention Tool Kit  version 3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
camitk::InterfaceProperty Class Referenceabstract

This class describe what are the methods to implement in order to manage dynamic properties. More...

#include <InterfaceProperty.h>

+ Inheritance diagram for camitk::InterfaceProperty:

Public Member Functions

virtual QStringList getHierarchy ()=0
 Get the inheritance hierachy of this Component instance as a list of QString. More...
 
virtual QObject * getPropertyObject ()=0
 get the property object that could be understood by PropertyEditor. More...
 
virtual QWidget * getPropertyWidget (QWidget *parent=0)=0
 get the property widget to display. More...
 
virtual bool isInstanceOf (QString className)=0
 Assert that a Component instance really inherits from a given className. More...
 
virtual bool setDynamicProperty (const char *name, const QVariant &value, const char *description="", bool isReadOnly=false)=0
 specific setProperty method that can pass the description and the readOnly property. More...
 
virtual void updateProperty (QString name, QVariant value)=0
 update property: if you override this method, do not forget to call the superclass method for the property not managed locally in order to properly manage all inherited dynamic properties. More...
 
virtual ~InterfaceProperty ()
 empty virtual destructor, to avoid memory leak More...
 

Detailed Description

This class describe what are the methods to implement in order to manage dynamic properties.

Constructor & Destructor Documentation

virtual camitk::InterfaceProperty::~InterfaceProperty ( )
inlinevirtual

empty virtual destructor, to avoid memory leak

Member Function Documentation

virtual QStringList camitk::InterfaceProperty::getHierarchy ( )
pure virtual

Get the inheritance hierachy of this Component instance as a list of QString.

Implemented in camitk::Component.

virtual QObject* camitk::InterfaceProperty::getPropertyObject ( )
pure virtual

get the property object that could be understood by PropertyEditor.

Returns this as any Component instance can manage its list of dynamic properties (and Component inherits from InterfaceProperty aka QObject). You can also have a separate class to manage your Component properties. In this case, just overide this method and return the corresponding instance.

See Also
PropertyExplorer
ObjectController

Implemented in camitk::Component.

virtual QWidget* camitk::InterfaceProperty::getPropertyWidget ( QWidget *  parent = 0)
pure virtual

get the property widget to display.

(always return NULL, overwrite this method if you want to give here you own widget)

See Also
PropertyExplorer

Implemented in camitk::Component.

virtual bool camitk::InterfaceProperty::isInstanceOf ( QString  className)
pure virtual

Assert that a Component instance really inherits from a given className.

Parameters
classNamethe name of the class to compare to

Implemented in camitk::Component.

virtual bool camitk::InterfaceProperty::setDynamicProperty ( const char *  name,
const QVariant &  value,
const char *  description = "",
bool  isReadOnly = false 
)
pure virtual

specific setProperty method that can pass the description and the readOnly property.

If the property already exists, it will just change its value (and descripion or readOnly property).

Parameters
namethe name of the property
valuethe new value for the given property
descriptionthe description associated with this property
isReadOnlyif true, then the property cannot be modified in the GUI

Implemented in camitk::Component.

virtual void camitk::InterfaceProperty::updateProperty ( QString  name,
QVariant  value 
)
pure virtual

update property: if you override this method, do not forget to call the superclass method for the property not managed locally in order to properly manage all inherited dynamic properties.

This method is called when a dynamic property has to be udpated

Parameters
namethe name of the dynamic property
valuethe new value to take into account

Implemented in camitk::Component.


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