Changeset 874 for trunk/source/interfaces
- Timestamp:
- Oct 30, 2008, 5:48:40 PM (16 years ago)
- Location:
- trunk/source/interfaces
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/History
r867 r874 1 $Id: History,v 1.10 1 2008/10/15 09:09:47lgarnier Exp $1 $Id: History,v 1.102 2008/10/24 13:23:22 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 24 October, Laurent Garnier 21 - Change GEANT4_QT_DEBUG flag by QTDEBUG 22 - Suppress unuseful DEBUG messages 23 20 24 15 October, Laurent Garnier 21 25 - Fix a problem on some linux with QApplication. But this is NOT the good way to do it... -
trunk/source/interfaces/basic/include/G4UIQt.hh
r867 r874 80 80 81 81 public: // With description 82 G4UIQt(int *,char**);82 G4UIQt(int,char**); 83 83 // (argv, argc) or (0, NULL) had to be given. 84 84 G4UIsession* SessionStart(); -
trunk/source/interfaces/basic/src/G4UIQt.cc
r867 r874 25 25 // 26 26 // 27 // $Id: G4UIQt.cc,v 1.2 0 2008/10/15 09:09:47lgarnier Exp $27 // $Id: G4UIQt.cc,v 1.21 2008/10/24 13:23:22 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // L. Garnier 31 32 //#define GEANT4_QT_DEBUG33 31 34 32 #ifdef G4UI_BUILD_QT_SESSION … … 102 100 */ 103 101 G4UIQt::G4UIQt ( 104 int *argc102 int argc 105 103 ,char** argv 106 104 ) … … 140 138 fMainWindow = new QMainWindow(); 141 139 142 #ifdef G EANT4_QT_DEBUG140 #ifdef G4DEBUG 143 141 printf("G4UIQt::Initialise after main window creation\n"); 144 142 #endif … … 201 199 #endif 202 200 fTextArea->setReadOnly(true); 203 204 205 #ifdef GEANT4_QT_DEBUG206 printf("G4UIQt:: 2\n");207 #endif208 209 210 201 211 202 layoutTop->addWidget(fTextArea); … … 306 297 307 298 308 #ifdef GEANT4_QT_DEBUG309 printf("disable secondary loop\n");310 #endif311 299 interactorManager->DisableSecondaryLoop (); // TO KEEP 312 300 if ((QApplication*)interactorManager->GetMainInteractor()) … … 323 311 324 312 interactorManager->EnableSecondaryLoop (); 325 #ifdef GEANT4_QT_DEBUG326 printf("enable secondary loop\n");327 #endif328 313 return this; 329 314 } … … 369 354 if (!aState) return; 370 355 371 #ifdef GEANT4_QT_DEBUG372 printf("G4UIQt::PauseSessionStart\n");373 #endif374 356 if(aState=="G4_pause> ") { // TO KEEP 375 357 SecondaryLoop ("Pause, type continue to exit this state"); // TO KEEP … … 394 376 if (!aPrompt) return; 395 377 396 #ifdef GEANT4_QT_DEBUG397 printf("G4UIQt::SecondaryLoop\n");398 #endif399 378 G4Qt* interactorManager = G4Qt::getInstance (); // TO KEEP ? 400 379 Prompt(aPrompt); // TO KEEP … … 1005 984 ) 1006 985 { 1007 #ifdef G EANT4_QT_DEBUG986 #ifdef G4DEBUG 1008 987 printf("G4UIQt::GetHelpChoice SHOULD NEVER GO HERE"); 1009 988 #endif … … 1017 996 ) 1018 997 { 1019 #ifdef G EANT4_QT_DEBUG998 #ifdef G4DEBUG 1020 999 printf("G4UIQt::ExitHelp SHOULD NEVER GO HERE"); 1021 1000 #endif … … 1615 1594 commandResultMap.insert(tmp*multFactor+doubleKeyAdd,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data())); 1616 1595 #endif 1617 #ifdef GEANT4_QT_DEBUG1618 #endif1619 1596 } 1620 1597 -
trunk/source/interfaces/common/include/G4Qt.hh
r867 r874 51 51 public: 52 52 static G4Qt* getInstance(); 53 static G4Qt* getInstance(int *,char**,char*);53 static G4Qt* getInstance(int,char**,char*); 54 54 G4bool Inited(); 55 55 void* GetEvent(); … … 57 57 virtual ~G4Qt(); 58 58 private: 59 G4Qt (int *,char**,char*);59 G4Qt (int,char**,char*); 60 60 static G4Qt* instance; // Pointer to single instance. 61 61 }; -
trunk/source/interfaces/common/src/G4Qt.cc
r867 r874 25 25 // 26 26 // 27 // $Id: G4Qt.cc,v 1. 9 2008/10/15 09:09:47lgarnier Exp $27 // $Id: G4Qt.cc,v 1.10 2008/10/24 13:23:22 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 56 56 /***************************************************************************/ 57 57 G4Qt* G4Qt::getInstance ( 58 int *a_argn58 int a_argn 59 59 ,char** a_args 60 60 ,char* a_class … … 70 70 /***************************************************************************/ 71 71 G4Qt::G4Qt ( 72 int *a_argn72 int a_argn 73 73 ,char** a_args 74 74 ,char* a_class … … 77 77 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ 78 78 { 79 #ifdef G EANT4_QT_DEBUG79 #ifdef G4DEBUG 80 80 printf("G4Qt::G4Qt try to inited Qt\n"); 81 81 #endif … … 88 88 SetMainInteractor (qApp); 89 89 //#endif 90 SetArguments (*a_argn,a_args); 91 #ifdef GEANT4_QT_DEBUG 90 SetArguments (a_argn,a_args); 91 92 #ifdef G4DEBUG 92 93 printf("G4Qt::G4Qt alredy inited in external \n"); 93 94 #endif … … 95 96 96 97 if(QtInited==FALSE) { //Qt should be Inited once ! 97 #ifdef GEANT4_QT_DEBUG 98 printf("G4Qt::G4Qt inited Qt\n"); 99 #endif 98 // Then two cases : 99 // - It is the first time we create G4UI (argc!=0) 100 // -> Inited and register 101 // - It is the first time we create G4VIS (arc == 0) 102 // -> Inited and NOT register 103 104 int argc; 105 char ** test; 106 if (a_argn != 0) { 107 SetArguments (a_argn,a_args); 108 #ifdef G4DEBUG 109 printf("G4Qt::G4Qt inited, first time creating UI \n"); 110 #endif 111 } else { //argc = 0 112 test = GetArguments(&argc); 113 114 #ifdef G4DEBUG 115 116 printf("G4Qt::G4Qt inited, create new QtVis\n"); 117 printf("G4Qt::G4Qt arguments avant %s\n",a_args[0]); 118 printf("G4Qt::G4Qt arguments avant %s\n",a_args[1]); 119 printf("G4Qt::G4Qt arguments avant %s\n",a_args[2]); 120 printf("G4Qt::G4Qt arguments avant %s\n",a_args[3]); 121 printf("G4Qt::G4Qt arguments apres %d\n",argc); 122 printf("G4Qt::G4Qt arguments apres %s \n",test[0]); 123 printf("G4Qt::G4Qt arguments apres %s \n",test[1]); 124 printf("G4Qt::G4Qt arguments apres %s \n",test[2]); 125 printf("G4Qt::G4Qt arguments apres %s \n",test[3]); 126 #endif 127 if (argc == 0) { 128 G4cout << "G4Qt : Unable to init Qt." << G4endl; 129 return; 130 } 131 } 100 132 #if QT_VERSION < 0x040000 101 qApp = new QApplication ( *a_argn, a_args);133 qApp = new QApplication (a_argn, a_args); 102 134 // QApplication qApp(a_argn, a_args); 103 135 // if(&qApp == NULL) { 104 136 #else 105 new QApplication (*a_argn, a_args); 106 #endif 137 new QApplication (a_argn, a_args); 138 #endif 139 107 140 if(!qApp) { 108 141 109 142 G4cout << "G4Qt : Unable to init Qt." << G4endl; 110 143 } else { 144 if (a_argn != 0) { 145 SetMainInteractor (qApp); 146 SetArguments (a_argn,a_args); 147 } 111 148 QtInited = TRUE; 112 //#if QT_VERSION < 0x040000 113 // SetMainInteractor (&qApp); 114 //#else 115 SetMainInteractor (qApp); 116 //#endif 117 SetArguments (*a_argn,a_args); 118 #ifdef GEANT4_QT_DEBUG 149 #ifdef G4DEBUG 119 150 printf("G4Qt::G4Qt inited Qt END\n"); 120 151 #endif … … 122 153 } 123 154 } 124 #ifdef G EANT4_QT_DEBUG155 #ifdef G4DEBUG 125 156 if (qApp) { 126 157 printf("G4Qt::qApp exist\n");
Note: See TracChangeset
for help on using the changeset viewer.