From 02d8cd4cc9825a6436a8914aa2e7eb6bee3d780f Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 15 Apr 2005 06:02:24 +0000 Subject: [PATCH] PAL8598: Provide an access to "Dump View" functionality from the context popup menu for the viewer --- src/VTKViewer/VTKViewer_RenderWindow.cxx | 2 ++ src/VTKViewer/VTKViewer_RenderWindow.h | 1 + src/VTKViewer/VTKViewer_ViewFrame.cxx | 1 + 3 files changed, 4 insertions(+) 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(); -- 2.39.2