Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
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-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
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 "InterfaceFrame.h"
36
37// -- QT stuff
38#include <QPixmap>
39#include <QMenu>
40#include <QVector>
41
42// -- vtk stuff
43// disable warning generated by clang about the surrounded headers
44#include "CamiTKDisableWarnings"
45#include <vtkWindowLevelLookupTable.h>
46#include <vtkActor.h>
47#include <vtkAxesActor.h>
48#include <vtkImageActor.h>
49#include "CamiTKReEnableWarnings"
50
51#include <vtkImageData.h>
52#include <vtkPointSet.h>
53#include <vtkSmartPointer.h>
54#include <vtkAlgorithmOutput.h>
55#include <vtkActor2D.h>
56#include <vtkTransform.h>
57
58// -- vtk stuff Classes
59class vtkActor;
60class vtkTexture;
61class vtkPointSet;
62class vtkUnstructuredGridAlgorithm;
63class vtkDataSetToUnstructuredGridFilter;
64class vtkWindowLevelLookupTable;
65
66// -----------------------------------------------------------------------
67//
68// Delegation macros
69// (And your dream comes true)
70//
71// -----------------------------------------------------------------------
72
77#define invoke0(HANDLER,METHOD) \
78if (HANDLER) \
79 HANDLER->METHOD();
80
81#define invoke1(HANDLER,METHOD,PARAM) \
82if (HANDLER) \
83 HANDLER->METHOD(PARAM);
84
85#define invoke2(HANDLER,METHOD,PARAM1,PARAM2) \
86if (HANDLER) \
87 HANDLER->METHOD(PARAM1,PARAM2);
88
89#define invoke3(HANDLER,METHOD,PARAM1,PARAM2,PARAM3) \
90if (HANDLER) \
91 HANDLER->METHOD(PARAM1,PARAM2,PARAM3);
92
93#define invoke4(HANDLER,METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
94if (HANDLER) \
95 HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);
96
101#define invokeGet0(HANDLER,METHOD) \
102if (HANDLER) \
103 return HANDLER->METHOD();
104
105#define invokeGet1(HANDLER,METHOD,PARAM) \
106if (HANDLER) \
107 return HANDLER->METHOD(PARAM);
108
109#define invokeGet2(HANDLER,METHOD,PARAM1,PARAM2) \
110if (HANDLER) \
111 return HANDLER->METHOD(PARAM1,PARAM2);
112
113#define invokeGet3(HANDLER,METHOD,PARAM1,PARAM2,PARAM3) \
114if (HANDLER) \
115 return HANDLER->METHOD(PARAM1,PARAM2,PARAM3);
116
117#define invokeGet4(HANDLER,METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
118if (HANDLER) \
119 return HANDLER->METHOD(PARAM1,PARAM2,PARAM3,PARAM4);
120
124#define invokeChildren0(METHOD) \
125for(Component *child: childrenComponent) { \
126 child->METHOD(); \
127 }
128
129#define invokeChildren1(METHOD,PARAM) \
130for(Component *child: childrenComponent) { \
131 child->METHOD(PARAM); \
132 }
133
134#define invokeChildren2(METHOD,PARAM1,PARAM2) \
135for(Component *child: childrenComponent) { \
136 child->METHOD(PARAM1,PARAM2); \
137 }
138
139#define invokeChildren3(METHOD,PARAM1,PARAM2,PARAM3) \
140for(Component *child: childrenComponent) { \
141 child->METHOD(PARAM1,PARAM2,PARAM3); \
142 }
143
144#define invokeChildren4(METHOD,PARAM1,PARAM2,PARAM3,PARAM4) \
145for(Component *child: childrenComponent) { \
146 child->METHOD(PARAM1,PARAM2,PARAM3,PARAM4); \
147 }
148
154#define delegate0(HANDLER,METHOD) \
155virtual void METHOD() override { \
156 invoke0(HANDLER,METHOD) \
157 }
158
159#define delegate1(HANDLER,METHOD,PARAM_TYPE) \
160virtual void METHOD(PARAM_TYPE param) override { \
161 invoke1(HANDLER,METHOD,param) \
162 }
163
164#define delegate2(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2) \
165virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) override { \
166 invoke2(HANDLER,METHOD,param1,param2) \
167 }
168
169#define delegate3(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3) \
170virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) override { \
171 invoke3(HANDLER,METHOD,param1,param2,param3) \
172 }
173
174#define delegate4(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3, PARAM_TYPE4) \
175virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3, PARAM_TYPE4 param4) override { \
176 invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
177 }
178
185#define delegateGet0(HANDLER,METHOD,TYPE) \
186virtual TYPE METHOD() override { \
187 invokeGet0(HANDLER,METHOD) \
188 else \
189 return 0; \
190 }
191
192#define delegateGet1(HANDLER,METHOD,TYPE,PARAM_TYPE) \
193virtual TYPE METHOD(PARAM_TYPE param) override { \
194 invokeGet1(HANDLER,METHOD,param) \
195 else \
196 return 0; \
197 }
198
199#define delegateGet2(HANDLER,METHOD,TYPE,PARAM1_TYPE,PARAM2_TYPE) \
200virtual TYPE METHOD(PARAM1_TYPE param1, PARAM2_TYPE param2) override { \
201 invokeGet2(HANDLER,METHOD,param1,param2) \
202 else \
203 return 0; \
204 }
208#define delegateConstGet0(HANDLER,METHOD,TYPE) \
209virtual TYPE METHOD() const override { \
210 invokeGet0(HANDLER,METHOD) \
211 else \
212 return 0; \
213 }
214
215#define delegateConstGet1(HANDLER,METHOD,TYPE,PARAM_TYPE) \
216virtual TYPE METHOD(PARAM_TYPE param) const override { \
217 invokeGet1(HANDLER,METHOD,param) \
218 else \
219 return 0; \
220 }
221
226#define delegateAndInvokeChildren1(HANDLER,METHOD,PARAM_TYPE) \
227virtual void METHOD(PARAM_TYPE param) override { \
228 invoke1(HANDLER,METHOD,param) \
229 invokeChildren1(METHOD,param) \
230 }
231
232#define delegateAndInvokeChildren2(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2) \
233virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2) override { \
234 invoke2(HANDLER,METHOD,param1,param2) \
235 invokeChildren2(METHOD,param1,param2) \
236 }
237
238#define delegateAndInvokeChildren1Array(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,DIM) \
239virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2[DIM]) override { \
240 invoke2(HANDLER,METHOD,param1,param2) \
241 invokeChildren2(METHOD,param1,param2) \
242 }
243
244#define delegateAndInvokeChildren3(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3) \
245virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3) override { \
246 invoke3(HANDLER,METHOD,param1,param2,param3) \
247 invokeChildren3(METHOD,param1,param2,param3) \
248 }
249
250#define delegateAndInvokeChildren4(HANDLER,METHOD,PARAM_TYPE1,PARAM_TYPE2,PARAM_TYPE3,PARAM_TYPE4) \
251virtual void METHOD(PARAM_TYPE1 param1, PARAM_TYPE2 param2, PARAM_TYPE3 param3,PARAM_TYPE4 param4) override { \
252 invoke4(HANDLER,METHOD,param1,param2,param3,param4) \
253 invokeChildren4(METHOD,param1,param2,param3,param4) \
254 }
255
256
257namespace camitk {
258// -- Core stuff classes
259class Geometry;
260class Slice;
261class Viewer;
262class FrameOfReference;
263class Transformation;
264
265
305 Q_OBJECT
306
307public:
316 NO_REPRESENTATION
317 };
318
323
331 Component(QString file, QString name, Representation rep = NO_REPRESENTATION, bool createDefaultFrame = true);
332
343 Component(Component* parentComponent, const QString& name, Representation rep = NO_REPRESENTATION, bool createDefaultFrame = true);
344
352 virtual ~Component() override;
353
357 Representation getRepresentation() const;
358
360 bool isTopLevel() const;
361
363 Component* getParentComponent();
364
366 Component* getTopLevelComponent();
367
369 virtual void setModified(bool modified = true);
370
372 virtual bool getModified() const;
373
375 virtual void setVisibility(QString, bool);
376
378 virtual bool getVisibility(QString) const;
379
382 virtual void refresh();
383
385 virtual bool isSelected() const;
386
391 virtual void setSelected(const bool b, const bool recursive = true);
392
394 const QString getFileName() const;
395
397 void setFileName(const QString&);
398
400 bool event(QEvent* e) override;
401
403 QMenu* getActionMenu();
405
406
413 virtual QVariant toVariant() const override;
414
416 virtual void fromVariant(const QVariant&) override;
417
419 virtual QUuid getUuid() const override;
420
427 virtual bool setUuid(QUuid) override;
429
430
437 QStringList getHierarchy() const override;
438
440 bool isInstanceOf(QString className) const override;
441
446 unsigned int getNumberOfPropertyWidget() override {
447 return 0;
448 }
449
454 QWidget* getPropertyWidgetAt(unsigned int) override {
455 return nullptr;
456 }
457
466 QObject* getPropertyObject() override {
467 return this;
468 }
469 const QObject* getPropertyObject() const override {
470 return this;
471 }
472
482 void propertyValueChanged(QString name) override;
483
491 inline void setIndexOfPropertyExplorerTab(unsigned int index) override final {
492 indexOfPropertyExplorerTab = index;
493 }
494
502 inline unsigned int getIndexOfPropertyExplorerTab() override {
503 return indexOfPropertyExplorerTab;
504 }
505
512 Q_INVOKABLE camitk::Property* getProperty(QString name) override;
513
522 bool addProperty(Property*) override;
523
527 virtual QVariant getPropertyValue(const QString& name) const override;
528
532 virtual bool setPropertyValue(const QString& name, QVariant newValue) override;
534
540
543 void removeChild(InterfaceNode*) override;
544
547 void setParent(InterfaceNode*) override;
548
552 bool doubleClicked() override;
553
554 //-- not commented because Doxygen automatically use the inherited documentation (set INHERIT_DOCS flag to YES in the Doxyfile)
555 void addChild(InterfaceNode*) override;
556 void attachChild(InterfaceNode*) override;
557 void deleteChildren() override final;
558 QString getName() const override;
559 void setName(const QString&) override;
560 const ComponentList& getChildren() const override;
561 InterfaceNode* getParent() override;
562 QPixmap getIcon() override;
563 void setNodeModified(bool) override final;
564 bool getNodeModified() const override;
565
569 bool inItalic() const override;
570
572 QMenu* getPopupMenu(QWidget* parent = nullptr) override {
573 return nullptr;
574 }
576
582
583 delegateGet0(myGeometry, getPointSet, vtkSmartPointer<vtkPointSet>)
584
585 delegate1(myGeometry, setPointSet, vtkSmartPointer<vtkPointSet>)
586
587 delegate1(myGeometry, setPointData, vtkSmartPointer<vtkDataArray>)
588
589 delegateConstGet0(myGeometry, getDataPort, vtkSmartPointer<vtkAlgorithmOutput>)
590
591 delegate1(myGeometry, setDataConnection, vtkSmartPointer<vtkAlgorithmOutput>)
592
593 delegateGet1(myGeometry, getActor, vtkSmartPointer<vtkActor>, const RenderingModes)
594
595 delegate1(myGeometry, setColorMode, int)
596
597 delegate1(myGeometry, updateLabel, const QString&);
598
599 // TODO : uses an object myRepresentation (which is a Geometry or a Slice)
600 // to use a single delegate macro
601 vtkSmartPointer<vtkProp> getProp(const QString& param) override {
602 if (myGeometry) {
603 return myGeometry->getProp(param);
604 }
605 else if (mySlice) {
606 return mySlice->getProp(param);
607 }
608
609 return nullptr;
610 }
611
612 unsigned int getNumberOfProp() const override {
613 if (myGeometry) {
614 return myGeometry->getNumberOfProp();
615 }
616 else if (mySlice) {
617 return mySlice->getNumberOfProp();
618 }
619
620 return 0;
621 }
622
623 vtkSmartPointer<vtkProp> getProp(unsigned int index) override {
624 if (myGeometry) {
625 return myGeometry->getProp(index);
626 }
627 else if (mySlice) {
628 return mySlice->getProp(index);
629 }
630
631 return nullptr;
632 }
633
634 bool addProp(const QString& name, vtkSmartPointer<vtkProp> prop) override {
635 if (myGeometry) {
636 return myGeometry->addProp(name, prop);
637 }
638 else if (mySlice) {
639 return mySlice->addProp(name, prop);
640 }
641
642 return false;
643 }
644
645
646 bool removeProp(const QString& name) override {
647 if (myGeometry) {
648 return myGeometry->removeProp(name);
649 }
650 else if (mySlice) {
651 return mySlice->removeProp(name);
652 }
653
654 return false;
655 }
656 // END TODO
657
658
662 void pointPicked(vtkIdType, bool) override {}
663
667 void cellPicked(vtkIdType, bool) override {}
668
671 virtual vtkSmartPointer<vtkActor> get3DCursor() {
672 return nullptr;
673 }
674
676 void getBounds(double* bounds) override;
677
681 double getBoundingRadius() override;
682
683 delegate4(myGeometry, setPointPosition, const unsigned int, const double, const double, const double)
684
685 delegateAndInvokeChildren1(myGeometry, setRenderingModes, const RenderingModes)
686
688 const InterfaceGeometry::RenderingModes getRenderingModes() const override;
689
690 delegateAndInvokeChildren1(myGeometry, setEnhancedModes, const EnhancedModes)
691
692 // cannot use macro here as the return type is a QFlag
693 virtual const EnhancedModes getEnhancedModes() const override {
694 if (myGeometry) {
695 return myGeometry->getEnhancedModes();
696 }
697 else {
698 return EnhancedModes();
699 }
700 }
701
702 delegateAndInvokeChildren1Array(myGeometry, setActorColor, const RenderingModes, double, 4)
703
704 delegateAndInvokeChildren4(myGeometry, setActorColor, const RenderingModes, const double, const double, const double)
705
707 void getActorColor(const RenderingModes, double [4], bool ignoreEnhancedModes = false) const override;
708
709 delegateAndInvokeChildren3(myGeometry, setColor, const double, const double, const double)
710
711 delegateAndInvokeChildren4(myGeometry, setColor, const double, const double, const double, const double)
712
713 delegateAndInvokeChildren2(myGeometry, setActorOpacity, const RenderingModes, const double)
714
715 delegateConstGet1(myGeometry, getActorOpacity, double, const RenderingModes)
716
717 delegateAndInvokeChildren1(myGeometry, setOpacity, const double)
718
719 delegate2(myGeometry, setMapperScalarRange, double, double)
720
721 delegate1(myGeometry, setTexture, vtkSmartPointer<vtkTexture>)
722
723 void setGlyphType(const GlyphTypes type, const double size = 0.0) override;
724
725 virtual void setLinesAsTubes(bool isTubes = true, bool radiusFromLength = true, double radiusFactor = 1.0 / 40.0, int numberOfSides = 5) override {
726 if (myGeometry) {
727 myGeometry->setLinesAsTubes(isTubes, radiusFromLength, radiusFactor, numberOfSides);
728 }
729 }
730
731 delegate1(myGeometry, setMeshWorldTransform, vtkSmartPointer<vtkTransform>)
732
733
734
735
740 delegateConstGet0(mySlice, getImageData, vtkSmartPointer<vtkImageData>)
741
742 delegate1(mySlice, setOriginalVolume, vtkSmartPointer<vtkImageData>)
743
744 delegateConstGet0(mySlice, get2DImageActor, vtkSmartPointer<vtkImageActor>)
745
746 delegateConstGet0(mySlice, get3DImageActor, vtkSmartPointer<vtkImageActor>)
747
748 delegateConstGet0(mySlice, getPickPlaneActor, vtkSmartPointer<vtkActor>)
749
750 delegateGet0(mySlice, getPixelActor, vtkSmartPointer<vtkActor>)
751
752 delegate3(mySlice, pixelPicked, double, double, double)
753
754 delegate0(mySlice, updatePickPlane)
755
756 delegate1(mySlice, setSlice, int)
757
758 delegate3(mySlice, setSlice, double, double, double)
759
760 delegateConstGet0(mySlice, getNumberOfColors, int)
761
762 delegate3(mySlice, setPixelRealPosition, double, double, double)
763
764 delegate1(mySlice, setArbitraryTransform, vtkSmartPointer<vtkTransform>)
765
767 int getNumberOfSlices() const override;
768
770 int getSlice() const override;
772
773
779
785
788 virtual void setFrame(const std::shared_ptr<FrameOfReference>& frame) override {
789 frameOfReference = frame;
790 }
791
794 // in conjunction with this method if you need to share the ownership of this frame
795 virtual const FrameOfReference* getFrame() const override {
796 return frameOfReference.get();
797 }
798
802 virtual QMultiMap<const FrameOfReference*, Component*> getAllFrames(bool includeChildrenFrames = true) override;
803
807 virtual QMultiMap<const Transformation*, Component*> getAllTransformations(bool includeChildrenTransformations = true) override;
808
811 virtual void setFrameFrom(const InterfaceFrame*) override;
812
815 virtual void resetFrame() override;
816
818 vtkSmartPointer<vtkAxesActor> getFrameAxisActor(QString viewerName) override;
819
821 virtual bool getFrameVisibility(QString viewerName) const override;
822
824 virtual void setFrameVisibility(QString viewerName, bool visibility) override;
826
827
828protected:
831
834
837
840
843
846
848 QString myFileName;
849
852
854 std::shared_ptr<FrameOfReference> frameOfReference = nullptr;
855
856
857private:
861
863 void init(const QString& name, bool createDefaultFrame);
864
866 Representation myService;
867
872 virtual void initRepresentation() = 0;
873
875 QMap<QString, bool> myViewers;
876
878 QMenu* actionsMenu;
879
881 QMenu* visibilityMenu;
882
884 QMap<QString, Property*> propertyMap;
885
887 bool interfaceNodeModifiedFlag;
888
890 QHash<QString, vtkSmartPointer<vtkAxesActor>> frameActors;
891
893 QHash<QString, bool> frameVisibilities;
894
896
897};
898
899
900// -------------------- isSelected --------------------
901inline bool Component::isSelected() const {
902 return isSelectedFlag;
903}
904
905// -------------------- doubleClicked --------------------
907 return false;
908}
909
910// -------------------- getChildren --------------------
912 return childrenComponent;
913}
914
915// -------------------- getName --------------------
916inline QString Component::getName() const {
917 return getPropertyValue("Name").toString();
918}
919
920// -------------------- getParent --------------------
924
925// -------------------- getPixmap ------------------
926inline QPixmap Component::getIcon() {
927 return QPixmap(0, 0); // this is a nullptr QPixmap in the Qt sense. QPixmap::isNull will then return true;
928}
929
930// -------------------- inItalic --------------------
931inline bool Component::inItalic() const {
932 return false;
933}
934
935// -------------------- setModified --------------------
936inline void Component::setModified(bool modification) {
937 modifiedFlag = modification;
938}
939
940// -------------------- getModified --------------------
941inline bool Component::getModified() const {
942 return modifiedFlag;
943}
944
945// -------------------- setNodeModified --------------------
946inline void Component::setNodeModified(bool nodeModified) {
947 interfaceNodeModifiedFlag = nodeModified;
948}
949
950// -------------------- getNodeModified --------------------
951inline bool Component::getNodeModified() const {
952 return interfaceNodeModifiedFlag;
953}
954
955}
956
957#endif
958
959
#define CAMITK_API
Definition CamiTKAPI.h:66
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition sdk/libraries/core/component/Component.h:304
void setIndexOfPropertyExplorerTab(unsigned int index) override final
Set the index of the tab in the ProperlyExplorer to select for display.
Definition sdk/libraries/core/component/Component.h:491
delegateGet0(myGeometry, getPointSet, vtkSmartPointer< vtkPointSet >) delegate1(myGeometry
virtual QVariant getPropertyValue(const QString &name) const override
get the property QVariant (same as property(const char*)) but check if it exists first.
Definition sdk/libraries/core/component/Component.cpp:540
Representation
The different representation that can be implemented to represent this Component in the InteractiveVi...
Definition sdk/libraries/core/component/Component.h:313
@ GEOMETRY
this Component can be displayed as a GEOMETRY
Definition sdk/libraries/core/component/Component.h:314
@ SLICE
this Component can be displayed as a SLICE
Definition sdk/libraries/core/component/Component.h:315
unsigned int indexOfPropertyExplorerTab
The PropertyExplorer tab index to select once refreshed.
Definition sdk/libraries/core/component/Component.h:851
unsigned int getNumberOfProp() const override
return the number of additional prop
Definition sdk/libraries/core/component/Component.h:612
unsigned int getIndexOfPropertyExplorerTab() override
Get the index of the tab in the ProperlyExplorer to select for display.
Definition sdk/libraries/core/component/Component.h:502
InterfaceNode * getParent() override
get the parent Component
Definition sdk/libraries/core/component/Component.h:921
delegate4(myGeometry, setPointPosition, const unsigned int, const double, const double, const double) delegateAndInvokeChildren1(myGeometry
QObject * getPropertyObject() override
Get the property object that could be understood by PropertyEditor.
Definition sdk/libraries/core/component/Component.h:466
virtual bool isSelected() const
Check if this data component is selected.
Definition sdk/libraries/core/component/Component.h:901
bool removeProp(const QString &name) override
remove a given additional prop.
Definition sdk/libraries/core/component/Component.h:646
InterfaceBitMap * mySlice
mySlice is the slice representation of this data component, the Component delegates all InterfaceBitM...
Definition sdk/libraries/core/component/Component.h:833
bool inItalic() const override
A component name is not displayed in italic by default.
Definition sdk/libraries/core/component/Component.h:931
virtual void setModified(bool modified=true)
set the modified flag
Definition sdk/libraries/core/component/Component.h:936
const QObject * getPropertyObject() const override
Definition sdk/libraries/core/component/Component.h:469
ComponentList childrenComponent
The explorer sub items.
Definition sdk/libraries/core/component/Component.h:839
QString getName() const override
get the name to be displayed
Definition sdk/libraries/core/component/Component.h:916
virtual const FrameOfReference * getFrame() const override
Get the pointer to this object's FrameOfReference.
Definition sdk/libraries/core/component/Component.h:795
unsigned int getNumberOfPropertyWidget() override
get the number of alternative property widgets
Definition sdk/libraries/core/component/Component.h:446
void pointPicked(vtkIdType, bool) override
an inherited class can redefine this method something specific.
Definition sdk/libraries/core/component/Component.h:662
InterfaceGeometry * myGeometry
myGeometry is the 3d representation of this Component, the Component delegates all InterfaceGeometry ...
Definition sdk/libraries/core/component/Component.h:830
bool addProp(const QString &name, vtkSmartPointer< vtkProp > prop) override
insert an additional prop, defining it by its name (default visibility = false).
Definition sdk/libraries/core/component/Component.h:634
void setNodeModified(bool) override final
Set up the node modification flag.
Definition sdk/libraries/core/component/Component.h:946
QPixmap getIcon() override
Get the pixmap that will be displayed for this node.
Definition sdk/libraries/core/component/Component.h:926
void cellPicked(vtkIdType, bool) override
an inherited class can redefine this method something specific.
Definition sdk/libraries/core/component/Component.h:667
QWidget * getPropertyWidgetAt(unsigned int) override
Get the ith alternative property widget.
Definition sdk/libraries/core/component/Component.h:454
virtual bool getModified() const
set the modified flag
Definition sdk/libraries/core/component/Component.h:941
bool modifiedFlag
the modification flag (could be extended to manage a undo/redo list)
Definition sdk/libraries/core/component/Component.h:845
delegateAndInvokeChildren1Array(myGeometry, setActorColor, const RenderingModes, double, 4) delegateAndInvokeChildren4(myGeometry
const ComponentList & getChildren() const override
get the list of the InterfaceNode children (sub items in the hierarchy)
Definition sdk/libraries/core/component/Component.h:911
bool getNodeModified() const override
Get the current modification flag.
Definition sdk/libraries/core/component/Component.h:951
bool doubleClicked() override
This method is called each time the InterfaceNode is double clicked by the user.
Definition sdk/libraries/core/component/Component.h:906
InterfaceNode * myParentNode
who is the boss? The Component!
Definition sdk/libraries/core/component/Component.h:836
virtual vtkSmartPointer< vtkActor > get3DCursor()
Return an Actor for a 3D cursor on the picked location This should be redefined into something specif...
Definition sdk/libraries/core/component/Component.h:671
vtkSmartPointer< vtkProp > getProp(unsigned int index) override
return an additional prop by its index
Definition sdk/libraries/core/component/Component.h:623
QString myFileName
the file name from which the Component is loaded
Definition sdk/libraries/core/component/Component.h:848
bool isSelectedFlag
tells if this particular Component is selected or not
Definition sdk/libraries/core/component/Component.h:842
FrameOfReference is only a label for an abstract coordinate system.
Definition FrameOfReference.h:71
This class describes what are the methods to implement for a BitMap.
Definition InterfaceBitMap.h:68
This class describes the methods to implement in order to manage a Component position in space.
Definition InterfaceFrame.h:51
This class describes what are the methods to implement for a Geometry (rendering parameters,...
Definition InterfaceGeometry.h:61
virtual const EnhancedModes getEnhancedModes() const =0
get the current enhanced mode
This class describe what are the methods to implement for a hierarchical tree node.
Definition InterfaceNode.h:58
Interface for all objects that should be serialized by the PersistenceManager.
Definition InterfacePersistence.h:38
This class describes what are the methods to implement in order to manage dynamic properties.
Definition InterfaceProperty.h:43
This class describes a property that can be used in components and actions or any class that needs to...
Definition Property.h:306
Definition Action.cpp:40
STL namespace.
#define delegate3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
Definition sdk/libraries/core/component/Component.h:169
#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:154
#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:226
#define delegateConstGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
Definition sdk/libraries/core/component/Component.h:215
#define delegateAndInvokeChildren2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
Definition sdk/libraries/core/component/Component.h:232
#define delegate2(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2)
Definition sdk/libraries/core/component/Component.h:164
#define delegate1(HANDLER, METHOD, PARAM_TYPE)
Definition sdk/libraries/core/component/Component.h:159
#define delegateAndInvokeChildren4(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3, PARAM_TYPE4)
Definition sdk/libraries/core/component/Component.h:250
#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:185
#define delegateAndInvokeChildren3(HANDLER, METHOD, PARAM_TYPE1, PARAM_TYPE2, PARAM_TYPE3)
Definition sdk/libraries/core/component/Component.h:244
#define delegateGet1(HANDLER, METHOD, TYPE, PARAM_TYPE)
Definition sdk/libraries/core/component/Component.h:192
#define delegateConstGet0(HANDLER, METHOD, TYPE)
delegateConstGet macros: Same as delegateGet but for const METHOD
Definition sdk/libraries/core/component/Component.h:208