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

Method spectrumSearchText_

src/openms_gui/source/VISUAL/DIATreeTab.cpp:166–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165
166 void DIATreeTab::spectrumSearchText_()
167 {
168 const QString& text = spectra_search_box_->text(); // get text from QLineEdit
169 if (!text.isEmpty())
170 {
171 Qt::MatchFlags matchflags = Qt::MatchFixedString;
172 matchflags |= Qt::MatchRecursive; // match subitems (below top-level)
173 matchflags |= Qt::MatchStartsWith;
174
175 QList<QTreeWidgetItem*> searched = dia_treewidget_->findItems(text, matchflags, spectra_combo_box_->currentIndex());
176
177 if (!searched.isEmpty())
178 {
179 dia_treewidget_->clearSelection();
180 searched.first()->setSelected(true);
181 dia_treewidget_->update();
182 dia_treewidget_->scrollToItem(searched.first());
183 }
184 }
185 }
186
187
188 OSWIndexTrace DIATreeTab::prepareSignal_(QTreeWidgetItem* item)

Callers

nothing calls this directly

Calls 3

setSelectedMethod · 0.80
isEmptyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected