MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / editParam

Method editParam

src/openms_gui/source/VISUAL/TOPPASToolVertex.cpp:188–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 }
187
188 void TOPPASToolVertex::editParam()
189 {
190 // use a copy for editing
191 Param edit_param(param_);
192
193 QVector<String> hidden_entries;
194 // remove entries that are handled by edges already, user should not see them
195 QVector<IOInfo> input_infos;
196 getInputParameters(input_infos);
197 for (ConstEdgeIterator it = inEdgesBegin(); it != inEdgesEnd(); ++it)
198 {
199 int index = (*it)->getTargetInParam();
200 if (index < 0)
201 {
202 continue;
203 }
204
205 const String& name = input_infos[index].param_name;
206 if (edit_param.exists(name))
207 {
208 hidden_entries.push_back(name);
209 }
210 }
211
212 QVector<IOInfo> output_infos;
213 getOutputParameters(output_infos);
214 for (ConstEdgeIterator it = outEdgesBegin(); it != outEdgesEnd(); ++it)
215 {
216 int index = (*it)->getSourceOutParam();
217 if (index < 0)
218 {
219 continue;
220 }
221
222 const String& name = output_infos[index].param_name;
223 if (edit_param.exists(name))
224 {
225 hidden_entries.push_back(name);
226 }
227 }
228
229 // remove entries explained by edges
230 foreach(const String &name, hidden_entries)
231 {
232 edit_param.remove(name);
233 }
234
235 // edit_param no longer contains tool description, take it from the node tooltip
236 QWidget* parent_widget = qobject_cast<QWidget*>(scene()->parent());
237 String default_dir;
238 TOPPASToolConfigDialog dialog(parent_widget, edit_param, default_dir, name_, type_, toolTip(), hidden_entries);
239 if (dialog.exec())
240 {
241 // take new values
242 param_.update(edit_param);
243 reset(true);
244 emit parameterChanged(doesParamChangeInvalidate_());
245 }

Callers 1

foreachFunction · 0.80

Calls 7

resetFunction · 0.85
getTargetInParamMethod · 0.80
getSourceOutParamMethod · 0.80
updateEdgeColorsMethod · 0.80
existsMethod · 0.45
push_backMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected