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 #include "QxScene_ViewManager.h"
23 #include "QxScene_ViewWindow.h"
26 #include "DebTrace.hxx"
31 QxScene_ViewManager::QxScene_ViewManager( SUIT_Study* theStudy,
32 SUIT_Desktop* theDesktop,
33 SUIT_ViewModel* theViewModel )
34 : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
36 DEBTRACE("QxScene_ViewManager::QxScene_ViewManager");
37 setTitle( tr( "QXSCENE_VIEW_TITLE" ) );
43 QxScene_ViewManager::~QxScene_ViewManager()
45 DEBTRACE("QxScene_ViewManager::~QxScene_ViewManager");
51 \param theView - view to be added
53 bool QxScene_ViewManager::insertView( SUIT_ViewWindow* theView )
55 DEBTRACE("QxScene_ViewManager::insertView");
56 bool res = SUIT_ViewManager::insertView( theView );
63 void QxScene_ViewManager::createView()
65 DEBTRACE("QxScene_ViewManager::createView");
70 * Method redefined here to allow some housekeeping before closing
71 * the view (delete a loded schema and everything related).
72 * If this is not possible, the view is not closed
74 void QxScene_ViewManager::closeView(SUIT_ViewWindow* theView)
76 DEBTRACE("QxScene_ViewManager::closeView");
77 QxScene_ViewWindow *qxview = dynamic_cast<QxScene_ViewWindow*>(theView);
78 bool OKToClose = true;
82 OKToClose = qxview->closeRequested();
85 DEBTRACE("SUIT View to close");
86 SUIT_ViewManager::closeView(theView);
87 DEBTRACE("SUIT View closed");