1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef VVTK_VIEWWINDOW_H
23 #define VVTK_VIEWWINDOW_H
26 #pragma warning( disable:4251 )
30 #include "SVTK_ViewWindow.h"
36 class VVTK_MainWindow1;
37 class VVTK_MainWindow2;
40 //----------------------------------------------------------------------------
41 //! Customize the SVTK_ViewWindow in order to manage two SVTK_View (base and segmented one)
42 class VVTK_EXPORT VVTK_ViewWindow : public SVTK_ViewWindow
47 //! To construct the class
48 VVTK_ViewWindow(SUIT_Desktop* theDesktop);
57 Initialize(SVTK_ViewModelBase* theModel);
59 //----------------------------------------------------------------------------
60 //! Get access to base SVTK_MainWindow
64 //! Get access to segmented SVTK_MainWindow
68 //----------------------------------------------------------------------------
69 //! Redefine SVTK_ViewWindow::AddActor method
71 This is an entry point for publication the presentation into the viewer.
72 Pointed actor published into the basic MainWindow. If the actor is
73 a Gauss Points one second actor is created from initial actor and
74 is put into segemented MainWindow.
78 AddActor(VTKViewer_Actor* theActor,
79 bool theIsUpdate = false);
81 //! Redefine SVTK_ViewWindow::RemoveActor method
84 RemoveActor(VTKViewer_Actor* theActor,
85 bool theIsUpdate = false);
87 //! Redefine SVTK_ViewWindow::Repaint method
90 Repaint(bool theUpdateTrihedron = true);
92 //----------------------------------------------------------------------------
93 /* interactive object management */
94 //! Redefine SVTK_ViewWindow::highlight method
97 highlight(const Handle(SALOME_InteractiveObject)& theIO,
98 bool theIsHighlight = true,
99 bool theIsUpdate = true);
101 //! Redefine SVTK_ViewWindow::unHighlightAll method
106 //! Redefine SVTK_ViewWindow::setBackgroundColor method
109 setBackgroundColor( const QColor& );
111 //----------------------------------------------------------------------------
113 //! Refresh dump images of the viewers
115 void RefreshDumpImage();
118 //! Redefine SVTK_ViewWindow::onSelectionChanged method
121 onSelectionChanged();
123 //! Redefine SVTK_ViewWindow::onResetView method
128 //! Redefine SVTK_ViewWindow::onFitAll method
133 //----------------------------------------------------------------------------
139 virtual QImage dumpView();
141 VVTK_MainWindow1* myMainWindow1; //!< The manage base view
142 SVTK_View* myView1; //!< The manage base view
144 VVTK_MainWindow2* myMainWindow2; //!< The manage segmented view
145 SVTK_View* myView2; //!< The manage segmented view
152 #pragma warning( default:4251 )