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() [1/2]

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

default constructor

References init(), myLM, and ui.

◆ LoadsEditor() [2/2]

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::~LoadsEditor ( )

Destructor.

References loads.

Member Function Documentation

◆ apply

void LoadsEditor::apply ( )
slot

◆ applyToClicked

void LoadsEditor::applyToClicked ( )
slot

when user clicked on the applyTo button

References editedLoad, and Load::getTargetList().

Referenced by init().

◆ applyToReturnPressed

void LoadsEditor::applyToReturnPressed ( )
slot

◆ applyToTextChanged

void LoadsEditor::applyToTextChanged ( const QString &  )
slot

when user has typed some text in the applyTo line edit

References ui.

Referenced by init().

◆ createDCLoads()

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

◆ createNewLoad()

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().

◆ deleteLoad

void LoadsEditor::deleteLoad ( )
slot

when user click to delete current load

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

Referenced by init().

◆ deleteValueEvent

void LoadsEditor::deleteValueEvent ( )
slot

when user wants to delete current value event

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

Referenced by init().

◆ editLoad()

void LoadsEditor::editLoad ( )
private

◆ init()

void LoadsEditor::init ( )
private

◆ loadTableItemClicked

void LoadsEditor::loadTableItemClicked ( QTableWidgetItem *  )
slot

when the user click on the load list

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

Referenced by init().

◆ newLoad

void LoadsEditor::newLoad ( )
slot

when user click to add a new load

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

Referenced by init().

◆ newValueEvent

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().

◆ nullDisplacementClicked

void LoadsEditor::nullDisplacementClicked ( )
slot

◆ reject

void LoadsEditor::reject ( )
slot

when the user clic on cancel

Referenced by createNewLoad().

◆ reset

void LoadsEditor::reset ( )
slot

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

References init().

Referenced by init().

◆ show()

void LoadsEditor::show ( )
virtual

overloaded so that it can update the load list

References editedLoad, and editLoad().

Referenced by LoadsManager::addLoad().

◆ unitChanged

void LoadsEditor::unitChanged ( )
slot

◆ updateLoads()

void LoadsEditor::updateLoads ( )

◆ updateLoadsTable()

void LoadsEditor::updateLoadsTable ( )
private

◆ updateND()

void LoadsEditor::updateND ( )
private

◆ updateValueEventTable()

void LoadsEditor::updateValueEventTable ( )
private

◆ valueEventTableItemClicked

void LoadsEditor::valueEventTableItemClicked ( QTableWidgetItem *  )
slot

◆ xChanged

void LoadsEditor::xChanged ( )
slot

when user changed the direction x

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

Referenced by init().

◆ yChanged

void LoadsEditor::yChanged ( )
slot

when user changed the direction y

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

Referenced by init().

◆ zChanged

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

◆ bgColor

QColor LoadsEditor::bgColor
private

the initial bg color

Referenced by applyToReturnPressed(), and editLoad().

◆ editedLoad

Load* LoadsEditor::editedLoad
private

◆ loads

Loads* LoadsEditor::loads
private

◆ myLM

LoadsManager* LoadsEditor::myLM
private

my load manager

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

◆ ui

Ui::LoadsEditor LoadsEditor::ui
private

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