From: ouv Date: Wed, 17 Aug 2005 09:59:01 +0000 (+0000) Subject: dumpView() moved from SVTK_View X-Git-Tag: BR-D5-38-2003_D2005-12-09~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fdfaaef48e1e0ba466c28c7bee20be36f6c7c42;p=modules%2Fgui.git dumpView() moved from SVTK_View --- diff --git a/src/SVTK/SVTK_RenderWindow.cxx b/src/SVTK/SVTK_RenderWindow.cxx index 9b0666dce..eccc4c75c 100644 --- a/src/SVTK/SVTK_RenderWindow.cxx +++ b/src/SVTK/SVTK_RenderWindow.cxx @@ -650,3 +650,12 @@ SVTK_RenderWindow { AdjustTrihedrons(false); } + +//---------------------------------------------------------------------------- +QImage +SVTK_RenderWindow +::dumpView() +{ + QPixmap px = QPixmap::grabWindow( winId() ); + return px.convertToImage(); +} diff --git a/src/SVTK/SVTK_RenderWindow.h b/src/SVTK/SVTK_RenderWindow.h index fcfea3edf..b974ccc22 100644 --- a/src/SVTK/SVTK_RenderWindow.h +++ b/src/SVTK/SVTK_RenderWindow.h @@ -30,6 +30,7 @@ #define SVTK_RenderWindow_h #include +#include #include "SVTK.h" @@ -100,6 +101,11 @@ class SVTK_EXPORT SVTK_RenderWindow : public QMainWindow void onAdjustTrihedron(); void onAdjustCubeAxes(); + void onDumpView(); + + public: + QImage dumpView(); + protected: enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId, FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, ViewTrihedronId }; @@ -108,6 +114,7 @@ class SVTK_EXPORT SVTK_RenderWindow : public QMainWindow void createActions(); void createToolBar(); + protected: vtkRenderer* myRenderer; vtkRenderWindow* myRenderWindow;