Ignore:
Timestamp:
Jan 28, 2008, 4:38:19 PM (16 years ago)
Author:
garnier
Message:

avancement sur la zone de recherche : ok, pret a supprimer un champ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/interfaces/basic/src/G4UIQt.cc

    r698 r699  
    12411241  if(UI==NULL) return;
    12421242  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
    12481255  if (command) {
    12491256#if QT_VERSION >= 0x040000
     
    12571264    fHelpArea->setText(GetCommandList(command));
    12581265#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
    12621271#if QT_VERSION >= 0x040000
    12631272#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 
    12791285/**   This callback is activated when user double clic on a item in the help tree
    12801286*/
     
    15121518   
    15131519    if (!commandChildResultMap.empty()) {
    1514       printf("Check -------------------in child %d\n",commandChildResultMap.count());
    15151520      // insert new childs
    15161521      QMap<int,QString>::const_iterator i = commandChildResultMap.constBegin();
     
    15391544   
    15401545  }
    1541   printf("Command Finale retun \n");
    15421546  return commandResultMap;
    15431547}
Note: See TracChangeset for help on using the changeset viewer.