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

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...
 
LoadsManagermyLM
 the load manager More...
 
AnimationMotorAddonmyMotor
 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...
 
LoadsSimulationDriversimDriver
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LoadsSimulation()

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

◆ ~LoadsSimulation()

LoadsSimulation::~LoadsSimulation ( )
virtual

Destructor.

References myMotor, output, simDriver, simulationToolBar, ui, and video.

Member Function Documentation

◆ addAnimationMotorAddon

void LoadsSimulation::addAnimationMotorAddon ( )
virtualslot

adding a animation motor add-on (in the 2nd tab)

References loadAddon().

Referenced by LoadsSimulation().

◆ addTab()

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

◆ chooseOutputDir

void LoadsSimulation::chooseOutputDir ( )
virtualslot

References output, outputDir, and ui.

Referenced by LoadsSimulation().

◆ doOneStep

bool LoadsSimulation::doOneStep ( )
slot

◆ dtChanged

void LoadsSimulation::dtChanged ( )
virtualslot

◆ dtModified

void LoadsSimulation::dtModified ( )
virtualslot

References ui.

Referenced by LoadsSimulation().

◆ enableButtons()

void LoadsSimulation::enableButtons ( bool  enable)
private

set the rew,play,pause,step buttons enable or not

References pauseToolbar, playOneStepToolbar, playToolbar, rewindToolbar, tLineEditToolbar, and ui.

Referenced by init(), and loadAddon().

◆ getTime()

double LoadsSimulation::getTime ( ) const

get the actual time

References LoadsSimulationDriver::getTime(), and simDriver.

◆ init

void LoadsSimulation::init ( )
slot

◆ loadAddon()

void LoadsSimulation::loadAddon ( QString  addonFile)
private

◆ pause

void LoadsSimulation::pause ( )
slot

◆ refreshDtChanged

void LoadsSimulation::refreshDtChanged ( )
virtualslot

◆ refreshDtModified

void LoadsSimulation::refreshDtModified ( )
virtualslot

References ui.

Referenced by LoadsSimulation().

◆ reject

void LoadsSimulation::reject ( )
virtualslot

dialog is closed

References simDriver, and LoadsSimulationDriver::stopTimer().

◆ rewind

void LoadsSimulation::rewind ( )
slot

◆ simulate

void LoadsSimulation::simulate ( )
slot

◆ simulateOneStep

void LoadsSimulation::simulateOneStep ( )
slot

Slot called when the next step is clicked.

References doOneStep().

Referenced by LoadsSimulation().

◆ tMaxChanged

void LoadsSimulation::tMaxChanged ( )
virtualslot

◆ tMaxModified

void LoadsSimulation::tMaxModified ( )
virtualslot

References ui.

Referenced by LoadsSimulation().

◆ updateAtomData()

void LoadsSimulation::updateAtomData ( )

only update atom data

References simDriver, and LoadsSimulationDriver::updateAtomData().

◆ updateDisplay()

void LoadsSimulation::updateDisplay ( bool  force)

update the display (the boolean indicates if the scene3d has to be refresh or not)

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

◆ updateTime()

void LoadsSimulation::updateTime ( bool  getMotorTime = false)

update time display

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

◆ videoToggled

void LoadsSimulation::videoToggled ( bool  state)
virtualslot

References output, outputDir, ui, and video.

Referenced by LoadsSimulation().

Member Data Documentation

◆ addonFilename

QString LoadsSimulation::addonFilename
private

Referenced by loadAddon().

◆ bgColor

QColor LoadsSimulation::bgColor
private

the initial bg color

Referenced by dtChanged(), LoadsSimulation(), refreshDtChanged(), and tMaxChanged().

◆ elapsed

double LoadsSimulation::elapsed
private

total elapsed time (to calculate simulator frequency)

Referenced by doOneStep(), LoadsSimulation(), and rewind().

◆ imageId

unsigned int LoadsSimulation::imageId
private

the number of screenshots

Referenced by doOneStep(), LoadsSimulation(), and rewind().

◆ iterationCount

double LoadsSimulation::iterationCount
private

total nr of iteration computed (to calculate simulator frequency)

Referenced by doOneStep(), LoadsSimulation(), and rewind().

◆ myLM

LoadsManager* LoadsSimulation::myLM
private

the load manager

Referenced by doOneStep(), init(), loadAddon(), and LoadsSimulation().

◆ myMotor

AnimationMotorAddon* LoadsSimulation::myMotor
private

◆ output

bool LoadsSimulation::output
private

if there is no output directory we can't make video

Referenced by chooseOutputDir(), LoadsSimulation(), videoToggled(), and ~LoadsSimulation().

◆ outputDir

QString LoadsSimulation::outputDir
private

the output directory name for making videos

Referenced by chooseOutputDir(), doOneStep(), and videoToggled().

◆ outputDirName

QString LoadsSimulation::outputDirName
private

the output directory name for making videos

◆ pauseToolbar

QAction* LoadsSimulation::pauseToolbar
private

Referenced by enableButtons(), and LoadsSimulation().

◆ playOneStepToolbar

QAction* LoadsSimulation::playOneStepToolbar
private

Referenced by enableButtons(), and LoadsSimulation().

◆ playToolbar

QAction* LoadsSimulation::playToolbar
private

Referenced by enableButtons(), and LoadsSimulation().

◆ rewindToolbar

QAction* LoadsSimulation::rewindToolbar
private

toolbar buttons

Referenced by enableButtons(), and LoadsSimulation().

◆ simDriver

LoadsSimulationDriver* LoadsSimulation::simDriver
private

◆ simulationToolBar

QToolBar* LoadsSimulation::simulationToolBar
private

the tool bar

Referenced by LoadsSimulation(), and ~LoadsSimulation().

◆ tLineEditToolbar

QLineEdit* LoadsSimulation::tLineEditToolbar
private

toolbar t line edit

Referenced by enableButtons(), LoadsSimulation(), and updateTime().

◆ ui

Ui::AnimationMotorDialog* LoadsSimulation::ui
private

◆ video

bool LoadsSimulation::video
private

record video or not?

Referenced by doOneStep(), LoadsSimulation(), videoToggled(), and ~LoadsSimulation().


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