| 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) |
nothing calls this directly
no test coverage detected