Computer Assited Medical Intervention Tool Kit  version 5.0
MonitoringGuiManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef MONITORINGGUIMANAGER_H
27 #define MONITORINGGUIMANAGER_H
28 
29 #include "MMLMonitoringGUIAPI.h"
30 
31 #include <QObject>
32 
33 // Monitor includes
35 
36 class MonitoringDialog;
37 class MonitoringDriver;
45 class /* needed if you monitoringgui is compiled as shared: MML_MONITORING_GUI_API*/ MonitoringGuiManager : public QObject {
46 
47  Q_OBJECT
48 
49 public:
50 
53 
55  ~MonitoringGuiManager() override;
56 
63 
65  bool loadMmlInFile(QString fileName);
67  bool saveMmlOutFile(QString fileName);
69  bool saveMmlInFile(QString fileName);
71  bool saveCsvFile(QString fileName);
72 
74  void updateDt(double dt);
76  void updateRefresh(double refresh);
78  void updatePml(QString fileName);
80  void updateLml(QString fileName);
81 
83  void pause();
85  void simulate();
87  void simulateOneStep();
89  void rewind();
90 
91 public slots:
92 
96  bool doOneStep();
98  void reload();
99 
100 signals:
102  void changed();
104  void reconnectPml();
105 
106 private :
107 
116 
117 
118 };
119 
120 #endif // MONITORINGGUIMANAGER_H
MonitoringManagerFactory.h
MonitoringManager::setRefresh
void setRefresh(double refresh)
change refresh and save modification into mmlIn
Definition: MonitoringManager.cpp:399
MonitoringGuiManager::doOneStep
bool doOneStep()
do one step of simulation
Definition: MonitoringGuiManager.cpp:80
MonitoringGuiManager::reconnectPml
void reconnectPml()
MonitoringDriver.h
MonitoringGuiManager::dialog
MonitoringDialog * dialog
the dialog box
Definition: MonitoringGuiManager.h:109
MonitoringDriver::startTimer
void startTimer()
starts the timer that will repeatedly call play and emit doOneStep
Definition: MonitoringDriver.cpp:68
MonitoringGuiManager::updatePml
void updatePml(QString fileName)
update pml
Definition: MonitoringGuiManager.cpp:228
MonitoringManager::setDt
void setDt(double dt)
change dt and save modification into mmlIn
Definition: MonitoringManager.cpp:393
MonitoringManager::setLmlFileName
void setLmlFileName(const char *file)
change lml file name and save modification into mmlIn
Definition: MonitoringManager.cpp:405
MonitoringGuiManager::lastRefreshTime
double lastRefreshTime
last refresh time
Definition: MonitoringGuiManager.h:115
MonitoringDialog::updateSimulation
void updateSimulation()
update simulation tab
Definition: MonitoringDialog.cpp:288
MonitoringDialog
TODO Comment class here.
Definition: MonitoringDialog.h:50
MonitoringGuiManager::getDialog
MonitoringDialog * getDialog()
get dialog
Definition: MonitoringGuiManager.cpp:64
MonitoringDialog.h
MonitoringGuiManager::saveMmlInFile
bool saveMmlInFile(QString fileName)
Save MMLIn file.
Definition: MonitoringGuiManager.cpp:211
MonitoringGuiManager::reload
void reload()
reload simulation with current parameters
Definition: MonitoringGuiManager.cpp:170
MonitoringGuiManager::monitoringManager
MonitoringManager * monitoringManager
Monitoring manager.
Definition: MonitoringGuiManager.h:113
MonitoringDialog::init
void init()
initialize dialog
Definition: MonitoringDialog.cpp:99
MonitoringDriver
TODO Comment class here.
Definition: MonitoringDriver.h:41
MonitoringManager::writeOutput
void writeOutput(const char *fileName)
Write all saved monitors' states into mmlOut file.
Definition: MonitoringManager.cpp:137
MonitoringDialog::updateAll
void updateAll()
update all tabs
Definition: MonitoringDialog.cpp:225
MonitoringDriver::isTimerActive
bool isTimerActive()
is the timer currently running
Definition: MonitoringDriver.cpp:78
MMLMonitoringGUIAPI.h
MonitoringDriver::stopTimer
void stopTimer()
stop the timer
Definition: MonitoringDriver.cpp:73
MonitoringManager::saveMmlIn
void saveMmlIn(const char *fileName)
save current version of mml in
Definition: MonitoringManager.cpp:417
MonitoringGuiManager
A GUI to manipulate mml documents.
Definition: MonitoringGuiManager.h:45
MonitoringGuiManager::loadMmlInFile
bool loadMmlInFile(QString fileName)
Load a MMLIn file.
Definition: MonitoringGuiManager.cpp:181
MonitoringGuiManager::MonitoringGuiManager
MonitoringGuiManager()
constructor
Definition: MonitoringGuiManager.cpp:35
MonitoringGuiManager::pause
void pause()
pause simulation
Definition: MonitoringGuiManager.cpp:156
MonitoringGuiManager::~MonitoringGuiManager
~MonitoringGuiManager() override
destructor
Definition: MonitoringGuiManager.cpp:47
MonitoringGuiManager::simulateOneStep
void simulateOneStep()
do one step of simulation
Definition: MonitoringGuiManager.cpp:144
MonitoringManager::rewind
void rewind()
Rewind simulation.
Definition: MonitoringManager.cpp:445
MonitoringGuiManager::saveMmlOutFile
bool saveMmlOutFile(QString fileName)
Save MMLout file.
Definition: MonitoringGuiManager.cpp:198
MonitoringManager::init
virtual bool init()=0
Initialize manager.
MonitoringGuiManager.h
MonitoringManager::setPmlFileName
void setPmlFileName(const char *file)
change pml file name and save modification into mmlIn
Definition: MonitoringManager.cpp:411
MonitoringManager::getRefresh
double getRefresh()
Definition: MonitoringManager.cpp:232
MonitoringGuiManager::changed
void changed()
emitted when one step of simulation is done, there was changes, so maybe there are some display to up...
MonitoringManager
Manager of the benchmark tests. Do simulation loop and tests.
Definition: MonitoringManager.h:50
MonitoringManager::doMove
virtual void doMove()=0
Do one step of simulation and save monitors for this step.
MonitoringGuiManager::simulate
void simulate()
do simulation lopp
Definition: MonitoringGuiManager.cpp:132
MonitoringGuiManager::updateDt
void updateDt(double dt)
update dt
Definition: MonitoringGuiManager.cpp:218
MonitoringManager::writeCsv
void writeCsv(const char *fileName)
Write all saved monitors'state into csv file.
Definition: MonitoringManager.cpp:168
MonitoringGuiManager::updateLml
void updateLml(QString fileName)
update lml
Definition: MonitoringGuiManager.cpp:233
MonitoringGuiManager::driver
MonitoringDriver * driver
the simulation driver
Definition: MonitoringGuiManager.h:111
MonitoringGuiManager::updateRefresh
void updateRefresh(double refresh)
update refresh
Definition: MonitoringGuiManager.cpp:223
MonitoringGuiManager::getMonitoringManager
MonitoringManager * getMonitoringManager()
get Monitoring Manager
Definition: MonitoringGuiManager.cpp:74
MonitoringManager::checkStop
virtual bool checkStop()=0
Check if simulation is finished.
MonitoringManager::getCurrentTime
double getCurrentTime()
Definition: MonitoringManager.cpp:237
MonitoringManagerFactory::createManager
static MonitoringManager * createManager(const char *mml)
create an interactive or noninteractive manager according to simulator type
Definition: MonitoringManagerFactory.cpp:32
camitk::refresh
void refresh()
refresh the display
MonitoringManager::reload
void reload(bool delPml=true)
reload simulation with current parameters
Definition: MonitoringManager.cpp:462
MonitoringDriver::init
void init()
Definition: MonitoringDriver.cpp:46
MonitoringGuiManager::saveCsvFile
bool saveCsvFile(QString fileName)
Save csv file.
Definition: MonitoringGuiManager.cpp:204
MonitoringGuiManager::getDriver
MonitoringDriver * getDriver()
get driver
Definition: MonitoringGuiManager.cpp:69
MonitoringGuiManager::rewind
void rewind()
rewind simulation
Definition: MonitoringGuiManager.cpp:161