![]() |
Computer Assited Medical Intervention Tool Kit
version 4.0
|
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... | |
Load * | createNewLoad () |
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... | |
Load * | editedLoad |
the currently edited load More... | |
Loads * | loads |
local copy of the loads More... | |
LoadsManager * | myLM |
my load manager More... | |
Ui::LoadsEditor | ui |
the ui dialog designed in qtdesigner More... | |
A clean dialog to edit (add, modify, delete), loads and their parameters, directly from Core.
LoadsEditor::LoadsEditor | ( | LoadsManager * | myLoadsManager, |
QWidget * | parent = 0 |
||
) |
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.
|
slot |
when the user clic on apply
References LoadsManager::addLoad(), LoadsManager::deleteAllLoads(), Loads::getLoad(), loads, myLM, Loads::numberOfLoads(), and LoadsManager::updateLoadsDisplay().
Referenced by init().
|
slot |
when user clicked on the applyTo button
References editedLoad, and Load::getTargetList().
Referenced by init().
|
slot |
when user pressed return in the applyTo line edit
References TargetList::add(), bgColor, editedLoad, PhysicalModel::getAtom(), TargetList::getIndexedTarget(), PMManagerDC::getPhysicalModel(), LoadsManager::getPMManagerDC(), Load::getTargetList(), myLM, Load::setTargetList(), TargetList::toString(), ui, and updateLoadsTable().
Referenced by init().
|
slot |
|
private |
create a new load using this DC as targets
References TargetList::add(), Loads::addLoad(), createNewLoad(), editedLoad, editLoad(), AtomDC::getAtom(), CellDC::getCell(), Structure::getIndex(), StructuralComponent::getNumberOfStructures(), StructuralComponent::getStructure(), loads, and Load::setTargetList().
Referenced by LoadsEditor().
|
private |
create a new load by asking the user for the load type.
References Load::LoadFactory(), and reject().
Referenced by createDCLoads(), and newLoad().
|
slot |
when user click to delete current load
References Loads::deleteLoad(), editedLoad, loads, ui, and updateLoadsTable().
Referenced by init().
|
slot |
when user wants to delete current value event
References editedLoad, Load::setAllEvents(), ui, and updateValueEventTable().
Referenced by init().
|
private |
let user play with a current load
References bgColor, editedLoad, Load::getDirection(), Load::getTargetList(), Load::getType(), Load::getUnit(), Unit::getUnitName(), TargetList::toString(), ui, updateLoadsTable(), updateND(), and updateValueEventTable().
Referenced by createDCLoads(), loadTableItemClicked(), newLoad(), and show().
|
private |
initialize everything
References apply(), applyToClicked(), applyToReturnPressed(), applyToTextChanged(), deleteLoad(), deleteValueEvent(), editedLoad, loads, loadTableItemClicked(), newLoad(), newValueEvent(), nullDisplacementClicked(), reset(), ui, unitChanged(), updateLoads(), updateLoadsTable(), valueEventTableItemClicked(), xChanged(), yChanged(), and zChanged().
Referenced by LoadsEditor(), and reset().
|
slot |
when the user click on the load list
References editedLoad, editLoad(), Loads::getLoad(), loads, and ui.
Referenced by init().
|
slot |
when user click to add a new load
References Loads::addLoad(), createNewLoad(), editedLoad, editLoad(), and loads.
Referenced by init().
|
slot |
when user wants to add a new value event
References Load::addValueEvent(), editedLoad, LoadsValueEvent::getDate(), LoadsValueEvent::getValue(), and updateValueEventTable().
Referenced by init().
|
slot |
when user toggle null displacement
References editedLoad, Load::setDirection(), Direction::setNullX(), Direction::setNullY(), Direction::setNullZ(), ui, updateLoadsTable(), and updateND().
Referenced by init().
|
slot |
when the user clic on cancel
Referenced by createNewLoad().
|
slot |
|
virtual |
overloaded so that it can update the load list
References editedLoad, and editLoad().
Referenced by LoadsManager::addLoad().
|
slot |
when user changed the current unit
References AccelerationUnit::CMSm2(), RotationUnit::DEG(), editedLoad, ForceUnit::KN(), PressureUnit::KPA(), TranslationUnit::M(), TranslationUnit::MICRO_M(), TranslationUnit::MM(), PressureUnit::MMHG(), AccelerationUnit::MMSm2(), AccelerationUnit::MSm2(), ForceUnit::N(), TranslationUnit::NM(), PressureUnit::PA(), ForceUnit::PN(), RotationUnit::RAD(), Load::setUnit(), ui, and updateLoadsTable().
Referenced by init().
void LoadsEditor::updateLoads | ( | ) |
copy the loads from the manager to a local list
References Loads::addLoad(), Load::addValueEvent(), ValueEvent::getDate(), Load::getDirection(), Loads::getLoad(), LoadsManager::getLoads(), Load::getTargetList(), Load::getType(), Load::getUnit(), ValueEvent::getValue(), Load::getValueEvent(), Load::LoadFactory(), loads, myLM, Loads::numberOfLoads(), Load::numberOfValueEvents(), Load::setDirection(), Load::setTargetList(), Load::setUnit(), and TargetList::toString().
Referenced by init().
|
private |
refresh load list display
References editedLoad, ValueEvent::getDate(), Load::getDirection(), Loads::getLoad(), Load::getTargetList(), Load::getType(), Load::getUnit(), Unit::getUnitName(), ValueEvent::getValue(), Load::getValueEvent(), loads, Loads::numberOfLoads(), TargetList::toString(), and ui.
Referenced by applyToReturnPressed(), deleteLoad(), editLoad(), init(), nullDisplacementClicked(), unitChanged(), xChanged(), yChanged(), and zChanged().
|
private |
update the null displacement display
References editedLoad, Load::getDirection(), Direction::isXNull(), Direction::isYNull(), Direction::isZNull(), and ui.
Referenced by editLoad(), nullDisplacementClicked(), xChanged(), yChanged(), and zChanged().
|
private |
refresh the value event display
References editedLoad, ValueEvent::getDate(), ValueEvent::getValue(), Load::getValueEvent(), Load::numberOfValueEvents(), and ui.
Referenced by deleteValueEvent(), editLoad(), newValueEvent(), and valueEventTableItemClicked().
|
slot |
when user double clic on a value event
References editedLoad, LoadsValueEvent::getDate(), ValueEvent::getDate(), LoadsValueEvent::getValue(), ValueEvent::getValue(), Load::getValueEvent(), ValueEvent::setDate(), ValueEvent::setValue(), ui, and updateValueEventTable().
Referenced by init().
|
slot |
when user changed the direction x
References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().
Referenced by init().
|
slot |
when user changed the direction y
References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().
Referenced by init().
|
slot |
when user changed the direction z
References editedLoad, Load::getDirection(), Load::setDirection(), ui, updateLoadsTable(), and updateND().
Referenced by init().
|
private |
the initial bg color
Referenced by applyToReturnPressed(), and editLoad().
|
private |
the currently edited load
Referenced by applyToClicked(), applyToReturnPressed(), createDCLoads(), deleteLoad(), deleteValueEvent(), editLoad(), init(), loadTableItemClicked(), newLoad(), newValueEvent(), nullDisplacementClicked(), show(), unitChanged(), updateLoadsTable(), updateND(), updateValueEventTable(), valueEventTableItemClicked(), xChanged(), yChanged(), and zChanged().
|
private |
local copy of the loads
Referenced by apply(), createDCLoads(), deleteLoad(), init(), loadTableItemClicked(), newLoad(), updateLoads(), updateLoadsTable(), and ~LoadsEditor().
|
private |
my load manager
Referenced by apply(), applyToReturnPressed(), LoadsEditor(), and updateLoads().
|
private |
the ui dialog designed in qtdesigner
Referenced by applyToReturnPressed(), applyToTextChanged(), deleteLoad(), deleteValueEvent(), editLoad(), init(), LoadsEditor(), loadTableItemClicked(), nullDisplacementClicked(), unitChanged(), updateLoadsTable(), updateND(), updateValueEventTable(), valueEventTableItemClicked(), xChanged(), yChanged(), and zChanged().