From b5ac9a9a4d73d7d34e88895cdbe6680ef994e67c Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 15 Apr 2005 05:46:23 +0000 Subject: [PATCH] PAL8598: Provide an access to "Dump View" functionality from the context popup menu for the viewer --- src/Plot2d/Plot2d_ViewFrame.cxx | 8 ++++++++ src/Plot2d/Plot2d_ViewFrame.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index cde7a3961..50626fa19 100644 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -244,6 +244,13 @@ void Plot2d_ViewFrame::createActions() fitDataAction->setStatusTip ( tr( "PRP_PLOT2D_CHANGE_BACKGROUND" ) ); myActions.insert( ChangeBackgroundId, changeBGAction ); connect( changeBGAction, SIGNAL( activated() ), this, SLOT( onChangeBackground() ) ); + + // Dump View + QActionP* dumpViewAction = new QActionP ( tr( "MEN_VP3D_DUMPVIEW"), + tr( "MEN_VP3D_DUMPVIEW" ), 0, this ); + dumpViewAction->setStatusTip ( tr( "MEN_VP3D_DUMPVIEW" ) ); + myActions.insert( DumpViewId, dumpViewAction ); + connect( dumpViewAction, SIGNAL( activated() ), this, SLOT( onProcessViewDump() ) ); } /*! Gets window's central widget @@ -288,6 +295,7 @@ void Plot2d_ViewFrame::onCreatePopup() // Change background myPopup->insertSeparator(); myActions[ ChangeBackgroundId ]->addTo( myPopup ); + myActions[ DumpViewId ]->addTo( myPopup ); } } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 275c432fb..c837cee50 100644 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -35,7 +35,7 @@ class QAD_EXPORT Plot2d_ViewFrame : public QAD_ViewFrame, public QAD_PopupClient enum { NoOpId, FitAllId, FitAreaId, ZoomId, PanId, DumpId, ModeXLinearId, ModeXLogarithmicId, ModeYLinearId, ModeYLogarithmicId, - LegendId, CurvePointsId, CurveLinesId, CurveSplinesId, SettingsId, FitDataId, ChangeBackgroundId }; + LegendId, CurvePointsId, CurveLinesId, CurveSplinesId, SettingsId, FitDataId, ChangeBackgroundId, DumpViewId }; public: /* Construction/destruction */ Plot2d_ViewFrame( QWidget* parent, const QString& title = "" ); -- 2.39.2