Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
sdk/libraries/core/component/Component.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 #ifndef CAMITK_COMPONENT_H
27 #define CAMITK_COMPONENT_H
28 
29 // -- Core stuff
30 #include "InterfaceNode.h"
31 #include "InterfaceGeometry.h"
32 #include "InterfaceBitMap.h"
33 #include "InterfaceProperty.h"
34 #include "AbortException.h"
35 
36 // -- QT stuff
37 #include <QPixmap>
38 #include <QMenu>
39 
40 // -- vtk stuff
41 #include <vtkWindowLevelLookupTable.h>
42 #include <vtkImageData.h>
43 #include <vtkPointSet.h>
44 #include <vtkSmartPointer.h>
45 #include <vtkAlgorithmOutput.h>
46 #include <vtkActor.h>
47 #include <vtkActor2D.h>
48 #include <vtkImageActor.h>
49 
50 // -- vtk stuff Classes
51 class vtkTexture;
52 class vtkPointSet;
53 class vtkUnstructuredGridAlgorithm;
54 class vtkDataSetToUnstructuredGridFilter;
55 class vtkWindowLevelLookupTable;
56 
57 // -----------------------------------------------------------------------
58 //
59 // Delegation macros
60 // (And your dream comes true)
61 //
62 // -----------------------------------------------------------------------
63 
68 #define invoke0(HANDLER,METHOD) \
69 if (HANDLER) \
70  HANDLER->METHOD();
71 
72 #define invoke1(HANDLER,METHOD,PARAM) \
73 if (HANDLER) \
74  HANDLER->METHOD(PARAM);
75 
76 #define invoke2(HANDLER,METHOD,PARAM1,PARAM2) \
77 if (HANDLER) \
78  HANDLER->METHOD(PARAM1,PARAM2);
79 
80 #define invoke3(HANDLER,METHOD,PARAM1,PARAM2,PARAM3) \
81 if (HANDLER) \
82  HANDLER->METHOD(PARAM1,PARAM2,PARAM3);
83 
84 #define invoke4(HANDLER,METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
85 if (HANDLER) \
86  HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);
87 
92 #define invokeGet0(HANDLER,METHOD) \
93 if (HANDLER) \
94  return HANDLER->METHOD();
95 
96 #define invokeGet1(HANDLER,METHOD,PARAM) \
97 if (HANDLER) \
98  return HANDLER->METHOD(PARAM);
99 
100 #define invokeGet2(HANDLER,METHOD,PARAM1,PARAM2) \
101 if (HANDLER) \
102  return HANDLER->METHOD(PARAM1,PARAM2);
103 
104 #define invokeGet3(HANDLER,METHOD,PARAM1,PARAM2,PARAM3) \
105 if (HANDLER) \
106  return HANDLER->METHOD(PARAM1,PARAM2,PARAM3);
107 
108 #define invokeGet4(HANDLER,METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
109 if (HANDLER) \
110  return HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);
111 
115 #define invokeChildren0(METHOD) \
116 foreach (Component *child, childrenComponent) { \
117  child->METHOD(); \
118  }
119 
120 #define invokeChildren1(METHOD,PARAM) \
121 foreach (Component *child, childrenComponent) { \
122  child->METHOD(PARAM); \
123  }
124 
125 #define invokeChildren2(METHOD,PARAM1,PARAM2) \
126 foreach (Component *child, childrenComponent) { \
127  child->METHOD(PARAM1,PARAM2); \
128  }
129 
130 #define invokeChildren3(METHOD,PARAM1,PARAM2,PARAM3) \
131 foreach (Component *child, childrenComponent) { \
132  child->METHOD(PARAM1,PARAM2,PARAM3); \
133  }
134 
135 #define invokeChildren4(METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
136 foreach (Component *child, childrenComponent) { \
137  child->METHOD(PARAM1,PARAM2,PARAM3,PARAM4); \
138  }
139 
145 #define delegate0(HANDLER,METHOD) \
146 virtual void METHOD() { \
147  invoke0(HANDLER,METHOD) \
148  }
149 
150 #define delegate1(HANDLER,METHOD,PARAM_TYPE) \
151 virtual void METHOD(PARAM_TYPE param) { \
152  invoke1(HANDLER,METHOD,param) \
153  }
154 
155 #define delegate2(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2) \
156 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) { \
157  invoke2(HANDLER,METHOD,param1,param2) \
158  }
159 
160 #define delegate3(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3) \
161 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) { \
162  invoke3(HANDLER,METHOD,param1,param2,param3) \
163  }
164 
165 #define delegate4(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3, PARAM_TYPE4) \
166 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3, PARAM_TYPE4 param4) { \
167  invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
168  }
169 
176 #define delegateGet0(HANDLER,METHOD,TYPE) \
177 virtual TYPE METHOD() { \
178  invokeGet0(HANDLER,METHOD) \
179  else \
180  return 0; \
181  }
182 
183 #define delegateGet1(HANDLER,METHOD,TYPE,PARAM_TYPE) \
184 virtual TYPE METHOD(PARAM_TYPE param) { \
185  invokeGet1(HANDLER,METHOD,param) \
186  else \
187  return 0; \
188  }
189 
190 #define delegateGet2(HANDLER,METHOD,TYPE,PARAM1_TYPE,PARAM2_TYPE) \
191 virtual TYPE METHOD(PARAM1_TYPE param1, PARAM2_TYPE param2) { \
192  invokeGet2(HANDLER,METHOD,param1,param2) \
193  else \
194  return 0; \
195  }
196 
199 #define delegateConstGet0(HANDLER,METHOD,TYPE) \
200 virtual TYPE METHOD() const { \
201  invokeGet0(HANDLER,METHOD) \
202  else \
203  return 0; \
204  }
205 
206 #define delegateConstGet1(HANDLER,METHOD,TYPE,PARAM_TYPE) \
207 virtual TYPE METHOD(PARAM_TYPE param) const { \
208  invokeGet1(HANDLER,METHOD,param) \
209  else \
210  return 0; \
211  }
212 
217 #define delegateAndInvokeChildren1(HANDLER,METHOD,PARAM_TYPE) \
218 virtual void METHOD(PARAM_TYPE param) { \
219  invoke1(HANDLER,METHOD,param) \
220  invokeChildren1(METHOD,param) \
221  }
222 
223 #define delegateAndInvokeChildren2(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2) \
224 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) { \
225  invoke2(HANDLER,METHOD,param1,param2) \
226  invokeChildren2(METHOD,param1,param2) \
227  }
228 
229 #define delegateAndInvokeChildren1Array(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,DIM) \
230 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2[DIM]) { \
231  invoke2(HANDLER,METHOD,param1,param2) \
232  invokeChildren2(METHOD,param1,param2) \
233  }
234 
235 #define delegateAndInvokeChildren3(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3) \
236 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) { \
237  invoke3(HANDLER,METHOD,param1,param2,param3) \
238  invokeChildren3(METHOD,param1,param2,param3) \
239  }
240 
241 #define delegateAndInvokeChildren4(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3,PARAM_TYPE4) \
242 virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3,PARAM_TYPE4 param4) { \
243  invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
244  invokeChildren4(METHOD,param1,param2,param3,param4) \
245  }
246 
247 
248 namespace camitk {
249 // -- Core stuff classes
250 class Geometry;
251 class Slice;
252 class Viewer;
253 
254 
293  Q_OBJECT
294 
295 public:
304  NO_REPRESENTATION
305  };
306 
310 
318  Component(const QString & file, const QString & name, Representation rep = NO_REPRESENTATION);
319 
327  Component(Component *parentComponent, const QString & name, Representation rep = NO_REPRESENTATION) throw(AbortException);
328 
330  virtual ~Component();
331 
335  Representation getRepresentation() const;
336 
338  bool isTopLevel() const;
339 
341  virtual Component * getParentComponent();
342 
344  virtual Component * getTopLevelComponent();
345 
347  virtual void setModified(bool modified = true);
348 
350  virtual bool getModified() const;
351 
353  virtual void setVisibility(Viewer *, bool);
354 
356  virtual bool getVisibility(Viewer *) const;
357 
359  virtual void refresh() const;
360 
367  virtual void refreshInterfaceNode();
368 
370  virtual bool isSelected() const;
371 
376  virtual void setSelected(const bool b, const bool recursive = true);
377 
379  const QString getFileName() const;
380 
382  void setFileName(const QString &);
383 
385  bool event(QEvent* e);
386 
391  QMenu * getActionAndPopupMenu();
393 
398  QStringList getHierarchy();
401 
403  bool isInstanceOf(QString className);
404 
406  // TODO CAMITK_DEPRECATED. This section list all the methods marked as deprecated. They are to be removed in CamiTK 4.0
415  virtual QWidget * getPropertyWidget(QWidget* parent = 0) {
416  return NULL;
417  }
419 
424  virtual unsigned int getNumberOfPropertyWidget() {
425  if (this->getPropertyWidget())
426  return 1;
427  else
428  return 0;
429  }
430 
435  virtual QWidget * getPropertyWidgetAt(unsigned int i, QWidget* parent = 0) {
436  if (this->getPropertyWidget() && (i==0))
437  return this->getPropertyWidget();
438  else
439  return NULL;
440  }
441 
450  virtual QObject * getPropertyObject() {
451  return this;
452  }
453 
460  void updateProperty(QString name, QVariant value);
461 
463  // TODO CAMITK_DEPRECATED. This section list all the methods marked as deprecated. They are to be removed in CamiTK 4.0
476  virtual bool setDynamicProperty(const char *name, const QVariant &value, const char *description = "", bool isReadOnly=false);
479 
486  Q_INVOKABLE virtual Property* getProperty(QString name);
487 
496  virtual bool addProperty(Property*);
497 
502  //-- the methods below are commented because the default comment in InterfaceNode lacks some information...
504  virtual void addChild(InterfaceNode *);
505  virtual void attachChild(InterfaceNode *);
509  virtual void removeChild(InterfaceNode *);
510 
512  virtual void setParent(InterfaceNode *);
513 
514  //--not commented because Doxygen automatically use the inherited documentation (set INHERIT_DOCS flag to YES in the Doxyfile)
515  virtual void deleteChildren();
516  virtual QString getName() const;
517  virtual void setName(const QString&);
518  virtual const ComponentList & getChildren();
519  virtual bool doubleClicked();
520  virtual InterfaceNode * getParent();
521  virtual QPixmap getIcon();
522 
526  virtual bool inItalic() const;
527 
529  virtual QMenu * getPopupMenu(QWidget* parent = 0) {
530  return NULL;
531  }
533 
538  const QString getLabel() const;
541 
543  void setLabel(QString newName);
544 
545  delegateGet0(myGeometry, getPointSet, vtkSmartPointer<vtkPointSet> )
546 
547  delegate1(myGeometry, setPointSet, vtkSmartPointer<vtkPointSet> )
548 
549  delegate1(myGeometry, setPointData, vtkSmartPointer<vtkDataArray> )
550 
551  delegateConstGet0(myGeometry, getDataPort, vtkSmartPointer<vtkAlgorithmOutput> )
552 
553  delegate1(myGeometry, setDataConnection, vtkSmartPointer<vtkAlgorithmOutput> )
554 
555  delegateGet1(myGeometry, getActor, vtkSmartPointer<vtkActor>, const RenderingModes)
556 
557  // TODO : uses an object myRepresentation (which is a Geometry or a Slice)
558  // to use a single delegate macro
559  virtual vtkSmartPointer<vtkProp> getProp(const QString &param)
560  {
561  if (myGeometry)
562  return myGeometry->getProp(param);
563  else if(mySlice)
564  return mySlice->getProp(param);
565  return NULL;
566  }
567 
568  virtual unsigned int getNumberOfProp() const {
569  if (myGeometry)
570  return myGeometry->getNumberOfProp();
571  else if (mySlice)
572  return mySlice->getNumberOfProp();
573  return 0;
574  }
575 
576  virtual vtkSmartPointer<vtkProp> getProp(unsigned int index) {
577  if (myGeometry)
578  return myGeometry->getProp(index);
579  else if (mySlice)
580  return mySlice->getProp(index);
581  return 0;
582  }
583 
584  virtual bool addProp(const QString &name, vtkSmartPointer<vtkProp> prop) {
585  if (myGeometry)
586  return myGeometry->addProp(name, prop);
587  else if (mySlice)
588  return mySlice->addProp(name, prop);
589  return false;
590  }
591 
592 
593  virtual bool removeProp(const QString & name) {
594  if (myGeometry)
595  return myGeometry->removeProp(name);
596  else if (mySlice)
597  return mySlice->removeProp(name);
598  return false;
599  }
600  // END TODO
601 
602 
606  virtual void pointPicked(vtkIdType, bool) {};
607 
611  virtual void cellPicked(vtkIdType, bool) {};
612 
613  // --
614 
616  virtual void getBounds(double *bounds);
617 
621  virtual double getBoundingRadius();
622 
623  delegate4(myGeometry, setPointPosition, const unsigned int, const double, const double, const double);
624 
625  delegateAndInvokeChildren1(myGeometry, setRenderingModes, const RenderingModes);
626 
628  virtual const InterfaceGeometry::RenderingModes getRenderingModes() const;
629 
630  delegateAndInvokeChildren1(myGeometry, setEnhancedModes, const EnhancedModes)
631 
632  delegateConstGet0(myGeometry, getEnhancedModes, const EnhancedModes)
633 
634  delegateAndInvokeChildren1Array(myGeometry, setActorColor, const RenderingModes, double, 4)
635 
636  delegateAndInvokeChildren4(myGeometry, setActorColor, const RenderingModes, const double, const double, const double)
637 
639  virtual void getActorColor(const RenderingModes, double [4]);
640 
641  delegateAndInvokeChildren3(myGeometry, setColor, const double, const double, const double)
642 
643  delegateAndInvokeChildren4(myGeometry, setColor, const double, const double, const double, const double)
644 
645  delegateAndInvokeChildren2(myGeometry, setActorOpacity, const RenderingModes, const double)
646 
647  delegateConstGet1(myGeometry, getActorOpacity, double, const RenderingModes)
648 
649  delegateAndInvokeChildren1(myGeometry, setOpacity, const double)
650 
651  delegate2(myGeometry, setMapperScalarRange, double, double)
652 
653  delegate1(myGeometry, setTexture, vtkSmartPointer<vtkTexture>)
654 
655  virtual void setGlyphType(const GlyphTypes type, const double size = 0.0);
656 
657  delegate1(myGeometry, setLinesAsTubes, bool);
658 
660 
665  delegateConstGet0(mySlice, getImageData, vtkSmartPointer<vtkImageData>)
667 
668  delegate1(mySlice, setOriginalVolume, vtkSmartPointer<vtkImageData>)
669 
670  delegateConstGet0(mySlice, get2DImageActor, vtkSmartPointer<vtkImageActor>)
671 
672  delegateConstGet0(mySlice, get3DImageActor, vtkSmartPointer<vtkImageActor>)
673 
674  delegateConstGet0(mySlice, getPickPlaneActor, vtkSmartPointer<vtkActor>)
675 
676  delegateGet0(mySlice, getPixelActor, vtkSmartPointer<vtkActor>)
677 
678  delegate3(mySlice, pixelPicked, double, double, double)
679 
680  delegate0(mySlice, updatePickPlane)
681 
682  delegate1(mySlice, setSlice, int);
683 
684  delegate3(mySlice, setSlice, double, double, double);
685 
686  delegate1(mySlice, setRotationX, double)
687 
688  delegate1(mySlice, setRotationY, double)
689 
690  delegate1(mySlice, setRotationZ, double)
691 
692  delegateConstGet0(mySlice, getNumberOfColors, int)
693 
694  delegate3(mySlice, setPixelRealPosition, double, double, double);
695 
697  virtual double getRotationX() const;
698 
700  virtual double getRotationY() const;
701 
703  virtual double getRotationZ() const;
704 
706  virtual int getNumberOfSlices() const;
707 
709  virtual int getSlice() const;
711 
712 
713 protected:
715  InterfaceGeometry * myGeometry;
716 
718  InterfaceBitMap * mySlice;
719 
721  InterfaceNode * myParentNode;
722 
724  ComponentList childrenComponent;
725 
727  bool isSelectedFlag;
728 
730  bool modifiedFlag;
731 
733  QString myFileName;
734 
735 
736 private:
739 
742  void init();
743 
745  Representation myService;
746 
748  QString myName;
749 
754  virtual void initRepresentation() = 0;
755 
757  QMap<Viewer *, bool> myViewers;
758 
760  QMenu * actionsMenu;
761 
763  QMap<QString, Property*> propertyMap;
765 
769  static QSet<Viewer*> allViewers;
773 
774 };
775 
776 
777 // -------------------- isSelected --------------------
778 inline bool Component::isSelected() const {
779  return isSelectedFlag;
780 }
781 
782 // -------------------- doubleClicked --------------------
784  // always false by default. You must overload this method in Components to change its behaviour.
785  return false;
786 }
787 
788 // -------------------- getChildren --------------------
790  return childrenComponent;
791 }
792 
793 // -------------------- getName --------------------
794 inline QString Component::getName() const {
795  return myName;
796 }
797 
798 // -------------------- getParent --------------------
800  return ((Component*) myParentNode);
801 }
802 
803 // -------------------- getPixmap ------------------
804 inline QPixmap Component::getIcon() {
805  return NULL;
806 }
807 
808 // -------------------- inItalic --------------------
809 inline bool Component::inItalic() const {
810  return false;
811 }
812 
813 // -------------------- setName --------------------
814 inline void Component::setName(const QString & n) {
815  myName = n;
816  if (myGeometry)
817  myGeometry->setLabel(n);
818 }
819 
820 // -------------------- setModified --------------------
821 inline void Component::setModified(bool modification) {
822  modifiedFlag = modification;
823 }
824 
825 // -------------------- getModified --------------------
826 inline bool Component::getModified() const {
827  return modifiedFlag;
828 }
829 
830 // -------------------- getModified --------------------
831 inline const QString Component::getLabel() const {
832  return getName();
833 }
834 // -------------------- getModified --------------------
835 inline void Component::setLabel(QString newName) {
836  setLabel(newName);
837 }
838 
839 }
840 
841 #endif
842 
this Component can be displayed as a GEOMETRY
Definition: sdk/libraries/core/component/Component.h:302
#define delegateAndInvokeChildren4(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3, PARAM_TYPE4)
Definition: sdk/libraries/core/component/Component.h:241
This class describe what are the methods to implement in order to manage dynamic properties.
Definition: InterfaceProperty.h:44
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:63
virtual const ComponentList & getChildren()
get the list of the InterfaceNode children (sub items in the hierarchy)
Definition: sdk/libraries/core/component/Component.h:789
#define delegateGet0(HANDLER, METHOD, TYPE)
delegateGet macros: Same as delegate macro but for an accessor non-const METHOD, returns a value of t...
Definition: sdk/libraries/core/component/Component.h:176
this Component can be displayed as a SLICE
Definition: sdk/libraries/core/component/Component.h:303
#define delegate1(HANDLER, METHOD, PARAM_TYPE)
Definition: sdk/libraries/core/component/Component.h:150
virtual bool doubleClicked()
this method is called each time the InterfaceNode is double clicked by the user.
Definition: sdk/libraries/core/component/Component.h:783
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:44
#define delegateAndInvokeChildren3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
Definition: sdk/libraries/core/component/Component.h:235
Viewer is an abstract viewer.
Definition: Viewer.h:55
#define delegate3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
Definition: sdk/libraries/core/component/Component.h:160
virtual void pointPicked(vtkIdType, bool)
an inherited class can redefine this method something specific.
Definition: sdk/libraries/core/component/Component.h:606
Representation
The different representation that can be implemented to represent this Component in the InteractiveVi...
Definition: sdk/libraries/core/component/Component.h:301
Definition: ExtensionWindow.h:41
This class describe what are the methods to implement for a hierarchical tree node.
Definition: InterfaceNode.h:58
Definition: Action.h:40
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:292
CAMITK_API QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:87
#define CAMITK_API
Definition: CamiTKAPI.h:49
virtual void setModified(bool modified=true)
set the modified flag
Definition: sdk/libraries/core/component/Component.h:821
virtual QString getName() const
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:794
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:529
#define delegateAndInvokeChildren1Array(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, DIM)
Definition: sdk/libraries/core/component/Component.h:229
virtual unsigned int getNumberOfPropertyWidget()
get the number of alternative property widgets
Definition: sdk/libraries/core/component/Component.h:424
Definition: ExtensionWindow.h:42
virtual QWidget * getPropertyWidgetAt(unsigned int i, QWidget *parent=0)
Get the ith alternative property widget.
Definition: sdk/libraries/core/component/Component.h:435
virtual bool inItalic() const
A component name is not displayed in italic by default.
Definition: sdk/libraries/core/component/Component.h:809
#define delegate4(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3, PARAM_TYPE4)
Definition: sdk/libraries/core/component/Component.h:165
virtual bool getModified() const
set the modified flag
Definition: sdk/libraries/core/component/Component.h:826
const QString getLabel() const
Definition: sdk/libraries/core/component/Component.h:831
#define delegate2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
Definition: sdk/libraries/core/component/Component.h:155
virtual InterfaceNode * getParent()
get the parent Component
Definition: sdk/libraries/core/component/Component.h:799
void setLabel(QString newName)
set the string used to display the label, do the same as setName
Definition: sdk/libraries/core/component/Component.h:835
#define delegateGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
Definition: sdk/libraries/core/component/Component.h:183
virtual unsigned int getNumberOfProp() const
return the number of additional prop
Definition: sdk/libraries/core/component/Component.h:568
virtual QObject * getPropertyObject()
Get the property object that could be understood by PropertyEditor.
Definition: sdk/libraries/core/component/Component.h:450
virtual QPixmap getIcon()
Get the pixmap that will be displayed for this node.
Definition: sdk/libraries/core/component/Component.h:804
This class describes what are the methods to implement for a Geometry (rendering parameters, input/output, filters, picking parameters...)
Definition: InterfaceGeometry.h:61
#define delegate0(HANDLER, METHOD)
delegate macros: completely delegates METHOD to HANDLER, eventually using parameters of given PARAM_T...
Definition: sdk/libraries/core/component/Component.h:145
virtual vtkSmartPointer< vtkProp > getProp(unsigned int index)
return an additional prop by its index
Definition: sdk/libraries/core/component/Component.h:576
virtual bool addProp(const QString &name, vtkSmartPointer< vtkProp > prop)
insert an additional prop, defining it by its name (default visibility = false)
Definition: sdk/libraries/core/component/Component.h:584
virtual bool removeProp(const QString &name)
remove a given additional prop.
Definition: sdk/libraries/core/component/Component.h:593
#define delegateAndInvokeChildren2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
Definition: sdk/libraries/core/component/Component.h:223
#define delegateConstGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
Definition: sdk/libraries/core/component/Component.h:206
virtual void setName(const QString &)
set the name to be displayed
Definition: sdk/libraries/core/component/Component.h:814
virtual void cellPicked(vtkIdType, bool)
an inherited class can redefine this method something specific.
Definition: sdk/libraries/core/component/Component.h:611
#define delegateAndInvokeChildren1(HANDLER, METHOD, PARAM_TYPE)
delegateAndInvokeChildren macros: Same as delegate but also calls METHOD, eventually with PARAM_TYPE...
Definition: sdk/libraries/core/component/Component.h:217
#define delegateConstGet0(HANDLER, METHOD, TYPE)
delegateConstGet macros: Same as delegateGet but for const METHOD
Definition: sdk/libraries/core/component/Component.h:199
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:188