-// 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
// 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 )
{
aLayout->setMargin( 0 );
aLayout->setSpacing( 0 );
- myViewPort = new GraphicsView_ViewPort( aFrame );
+ if( w )
+ myViewPort = dynamic_cast<GraphicsView_ViewPort*>(w);
+ else
+ myViewPort = new GraphicsView_ViewPort( aFrame );
+
aLayout->addWidget( myViewPort );
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 );
return tid;
}
+//================================================================
+// Function : getToolBarId
+// Purpose :
+//================================================================
+int GraphicsView_ViewFrame::getToolBarId()
+{
+ return myToolBarId;
+}
+
//================================================================
// Function : dumpView
// Purpose :
return myViewPort->dumpView();
}
+//================================================================
+// Function : dumpViewToPSFormat
+// Purpose :
+//================================================================
+bool GraphicsView_ViewFrame::dumpViewToPSFormat(const QString& fileName)
+{
+ return myViewPort->dumpViewToPSFormat(fileName);
+}
+
//================================================================
// Function : getVisualParameters
// Purpose :