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

Method decoded_progress

DSView/pv/dock/protocoldock.cpp:448–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448void ProtocolDock::decoded_progress(int progress)
449{
450 const auto &decode_sigs = _session->get_decode_signals();
451 unsigned int index = 0;
452
453 for(auto d : decode_sigs) {
454 int pg = d->get_progress();
455 QString err;
456
457 if (d->decoder()->out_of_memory())
458 err = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_OUT_OF_MEMORY), "Out of Memory");
459
460 if (index < _protocol_lay_items.size())
461 {
462 ProtocolItemLayer &lay = *(_protocol_lay_items.at(index));
463 lay.SetProgress(pg, err);
464
465 // have custom data format
466 if (pg == 100 && lay.m_decoderStatus != NULL){
467 lay.enable_format(lay.m_decoderStatus->m_bNumeric);
468 }
469 }
470
471 index++;
472 }
473
474 if (progress == 0 || progress % 10 == 1){
475 update_model();
476 }
477}
478
479void ProtocolDock::set_model()
480{

Callers

nothing calls this directly

Calls 6

out_of_memoryMethod · 0.80
sizeMethod · 0.80
SetProgressMethod · 0.80
enable_formatMethod · 0.80
get_progressMethod · 0.45
decoderMethod · 0.45

Tested by

no test coverage detected