| 2218 | } |
| 2219 | |
| 2220 | void G4UIQt::NewSceneTreeItemTreeWidget::ActWithAString |
| 2221 | (const G4String& action, G4SceneTreeItem* sceneTreeItem) |
| 2222 | { |
| 2223 | auto uiMan = G4UImanager::GetUIpointer(); |
| 2224 | auto command = uiMan->FindCommand("/vis/touchable/set/" + action); |
| 2225 | if (command) { |
| 2226 | QStringList qStringList; |
| 2227 | const auto& candidates = command->GetParameter(0)->GetParameterCandidates(); |
| 2228 | std::istringstream iss(candidates); |
| 2229 | G4String candidate; |
| 2230 | while (iss >> candidate) qStringList.append(candidate.c_str()); |
| 2231 | G4bool ok = true; |
| 2232 | auto chosenValue = QInputDialog::getItem(this, action.c_str(), action.c_str(), qStringList, |
| 2233 | 0, false, &ok); |
| 2234 | if (ok) { |
| 2235 | uiMan->ApplyCommand("/vis/set/touchable" + sceneTreeItem->GetPVPath()); |
| 2236 | G4String g4ChosenValue = chosenValue.toStdString(); |
| 2237 | uiMan->ApplyCommand("/vis/touchable/set/" + action + ' ' + g4ChosenValue); |
| 2238 | } |
| 2239 | } |
| 2240 | } |
| 2241 | |
| 2242 | |
| 2243 | /** Create the History ToolBox Widget |
nothing calls this directly
no test coverage detected