1 #ifndef VTKVIEWER_VIEWWINDOW_H
2 #define VTKVIEWER_VIEWWINDOW_H
6 #include "SUIT_ViewWindow.h"
12 class VTKViewer_Viewer;
13 class VTKViewer_Trihedron;
14 class VTKViewer_Transform;
15 class VTKViewer_RenderWindow;
16 class VTKViewer_InteractorStyle;
17 class VTKViewer_RenderWindowInteractor;
18 class VTKViewer_Actor;
21 #pragma warning( disable:4251 )
24 class VTKVIEWER_EXPORT VTKViewer_ViewWindow : public SUIT_ViewWindow
29 VTKViewer_ViewWindow( SUIT_Desktop*, VTKViewer_Viewer*,
30 VTKViewer_InteractorStyle* = 0,
31 VTKViewer_RenderWindowInteractor* = 0 );
32 virtual ~VTKViewer_ViewWindow();
34 QToolBar* getToolBar() { return myToolBar; }
36 void setBackgroundColor( const QColor& );
37 QColor backgroundColor() const;
39 vtkRenderer* getRenderer() { return myRenderer; }
40 VTKViewer_RenderWindow* getRenderWindow() { return myRenderWindow; }
41 VTKViewer_RenderWindowInteractor* getRWInteractor() { return myRWInteractor; }
42 bool isTrihedronDisplayed();
44 void Repaint( bool theUpdateTrihedron = true );
45 void onAdjustTrihedron();
46 void GetScale( double theScale[3] );
47 void SetScale( double theScale[3] );
48 void AddActor( VTKViewer_Actor*, bool update = false );
49 void RemoveActor( VTKViewer_Actor*, bool update = false);
62 void activateWindowFit();
63 void activateRotation();
64 void activatePanning();
65 void activateGlobalPanning();
66 void onTrihedronShow();
69 void onKeyPressed(QKeyEvent* event);
70 void onKeyReleased(QKeyEvent* event);
71 void onMousePressed(QMouseEvent* event);
72 void onMouseDoubleClicked(QMouseEvent* event);
73 void onMouseReleased(QMouseEvent* event);
74 void onMouseMoving(QMouseEvent* event);
77 void InsertActor( VTKViewer_Actor* theActor,
78 bool theMoveInternalActors = false );
79 void MoveActor( VTKViewer_Actor* theActor );
82 enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId,
83 FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, TrihedronShowId };
84 typedef QMap<int, QtxAction*> ActionsMap;
89 VTKViewer_Viewer* myModel;
91 vtkRenderer* myRenderer;
92 VTKViewer_RenderWindow* myRenderWindow;
93 VTKViewer_RenderWindowInteractor* myRWInteractor;
95 VTKViewer_Trihedron* myTrihedron;
96 VTKViewer_Transform* myTransform;
99 ActionsMap myActionsMap;
103 friend class VTKViewer_RenderWindowInteractor;
107 #pragma warning( default:4251 )