![]() |
Computer Assited Medical Intervention Tool Kit
version 4.0
|
This dialog allows one to run a simulation using a simulation motor. More...
#include <LoadsSimulation.h>
Inherits QDialog.
Public Slots | |
| virtual void | addAnimationMotorAddon () |
| adding a animation motor add-on (in the 2nd tab) More... | |
| virtual void | chooseOutputDir () |
| bool | doOneStep () |
| do one step of simulation More... | |
| virtual void | dtChanged () |
| virtual void | dtModified () |
| void | init () |
| init display More... | |
| void | pause () |
| Slot called when the button Pause is clicked. More... | |
| virtual void | refreshDtChanged () |
| virtual void | refreshDtModified () |
| virtual void | reject () |
| dialog is closed More... | |
| void | rewind () |
| Slot called when the button Rewind is clicked. More... | |
| void | simulate () |
| Slot called when the button Play is clicked. More... | |
| void | simulateOneStep () |
| Slot called when the next step is clicked. More... | |
| virtual void | tMaxChanged () |
| virtual void | tMaxModified () |
| virtual void | videoToggled (bool) |
Public Member Functions | |
| void | addTab (QWidget *) |
| add a tabulation (will be remove when the current animation motor add-on will be removed More... | |
| double | getTime () const |
| get the actual time More... | |
| LoadsSimulation (LoadsManager *myLoadsManager, QWidget *parent=0) | |
| Default Constructor. More... | |
| void | updateAtomData () |
| only update atom data More... | |
| void | updateDisplay (bool force) |
| update the display (the boolean indicates if the scene3d has to be refresh or not) More... | |
| void | updateTime (bool getMotorTime=false) |
| update time display More... | |
| virtual | ~LoadsSimulation () |
| Destructor. More... | |
Private Member Functions | |
| void | enableButtons (bool enable) |
| set the rew,play,pause,step buttons enable or not More... | |
| void | loadAddon (QString) |
| load a animation motor add-on using a filename (shared lib location) More... | |
Private Attributes | |
| QString | addonFilename |
| QColor | bgColor |
| the initial bg color More... | |
| double | elapsed |
| total elapsed time (to calculate simulator frequency) More... | |
| unsigned int | imageId |
| the number of screenshots More... | |
| double | iterationCount |
| total nr of iteration computed (to calculate simulator frequency) More... | |
| LoadsManager * | myLM |
| the load manager More... | |
| AnimationMotorAddon * | myMotor |
| the motor More... | |
| bool | output |
| if there is no output directory we can't make video More... | |
| QString | outputDir |
| the output directory name for making videos More... | |
| QString | outputDirName |
| the output directory name for making videos More... | |
| QAction * | pauseToolbar |
| QAction * | playOneStepToolbar |
| QAction * | playToolbar |
| QAction * | rewindToolbar |
| toolbar buttons More... | |
| LoadsSimulationDriver * | simDriver |
| the code core for the display of a loads More... | |
| QToolBar * | simulationToolBar |
| the tool bar More... | |
| QLineEdit * | tLineEditToolbar |
| toolbar t line edit More... | |
| Ui::AnimationMotorDialog * | ui |
| the ui dialog designed in qtdesigner More... | |
| bool | video |
| record video or not? More... | |
This dialog allows one to run a simulation using a simulation motor.
It plays the impload, allowing the user to see the evolution of translations along time.
| LoadsSimulation::LoadsSimulation | ( | LoadsManager * | myLoadsManager, |
| QWidget * | parent = 0 |
||
| ) |
Default Constructor.
References addAnimationMotorAddon(), bgColor, chooseOutputDir(), doOneStep(), dtChanged(), dtModified(), elapsed, LoadsSimulationDriver::getDt(), LoadsSimulationDriver::getRefreshDt(), LoadsSimulationDriver::getTMax(), imageId, iterationCount, myLM, myMotor, output, pause(), pauseToolbar, playOneStepToolbar, playToolbar, refreshDtChanged(), refreshDtModified(), LoadsSimulationDriver::resetTMaxToDefault(), rewind(), rewindToolbar, LoadsSimulationDriver::setDt(), LoadsSimulationDriver::setRefreshDt(), LoadsSimulationDriver::setTime(), LoadsSimulationDriver::setTMax(), simDriver, simulate(), simulateOneStep(), simulationToolBar, tLineEditToolbar, tMaxChanged(), tMaxModified(), ui, updateDisplay(), video, and videoToggled().
|
virtual |
|
virtualslot |
adding a animation motor add-on (in the 2nd tab)
References loadAddon().
Referenced by LoadsSimulation().
| void LoadsSimulation::addTab | ( | QWidget * | w | ) |
add a tabulation (will be remove when the current animation motor add-on will be removed
References ui.
Referenced by loadAddon().
|
virtualslot |
References output, outputDir, and ui.
Referenced by LoadsSimulation().
|
slot |
do one step of simulation
References LoadsManager::ADD_ON, AnimationMotorAddon::doMove(), elapsed, LoadsManager::getAtomDataDisplay(), LoadsSimulationDriver::getDt(), PhysicalModel::getName(), LoadsSimulationDriver::getNextRefreshTime(), PMManagerDC::getPhysicalModel(), LoadsManager::getPMManagerDC(), LoadsSimulationDriver::getRefreshDt(), LoadsSimulationDriver::getTime(), AnimationMotorAddon::getTime(), LoadsSimulationDriver::getTMax(), imageId, LoadsSimulationDriver::isTimerActive(), iterationCount, myLM, myMotor, outputDir, pause(), LoadsManager::setAtomDataDisplay(), LoadsSimulationDriver::setLoads(), simDriver, LoadsSimulationDriver::slower(), ui, updateDisplay(), and video.
Referenced by LoadsSimulation(), simulate(), and simulateOneStep().
|
virtualslot |
References bgColor, LoadsSimulationDriver::setDt(), simDriver, and ui.
Referenced by LoadsSimulation().
|
virtualslot |
References ui.
Referenced by LoadsSimulation().
|
private |
set the rew,play,pause,step buttons enable or not
References pauseToolbar, playOneStepToolbar, playToolbar, rewindToolbar, tLineEditToolbar, and ui.
Referenced by init(), and loadAddon().
| double LoadsSimulation::getTime | ( | ) | const |
get the actual time
References LoadsSimulationDriver::getTime(), and simDriver.
|
slot |
init display
References enableButtons(), LoadsManager::getAnimationMotorAddonLocation(), loadAddon(), myLM, myMotor, and updateDisplay().
|
private |
load a animation motor add-on using a filename (shared lib location)
References addonFilename, addTab(), enableButtons(), AnimationMotorAddon::getDescription(), AnimationMotorAddon::getMotorWidget(), myLM, myMotor, LoadsManager::setAnimationMotorAddonLocation(), and ui.
Referenced by addAnimationMotorAddon(), and init().
|
slot |
Slot called when the button Pause is clicked.
References LoadsSimulationDriver::getRefreshDt(), LoadsSimulationDriver::setRefreshDt(), simDriver, LoadsSimulationDriver::stopTimer(), and updateDisplay().
Referenced by doOneStep(), LoadsSimulation(), and rewind().
|
virtualslot |
References bgColor, LoadsSimulationDriver::setRefreshDt(), simDriver, and ui.
Referenced by LoadsSimulation().
|
virtualslot |
References ui.
Referenced by LoadsSimulation().
|
virtualslot |
dialog is closed
References simDriver, and LoadsSimulationDriver::stopTimer().
|
slot |
Slot called when the button Rewind is clicked.
References elapsed, imageId, iterationCount, myMotor, pause(), AnimationMotorAddon::restart(), LoadsSimulationDriver::setLoads(), LoadsSimulationDriver::setTime(), simDriver, ui, and updateDisplay().
Referenced by LoadsSimulation().
|
slot |
Slot called when the button Play is clicked.
References doOneStep(), LoadsSimulationDriver::isTimerActive(), LoadsSimulationDriver::maxSpeed(), simDriver, and LoadsSimulationDriver::startTimer().
Referenced by LoadsSimulation().
|
slot |
|
virtualslot |
References bgColor, LoadsSimulationDriver::setTMax(), simDriver, and ui.
Referenced by LoadsSimulation().
|
virtualslot |
References ui.
Referenced by LoadsSimulation().
| void LoadsSimulation::updateAtomData | ( | ) |
only update atom data
References simDriver, and LoadsSimulationDriver::updateAtomData().
| void LoadsSimulation::updateDisplay | ( | bool | force | ) |
update the display (the boolean indicates if the scene3d has to be refresh or not)
| force | if true force display update independently from refresh dt (default is false) |
References simDriver, LoadsSimulationDriver::updateDisplay(), and updateTime().
Referenced by doOneStep(), init(), LoadsSimulation(), pause(), and rewind().
| void LoadsSimulation::updateTime | ( | bool | getMotorTime = false | ) |
update time display
| getMotorTime | if force is true, then the time taken by the method is not the simulation driver time, but the animation motor add-on time. |
References LoadsSimulationDriver::getTime(), AnimationMotorAddon::getTime(), myMotor, LoadsSimulationDriver::setTime(), simDriver, tLineEditToolbar, and ui.
Referenced by updateDisplay().
|
virtualslot |
References output, outputDir, ui, and video.
Referenced by LoadsSimulation().
|
private |
Referenced by loadAddon().
|
private |
the initial bg color
Referenced by dtChanged(), LoadsSimulation(), refreshDtChanged(), and tMaxChanged().
|
private |
total elapsed time (to calculate simulator frequency)
Referenced by doOneStep(), LoadsSimulation(), and rewind().
|
private |
the number of screenshots
Referenced by doOneStep(), LoadsSimulation(), and rewind().
|
private |
total nr of iteration computed (to calculate simulator frequency)
Referenced by doOneStep(), LoadsSimulation(), and rewind().
|
private |
the load manager
Referenced by doOneStep(), init(), loadAddon(), and LoadsSimulation().
|
private |
the motor
Referenced by doOneStep(), init(), loadAddon(), LoadsSimulation(), rewind(), updateTime(), and ~LoadsSimulation().
|
private |
if there is no output directory we can't make video
Referenced by chooseOutputDir(), LoadsSimulation(), videoToggled(), and ~LoadsSimulation().
|
private |
the output directory name for making videos
Referenced by chooseOutputDir(), doOneStep(), and videoToggled().
|
private |
the output directory name for making videos
|
private |
Referenced by enableButtons(), and LoadsSimulation().
|
private |
Referenced by enableButtons(), and LoadsSimulation().
|
private |
Referenced by enableButtons(), and LoadsSimulation().
|
private |
toolbar buttons
Referenced by enableButtons(), and LoadsSimulation().
|
private |
the code core for the display of a loads
Referenced by doOneStep(), dtChanged(), getTime(), LoadsSimulation(), pause(), refreshDtChanged(), reject(), rewind(), simulate(), tMaxChanged(), updateAtomData(), updateDisplay(), updateTime(), and ~LoadsSimulation().
|
private |
the tool bar
Referenced by LoadsSimulation(), and ~LoadsSimulation().
|
private |
toolbar t line edit
Referenced by enableButtons(), LoadsSimulation(), and updateTime().
|
private |
the ui dialog designed in qtdesigner
Referenced by addTab(), chooseOutputDir(), doOneStep(), dtChanged(), dtModified(), enableButtons(), loadAddon(), LoadsSimulation(), refreshDtChanged(), refreshDtModified(), rewind(), tMaxChanged(), tMaxModified(), updateTime(), videoToggled(), and ~LoadsSimulation().
|
private |
record video or not?
Referenced by doOneStep(), LoadsSimulation(), videoToggled(), and ~LoadsSimulation().
1.8.13