Computer Assited Medical Intervention Tool Kit  version 4.1
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-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 
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 
103  MonitoringGuiManager* mmlGUI;
104 
106  PMLComponent* pmlComponent;
107 
109  MMLDisplay* display;
110 
112  QString exportedMml;
113 
115  bool neverSelected;
116 
117 };
118 
119 
120 #endif
MMLComponent::pmlComponent
PMLComponent * pmlComponent
physical model manager
Definition: MMLComponent.h:105
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:261
MMLComponentAPI.h
MonitoringManager::takePml
PhysicalModel * takePml()
This is nearly the same as getPml(), but it also transfers ownership of the pointer.
Definition: MonitoringManager.cpp:267
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::refresh
virtual void refresh() const
refresh all the viewer that are currently displaying this Component
Definition: sdk/libraries/core/component/Component.cpp:298
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:572
MMLComponent::~MMLComponent
virtual ~MMLComponent()
destructor
Definition: MMLComponent.cpp:120
camitk::Component::removeChild
void removeChild(InterfaceNode *) override
remove from the the sub item vector.
Definition: sdk/libraries/core/component/Component.cpp:582
MonitoringManager.h
camitk::Action::getQAction
QAction * getQAction()
Get the corresponding QAction.
Definition: Action.cpp:182
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:550
MMLComponent::getMonitoringGuiManager
MonitoringGuiManager * getMonitoringGuiManager()
get MonitoringGuiManager
Definition: MMLComponent.cpp:152
camitk::Component::initRepresentation
virtual void initRepresentation()=0
instantiate the concrete representation (either InterfaceGeometry or InterfaceBitMap) if needed.
camitk::Component::setModified
virtual void setModified(bool modified=true)
set the modified flag
Definition: sdk/libraries/core/component/Component.h:881
camitk::Component::myFileName
QString myFileName
the file name from which the Component is loaded
Definition: sdk/libraries/core/component/Component.h:784
MonitoringGuiManager::getDialog
MonitoringDialog * getDialog()
get dialog
Definition: MonitoringGuiManager.cpp:63
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:210
Log.h
MonitoringManager::getPmlFileName
std::string getPmlFileName()
Definition: MonitoringManager.cpp:284
MMLComponent::exportedMml
QString exportedMml
when a .scn is loaded, name of the automatically exported mml file (empty string otherwise)
Definition: MMLComponent.h:111
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:228
MonitoringGuiManager
A GUI to manipulate mml documents.
Definition: MonitoringGuiManager.h:44
MonitoringGuiManager::loadMmlInFile
bool loadMmlInFile(QString fileName)
Load a MMLIn file.
Definition: MonitoringGuiManager.cpp:180
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:47
camitk::AbortException
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:64
camitk::Component::setSelected
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag.
Definition: sdk/libraries/core/component/Component.cpp:557
PMLComponent
This class manages a physical model (PML) CamiTK component.
Definition: PMLComponent.h:98
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:114
MMLComponent::display
MMLDisplay * display
display manager
Definition: MMLComponent.h:108
MainWindow.h
MMLCOMPONENT_API
#define MMLCOMPONENT_API
Definition: MMLComponentAPI.h:53
MonitoringGuiManager::getMonitoringManager
MonitoringManager * getMonitoringManager()
get Monitoring Manager
Definition: MonitoringGuiManager.cpp:73
MMLComponent::getDisplay
MMLDisplay * getDisplay()
get the display
Definition: MMLComponent.cpp:162
MMLDisplay
TODO Describe the class here.
Definition: MMLDisplay.h:46
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::deleteChildren
void deleteChildren() override
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:590
camitk::Component::refreshInterfaceNode
virtual void refreshInterfaceNode()
Asks all viewers that are currently displaying this Component to rebuild the representation of the In...
Definition: sdk/libraries/core/component/Component.cpp:307
MMLComponent.h
PMLComponent.h
MMLComponent::mmlGUI
MonitoringGuiManager * mmlGUI
the mml GUI class is used directly
Definition: MMLComponent.h:102
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:297
camitk::Component::getModified
virtual bool getModified() const
set the modified flag
Definition: sdk/libraries/core/component/Component.h:886
Application.h
camitk
Definition: Action.cpp:36