X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGraphicsView%2FGraphicsView_ViewFrame.cxx;h=c5f1dfaad6c4fd7266c6e58b818a1a270bd78eb0;hb=adc11cbe30d981a17183c5ac49300594c5ff3be4;hp=9e84bb2276a023685095fda8594f8e884fc8c0e8;hpb=034a705024b224972c148e1e3834c5ee38df184b;p=modules%2Fgui.git diff --git a/src/GraphicsView/GraphicsView_ViewFrame.cxx b/src/GraphicsView/GraphicsView_ViewFrame.cxx index 9e84bb227..c5f1dfaad 100644 --- a/src/GraphicsView/GraphicsView_ViewFrame.cxx +++ b/src/GraphicsView/GraphicsView_ViewFrame.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -47,7 +47,7 @@ // Name : GraphicsView_ViewFrame // Purpose : Constructor //======================================================================= -GraphicsView_ViewFrame::GraphicsView_ViewFrame( SUIT_Desktop* d, GraphicsView_Viewer* vw ) +GraphicsView_ViewFrame::GraphicsView_ViewFrame( SUIT_Desktop* d, GraphicsView_Viewer* vw, QWidget* w ) : SUIT_ViewWindow( d ), myViewer( vw ) { @@ -58,7 +58,11 @@ GraphicsView_ViewFrame::GraphicsView_ViewFrame( SUIT_Desktop* d, GraphicsView_Vi aLayout->setMargin( 0 ); aLayout->setSpacing( 0 ); - myViewPort = new GraphicsView_ViewPort( aFrame ); + if( w ) + myViewPort = dynamic_cast(w); + else + myViewPort = new GraphicsView_ViewPort( aFrame ); + aLayout->addWidget( myViewPort ); createActions(); @@ -167,7 +171,9 @@ void GraphicsView_ViewFrame::createActions() //================================================================ int GraphicsView_ViewFrame::createToolBar() { - int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL") ); + int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), // title (language-dependant) + QString( "GraphicsViewViewOperations" ), // name (language-independant) + false ); // disable floatable toolbar toolMgr()->append( DumpId, tid ); myScaleAction = new QtxMultiAction( this ); @@ -187,6 +193,15 @@ int GraphicsView_ViewFrame::createToolBar() return tid; } +//================================================================ +// Function : getToolBarId +// Purpose : +//================================================================ +int GraphicsView_ViewFrame::getToolBarId() +{ + return myToolBarId; +} + //================================================================ // Function : dumpView // Purpose : @@ -196,6 +211,15 @@ QImage GraphicsView_ViewFrame::dumpView() return myViewPort->dumpView(); } +//================================================================ +// Function : dumpViewToPSFormat +// Purpose : +//================================================================ +bool GraphicsView_ViewFrame::dumpViewToPSFormat(const QString& fileName) +{ + return myViewPort->dumpViewToPSFormat(fileName); +} + //================================================================ // Function : getVisualParameters // Purpose :