Computer Assited Medical Intervention Tool Kit  version 5.0
MMLComponent.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 
27 #ifndef MMLCOMPONENT_H
28 #define MMLCOMPONENT_H
29 
30 #include <camitkcore/Component.h> // Nico: do not remove the camitkcore/ prefix
31 
32 #include <QObject>
33 #include "MMLComponentAPI.h"
34 
35 class QDockWidget;
36 
37 class MMLDisplay;
39 class PMLComponent;
49  Q_OBJECT
50 
51 public:
52 
56  MMLComponent(const QString&);
57 
59  virtual ~MMLComponent();
60 
63 
67  bool save();
68 
70  void initRepresentation() {};
71 
78  virtual void setSelected(const bool b, const bool recursive = true);
79 
81 
83  MonitoringGuiManager* getMonitoringGuiManager();
84 
86  PMLComponent* getPMLComponent();
87 
89  MMLDisplay* getDisplay();
90 
92  void connectPml();
93 
95  void saveMML();
96 
98  virtual bool getModified() const;
99 
100 private:
101 
104 
107 
110 
112  QString exportedMml;
113 
116 
117 };
118 
119 
120 #endif
MMLComponent::pmlComponent
PMLComponent * pmlComponent
physical model manager
Definition: MMLComponent.h:106
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
MMLComponentAPI.h
MonitoringManager::takePml
PhysicalModel * takePml()
This is nearly the same as getPml(), but it also transfers ownership of the pointer.
Definition: MonitoringManager.cpp:268
MMLComponent::getPMLComponent
PMLComponent * getPMLComponent()
get Physical model manager
Definition: MMLComponent.cpp:157
MMLComponent::MMLComponent
MMLComponent(const QString &)
Default constructor: give it the name of the file containing the data (.mml file) This method may thr...
Definition: MMLComponent.cpp:50
MMLDisplay.h
camitk::Component::getFileName
const QString getFileName() const
get the file name where the data have to be stored/were stored
Definition: sdk/libraries/core/component/Component.cpp:461
MMLComponent::~MMLComponent
virtual ~MMLComponent()
destructor
Definition: MMLComponent.cpp:120
camitk::Component::removeChild
void removeChild(InterfaceNode *) override
remove a child node.
Definition: sdk/libraries/core/component/Component.cpp:550
MonitoringManager.h
camitk::Component::addChild
void addChild(InterfaceNode *) override
add a child Component (sub item in the hierarchy), and modify the child's parent to be equal to this ...
Definition: sdk/libraries/core/component/Component.cpp:542
MMLComponent::getMonitoringGuiManager
MonitoringGuiManager * getMonitoringGuiManager()
get MonitoringGuiManager
Definition: MMLComponent.cpp:152
camitk::Component::setModified
virtual void setModified(bool modified=true)
set the modified flag
Definition: sdk/libraries/core/component/Component.h:943
camitk::Component::myFileName
QString myFileName
the file name from which the Component is loaded
Definition: sdk/libraries/core/component/Component.h:845
MonitoringGuiManager::getDialog
MonitoringDialog * getDialog()
get dialog
Definition: MonitoringGuiManager.cpp:64
MonitoringDialog.h
Action.h
MMLComponent::connectPml
void connectPml()
connect pml
Definition: MMLComponent.cpp:168
MonitoringGuiManager::saveMmlInFile
bool saveMmlInFile(QString fileName)
Save MMLIn file.
Definition: MonitoringGuiManager.cpp:211
Log.h
MonitoringManager::getPmlFileName
std::string getPmlFileName()
Definition: MonitoringManager.cpp:285
MMLComponent::exportedMml
QString exportedMml
when a .scn is loaded, name of the automatically exported mml file (empty string otherwise)
Definition: MMLComponent.h:112
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
camitk::Action::getQAction
virtual QAction * getQAction(Component *target=nullptr)
Get the corresponding QAction.
Definition: Action.cpp:204
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
MMLComponent::saveMML
void saveMML()
save the mml in the current filename (and the pml if needed)
Definition: MMLComponent.cpp:192
MMLComponent
This class manage an MML monitoring document ".mml".
Definition: MMLComponent.h:48
camitk::AbortException
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:66
camitk::Component::setSelected
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag.
Definition: sdk/libraries/core/component/Component.cpp:445
PMLComponent
This class manages a physical model (PML) CamiTK component.
Definition: PMLComponent.h:103
MMLComponent::setSelected
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag (this method is overridden in order to show the default modeling action whe...
Definition: MMLComponent.cpp:139
MonitoringGuiManager.h
MMLComponent::neverSelected
bool neverSelected
the first selection should trigger the pml exporer action (default action)
Definition: MMLComponent.h:115
MMLComponent::display
MMLDisplay * display
display manager
Definition: MMLComponent.h:109
MainWindow.h
MMLCOMPONENT_API
#define MMLCOMPONENT_API
Definition: MMLComponentAPI.h:54
camitk::Component::deleteChildren
void deleteChildren() override final
delete all sub Component, but do not delete the pointer (only the top-level component has the right t...
Definition: sdk/libraries/core/component/Component.cpp:559
MMLComponent::initRepresentation
void initRepresentation()
init the representation (nothing to do, every 3D representation is managed by the PMLComponent)
Definition: MMLComponent.h:70
MonitoringGuiManager::getMonitoringManager
MonitoringManager * getMonitoringManager()
get Monitoring Manager
Definition: MonitoringGuiManager.cpp:74
MMLComponent::getDisplay
MMLDisplay * getDisplay()
get the display
Definition: MMLComponent.cpp:162
MMLDisplay
TODO Describe the class here.
Definition: MMLDisplay.h:47
MMLComponent::getModified
virtual bool getModified() const
check if the mml or pml were modified in the UI
Definition: MMLComponent.cpp:186
MMLDisplay::updateDisplay
void updateDisplay()
slot called when display have to be updated
Definition: MMLDisplay.cpp:78
camitk::Component::refresh
virtual void refresh()
refresh all the viewer that are currently displaying this Component At the end the InterfaceNode modi...
Definition: sdk/libraries/core/component/Component.cpp:286
MMLComponent.h
PMLComponent.h
MMLComponent::mmlGUI
MonitoringGuiManager * mmlGUI
the mml GUI class is used directly
Definition: MMLComponent.h:103
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:302
camitk::Component::getModified
virtual bool getModified() const
set the modified flag
Definition: sdk/libraries/core/component/Component.h:948
Application.h
camitk
Definition: Action.cpp:35