Changeset 567 for trunk/geant4/N03/exampleN03.cc
- Timestamp:
- Aug 16, 2007, 3:27:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/N03/exampleN03.cc
r561 r567 32 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 33 33 34 35 /** Environnement definition for app launch for mac 36 */ 37 #define MOSX_APP 38 #ifdef MOSX_APP 39 #define G4UI_BUILD_QT_SESSION 40 #define G4UI_USE_QT 41 #define G4VIS_BUILD_OPENGLQT_DRIVER 42 #define G4VIS_USE_OPENGLQT 43 #endif 44 /** End of Environnement definition for app launch for mac 45 */ 46 47 48 49 50 51 52 34 53 #include "G4RunManager.hh" 35 54 #include "G4UImanager.hh" … … 43 62 #ifdef G4UI_USE_QT 44 63 #include "G4UIQt.hh" 64 #include "G4Qt.hh" 45 65 #endif 46 66 … … 90 110 G4UIsession* session=0; 91 111 112 #ifndef MOSX_APP 92 113 if (argc==1) // Define UI session for interactive mode. 93 114 { 115 #endif 94 116 // G4UIterminal is a (dumb) terminal 95 117 // … … 105 127 session = new G4UIterminal(); 106 128 #endif 129 #ifndef MOSX_APP 107 130 } 131 #endif 108 132 109 133 #ifdef G4VIS_USE … … 141 165 // G4UIterminal is a (dumb) terminal 142 166 // 143 UI->ApplyCommand("/control/execute vis.mac"); 167 #ifdef MOSX_APP 168 G4Qt* interactorManager = G4Qt::getInstance (); 169 G4String vis = QString("/control/execute "+((QApplication*)interactorManager->GetMainInteractor())->applicationDirPath ()+"/../Resources/vis.mac").toStdString().c_str(); 170 #else 171 G4String vis = "/control/execute vis.mac"; 172 #endif 173 UI->ApplyCommand(vis); 144 174 #if defined(G4UI_USE_XM) || defined(G4UI_USE_WIN32) || defined(G4UI_USE_QT) 145 175 // Customize the G4UIXm,Win32 menubar with a macro file 146 176 // 147 UI->ApplyCommand("/control/execute visTutor/gui.mac"); 177 #ifdef MOSX_APP 178 G4String visTutor = QString("/control/execute "+((QApplication*)interactorManager->GetMainInteractor())->applicationDirPath ()+"/../Resources/visTutor/gui.mac").toStdString().c_str(); 179 #else 180 G4String visTutor = "/control/execute visTutor/gui.mac"; 181 #endif 182 UI->ApplyCommand(visTutor); 148 183 #endif 149 184 session->SessionStart();
Note: See TracChangeset
for help on using the changeset viewer.