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

Method createResources

src/openms_gui/source/VISUAL/TOPPASScene.cpp:2285–2317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2283 }
2284
2285 void TOPPASScene::createResources(TOPPASResources& resources)
2286 {
2287 resources.clear();
2288 QStringList used_keys;
2289 for (VertexIterator it = verticesBegin(); it != verticesEnd(); ++it)
2290 {
2291 TOPPASInputFileListVertex* iflv = qobject_cast<TOPPASInputFileListVertex*>(*it);
2292 if (iflv)
2293 {
2294 QString key = iflv->getKey();
2295 if (used_keys.contains(key))
2296 {
2297 if (gui_)
2298 {
2299 QMessageBox::warning(nullptr, "Non-unique input node names", "Some of the input nodes have the same names. Cannot create resource file.");
2300 }
2301 else
2302 {
2303 std::cerr << "Some of the input nodes have the same names. Cannot create resource file." << std::endl;
2304 }
2305 return;
2306 }
2307 used_keys << key;
2308 QList<TOPPASResource> resource_list;
2309 QStringList files = iflv->getFileNames();
2310 foreach(const QString& file, files)
2311 {
2312 resource_list << TOPPASResource(file);
2313 }
2314 resources.add(key, resource_list);
2315 }
2316 }
2317 }
2318
2319 TOPPASScene::RefreshStatus TOPPASScene::refreshParameters()
2320 {

Callers 1

Calls 4

getFileNamesMethod · 0.80
clearMethod · 0.45
containsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected