Build the parameter list parameters in a QString Reimplement partialy the G4UIparameter.cc @param aCommand : command to list parameters @see G4UIparameter::List() @see G4UIcommand::List() @return the command list parameters, or "" if nothing */
| 4759 | @return the command list parameters, or "" if nothing |
| 4760 | */ |
| 4761 | QString G4OpenGLQtViewer::GetCommandParameterList ( |
| 4762 | const G4UIcommand *aCommand |
| 4763 | ) |
| 4764 | { |
| 4765 | G4int n_parameterEntry = (G4int)aCommand->GetParameterEntries(); |
| 4766 | QString txt; |
| 4767 | |
| 4768 | if( n_parameterEntry > 0 ) { |
| 4769 | G4UIparameter *param; |
| 4770 | |
| 4771 | // Re-implementation of G4UIparameter.cc |
| 4772 | |
| 4773 | for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ ) { |
| 4774 | param = aCommand->GetParameter(i_thParameter); |
| 4775 | txt += "\nParameter : " + QString((char*)(param->GetParameterName()).data()) + "\n"; |
| 4776 | if( ! param->GetParameterGuidance().empty() ) |
| 4777 | txt += QString((char*)(param->GetParameterGuidance()).data())+ "\n" ; |
| 4778 | txt += " Parameter type : " + QString(QChar(param->GetParameterType())) + "\n"; |
| 4779 | if(param->IsOmittable()){ |
| 4780 | txt += " Omittable : True\n"; |
| 4781 | } else { |
| 4782 | txt += " Omittable : False\n"; |
| 4783 | } |
| 4784 | if( param->GetCurrentAsDefault() ) { |
| 4785 | txt += " Default value : taken from the current value\n"; |
| 4786 | } else if( ! param->GetDefaultValue().empty() ) { |
| 4787 | txt += " Default value : " + QString((char*)(param->GetDefaultValue()).data())+ "\n"; |
| 4788 | } |
| 4789 | if( ! param->GetParameterRange().empty() ) { |
| 4790 | txt += " Parameter range : " + QString((char*)(param->GetParameterRange()).data())+ "\n"; |
| 4791 | } |
| 4792 | if( ! param->GetParameterCandidates().empty() ) { |
| 4793 | txt += " Candidates : " + QString((char*)(param->GetParameterCandidates()).data())+ "\n"; |
| 4794 | } |
| 4795 | } |
| 4796 | } |
| 4797 | return txt; |
| 4798 | } |
| 4799 | |
| 4800 | #ifdef G4MULTITHREADED |
| 4801 |
nothing calls this directly
no test coverage detected