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

Method search_update

DSView/pv/dock/protocoldock.cpp:820–853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818}
819
820void ProtocolDock::search_update()
821{
822 if (!_search_edited)
823 return;
824
825 pv::data::DecoderModel *decoder_model = _session->get_decoder_model();
826
827 auto decoder_stack = decoder_model->getDecoderStack();
828 if (!decoder_stack)
829 return;
830
831 if (decoder_stack->list_annotation_size(_model_proxy.filterKeyColumn()) > ProgressRows) {
832 QFuture<void> future;
833 future = QtConcurrent::run([&]{
834 search_done();
835 });
836 Qt::WindowFlags flags = Qt::CustomizeWindowHint;
837 QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SEARCHING), "Searching..."),
838 L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"),0,0,this,flags);
839 dlg.setWindowModality(Qt::WindowModal);
840 dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
841 Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
842 dlg.setCancelButton(NULL);
843
844 QFutureWatcher<void> watcher;
845 connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel()));
846 watcher.setFuture(future);
847
848 dlg.exec();
849 } else {
850 search_done();
851 }
852 _search_edited = false;
853}
854
855 //-------------------IProtocolItemLayerCallback
856void ProtocolDock::OnProtocolSetting(void *handle){

Callers

nothing calls this directly

Calls 4

get_decoder_modelMethod · 0.80
getDecoderStackMethod · 0.80
list_annotation_sizeMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected