1 // Copyright (C) 2023 CEA, EDF
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 "PV3DViewer_ViewWindow.h"
21 //#include "PV3DViewer_Core.h"
22 //#include "PV3DViewer_GUIElements.h"
23 #include "PV3DViewer_ViewModel.h"
24 #include "PV3DViewer_ViewManager.h"
26 #include "SUIT_ViewManager.h"
27 #include "SUIT_ResourceMgr.h"
28 #include "SUIT_Session.h"
29 #include "SUIT_Desktop.h"
30 #include "SUIT_Application.h"
32 #include <pqTabbedMultiViewWidget.h>
33 #include <pqApplicationCore.h>
37 \param theDesktop parent desktop window
38 \param theModel view model
40 PV3DViewer_ViewWindow::PV3DViewer_ViewWindow( SUIT_Desktop* theDesktop, PV3DViewer_ViewModel* theModel )
41 : SUIT_ViewWindow( theDesktop ), myPVMgr( 0 )
43 myDesktop = theDesktop;
45 setViewManager(myModel->getViewManager());
50 As pqViewManager persists through the whole session,
51 the destructor first removes it from the children of this PV3DViewer_ViewWindow
52 to prevent its unexpected deletion.
54 PV3DViewer_ViewWindow::~PV3DViewer_ViewWindow()
57 myPVMgr->setParent( nullptr );
60 setCentralWidget( nullptr );
64 void PV3DViewer_ViewWindow::removePVMgr()
66 pqTabbedMultiViewWidget* aPVMgr = qobject_cast<pqTabbedMultiViewWidget*>(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET"));
72 \brief Returns the ParaView multi-view manager previously set with setPVManager()
74 pqTabbedMultiViewWidget *PV3DViewer_ViewWindow::getMultiViewManager() const