X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGLViewer%2FGLViewer_ViewManager.cxx;h=8571d69f416f86318876a07cae6c6345dee8b379;hb=ee2404a020ff8bb9db84f624af1179804f8c8dbe;hp=58284a1fff14799fdac556d9ae96b4f8a4d75768;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/GLViewer/GLViewer_ViewManager.cxx b/src/GLViewer/GLViewer_ViewManager.cxx index 58284a1ff..8571d69f4 100644 --- a/src/GLViewer/GLViewer_ViewManager.cxx +++ b/src/GLViewer/GLViewer_ViewManager.cxx @@ -1,39 +1,48 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// Author : OPEN CASCADE // File: GLViewer_ViewManager.cxx // Created: November, 2004 -// Author: OCC team -// Copyright (C) CEA 2004 - - +//#include +// #include "GLViewer_ViewManager.h" -#include "GLViewer_ViewFrame.h" #include "GLViewer_Viewer2d.h" #include "SUIT_Desktop.h" -int GLViewer_ViewManager::myMaxId = 0; - -//*************************************************************** -GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* aStudy, - SUIT_Desktop* theDesktop ) -: SUIT_ViewManager( aStudy, theDesktop ) +/*!Constructor.*/ +GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop ) +: SUIT_ViewManager( theStudy, theDesktop, new GLViewer_Viewer2d( "GLViewer" ) ) { - myId = ++myMaxId; - setViewModel( new GLViewer_Viewer2d( "GLViewer" ) ); + setTitle( tr( "GL_VIEW_TITLE" ) ); } -//*************************************************************** +/*!Destructor.*/ GLViewer_ViewManager::~GLViewer_ViewManager() { } -//*************************************************************** -void GLViewer_ViewManager::setViewName(SUIT_ViewWindow* theView) -{ - int aPos = myViews.find(theView); - theView->setCaption( QString( "GL scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1)); -} - -//*************************************************************** -void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup ) +/*!Context menu popup for \a popup.*/ +void GLViewer_ViewManager::contextMenuPopup( QMenu* popup ) { SUIT_ViewManager::contextMenuPopup( popup ); // if it is necessary invoke method CreatePopup of ViewPort