X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGLViewer%2FGLViewer_ViewFrame.cxx;h=2942d3ab360393998a03ac048a76a51226785bc4;hb=ee2404a020ff8bb9db84f624af1179804f8c8dbe;hp=b52bdb69f1a7bf5acf51acd3b1c5c14965c5bdea;hpb=1c889394b028b786898a995d38c07c8f3d564837;p=modules%2Fgui.git diff --git a/src/GLViewer/GLViewer_ViewFrame.cxx b/src/GLViewer/GLViewer_ViewFrame.cxx index b52bdb69f..2942d3ab3 100644 --- a/src/GLViewer/GLViewer_ViewFrame.cxx +++ b/src/GLViewer/GLViewer_ViewFrame.cxx @@ -1,29 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 +// 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. +// 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. +// 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 +// 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_ViewFrame.cxx -// Created: November, 2004 -//#include +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "GLViewer_ViewFrame.h" #include "GLViewer_Viewer.h" #include "GLViewer_ViewPort2d.h" @@ -50,7 +46,6 @@ #ifdef WIN32 #include #include -using namespace std; #endif /*! @@ -94,57 +89,57 @@ void GLViewer_ViewFrame::createActions() // Dump view aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_DUMP" ) ), - tr( "MNU_DUMP_VIEW" ), 0, this); + tr( "MNU_DUMP_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_DUMP_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView())); toolMgr()->registerAction( aAction, DumpId ); // FitAll aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITALL" ) ), - tr( "MNU_FITALL" ), 0, this); + tr( "MNU_FITALL" ), 0, this); aAction->setStatusTip(tr("DSC_FITALL")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitAll())); toolMgr()->registerAction( aAction, FitAllId ); // FitRect aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITAREA" ) ), - tr( "MNU_FITRECT" ), 0, this); + tr( "MNU_FITRECT" ), 0, this); aAction->setStatusTip(tr("DSC_FITRECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitArea())); toolMgr()->registerAction( aAction, FitRectId ); // FitSelect aAction = new QtxAction(tr("MNU_FITSELECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITSELECT" ) ), - tr( "MNU_FITSELECT" ), 0, this); + tr( "MNU_FITSELECT" ), 0, this); aAction->setStatusTip(tr("DSC_FITSELECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitSelect())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitSelect())); toolMgr()->registerAction( aAction, FitSelectId ); // Zoom aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_ZOOM" ) ), - tr( "MNU_ZOOM_VIEW" ), 0, this); + tr( "MNU_ZOOM_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_ZOOM_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewZoom())); toolMgr()->registerAction( aAction, ZoomId ); // Panning aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_PAN" ) ), - tr( "MNU_PAN_VIEW" ), 0, this); + tr( "MNU_PAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewPan())); toolMgr()->registerAction( aAction, PanId ); // Global Panning aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_GLOBALPAN" ) ), - tr( "MNU_GLOBALPAN_VIEW" ), 0, this); + tr( "MNU_GLOBALPAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewGlobalPan())); toolMgr()->registerAction( aAction, GlobalPanId ); aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); + tr( "MNU_RESET_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewReset())); toolMgr()->registerAction( aAction, ResetId ); } @@ -153,7 +148,9 @@ void GLViewer_ViewFrame::createActions() */ void GLViewer_ViewFrame::createToolBar() { - int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL") ); + int tid = toolMgr()->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), // title (language-dependant) + QString( "GLViewerViewOperations" ), // name (language-independant) + false ); // disable floatable toolbar toolMgr()->append( DumpId, tid ); QtxMultiAction* aScaleAction = new QtxMultiAction( this );