![]() |
Computer Assited Medical Intervention Tool Kit
|
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 | |
AtomDC * | myDC |
the currently selected atom's AtomDC |
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).
AtomDCProperties::AtomDCProperties | ( | AtomDC * | adc | ) |
Default construtor.
References updateProperties().
|
inline |
destructor
|
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().
|
private |
the currently selected atom's AtomDC
Referenced by event(), getIndex(), getPosition(), setIndex(), setPosition(), and updateProperties().
|
readwrite |
the index property that will be managed in the property dialog
|
readwrite |
the 3D position property