Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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-2014 UJF-Grenoble 1, 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 class QDockWidget;
34 
35 class MMLDisplay;
36 class MMLComponentPopup;
38 class PMManagerDC;
48 Q_OBJECT
49 
50  public:
51 
53  MMLComponent(const QString &) throw(camitk::AbortException);
54 
56  virtual ~MMLComponent();
57 
60 
64  bool save();
65 
67 
75  void connectPml();
76 
78  virtual QMenu * getPopupMenu(QWidget* parent);
79 
81  bool isDockVisible();
83  void setDockVisible(bool visible);
84 
86  void saveMML();
87 
89  virtual bool getModified() const;
90 
91  private:
92 
95 
97  QDockWidget *mmlDock;
98 
101 
104 
106  QString exportedMml;
107 
110 };
111 
112 
113 #endif
MMLComponentPopup * myPopupMenu
the popup menu
Definition: MMLComponent.h:109
The manager of the physical model data.
Definition: PMManagerDC.h:97
virtual QMenu * getPopupMenu(QWidget *parent)
Overriden method so that we actually can build a popup menu with different actions.
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:44
bool save()
save the current mml in the current file name.
TODO Describe the class here.
Definition: MMLDisplay.h:45
MMLComponent(const QString &)
Default constructor: give it the name of the file containing the data (.mml file) ...
void setDockVisible(bool visible)
show or hide mmlDock
This class manage an MML monitoring document ".mml".
Definition: MMLComponent.h:47
A GUI to manipulate mml documents.
Definition: MonitoringGuiManager.h:43
void initRepresentation()
Instanciate the concrete representation (either InterfaceGeometry or InterfaceBitMap) if needed...
Definition: MMLComponent.h:66
QString exportedMml
when a .scn is loaded, name of the automatically exported mml file (empty string otherwise) ...
Definition: MMLComponent.h:106
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:292
void saveMML()
save the mml in the current filename (and the pml if needed)
MMLDisplay * getDisplay()
get the display
PMManagerDC * pmMgr
physical model manager
Definition: MMLComponent.h:100
MonitoringGuiManager * mmlGUI
the mml GUI class is used directly
Definition: MMLComponent.h:94
QDockWidget * mmlDock
to put the mmlGUI
Definition: MMLComponent.h:97
virtual bool getModified() const
check if the mml or pml were modified in the UI
bool isDockVisible()
return true if mmlDock is visible
PMManagerDC * getPMManager()
get Physical model manager
A popup monu for MML component Acessible when rigth cliking on the component.
Definition: MMLComponentPopup.h:39
virtual ~MMLComponent()
destructor
MonitoringGuiManager * getMonitoringGuiManager()
get MonitoringGuiManager
void connectPml()
connect pml
MMLDisplay * display
display manager
Definition: MMLComponent.h:103