Changeset 858 for trunk/source
- Timestamp:
- Oct 2, 2008, 10:29:48 AM (16 years ago)
- Location:
- trunk/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r850 r858 30 30 // L. Garnier 31 31 32 // define GEANT4_QT_DEBUG32 //#define GEANT4_QT_DEBUG 33 33 34 34 #ifdef G4UI_BUILD_QT_SESSION … … 113 113 if(UI!=NULL) UI->SetSession(this); 114 114 115 // Check if already define in external app QMainWindow 116 bool found = false; 117 #if QT_VERSION < 0x040000 118 // theses lines does nothing exept this one "GLWindow = new QDialog(0..." 119 // but if I comment them, it doesn't work... 120 QWidgetList *list = QApplication::allWidgets(); 121 QWidgetListIt it( *list ); // iterate over the widgets 122 QWidget * widget; 123 while ( (widget=it.current()) != 0 ) { // for each widget... 124 ++it; 125 if ((found== false) && (widget->inherits("QMainWindow"))) { 126 found = true; 127 } 128 } 129 delete list; // delete the list, not the widgets 130 #else 131 foreach (QWidget *widget, QApplication::allWidgets()) { 132 if ((found== false) && (widget->inherits("QMainWindow"))) { 133 found = true; 134 } 135 } 136 #endif 137 138 if (found) { 139 G4cout << "G4UIQt : Found an external App with a QMainWindow already defined. Aborted" << G4endl; 140 return ; 141 } 115 142 fMainWindow = new QMainWindow(); 116 143 -
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r857 r858 317 317 318 318 // launch Qt if not 319 G4Qt * interactorManager = G4Qt::getInstance ();319 G4Qt::getInstance (); 320 320 321 321 fLastPos3 = QPoint(-1,-1); … … 689 689 #if QT_VERSION < 0x040000 690 690 #if QT_VERSION < 0x030200 691 QAction *movieParameters = new QAction("&M ovie parameters...","&Make movie ...",CTRL+Key_M,mActions,0,true);692 #else 693 QAction *movieParameters = new QAction("&M ovie parameters...",CTRL+Key_M,mActions);691 QAction *movieParameters = new QAction("&Make Movie...","&Make movie ...",CTRL+Key_M,mActions,0,true); 692 #else 693 QAction *movieParameters = new QAction("&Make Movie...",CTRL+Key_M,mActions); 694 694 #endif 695 695 movieParameters->addTo(mActions); … … 1710 1710 printf("should rescale \n"); 1711 1711 #endif 1712 GLfloat* feedback_buffer;1713 GLint returned;1714 FILE* file;1712 // GLfloat* feedback_buffer; 1713 // GLint returned; 1714 // FILE* file; 1715 1715 1716 1716 // feedback_buffer = new GLfloat[size]; -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQt.cc
r850 r858 62 62 63 63 G4VViewer* G4OpenGLStoredQt::CreateViewer 64 (G4VSceneHandler& scene, const G4String& name) {65 64 #ifdef GEANT4_QT_DEBUG 66 65 printf("G4OpenGLStoredQt::CreateViewer \n"); 67 66 #endif 67 (G4VSceneHandler& scene, const G4String& name) { 68 68 G4VViewer* pView = 69 69 new G4OpenGLStoredQtViewer -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r850 r858 58 58 nbPaint =0; 59 59 hasToRepaint =false; 60 61 // if no scene... 62 if (fSceneHandler.GetScene() == 0) { 63 G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... " 64 << G4endl; 65 return; 66 } 60 67 if (fViewId < 0) return; // In case error in base class instantiation. 61 68 } … … 76 83 void G4OpenGLStoredQtViewer::Initialise() { 77 84 #ifdef GEANT4_QT_DEBUG 78 printf("G LWidget::Initialise\n");85 printf("G4OpenGLStoredQtViewer::Initialise 1\n"); 79 86 #endif 80 87 readyToPaint = false; -
trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
r850 r858 150 150 151 151 void G4OpenGLViewer::SetView () { 152 152 153 if (!fSceneHandler.GetScene()) { 154 G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... " 155 << G4endl; 156 return; 157 } 153 158 // Calculates view representation based on extent of object being 154 159 // viewed and (initial) viewpoint. (Note: it can change later due
Note: See TracChangeset
for help on using the changeset viewer.