Changeset 876 for trunk/source/interfaces
- Timestamp:
- Nov 6, 2008, 11:06:50 AM (16 years ago)
- Location:
- trunk/source/interfaces
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/History
r874 r876 1 $Id: History,v 1.10 2 2008/10/24 13:23:22lgarnier Exp $1 $Id: History,v 1.103 2008/11/06 10:06:33 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 6 November, Laurent Garnier 21 - G4Qt : Re-fix problem on some linux with QApplication, should be better 22 - G4Qt : Add availabity to launch a G4Qt without a G4UIQt 23 20 24 24 October, Laurent Garnier 21 25 - Change GEANT4_QT_DEBUG flag by QTDEBUG … … 25 29 - Fix a problem on some linux with QApplication. But this is NOT the good way to do it... 26 30 - Fix a qt3 backward compatibility on G4UIQt.cc 27 28 31 29 32 7 October, Laurent Garnier -
trunk/source/interfaces/basic/include/G4UIQt.hh
r874 r876 25 25 // 26 26 // 27 // $Id: G4UIQt.hh,v 1.1 4 2008/10/15 09:09:47lgarnier Exp $27 // $Id: G4UIQt.hh,v 1.15 2008/11/06 10:06:33 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/source/interfaces/basic/src/G4UIQt.cc
r874 r876 25 25 // 26 26 // 27 // $Id: G4UIQt.cc,v 1.2 1 2008/10/24 13:23:22lgarnier Exp $27 // $Id: G4UIQt.cc,v 1.22 2008/11/06 10:06:33 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/source/interfaces/basic/src/G4UIXm.cc
r850 r876 26 26 // 27 27 // $Id: G4UIXm.cc,v 1.14 2006/06/29 19:09:49 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G.Barrand -
trunk/source/interfaces/common/include/G4Qt.hh
r874 r876 25 25 // 26 26 // 27 // $Id: G4Qt.hh,v 1. 3 2008/10/15 09:09:47lgarnier Exp $27 // $Id: G4Qt.hh,v 1.4 2008/11/06 10:06:33 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 59 59 G4Qt (int,char**,char*); 60 60 static G4Qt* instance; // Pointer to single instance. 61 int argn; 62 char** args; 61 63 }; 62 64 -
trunk/source/interfaces/common/src/G4Qt.cc
r874 r876 25 25 // 26 26 // 27 // $Id: G4Qt.cc,v 1.1 0 2008/10/24 13:23:22lgarnier Exp $27 // $Id: G4Qt.cc,v 1.11 2008/11/06 10:06:33 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 77 77 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ 78 78 { 79 argn = 0; 80 args = NULL; 81 79 82 #ifdef G4DEBUG 80 83 printf("G4Qt::G4Qt try to inited Qt\n"); … … 82 85 // Check if Qt already init in another external app 83 86 if(qApp) { 84 85 86 87 88 89 90 91 92 #ifdef G4DEBUG 93 87 QtInited = TRUE; 88 //#if QT_VERSION < 0x040000 89 // SetMainInteractor (&qApp); 90 //#else 91 SetMainInteractor (qApp); 92 //#endif 93 SetArguments (a_argn,a_args); 94 95 #ifdef G4DEBUG 96 printf("G4Qt::G4Qt alredy inited in external \n"); 94 97 #endif 95 98 } else { 96 99 97 100 if(QtInited==FALSE) { //Qt should be Inited once ! 98 101 // Then two cases : 99 102 // - It is the first time we create G4UI (argc!=0) 100 103 // -> Inited and register 101 // - It is the first time we create G4VIS (ar c == 0)104 // - It is the first time we create G4VIS (argc == 0) 102 105 // -> Inited and NOT register 103 104 int argc; 105 char ** test; 106 106 107 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 108 argn = a_argn; 109 args = a_args; 110 111 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 } 112 113 // FIXME : That's not the good arguments, but I don't know how to get args from other Interactor. 114 // Ex: How to get them from G4Xt ? 115 argn = 1; 116 args = (char **)malloc( 1 * sizeof(char *) ); 117 args[0] = (char *)malloc(10 * sizeof(char)); 118 strncpy(args[0], "my_app \0", 9); 131 119 } 120 121 int *p_argn = (int*)malloc(sizeof(int)); 122 *p_argn = argn; 132 123 #if QT_VERSION < 0x040000 133 qApp = new QApplication (a_argn, a_args); 134 // QApplication qApp(a_argn, a_args); 135 // if(&qApp == NULL) { 124 qApp = new QApplication (argn, args); 136 125 #else 137 new QApplication (a_argn, a_args); 138 #endif 139 126 new QApplication (argn, args); 127 #endif 140 128 if(!qApp) { 141 129 142 130 G4cout << "G4Qt : Unable to init Qt." << G4endl; 143 131 } else { 132 QtInited = TRUE; 144 133 if (a_argn != 0) { 145 134 SetMainInteractor (qApp); 146 SetArguments (a_argn,a_args);147 135 } 148 QtInited = TRUE;136 SetArguments (a_argn,a_args); 149 137 #ifdef G4DEBUG 150 138 printf("G4Qt::G4Qt inited Qt END\n"); -
trunk/source/interfaces/common/src/G4Xt.cc
r850 r876 26 26 // 27 27 // $Id: G4Xt.cc,v 1.11 2006/06/29 19:10:28 gunter Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G.Barrand
Note: See TracChangeset
for help on using the changeset viewer.