X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSVTK%2FSVTK_ViewWindow.cxx;h=dace6f30e893fc531d3506b8731c9b06d4e9e68e;hb=dcc5c1484f2eaad2eca2e9b4f86ad3fa6de7c370;hp=a6d58a5c20a5fec40c50433450464e8b2fda7be5;hpb=62e8dfbfe705eb200a332406b890bd86c97d0db4;p=modules%2Fgui.git diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index a6d58a5c2..dace6f30e 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -1,4 +1,3 @@ -#include "SVTK_Selector.h" #include "SALOME_Actor.h" #include @@ -16,7 +15,6 @@ #include "SUIT_Tools.h" #include "SUIT_ResourceMgr.h" -#include "SUIT_FileDlg.h" #include "VTKViewer_Transform.h" #include "VTKViewer_Utilities.h" @@ -30,6 +28,8 @@ #include "SALOME_ListIteratorOfListIO.hxx" +#include "SVTK_SelectorDef.h" + #include "VTKViewer_Algorithm.h" #include "SVTK_Functor.h" @@ -40,7 +40,7 @@ SVTK_ViewWindow : SUIT_ViewWindow(theDesktop) { myModel = theModel; - mySelector = new SVTK_Selector(); + mySelector = new SVTK_SelectorDef(); connect(this,SIGNAL(selectionChanged()),theModel,SLOT(onSelectionChanged())); myTransform = VTKViewer_Transform::New(); @@ -278,6 +278,13 @@ SVTK_ViewWindow aAction->setStatusTip(tr("DSC_RESET_VIEW")); connect(aAction, SIGNAL(activated()), this, SLOT(onResetView())); myActionsMap[ ResetId ] = aAction; + + // onViewTrihedron: Shows - Hides Trihedron + aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRON"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ), + tr( "MNU_SHOW_TRIHEDRON" ), 0, this); + aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON")); + connect(aAction, SIGNAL(activated()), this, SLOT(onViewTrihedron())); + myActionsMap[ ViewTrihedronId ] = aAction; } //---------------------------------------------------------------------------- @@ -286,6 +293,7 @@ SVTK_ViewWindow ::createToolBar() { myActionsMap[DumpId]->addTo(myToolBar); + myActionsMap[ViewTrihedronId]->addTo(myToolBar); SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar); aScaleBtn->AddAction(myActionsMap[FitAllId]); @@ -418,19 +426,18 @@ SVTK_ViewWindow QPixmap px = QPixmap::grabWindow(myRenderWindow->winId()); QApplication::restoreOverrideCursor(); - QString fileName = SUIT_FileDlg::getFileName(this, - QString::null, - tr("VTK_IMAGE_FILES"), - tr("INF_APP_DUMP_VIEW"), - false); - if (!fileName.isNull()) { + SUIT_Application* app = getViewManager()->study()->application(); + + QString aFileName = app->getFileName( false, QString::null, tr("VTK_IMAGE_FILES"), tr("INF_APP_DUMP_VIEW"), 0 ); + + if ( !aFileName.isNull() ) { QApplication::setOverrideCursor( Qt::waitCursor ); - QString fmt = SUIT_Tools::extension( fileName ).upper(); + QString fmt = SUIT_Tools::extension( aFileName ).upper(); if (fmt.isEmpty()) fmt = QString("BMP"); // default format if (fmt == "JPG") fmt = "JPEG"; - bool bOk = px.save(fileName, fmt.latin1()); + bool bOk = px.save(aFileName, fmt.latin1()); QApplication::restoreOverrideCursor(); if (!bOk) { SUIT_MessageBox::error1(this, tr("ERROR"), tr("ERR_DOC_CANT_SAVE_FILE"), tr("BUT_OK"));