1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "QxScene_ViewManager.h"
21 #include "QxScene_ViewWindow.h"
24 #include "DebTrace.hxx"
29 QxScene_ViewManager::QxScene_ViewManager( SUIT_Study* theStudy,
30 SUIT_Desktop* theDesktop,
31 SUIT_ViewModel* theViewModel )
32 : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
34 DEBTRACE("QxScene_ViewManager::QxScene_ViewManager");
35 setTitle( tr( "QXSCENE_VIEW_TITLE" ) );
41 QxScene_ViewManager::~QxScene_ViewManager()
43 DEBTRACE("QxScene_ViewManager::~QxScene_ViewManager");
49 \param theView - view to be added
51 bool QxScene_ViewManager::insertView( SUIT_ViewWindow* theView )
53 DEBTRACE("QxScene_ViewManager::insertView");
54 bool res = SUIT_ViewManager::insertView( theView );
61 void QxScene_ViewManager::createView()
63 DEBTRACE("QxScene_ViewManager::createView");
68 * Method redefined here to allow some housekeeping before closing
69 * the view (delete a loded schema and everything related).
70 * If this is not possible, the view is not closed
72 void QxScene_ViewManager::closeView(SUIT_ViewWindow* theView)
74 DEBTRACE("QxScene_ViewManager::closeView");
75 QxScene_ViewWindow *qxview = dynamic_cast<QxScene_ViewWindow*>(theView);
76 bool OKToClose = true;
80 OKToClose = qxview->closeRequested();
83 DEBTRACE("SUIT View to close");
84 SUIT_ViewManager::closeView(theView);
85 DEBTRACE("SUIT View closed");