From: vsr Date: Fri, 15 Apr 2005 06:02:24 +0000 (+0000) Subject: PAL8598: Provide an access to "Dump View" functionality from the context popup menu... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=02d8cd4cc9825a6436a8914aa2e7eb6bee3d780f;p=modules%2Fkernel.git PAL8598: Provide an access to "Dump View" functionality from the context popup menu for the viewer --- diff --git a/src/VTKViewer/VTKViewer_RenderWindow.cxx b/src/VTKViewer/VTKViewer_RenderWindow.cxx index 08dbc0eda..bd97dd202 100644 --- a/src/VTKViewer/VTKViewer_RenderWindow.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindow.cxx @@ -176,6 +176,8 @@ void VTKViewer_RenderWindow::onCreatePopup() int id; myIDs.append ( id = myPopup->insertItem (tr ("MEN_VP3D_CHANGEBGR")) ); QAD_ASSERT ( myPopup->connectItem ( id, this, SLOT(onChangeBackgroundColor())) ); + myIDs.append ( id = myPopup->insertItem (tr ("MEN_VP3D_DUMPVIEW")) ); + QAD_ASSERT ( myPopup->connectItem ( id, this, SIGNAL(DumpView())) ); // } } } diff --git a/src/VTKViewer/VTKViewer_RenderWindow.h b/src/VTKViewer/VTKViewer_RenderWindow.h index 34fd61ff0..e19e67966 100644 --- a/src/VTKViewer/VTKViewer_RenderWindow.h +++ b/src/VTKViewer/VTKViewer_RenderWindow.h @@ -77,6 +77,7 @@ public QWidget, /*virtual public vtkRenderWindow, */ void ButtonPressed(const QMouseEvent *event) ; void ButtonReleased(const QMouseEvent *event) ; void KeyPressed(QKeyEvent *event) ; + void DumpView(); protected: vtkRenderWindow* myRW; diff --git a/src/VTKViewer/VTKViewer_ViewFrame.cxx b/src/VTKViewer/VTKViewer_ViewFrame.cxx index 067cc6aee..783b60bae 100644 --- a/src/VTKViewer/VTKViewer_ViewFrame.cxx +++ b/src/VTKViewer/VTKViewer_ViewFrame.cxx @@ -90,6 +90,7 @@ VTKViewer_ViewFrame::VTKViewer_ViewFrame(QWidget* parent, const char* name) void VTKViewer_ViewFrame::InitialSetup() { m_RW = new VTKViewer_RenderWindow(this, "RenderWindow"); m_RW->getRenderWindow()->AddRenderer(m_Renderer); + connect(m_RW, SIGNAL(DumpView()), this, SLOT(onProcessViewDump())); m_Renderer->GetActiveCamera()->ParallelProjectionOn(); m_Renderer->LightFollowCameraOn();