Computer Assited Medical Intervention Tool Kit  version 4.1
Public Member Functions | Private Attributes | List of all members
CamiTKPropertyList Class Reference

This class holds a list of CamiTK Properties and can be used as an editable QObject for the ObjectControler widget. More...

#include <CamiTKPropertyList.h>

Inherits QObject.

Public Member Functions

virtual bool addProperty (camitk::Property *)
 Add a new CamiTK property to the component. More...
 
virtual unsigned int getNumberOfProperties () const
 get the number of properties More...
 
virtual Q_INVOKABLE camitk::PropertygetProperty (QString name)
 Get a Property given its name. More...
 
virtual camitk::PropertygetProperty (unsigned int)
 get the property stored at the given index More...
 
 ~CamiTKPropertyList () override
 

Private Attributes

QMap< QString, camitk::Property * > propertyMap
 list of CamiTK property decorating the dynamic properties More...
 

Detailed Description

This class holds a list of CamiTK Properties and can be used as an editable QObject for the ObjectControler widget.

Constructor & Destructor Documentation

◆ ~CamiTKPropertyList()

CamiTKPropertyList::~CamiTKPropertyList ( )
override

Member Function Documentation

◆ addProperty()

bool CamiTKPropertyList::addProperty ( camitk::Property prop)
virtual

Add a new CamiTK property to the component.

If the property already exist, it will just change its value.

Note
The component takes ownership of the Property instance.
Returns
false if the Qt Meta Object property was added by this method (otherwise the property was already defined and true is returned if it was successfully updated)

References camitk::Property::getInitialValue(), and camitk::Property::getName().

Referenced by PMLExplorerWidget::createMCPropertyList(), PMLExplorerWidget::createNewProperty(), and PMLExplorerWidget::createSCPropertyList().

◆ getNumberOfProperties()

unsigned int CamiTKPropertyList::getNumberOfProperties ( ) const
virtual

get the number of properties

◆ getProperty() [1/2]

Property * CamiTKPropertyList::getProperty ( QString  name)
virtual

Get a Property given its name.

Parameters
namethe property name
Returns
NULL if the name does not match any property name
See also
Property

◆ getProperty() [2/2]

Property * CamiTKPropertyList::getProperty ( unsigned int  index)
virtual

get the property stored at the given index

Member Data Documentation

◆ propertyMap

QMap<QString, camitk::Property*> CamiTKPropertyList::propertyMap
private

list of CamiTK property decorating the dynamic properties


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