YANE-Framework 1.1.0
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes

yane::ModelQt2::SimulatorWidget Class Reference

Central visualization widget. More...

Collaboration diagram for yane::ModelQt2::SimulatorWidget:
[legend]

List of all members.

Public Slots

void reset ()
 Slot which triggers the computing thread to be resetted.
void setControl (const QVarLengthArray< double > &control)
 Function to set the control within the computing thread.
void setState (const QVarLengthArray< double > &state)
 Function to set the state within the computing thread.
void setTime (double sec)
 Function to set the time within the computing thread.
void start ()
 Slot which triggers the computing thread to start.
void stop ()
 Slot which triggers the computing thread to stop.

Signals

void simulationFinished ()
 Signal which emit the signal that the simulation is finished.

Public Member Functions

void setIntervalTime (double sec=INFINITY)
 Function to set the maximally tolerated computing time.
 SimulatorWidget (yane::Model::Model *model, QWidget *modelwidget, QWidget *parent=0)
 Constructor.
QVarLengthArray< double > state ()
 Function to return the current state value computed in SimulatorThread _thread.
void waitUntilThreadFinished ()
 Funtion to hold the program until the computing thread is finished.
 ~SimulatorWidget ()
 Destructor.

Protected Slots

void simulationStopped ()
 Slot used to stop the simulation.

Protected Member Functions

virtual void closeEvent (QCloseEvent *event)
 Function to close the window and shut down the computation.

Protected Attributes

ModelInfo * _modelinfo
 Model and its configuration used within the SimulatorWidget.
QWidget * _modelwidget
 Visualization widget provided by the class Model object.
SimulatorThread_thread
 Pointer of the thread used for simulation.

Detailed Description

SimulatorWidget


Constructor & Destructor Documentation

yane::ModelQt2::SimulatorWidget::SimulatorWidget ( yane::Model::Model model,
QWidget *  modelwidget,
QWidget *  parent = 0 
)
Parameters:
modela model object
modelwidgetthe display widget of the model
parentParenting QWidget

Member Function Documentation

void yane::ModelQt2::SimulatorWidget::closeEvent ( QCloseEvent *  event) [protected, virtual]
Parameters:
eventQCloseEvent which triggers closing down all widgets and computations
void yane::ModelQt2::SimulatorWidget::setControl ( const QVarLengthArray< double > &  control) [slot]
Parameters:
controlControl variable
void yane::ModelQt2::SimulatorWidget::setIntervalTime ( double  sec = INFINITY)
Parameters:
secMaximally tolerated computing time in seconds
void yane::ModelQt2::SimulatorWidget::setState ( const QVarLengthArray< double > &  state) [slot]
Parameters:
stateState variable
void yane::ModelQt2::SimulatorWidget::setTime ( double  sec) [slot]
Parameters:
secTime in seconds
QVarLengthArray< double > yane::ModelQt2::SimulatorWidget::state ( )
Returns:
Current state value