-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 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.
//
-// 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 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME QxScene : build Supervisor viewer into desktop
//
#include "QxScene_ViewWindow.h"
//#define _DEVDEBUG_
#include "DebTrace.hxx"
-using namespace std;
-
/*!
Constructor
*/
aAction = new QtxAction( tr( "MNU_FITALL" ),
aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_FITALL" ) ),
tr( "MNU_FITALL" ),
- 0, this);
+ 0, this);
aAction->setStatusTip( tr( "DSC_FITALL" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewFitAll() ) );
mgr->registerAction( aAction, FitAllId );
aAction = new QtxAction( tr( "MNU_FITRECT" ),
aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_FITAREA" ) ),
tr( "MNU_FITRECT" ),
- 0, this);
+ 0, this);
aAction->setStatusTip( tr( "DSC_FITRECT" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewFitArea() ) );
mgr->registerAction( aAction, FitRectId );
// 2.3. Zoom
aAction = new QtxAction( tr( "MNU_ZOOM_VIEW" ),
- aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_ZOOM" ) ),
+ aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_ZOOM" ) ),
tr( "MNU_ZOOM_VIEW" ),
- 0, this);
+ 0, this);
aAction->setStatusTip( tr( "DSC_ZOOM_VIEW" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewZoom() ) );
mgr->registerAction( aAction, ZoomId );
// 3.1. Panning
aAction = new QtxAction( tr( "MNU_PAN_VIEW" ),
- aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_PAN" ) ),
- tr( "MNU_PAN_VIEW" ),
- 0, this);
+ aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_PAN" ) ),
+ tr( "MNU_PAN_VIEW" ),
+ 0, this);
aAction->setStatusTip( tr( "DSC_PAN_VIEW" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewPan() ) );
mgr->registerAction( aAction, PanId );
// 3.2. Global Panning
aAction = new QtxAction( tr( "MNU_GLOBALPAN_VIEW" ),
- aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_GLOBALPAN" ) ),
+ aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_GLOBALPAN" ) ),
tr( "MNU_GLOBALPAN_VIEW" ),
- 0, this);
+ 0, this);
aAction->setStatusTip( tr( "DSC_GLOBALPAN_VIEW" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewGlobalPan() ) );
mgr->registerAction( aAction, GlobalPanId );
// reset
aAction = new QtxAction( tr( "MNU_RESET_VIEW" ),
- aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_RESET" ) ),
- tr( "MNU_RESET_VIEW" ),
- 0, this);
+ aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_RESET" ) ),
+ tr( "MNU_RESET_VIEW" ),
+ 0, this);
aAction->setStatusTip( tr( "DSC_RESET_VIEW" ) );
connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewReset() ) );
mgr->registerAction( aAction, ResetId );
{
DEBTRACE("QxScene_ViewWindow::createToolBar");
QtxActionToolMgr* mgr = toolMgr();
- myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ) );
+ myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), false );
mgr->append( ScaleOpId, myToolBar );
mgr->append( MoveOpId, myToolBar );
mgr->append( ResetId, myToolBar );
bool QxScene_ViewWindow::closeRequested()
{
DEBTRACE("QxScene_ViewWindow::closeRequested");
- bool isClosed = false;
+ bool isClosed = true;
emit tryClose(isClosed, this);
DEBTRACE("isClosed=" << isClosed);
return isClosed;