Changeset 699 for trunk/geant4
- Timestamp:
- Jan 28, 2008, 4:38:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/basic/src/G4UIQt.cc
r698 r699 1241 1241 if(UI==NULL) return; 1242 1242 G4UIcommandTree * treeTop = UI->GetTree(); 1243 #if QT_VERSION < 0x040000 1244 G4UIcommand* command = treeTop->FindPath(item->text (1).ascii()); 1245 #else 1246 G4UIcommand* command = treeTop->FindPath(item->text (1).toStdString().c_str()); 1247 #endif 1243 1244 1245 1246 std::string itemText; 1247 #if QT_VERSION < 0x040000 1248 itemText = std::string(item->text(0).ascii()); 1249 #else 1250 itemText = std::string(item->text(0).toStdString()); 1251 #endif 1252 1253 G4UIcommand* command = treeTop->FindPath(itemText.c_str()); 1254 1248 1255 if (command) { 1249 1256 #if QT_VERSION >= 0x040000 … … 1257 1264 fHelpArea->setText(GetCommandList(command)); 1258 1265 #endif 1259 } else { 1260 // this is not a command, this is a sub directory 1261 // We display the Title 1266 } else { // this is a command 1267 G4UIcommandTree* path = treeTop->FindCommandTree(itemText.c_str()); 1268 if ( path) { 1269 // this is not a command, this is a sub directory 1270 // We display the Title 1262 1271 #if QT_VERSION >= 0x040000 1263 1272 #if QT_VERSION < 0x040200 1264 fHelpArea->clear(); 1265 fHelpArea->append(command->GetTitle().data()); 1266 #else 1267 Command est nulle ici :comment récupérer le titre ? 1268 1269 printf("Command %s\n",(char*)(command->GetCommandPath()).data()); 1270 printf("Command %s\n",(char*)(command->GetTitle()).data()); 1271 fHelpArea->setText(command->GetTitle().data()); 1272 #endif 1273 #else 1274 fHelpArea->setText(command->GetTitle().data()); 1275 #endif 1276 } 1277 } 1278 1273 fHelpArea->clear(); 1274 fHelpArea->append(path->GetTitle().data()); 1275 #else 1276 fHelpArea->setText(path->GetTitle().data()); 1277 #endif 1278 #else 1279 fHelpArea->setText(path->GetTitle().data()); 1280 #endif 1281 } 1282 } 1283 } 1284 1279 1285 /** This callback is activated when user double clic on a item in the help tree 1280 1286 */ … … 1512 1518 1513 1519 if (!commandChildResultMap.empty()) { 1514 printf("Check -------------------in child %d\n",commandChildResultMap.count());1515 1520 // insert new childs 1516 1521 QMap<int,QString>::const_iterator i = commandChildResultMap.constBegin(); … … 1539 1544 1540 1545 } 1541 printf("Command Finale retun \n");1542 1546 return commandResultMap; 1543 1547 }
Note: See TracChangeset
for help on using the changeset viewer.