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

Method annotateWithFileDialog

src/openms_gui/source/VISUAL/LayerDataBase.cpp:106–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 bool LayerAnnotatorBase::annotateWithFileDialog(LayerDataBase& layer, LogWindow& log, const String& current_path) const
107 {
108 // warn if hidden layer => wrong layer selected...
109 if (!layer.visible)
110 {
111 log.appendNewHeader(LogWindow::LogState::NOTICE, "The current layer is not visible", "Have you selected the right layer for this action? Aborting.");
112 return false;
113 }
114
115 // load id data
116 QString fname = QFileDialog::getOpenFileName(nullptr,
117 file_dialog_text_.toQString(),
118 current_path.toQString(),
119 supported_types_.toFileDialogFilter(FilterLayout::BOTH, true).toQString());
120
121 bool success = annotateWithFilename(layer, log, fname);
122
123 return success;
124 }
125
126 bool LayerAnnotatorBase::annotateWithFilename(LayerDataBase& layer, LogWindow& log, const String& fname) const
127 {

Callers 3

annotateWithAMSMethod · 0.80
annotateWithIDMethod · 0.80
annotateWithOSWMethod · 0.80

Calls 3

appendNewHeaderMethod · 0.80
toFileDialogFilterMethod · 0.80
toQStringMethod · 0.45

Tested by

no test coverage detected