Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VVTK / VVTK_ViewWindow.h
1 #ifndef VVTK_VIEWWINDOW_H
2 #define VVTK_VIEWWINDOW_H
3
4 #ifdef WIN32
5 #pragma warning( disable:4251 )
6 #endif
7
8 #include "VVTK.h"
9 #include "SVTK_ViewWindow.h"
10
11 #include <string>
12
13 class VVTK_MainWindow1;
14 class VVTK_MainWindow2;
15 class SVTK_View;
16
17 //----------------------------------------------------------------------------
18 //! Customize the SVTK_ViewWindow in order to manage two SVTK_View (base and segmented one)
19 class VVTK_EXPORT VVTK_ViewWindow : public SVTK_ViewWindow
20 {
21   Q_OBJECT;
22
23 public:
24   //! To construct the class
25   VVTK_ViewWindow(SUIT_Desktop* theDesktop);
26
27   //! Destroy
28   virtual
29   ~VVTK_ViewWindow();
30
31   //! To initialize
32   virtual
33   void
34   Initialize(SVTK_ViewModelBase* theModel);
35
36   //----------------------------------------------------------------------------
37   //! Get access to base SVTK_MainWindow
38   VVTK_MainWindow1* 
39   getMainWindow1();
40
41   //! Get access to segmented SVTK_MainWindow
42   VVTK_MainWindow2* 
43   getMainWindow2();
44
45   //----------------------------------------------------------------------------
46   //! Redefine SVTK_ViewWindow::AddActor method
47   /*!
48     This is an entry point for publication the presentation into the viewer.
49     Pointed actor published into the basic MainWindow. If the actor is
50     a Gauss Points one second actor is created from initial actor and 
51     is put into segemented MainWindow.
52   */
53   virtual
54   void
55   AddActor(VTKViewer_Actor* theActor,
56            bool theIsUpdate = false);
57
58   //! Redefine SVTK_ViewWindow::RemoveActor method
59   virtual
60   void
61   RemoveActor(VTKViewer_Actor* theActor,
62               bool theIsUpdate = false);
63
64   //! Redefine SVTK_ViewWindow::Repaint method
65   virtual
66   void
67   Repaint(bool theUpdateTrihedron = true);
68
69   //----------------------------------------------------------------------------
70   /*  interactive object management */
71   //! Redefine SVTK_ViewWindow::highlight method
72   virtual
73   void
74   highlight(const Handle(SALOME_InteractiveObject)& theIO, 
75             bool theIsHighlight = true, 
76             bool theIsUpdate = true);
77
78   //! Redefine SVTK_ViewWindow::unHighlightAll method
79   virtual
80   void
81   unHighlightAll();
82
83   //! Redefine SVTK_ViewWindow::setBackgroundColor method
84   virtual
85   void
86   setBackgroundColor( const QColor& );
87
88   //----------------------------------------------------------------------------
89 public slots:
90   //! Redefine SVTK_ViewWindow::onSelectionChanged method
91   virtual
92   void
93   onSelectionChanged();
94
95   //! Redefine SVTK_ViewWindow::onResetView method
96   virtual
97   void
98   onResetView();     
99
100   //! Redefine SVTK_ViewWindow::onFitAll method
101   virtual
102   void 
103   onFitAll();
104
105   //----------------------------------------------------------------------------
106 protected:
107   virtual 
108   void
109   action( const int );
110
111   virtual QImage dumpView();
112
113   VVTK_MainWindow1* myMainWindow1; //!< The manage base view
114   SVTK_View* myView1; //!< The manage base view
115
116   VVTK_MainWindow2* myMainWindow2; //!< The manage segmented view
117   SVTK_View* myView2; //!< The manage segmented view
118 };
119
120 #ifdef WIN32
121 #pragma warning( default:4251 )
122 #endif
123
124 #endif