Computer Assited Medical Intervention Tool Kit  version 4.0
MultiComponentDC.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2016 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 MultipleComponentDC_H
27 #define MultipleComponentDC_H
28 
29 #include <pml/MultiComponent.h>
31 #include "ComponentDC.h"
32 
33 
35 class QPixmap;
36 
37 class QMenu;
38 
51  Q_OBJECT
52 public:
54  virtual ~MultiComponentDC();
55 
57  virtual QMenu * getPopupMenu(QWidget* parent);
58 
60  MultiComponent * getMultiComponent();
61 
63  MultiComponentDC * addSubMC(MultiComponent *);
64 
67 
69  virtual void addChild(InterfaceNode *);
70 
72  virtual void removeChild(InterfaceNode *);
73 
75  virtual QPixmap getIcon();
76 
77 private:
79  void initRepresentation() {};
80 
83 
85  static QPixmap * myPixmap;
86 };
87 
88 
90  return dynamic_cast<MultiComponent *>(myComponent);
91 }
92 
93 #endif
MultiComponentDCPopup * myPopupMenu
the popup menu
Definition: MultiComponentDC.h:79
::Component * myComponent
the managed Component
Definition: ComponentDC.h:103
The manager of the physical model data.
Definition: PMManagerDC.h:97
#define PHYSICALMODEL_COMPONENT_API
Definition: PMComponentAPI.h:54
The manager of the MultiComponent data.
Definition: MultiComponentDC.h:50
virtual QPixmap getIcon()
Get the pixmap that will be displayed for this node.
Definition: MeshComponent.cpp:870
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
The popup menu of the multi component data component.
Definition: MultiComponentDCPopup.h:39
virtual void initRepresentation()
the concrete building of the 3D objects (Slice/Geometry): none in this case, everything is done by in...
Definition: MeshComponent.h:340
The manager of the Component data.
Definition: ComponentDC.h:43
virtual void addChild(InterfaceNode *)
add a child Component (sub item in the hierarchy), and modify the child&#39;s parent to be equal to this ...
Definition: sdk/libraries/core/component/Component.cpp:585
virtual QMenu * getPopupMenu(QWidget *parent=0)
get the popup menu to display (always return NULL, overwrite this method if you want to give here you...
Definition: sdk/libraries/core/component/Component.h:571
MultiComponent * getMultiComponent()
convenient method to get the managed mc
Definition: MultiComponentDC.h:89
The manager of the Structural component data.
Definition: StructuralComponentDC.h:83
virtual void removeChild(InterfaceNode *)
remove from the the sub item vector.
Definition: sdk/libraries/core/component/Component.cpp:617
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
static QPixmap * myPixmap
the MultiComponentDC pixmap
Definition: MultiComponentDC.h:85
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44