Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ComponentDC.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 ComponentDC_H
28 #define ComponentDC_H
29 
30 #include <pml/Component.h>
31 #include <MeshComponent.h>
32 
33 class PMManagerDC;
34 #include "PMComponentAPI.h"
44  Q_OBJECT
45 public:
47  ComponentDC(camitk::Component *parent, PMManagerDC * pmManagerDC, ::Component * c=NULL);
48 
49  virtual ~ComponentDC() {};
50 
56  virtual void setOpacity(const double);
58 
59  virtual const EnhancedModes getEnhancedModes() const;
60 
61  virtual const RenderingModes getRenderingModes() const;
62 
63  virtual void setName(const QString &);
64 
66  virtual void deleteChildren() {}
68 
70  ::Component * getComponent();
71 
73  virtual PMManagerDC * getPMManagerDC() { return myPMManagerDC; }
74 
79  virtual void createPointData();
80 
82  virtual void destroyPointData();
83 
85  virtual QObject* getPropertyObject() {
86  return this;
87  }
88 
90  virtual void updateProperty(QString name, QVariant value);
91 
92 protected:
93 
96 
99 };
100 
101 
103  return ((::Component *)myComponent);
104 }
105 
106 inline void ComponentDC::setName(const QString &n) {
107  getComponent()->setName(n.toStdString());
109 }
110 
111 #endif
::Component * myComponent
the managed Component
Definition: ComponentDC.h:98
The manager of the physical model data.
Definition: PMManagerDC.h:97
#define PHYSICALMODEL_COMPONENT_API
Definition: PMComponentAPI.h:54
Definition: ExtensionWindow.h:41
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:44
virtual void setOpacity(const double)=0
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified! ...
void setName(const std::string)
set the name of the component
Definition: modeling/libraries/pml/Component.h:150
virtual QObject * getPropertyObject()
show all properties
Definition: ComponentDC.h:85
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:292
The manager of the Component data.
Definition: ComponentDC.h:43
virtual const EnhancedModes getEnhancedModes() const =0
get the current enhanced mode
void updateProperty(QString, QVariant)
update property: empty method.
Definition: MeshComponent.h:94
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
virtual ~ComponentDC()
Definition: ComponentDC.h:49
virtual const InterfaceGeometry::RenderingModes getRenderingModes() const
see Component.cpp
virtual PMManagerDC * getPMManagerDC()
get the PMManagerDC (given during instanciation), allows to get PML/Component maps ...
Definition: ComponentDC.h:73
PMManagerDC * myPMManagerDC
the PMManagerDC
Definition: ComponentDC.h:95
::Component * getComponent()
return the component that this dc is managing
Definition: ComponentDC.h:102
virtual void setName(const QString &)
set the name to be displayed
Definition: ComponentDC.h:106
virtual void deleteChildren()
remove a sub DC: overloaded method to avoir deletion of children that are used in more than one SCDC ...
Definition: ComponentDC.h:66
virtual void setName(const QString &)
set the name to be displayed
Definition: sdk/libraries/core/component/Component.h:814