MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / on_keyword_changed

Method on_keyword_changed

DSView/pv/dock/searchcombobox.cpp:181–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 }
180
181 void SearchComboBox::on_keyword_changed(const QString &value)
182 {
183 if (_items.size() == 0)
184 return;
185
186 for(auto o : _items)
187 {
188 if (value == ""
189 || o->_name.indexOf(value, 0, Qt::CaseInsensitive) >= 0
190 || o->_id.indexOf(value, 0, Qt::CaseInsensitive) >= 0){
191 if (o->_control->isHidden()){
192 o->_control->show();
193 }
194 }
195 else if (o->_control->isHidden() == false){
196 o->_control->hide();
197 }
198 }
199
200 _scroll->verticalScrollBar()->setValue(0);
201 }

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
hideMethod · 0.80
setValueMethod · 0.80
showMethod · 0.45

Tested by

no test coverage detected