1 #ifndef VVTK_MAINWINDOW_H
2 #define VVTK_MAINWINDOW_H
5 #pragma warning( disable:4251 )
9 #include "SVTK_MainWindow.h"
13 class VISU_WidgetCtrl;
14 class VVTK_SegmentationCursorDlg;
15 class VISU_InsideCursorSettings;
16 class VISU_OutsideCursorSettings;
17 class VISU_PickingSettings;
18 class VVTK_InteractorStyle;
19 class VVTK_ControllerIncrement;
20 class VVTK_ControllerOnKeyDown;
21 class VVTK_PickingDlg;
22 class VVTK_MainWindow2;
27 //----------------------------------------------------------------------------
28 //! Customize SVTK_MainWindow to provide VVTK functionality
29 class VVTK_EXPORT VVTK_MainWindow: public SVTK_MainWindow
34 //! Construct instance of the class
35 VVTK_MainWindow(QWidget* theParent,
37 SUIT_ResourceMgr* theResourceMgr,
38 SUIT_ViewWindow* theViewWindow);
40 //! Reimplement SVTK_MainWindow::Initialize
43 Initialize(SVTK_RenderWindowInteractor* theInteractor);
45 //! Destroy instance of the class
55 //! To change active interactor style at run-time
58 OnInteractorStyleSwitch(bool theIsGaussStyleOn);
81 vtkSmartPointer<VVTK_InteractorStyle> myInteractorStyle;
82 vtkSmartPointer<VVTK_ControllerIncrement> myControllerIncrement;
83 vtkSmartPointer<VVTK_ControllerOnKeyDown> myControllerOnKeyDown;
85 QToolBar* myRecordingToolBar;
86 QtxAction* myStartAction;
87 QtxAction* myPlayAction;
88 QtxAction* myPauseAction;
89 QtxAction* myStopAction;
91 VVTK_Recorder *myRecorder;
95 //----------------------------------------------------------------------------
96 //! Extend VVTK_MainWindow to implement functionality for base view
97 class VVTK_EXPORT VVTK_MainWindow1: public VVTK_MainWindow
102 //! Construct instance of the class
103 VVTK_MainWindow1(QSplitter* theParent,
105 SUIT_ResourceMgr* theResourceMgr,
106 SUIT_ViewWindow* theViewWindow);
108 //! Reimplement VVTK_MainWindow::Initialize
111 Initialize(SVTK_RenderWindowInteractor* theInteractor,
112 VVTK_Renderer1* theRenderer);
114 //! Destroy instance of the class
118 //! Create instance of the segmented VVTK_MainWindow
120 The two views (VVTK_MainWindow1 and VVTK_MainWindow2) should change its behaviour in the same time.
121 So, it is necessary to synhronize them through sharing some common pointers.
124 CreateMainWindow2(QWidget* theParent,
126 SUIT_ResourceMgr* theResourceMgr,
127 SUIT_ViewWindow* theViewWindow);
129 VISU_WidgetCtrl* GetWidgetCtrl();
132 SetPlanesSegementation(bool theIsOn);
135 SetSphereSegementation(bool theIsOn);
137 VISU_InsideCursorSettings*
138 GetInsideCursorSettings();
140 //! Get contained VISU_OutsideCursorSettings
141 VISU_OutsideCursorSettings*
142 GetOutsideCursorSettings();
144 //! Get contained VISU_PickingSettings
145 VISU_PickingSettings*
146 GetPickingSettings();
149 //! To activate/ deactivate the segementation cursor at run-time
151 OnSegmentationSwitch();//bool theIsSegmentationOn);
154 OnSegmentationSwitch(QtxAction* theAction);//bool theIsSegmentationOn);
156 //! To change active selection mode at run-time
159 OnSelectionModeSwitch(bool theIsSelectionOn);
161 //! To adjust to the current selection mode
164 OnSelectionChanged();
167 VVTK_Renderer1* myRenderer; //!< Keeps extended version of SVTK_Renderer
169 VVTK_MainWindow2* myMainWindow2; //!< Refer to segmented view
171 QtxAction* myStyleSwitchAction; //!< Action for switch interactor style
172 QToolBar* myPtsToolBar; //!< Additional tool bar
174 //! To implement show/hide segmented view on acttivate/ deactivate segementation cursor
175 QSplitter* mySplitter;
177 QtxAction* myPickingAction; //!< Action for switch selection mode
178 QtxAction* myPlaneSegmentationAction; //!< Action for switch segmentation mode to plane
179 QtxAction* mySphereSegmentationAction; //!< Action for switch segmentation mode to sphere
181 //! Keep reference to VVTK_SegmentationCursorDlg
182 VVTK_SegmentationCursorDlg* mySegmentationCursorDlg;
183 VVTK_PickingDlg* myPickingDlg; //!< Keep reference to VVTK_PickingDlg
187 //----------------------------------------------------------------------------
188 //! Extend VVTK_MainWindow to implement functionality for segmented view
189 class VVTK_EXPORT VVTK_MainWindow2: public VVTK_MainWindow
193 friend class VVTK_MainWindow1;
195 //! Construct instance of the class
196 VVTK_MainWindow2(QWidget* theParent,
198 SUIT_ResourceMgr* theResourceMgr,
199 SUIT_ViewWindow* theViewWindow,
200 QtxAction* theStyleSwitchAction);
202 //! Destroy instance of the class
206 //! Reimplement SVTK_MainWindow::Initialize
209 Initialize(SVTK_RenderWindowInteractor* theInteractor);
212 // Refer to the VVTK_MainWindow1::myStyleSwitchAction instance
213 QtxAction* myStyleSwitchAction;
219 #pragma warning( default:4251 )