Computer Assited Medical Intervention Tool Kit  version 4.1
MonitoringDialog.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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 MONITORINGDIALOG_H
27 #define MONITORINGDIALOG_H
28 
29 #include "MMLMonitoringGUIAPI.h"
30 
31 #include <QDialog>
32 class QTableWidget;
33 class QTreeWidgetItem;
34 
35 namespace Ui {
36 class MonitoringDialog;
37 }
38 
40 
41 class StoppingCriterion;
42 
50 class /* needed if you monitoringgui is compiled as shared: MML_MONITORING_GUI_API*/ MonitoringDialog : public QDialog {
51  Q_OBJECT
52 
53 public:
55  MonitoringDialog(MonitoringGuiManager* guiManager, QWidget* parent = nullptr);
57  ~MonitoringDialog() override;
58 
60  void init();
61 
63  void updateAll();
65  void updateMonitors();
67  void updateStoppingCriteria();
69  void updateSimulation();
71  void updateSimulatorWidget();
73  QString getMmlInFileName();
75  QTableWidget* getMonitorsTableWidget();
76 
77 public slots:
79  void browseMmlIn();
81  void saveMmlOut();
83  void saveCsv();
85  void saveMmlIn();
87  void browsePml();
89  void browseLml();
91  void dtModified();
93  void refreshModified();
94 
98  void pause();
101  void simulate();
103  void simulateOneStep();
105  void rewind();
106 
107 signals:
109  void monitorsChanged();
110 
111 
112 private:
114  Ui::MonitoringDialog* ui;
115 
118 
120  QColor bgColor;
121 
123  void enableButtons(bool enable);
124 
126  QTreeWidgetItem* createItem(StoppingCriterion* sc, QTreeWidgetItem* parent);
127 };
128 
129 #endif // MONITORINGDIALOG_H
QColor bgColor
the initial bg color
Definition: MonitoringDialog.h:120
Definition: SettingsDialog.h:31
A GUI to manipulate mml documents.
Definition: MonitoringGuiManager.h:45
TODO Comment class here.
Definition: MonitoringDialog.h:50
MonitoringGuiManager * guiManager
the monitoring manager
Definition: MonitoringDialog.h:117
class which represent the stopping criterion to check to stop simulation a StoppingCriterion is eithe...
Definition: StoppingCriterion.h:48
Ui::MonitoringDialog * ui
the ui dialog designed in qtdesigner
Definition: MonitoringDialog.h:114