]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Possibility to dump view content to JPEG image file CATH_dev
authorouv <ouv@opencascade.com>
Mon, 12 Mar 2007 12:07:01 +0000 (12:07 +0000)
committerouv <ouv@opencascade.com>
Mon, 12 Mar 2007 12:07:01 +0000 (12:07 +0000)
src/GLViewer/GLViewer_ViewFrame.cxx

index 38edf40b1027635e11c182c5b427a239159ce868..951935503150d484de0cc2d79ad993ae8b2fe3d5 100644 (file)
@@ -414,7 +414,7 @@ QImage GLViewer_ViewFrame::dumpView()
 */
 void GLViewer_ViewFrame::onViewDump()
 {
-    QString aFilter( "*.bmp\n*.png" );
+    QString aFilter( "*.bmp\n*.png\n*.jpeg" );
 
     QFileDialog aFileDlg( QDir::current().absPath(), aFilter, this );
     aFileDlg.setCaption( tr( "DUMP_VIEW_SAVE_FILE_DLG_CAPTION" ) );
@@ -444,9 +444,18 @@ void GLViewer_ViewFrame::onViewDump()
         aSaveOp = "BMP";
     }
     else if( aFileExt == "*.png" )
+    {
         if( aTypedFileExt.isEmpty() )
             aFileName += ".png";
         aSaveOp = "PNG";
+    }
+    else if( aFileExt == "*.jpeg" )
+    {
+        if( aTypedFileExt.isEmpty() )
+            aFileName += ".jpeg";
+        aSaveOp = "JPEG";
+    }
+
 
     QImage anImage = dumpView();
     if( !anImage.save( aFileName, aSaveOp ) )