Index: /trunk/source/visualization/OpenGL/History
===================================================================
--- /trunk/source/visualization/OpenGL/History	(revision 865)
+++ /trunk/source/visualization/OpenGL/History	(revision 866)
@@ -1,3 +1,3 @@
-$Id: History,v 1.117 2008/10/02 08:56:45 lgarnier Exp $
+$Id: History,v 1.118 2008/10/15 10:33:27 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,9 @@
 History file for visualization/OpenGL
 -------------------------------------
+
+12th October Laurent Garnier
+ - G4OpenGLQtExportDialog : improvments for Qt3"
+ - G4OpenGLQtViewer,G4OpenGLImmediateQtViewer,G4OpenGLStoreQtViewer : Add the name on OpenGlQt viewers
+ - G4OpenGLStoredQtViewer,G4OpenGLImmediateQt, G4OpenGLStoredQt : Change OGLSQT and OGLIQT by OGLSQt and OGLIQt
 
 2 October Laurent Garnier
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 865)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 866)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtExportDialog.hh,v 1.5 2008/01/30 10:54:13 lgarnier Exp $
+// $Id: G4OpenGLQtExportDialog.hh,v 1.6 2008/10/15 10:16:17 lgarnier Exp $
 // GEANT4 tag $Name: 
 //
@@ -36,4 +36,5 @@
 
 #include <qdialog.h>
+#include <qobject.h>
 
 class QButtonGroup;
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh	(revision 865)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh	(revision 866)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtMovieDialog.hh,v 1.3 2008/10/07 01:03:04 lgarnier Exp $
+// $Id: G4OpenGLQtMovieDialog.hh,v 1.4 2008/10/07 05:36:11 lgarnier Exp $
 // GEANT4 tag $Name: 
 //
@@ -79,5 +79,4 @@
 
 public slots :
-  void checkAllParameters();
   void stopFinishClose();
   void save();
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 865)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 866)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLQtViewer.hh,v 1.10 2008/06/20 13:55:06 lgarnier Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenGLQtViewer.hh,v 1.12 2008/10/15 10:24:04 lgarnier Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -105,5 +105,5 @@
 protected:
   void CreateGLQtContext ();
-  virtual void CreateMainWindow (QGLWidget*);
+  virtual void CreateMainWindow (QGLWidget*,QString);
   void manageContextMenuEvent(QContextMenuEvent *e);
 #if QT_VERSION < 0x040000
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc	(revision 866)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLImmediateQt.cc,v 1.2 2007/11/15 18:24:28 lgarnier Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenGLImmediateQt.cc,v 1.3 2008/10/15 10:26:25 lgarnier Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -43,5 +43,5 @@
 G4OpenGLImmediateQt::G4OpenGLImmediateQt ():
   G4VGraphicsSystem ("OpenGLImmediateQt",
-		     "OGLIQT",
+		     "OGLIQt",
 		     G4VisFeaturesOfOpenGLIQt (),
 		     G4VGraphicsSystem::threeD)
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 866)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLImmediateQtViewer.cc,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenGLImmediateQtViewer.cc,v 1.5 2008/10/15 10:24:04 lgarnier Exp $
+// GEANT4 tag $Name:  $
 //
 //
@@ -75,5 +75,5 @@
 #endif
 
-  CreateMainWindow (this);
+   CreateMainWindow (this,QString(fName));
 #ifdef GEANT4_QT_DEBUG
   printf("G4OpenGLImmediateQtViewer::Initialise () 3\n");
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 866)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLQtViewer.cc,v 1.24 2008/06/20 13:55:06 lgarnier Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenGLQtViewer.cc,v 1.26 2008/10/07 03:39:47 lgarnier Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -167,4 +167,5 @@
 void G4OpenGLQtViewer::CreateMainWindow (
  QGLWidget* glWidget
+ ,QString name
 ) 
 //////////////////////////////////////////////////////////////////////////////
@@ -235,10 +236,10 @@
 
 #if QT_VERSION < 0x040000
-  GLWindow->setCaption( tr( "QGl Viewer" ));
+  GLWindow->setCaption(name );
 #else
   GLWindow->setLayout(mainLayout);
-  GLWindow->setWindowTitle(tr("QGl Viewer"));
-#endif
-  GLWindow->resize(300, 300);
+  GLWindow->setWindowTitle( name);
+#endif
+  GLWindow->resize(fVP.GetWindowSizeHintX(), fVP.GetWindowSizeHintY());
   GLWindow->move(900,300);
   GLWindow->show();
