Computer Assited Medical Intervention Tool Kit  version 4.0
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
LoadsEditor Class Reference

A clean dialog to edit (add, modify, delete), loads and their parameters, directly from Core. More...

#include <LoadsEditor.h>

Inherits QDialog.

Public Slots

void apply ()
 when the user clic on apply More...
 
void applyToClicked ()
 when user clicked on the applyTo button More...
 
void applyToReturnPressed ()
 when user pressed return in the applyTo line edit More...
 
void applyToTextChanged (const QString &)
 when user has typed some text in the applyTo line edit More...
 
void deleteLoad ()
 when user click to delete current load More...
 
void deleteValueEvent ()
 when user wants to delete current value event More...
 
void loadTableItemClicked (QTableWidgetItem *)
 when the user click on the load list More...
 
void newLoad ()
 when user click to add a new load More...
 
void newValueEvent ()
 when user wants to add a new value event More...
 
void nullDisplacementClicked ()
 when user toggle null displacement More...
 
void reject ()
 when the user clic on cancel More...
 
void reset ()
 when the user clic on reset, reset the loads (using load manager loads) More...
 
void unitChanged ()
 when user changed the current unit More...
 
void valueEventTableItemClicked (QTableWidgetItem *)
 when user double clic on a value event More...
 
void xChanged ()
 when user changed the direction x More...
 
void yChanged ()
 when user changed the direction y More...
 
void zChanged ()
 when user changed the direction z More...
 

Public Member Functions

 LoadsEditor (LoadsManager *myLoadsManager, QWidget *parent=0)
 default constructor More...
 
 LoadsEditor (std::vector< camitk::Component * > selectedDC, LoadsManager *myLoadsManager, QWidget *parent=0)
 another constructor allowing for creating a new load for a particular atom dc More...
 
virtual void show ()
 overloaded so that it can update the load list More...
 
void updateLoads ()
 copy the loads from the manager to a local list More...
 
 ~LoadsEditor ()
 Destructor. More...
 

Private Member Functions

void createDCLoads (std::vector< camitk::Component * > *)
 create a new load using this DC as targets More...
 
LoadcreateNewLoad ()
 create a new load by asking the user for the load type. More...
 
void editLoad ()
 let user play with a current load More...
 
void init ()
 initialize everything More...
 
void updateLoadsTable ()
 refresh load list display More...
 
void updateND ()
 update the null displacement display More...
 
void updateValueEventTable ()
 refresh the value event display More...
 

Private Attributes

QColor bgColor
 the initial bg color More...
 
LoadeditedLoad
 the currently edited load More...
 
Loadsloads
 local copy of the loads More...
 
LoadsManagermyLM
 my load manager More...
 
Ui::LoadsEditor ui
 the ui dialog designed in qtdesigner More...
 

Detailed Description

A clean dialog to edit (add, modify, delete), loads and their parameters, directly from Core.

Constructor & Destructor Documentation

LoadsEditor::LoadsEditor ( LoadsManager myLoadsManager,
QWidget *  parent = 0 
)

default constructor

References init(), myLM, and ui.

LoadsEditor::LoadsEditor ( std::vector< camitk::Component * >  selectedDC,
LoadsManager myLoadsManager,
QWidget *  parent = 0 
)

another constructor allowing for creating a new load for a particular atom dc

References createDCLoads(), init(), myLM, and ui.

LoadsEditor::~LoadsEditor ( )

Destructor.

References loads.

Member Function Documentation

void LoadsEditor::apply ( )
slot
void LoadsEditor::applyToClicked ( )
slot

when user clicked on the applyTo button

References editedLoad, and Load::getTargetList().

Referenced by init().

void LoadsEditor::applyToReturnPressed ( )
slot
void LoadsEditor::applyToTextChanged ( const QString &  )
slot

when user has typed some text in the applyTo line edit

References ui.

Referenced by init().

void LoadsEditor::createDCLoads ( std::vector< camitk::Component * > *  selectedDC)
private
Load * LoadsEditor::createNewLoad ( )
private

create a new load by asking the user for the load type.

Returns
a new load of type choose by the user or NULL if user cancelled

References Load::LoadFactory(), and reject().

Referenced by createDCLoads(), and newLoad().

void LoadsEditor::deleteLoad ( )
slot

when user click to delete current load

References Loads::deleteLoad(), editedLoad, loads, ui, and updateLoadsTable().

Referenced by init().

void LoadsEditor::deleteValueEvent ( )
slot

when user wants to delete current value event

References editedLoad, Load::setAllEvents(), ui, and updateValueEventTable().

Referenced by init().

void LoadsEditor::editLoad ( )
private
void LoadsEditor::init ( )
private
void LoadsEditor::loadTableItemClicked ( QTableWidgetItem *  )
slot

when the user click on the load list

References editedLoad, editLoad(), Loads::getLoad(), loads, and ui.

Referenced by init().

void LoadsEditor::newLoad ( )
slot

when user click to add a new load

References Loads::addLoad(), createNewLoad(), editedLoad, editLoad(), and loads.

Referenced by init().

void LoadsEditor::newValueEvent ( )
slot

when user wants to add a new value event

References Load::addValueEvent(), editedLoad, LoadsValueEvent::getDate(), LoadsValueEvent::getValue(), and updateValueEventTable().

Referenced by init().

void LoadsEditor::nullDisplacementClicked ( )
slot
void LoadsEditor::reject ( )
slot

when the user clic on cancel

Referenced by createNewLoad().

void LoadsEditor::reset ( )
slot

when the user clic on reset, reset the loads (using load manager loads)

References init().

Referenced by init().

void LoadsEditor::show ( )
virtual

overloaded so that it can update the load list

References editedLoad, and editLoad().

Referenced by LoadsManager::addLoad().

void LoadsEditor::unitChanged ( )
slot
void LoadsEditor::updateLoads ( )
void LoadsEditor::updateLoadsTable ( )
private
void LoadsEditor::updateND ( )
private
void LoadsEditor::updateValueEventTable ( )
private
void LoadsEditor::valueEventTableItemClicked ( QTableWidgetItem *  )
slot
void LoadsEditor::xChanged ( )
slot

when user changed the direction x

References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().

Referenced by init().

void LoadsEditor::yChanged ( )
slot

when user changed the direction y

References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().

Referenced by init().

void LoadsEditor::zChanged ( )
slot

when user changed the direction z

References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().

Referenced by init().

Member Data Documentation

QColor LoadsEditor::bgColor
private

the initial bg color

Referenced by applyToReturnPressed(), and editLoad().

Load* LoadsEditor::editedLoad
private
Loads* LoadsEditor::loads
private
LoadsManager* LoadsEditor::myLM
private

my load manager

Referenced by apply(), applyToReturnPressed(), LoadsEditor(), and updateLoads().

Ui::LoadsEditor LoadsEditor::ui
private

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