]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
dumpView() moved from SVTK_View
authorouv <ouv@opencascade.com>
Wed, 17 Aug 2005 09:59:01 +0000 (09:59 +0000)
committerouv <ouv@opencascade.com>
Wed, 17 Aug 2005 09:59:01 +0000 (09:59 +0000)
src/SVTK/SVTK_RenderWindow.cxx
src/SVTK/SVTK_RenderWindow.h

index 9b0666dcede3a91659c03f0f61c1c8bb798285cb..eccc4c75c8da3b7372026ee5e8ee742300edda0c 100644 (file)
@@ -650,3 +650,12 @@ SVTK_RenderWindow
 {   
   AdjustTrihedrons(false);
 }
+
+//----------------------------------------------------------------------------
+QImage
+SVTK_RenderWindow
+::dumpView()
+{
+  QPixmap px = QPixmap::grabWindow( winId() );
+  return px.convertToImage();
+}
index fcfea3edfe2f4169a2d930a7f15f56dbf48e7ab0..b974ccc226ade401d10651bad1c29bd2a095f2ba 100644 (file)
@@ -30,6 +30,7 @@
 #define SVTK_RenderWindow_h
 
 #include <qmainwindow.h>
+#include <qimage.h>
 
 #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;