@@ -1057,4 +1058,16 @@
   } else  if (fMouseAction == STYLE3) { //pick
     G4cout << "Click and pick " << G4endl;
+  } else {
+    G4cout << "Move camera point of view with mouse" << G4endl;
+    G4cout << "Press left/right arrows to move volume left/right" << G4endl;
+    G4cout << "Press up/down arrows to move volume up/down" << G4endl;
+    G4cout << "Press ALT+up/down arrows to move volume toward/forward" << G4endl;
+    G4cout << "Press SHIFT+left/right arrows to rotate volume left/right" << G4endl;
+    G4cout << "Press SHIFT+up/down arrows to rotate volume up/down" << G4endl;
+    G4cout << "Press +/- to zoom into volume" << G4endl;
+    G4cout << "Press ALT+/- to slow/speed auto rotation/move" << G4endl;
+    G4cout << "In video mode : " << G4endl;
+    G4cout << " Press SPACE to Start/Pause video recording " << G4endl;
+    G4cout << " Press RETURN to Stop video recording " << G4endl;
   }
 
@@ -1885,4 +1898,5 @@
 #else
     bool alpha = aImage.hasAlphaChannel();
+#endif
     for(int y=height-1; y >=0 ; y--) {
       QRgb * s = (QRgb*)(aImage.scanLine(y));
@@ -1904,5 +1918,4 @@
       fprintf (fp, "\n");
     } 
-#endif
 
   }
@@ -2769,5 +2782,4 @@
 
   setRecordingInfos("Parameter file "+fParameterFileName+" generated in "+fMovieTempFolderPath);
-  printf("Parameter file %s  generated in %s\n",fParameterFileName.toStdString().c_str(),fMovieTempFolderPath.toStdString().c_str());
   setRecordingStatus(READY_TO_ENCODE);
   return true;
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQt.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQt.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQt.cc	(revision 866)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredQt.cc,v 1.6 2008/10/07 05:28:49 lgarnier Exp $
+// $Id: G4OpenGLStoredQt.cc,v 1.7 2008/10/15 10:26:25 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -45,5 +45,5 @@
 G4OpenGLStoredQt::G4OpenGLStoredQt ():
   G4VGraphicsSystem ("OpenGLStoredQt",
-		     "OGLSQT",
+		     "OGLSQt",
 		     G4VisFeaturesOfOpenGLSQt (),
 		     G4VGraphicsSystem::threeD)
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 866)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpenGLStoredQtViewer.cc,v 1.15 2008/06/20 13:55:06 lgarnier Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenGLStoredQtViewer.cc,v 1.18 2008/10/15 10:29:39 lgarnier Exp $
+// GEANT4 tag $Name:  $
 //
 //
@@ -52,9 +52,9 @@
 {
   // if no scene...
-  if (fSceneHandler.GetScene() == 0) {
-    G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... "
-	   << G4endl;
-    return;
-  }
+//   if (fSceneHandler.GetScene() == 0) {
+//     G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... "
+// 	   << G4endl;
+//     return;
+//   }
 
   //set true to picking
@@ -93,5 +93,5 @@
   printf("G4OpenGLStoredQtViewer::Initialise () 2\n");
 #endif
-  CreateMainWindow (this);
+  CreateMainWindow (this,QString(fName));
 #ifdef GEANT4_QT_DEBUG
   printf("G4OpenGLStoredQtViewer::Initialise () 3\n");
@@ -121,5 +121,9 @@
   glDepthMask (GL_TRUE);
 
-  hasToRepaint =true;
+  if (fSceneHandler.GetScene() == 0) {
+    hasToRepaint =false;
+  } else {
+    hasToRepaint =true;
+  }
 
 #ifdef GEANT4_QT_DEBUG
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc	(revision 865)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc	(revision 866)
@@ -104,5 +104,5 @@
   if (fMemoryForDisplayLists) {
     fDisplayListId = glGenLists (1);
-    if (!fDisplayListId) {  // Could pre-allocate?
+    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could pre-allocate?
       G4cout <<
 	"********************* WARNING! ********************"
@@ -172,6 +172,18 @@
   }
 
+  if ((glGetError() == GL_TABLE_TOO_LARGE) || (glGetError() == GL_OUT_OF_MEMORY)) {  // Could close?
+    G4cout <<
+      "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
+      "  display List for fTopPODL - try OpenGL Immediated mode."
+           << G4endl;
+  }
   if (fMemoryForDisplayLists) {
     glEndList();
+    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could close?
+      G4cout <<
+        "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
+        "  display List for fTopPODL - try OpenGL Immediated mode."
+             << G4endl;
+    }
   }
   if (fReadyForTransients || !fMemoryForDisplayLists) {
@@ -283,5 +295,5 @@
   // Make a List which calls the other lists.
   fTopPODL = glGenLists (1);
-  if (!fTopPODL) {
+  if (glGetError() == GL_OUT_OF_MEMORY) {  // Could pre-allocate?
     G4cout <<
       "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
@@ -301,4 +313,10 @@
     }
     glEndList ();
+    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could close?
+      G4cout <<
+        "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
+        "  display List for fTopPODL - try OpenGL Immediated mode."
+             << G4endl;
+    }
   }
 
