Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Properties | Private Attributes | List of all members
AtomDCProperties Class Reference

The class AtomDCProperties defines an object that allows interaction of some properties of an atom. More...

#include <AtomDCProperties.h>

Public Member Functions

 AtomDCProperties (AtomDC *)
 Default construtor.
virtual bool event (QEvent *e)
 intercept signal for dynamic property changed.
int getIndex () const
 get the atom's index in a form the property editor understands
QVector3D getPosition () const
 get the atom's position in a form the property editor understands
void setIndex (int)
 change the atom's index from the property editor
void setPosition (QVector3D)
 change the atom's position from the property editor
void updateProperties (AtomDC *)
 change the currently managed AtomDC and update the value of the properties
 ~AtomDCProperties ()
 destructor

Properties

int index
 the index property that will be managed in the property dialog
QVector3D position
 the 3D position property

Private Attributes

AtomDCmyDC
 the currently selected atom's AtomDC

Detailed Description

The class AtomDCProperties defines an object that allows interaction of some properties of an atom.

The default atom properties are created thanks to Q_PROPERTY. The extra properties found in the PML document are also available thanks to the dynamic features of the Qt's Property System (see qt documentation).

Constructor & Destructor Documentation

AtomDCProperties::AtomDCProperties ( AtomDC adc)

Default construtor.

References updateProperties().

AtomDCProperties::~AtomDCProperties ( )
inline

destructor

Member Function Documentation

bool AtomDCProperties::event ( QEvent *  e)
virtual

intercept signal for dynamic property changed.

: build a specific virtual class ImpProperty than have a specific slot/method that is automatically called when a change is made in the dynamic property (or may be any property). Modify the PropertyEditor::edit method to PropertyEditor::edit(ImpProperty). In this ImpProperty one also could put some specific methods in order to simplifies the properties. For instance, a method addProperty(string name) that automatically adds a new dynamic property! Then it is bye bye to Q_PROPERTY and this is a complete Qt wrapping!

References AtomDC::getAtom(), and myDC.

int AtomDCProperties::getIndex ( ) const

get the atom's index in a form the property editor understands

References AtomDC::getAtom(), and myDC.

QVector3D AtomDCProperties::getPosition ( ) const

get the atom's position in a form the property editor understands

References AtomDC::getAtom(), and myDC.

void AtomDCProperties::setIndex ( int  id)

change the atom's index from the property editor

References AtomDC::getAtom(), and myDC.

void AtomDCProperties::setPosition ( QVector3D  newCoord)

change the atom's position from the property editor

References myDC, camitk::Component::refresh(), AtomDC::resetAlreadyMovedFlag(), and AtomDC::setPosition().

void AtomDCProperties::updateProperties ( AtomDC adc)

change the currently managed AtomDC and update the value of the properties

References AtomDC::getAtom(), and myDC.

Referenced by AtomDCProperties().

Member Data Documentation

AtomDC* AtomDCProperties::myDC
private

the currently selected atom's AtomDC

Referenced by event(), getIndex(), getPosition(), setIndex(), setPosition(), and updateProperties().

Property Documentation

int AtomDCProperties::index
readwrite

the index property that will be managed in the property dialog

QVector3D AtomDCProperties::position
readwrite

the 3D position property


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