Index: /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh
===================================================================
--- /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 655)
+++ /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 656)
@@ -47,19 +47,18 @@
 
 /** The G4OpenGLQtExportDialog class provide a Dialog displaying differents options
-  for each file format
- */
+    for each file format
+*/
 class G4OpenGLQtExportDialog : public QDialog
 {
   Q_OBJECT
 
-public:
+ public:
   /** Construct a G4OpenGLQtExportDialog
       @param parent : parent widget
-      @param name : name of the saved file with extention
       @param format : format of save file in lower case
       @param height : height of the original file
       @param width : width of the original file
   */
-  G4OpenGLQtExportDialog(QWidget* parent, QString name, QString format, int height =0, int width=0);
+  G4OpenGLQtExportDialog(QWidget* parent, QString format, int height =0, int width=0);
 
   /** Destroys G4OpenGLQtExportDialog */
@@ -70,9 +69,9 @@
 
   /** return the new width for file if format has a width widget, instead return 
-the original value */
+      the original value */
   int getWidth();
 
   /** return the new height for file if format has a height widget, instead return
-the original value  */
+      the original value  */
   int getHeight();
 
@@ -86,10 +85,15 @@
   bool getVectorEPS();
 
-public slots:
+	    public slots:
 
-/** Called by a clic on modify/original size button.This will 
-    invert buttons and hide/unhide size
-*/
-  void changeSizeBox();  
+	    /** Called by a clic on modify/original size button.This will 
+		invert buttons and hide/unhide size
+	    */
+	    void changeSizeBox();  
+
+  /** Called by a clic on vectorEPS check box.If vectorEPS checkBox is checked,
+      it will enable change size buttons. Else it will disable them.
+  */
+  void changeVectorEPS();
 
   /** Called by changing value in height lineEdit. If ratio is keep, will also change the width
@@ -101,5 +105,5 @@
   void textHeightChanged(const QString &); 
 
-private:
+ private:
   QString f_name, f_type, f_dir;
   QLabel* qualityLabel;
Index: /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 655)
+++ /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 656)
@@ -132,7 +132,6 @@
   void toggleAux(bool);
   void toggleFullScreen(bool);
-#if QT_VERSION >= 0x040000
+  // Only use for Qt>4.0
   void dialogClosed();
-#endif
 };
 
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 655)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 656)
@@ -50,5 +50,4 @@
 G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
  QWidget* parent
-,QString nomFich
 ,QString format
  ,int aHeight
@@ -103,4 +102,10 @@
 //   }
 
+  // FIXME : L. Garnier 4/12/07
+  // This is not working for PS and PDF images, it does nothing.
+  // Image is staying in color mode
+  //  if ((format == "ps") || (format == "pdf") || (format == "eps")) {
+
+
   // size box
 
@@ -231,49 +236,12 @@
   globalVLayout->addWidget(sizeWidget);
 
-  if ((format == "jpg") || 
-      (format == "jpeg")) {
-    
-    QGroupBox *imageGroupBox = new QGroupBox(tr("Image quality"),this);
-    QHBoxLayout *hSliderLayout = new QHBoxLayout(imageGroupBox);
-    hSliderLayout->setMargin (15); 
-
-    qualitySlider= new QSlider(Qt::Horizontal,imageGroupBox);
-#if QT_VERSION < 0x040000
-    qualitySlider->setMinValue(0);
-    qualitySlider->setMaxValue(100);
-    qualitySlider->setTickmarks(QSlider::Below); 
-#else
-    qualitySlider->setMinimum(0);
-    qualitySlider->setMaximum(100);
-    qualitySlider->setTickPosition(QSlider::TicksBelow);
-#endif
-    qualitySlider->setValue(60);
-    hSliderLayout->addWidget(new QLabel("Low ",imageGroupBox));
-    hSliderLayout->addWidget(qualitySlider);
-    hSliderLayout->addWidget(new QLabel(" Maximum",imageGroupBox));
-    
-#if QT_VERSION >= 0x040000
-    imageGroupBox->setLayout(hSliderLayout);
-#endif
-
-#if QT_VERSION >= 0x040000
-    imageGroupBox->setLayout(hSliderLayout);
-#endif
-
-    globalVLayout->addWidget(imageGroupBox);
-  }
-
-
-  // FIXME : L. Garnier 4/12/07
-  // This is not working for PS and PDF images, it does nothing.
-  // Image is staying in color mode
-  //  if ((format == "ps") || (format == "pdf") || (format == "eps")) {
-
  if (format == "eps") {
 
-    QWidget * EPSWidgetGroupBox; // widget containing group button
-    QVBoxLayout *EPSGroupBoxLayout;
-
-#if QT_VERSION < 0x040000
+   QGroupBox *EPSWidgetGroupBox = new QGroupBox(tr("EPS options"),this); // widget containing group button
+
+
+#if QT_VERSION < 0x040000
+
+    EPSWidgetGroupBox->setInsideMargin (15); 
 
     //    QButtonGroup * EPSColorButtonGroupBox = new QButtonGroup( 2,Qt::Vertical, tr("EPS options"),this);
@@ -288,10 +256,8 @@
 
     vectorEPSCheckBox = new QCheckBox( "Vector EPS File",EPSWidgetGroupBox);
-    EPSWidgetGroupBox->add(vectorEPSCheckBox);
-
-#else
-     EPSWidgetGroupBox = new QGroupBox(tr("EPS options"));
-//     EPSGroupBoxLayout = new QVBoxLayout(EPSWidgetGroupBox);
-//     EPSGroupBoxLayout->setMargin (15); 
+
+#else
+    QVBoxLayout * EPSGroupBoxLayout = new QVBoxLayout(EPSWidgetGroupBox);
+     EPSGroupBoxLayout->setMargin (15); 
 
 //     colorButton = new QRadioButton("Color",EPSWidgetGroupBox);
@@ -315,5 +281,39 @@
     
     globalVLayout->addWidget(EPSWidgetGroupBox);
-
+    connect( vectorEPSCheckBox, SIGNAL( clicked() ), this, SLOT( changeVectorEPS()) );
+
+  }
+
+  if ((format == "jpg") || 
+      (format == "jpeg")) {
+    
+    QGroupBox *imageGroupBox = new QGroupBox(tr("Image quality"),this);
+    QHBoxLayout *hSliderLayout = new QHBoxLayout(imageGroupBox);
+    hSliderLayout->setMargin (15); 
+
+    qualitySlider= new QSlider(Qt::Horizontal,imageGroupBox);
+#if QT_VERSION < 0x040000
+    qualitySlider->setMinValue(0);
+    qualitySlider->setMaxValue(100);
+    qualitySlider->setTickmarks(QSlider::Below); 
+#else
+    qualitySlider->setMinimum(0);
+    qualitySlider->setMaximum(100);
+    qualitySlider->setTickPosition(QSlider::TicksBelow);
+#endif
+    qualitySlider->setValue(60);
+    hSliderLayout->addWidget(new QLabel("Low ",imageGroupBox));
+    hSliderLayout->addWidget(qualitySlider);
+    hSliderLayout->addWidget(new QLabel(" Maximum",imageGroupBox));
+    
+#if QT_VERSION >= 0x040000
+    imageGroupBox->setLayout(hSliderLayout);
+#endif
+
+#if QT_VERSION >= 0x040000
+    imageGroupBox->setLayout(hSliderLayout);
+#endif
+
+    globalVLayout->addWidget(imageGroupBox);
   }
 
@@ -393,4 +393,34 @@
 
 
+void G4OpenGLQtExportDialog::changeVectorEPS()
+{
+  if (!vectorEPSCheckBox) return;
+  if (vectorEPSCheckBox->isChecked()) {
+#if QT_VERSION < 0x040000
+    original->setEnabled ( true );
+    modify->setEnabled ( true );
+#else
+    original->show();
+    modify->show();
+#endif
+    changeSizeBox();
+  } else {
+#if QT_VERSION < 0x040000
+    original->setEnabled ( false );
+    modify->setEnabled ( false );
+    ratioCheckBox->setEnabled ( false );
+    heightWidget->setEnabled ( false );
+    widthWidget->setEnabled ( false );
+#else
+    original->hide();
+    modify->hide();
+    ratioCheckBox->hide();
+    heightWidget->hide();
+    widthWidget->hide();
+#endif
+  }
+}
+
+
 void G4OpenGLQtExportDialog::changeSizeBox()
 {
@@ -432,5 +462,5 @@
   if (ratioCheckBox->isChecked()){
     QString tmp;
-    width->setText(tmp.setNum(s.toInt()*originalHeight/originalHeight));
+    height->setText(tmp.setNum(s.toInt()*originalHeight/originalWidth));
   }
 }
@@ -445,5 +475,5 @@
   if (ratioCheckBox->isChecked()){
     QString tmp;
-    width->setText(tmp.setNum(s.toInt()*originalWidth/originalWidth));
+    width->setText(tmp.setNum(s.toInt()*originalWidth/originalHeight));
   }
 } 
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 655)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 656)
@@ -1087,5 +1087,5 @@
   QString format = selectedFormat->toLower();
 #endif
-  G4OpenGLQtExportDialog* exportDialog= new G4OpenGLQtExportDialog(GLWindow,nomFich,format,fWindow->height(),fWindow->width());
+  G4OpenGLQtExportDialog* exportDialog= new G4OpenGLQtExportDialog(GLWindow,format,fWindow->height(),fWindow->width());
   if(  exportDialog->exec()) {
 
@@ -1151,7 +1151,7 @@
     } else {
 #if QT_VERSION < 0x040000
-      G4cerr << "File "<<nomFich.ascii()<<" saved \n" << G4endl;
-#else
-      G4cerr << "File "<<nomFich.toStdString().c_str()<<" saved \n" << G4endl;
+      G4cout << "File "<<nomFich.ascii()<<" has been saved \n" << G4endl;
+#else
+      G4cout << "File "<<nomFich.toStdString().c_str()<<" has been saved \n" << G4endl;
 #endif
     }
@@ -1326,13 +1326,7 @@
   glRenderMode (GL_FEEDBACK);
   
-#ifdef GEANT4_QT_DEBUG
-  printf("generateVectorEPS::  AVANt DRAWVIEW !!======================== \n");
-#endif
   glViewport (0, 0, aWidth,aHeight);
   DrawView();
 
-#ifdef GEANT4_QT_DEBUG
-  printf("generateVectorEPS::  APREs DRAWVIEW !!======================== \n");
-#endif
   returned = glRenderMode (GL_RENDER);
   
