Computer Assited Medical Intervention Tool Kit  version 5.0
SofaWidget.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 SIMULATOR_SIMULATORS_SOFA_SOFAWIDGET_H
27 #define SIMULATOR_SIMULATORS_SOFA_SOFAWIDGET_H
28 
29 #include <QProcess>
30 
31 #include "SimulatorWidget.h"
32 #include "SofaSimulator.h"
33 #include "Xmlhighlighter.h"
34 
35 #include "ui_SofaWidget.h"
36 
44 class SofaWidget: public SimulatorWidget {
45  Q_OBJECT
46 
47 public:
49  SofaWidget(QWidget* parent = 0, SofaSimulator* sofaSimulator = NULL);
51  ~SofaWidget();
52 
56  void writeScn(QString path);
57 
58 
59 public slots:
61  void runSofa();
63  void applyChanges();
65  void sofaExited();
66 
67 private:
69  Ui::ui_SofaWidget ui;
71  std::string scnFile;
73  std::string scnFileTemp;
78 
79 };
80 
81 #endif
SofaSimulator.h
SofaWidget::SofaWidget
SofaWidget(QWidget *parent=0, SofaSimulator *sofaSimulator=NULL)
constructor
Definition: SofaWidget.cpp:36
SofaWidget::~SofaWidget
~SofaWidget()
destructor
Definition: SofaWidget.cpp:61
SofaWidget::ui
Ui::ui_SofaWidget ui
the ui widget designed in qtdesigner
Definition: SofaWidget.h:92
SimulatorWidget::reload
void reload()
SofaWidget::scnFileTemp
std::string scnFileTemp
temp copy of scn filr
Definition: SofaWidget.h:96
SofaWidget::sofaExited
void sofaExited()
slot called when sofa is finished
Definition: SofaWidget.cpp:116
Xmlhighlighter.h
SofaWidget::xmlHighlighter
XmlHighlighter * xmlHighlighter
xml highlighter
Definition: SofaWidget.h:98
SofaWidget::writeScn
void writeScn(QString path)
write text typed in the highlighted QTextEdit into a scn file
Definition: SofaWidget.cpp:105
SofaWidget::sofaSimulator
SofaSimulator * sofaSimulator
the sofa simulator
Definition: SofaWidget.h:100
SofaWidget::applyChanges
void applyChanges()
slot called when apply changes is pressed
Definition: SofaWidget.cpp:68
XmlHighlighter
TODO Comment class here.
Definition: Xmlhighlighter.h:51
SofaWidget
TODO Comment class here.
Definition: SofaWidget.h:44
SimulatorWidget.h
SimulatorWidget
A widget specific of the simulator to add in the gui all simulator widget have to derive from this cl...
Definition: SimulatorWidget.h:40
SofaWidget::runSofa
void runSofa()
slot called when runSofa button is pressed
Definition: SofaWidget.cpp:78
SofaWidget::scnFile
std::string scnFile
sofa scn file
Definition: SofaWidget.h:94
SofaSimulator::getScnFile
std::string getScnFile()
Definition: SofaSimulator.h:203
SofaSimulator
TODO Comment class here.
Definition: SofaSimulator.h:69
SofaWidget.h