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

Method set_search_pos

DSView/pv/view/view.cpp:558–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558void View::set_search_pos(uint64_t search_pos, bool hit)
559{
560 QColor fore(QWidget::palette().color(QWidget::foregroundRole()));
561 fore.setAlpha(View::BackAlpha);
562
563 const double time = search_pos * 1.0 / _session->cur_snap_samplerate();
564 _search_pos = search_pos;
565 _search_hit = hit;
566 _search_cursor->set_index(search_pos);
567 _search_cursor->set_colour(hit ? View::Blue : fore);
568
569 int width = get_view_width();
570 assert(width);
571
572 if (hit) {
573 set_scale_offset(_scale, (time / _scale) - (width / 2));
574 _ruler->update();
575 viewport_update();
576 }
577}
578
579void View::normalize_layout()
580{

Callers 4

mouseMoveEventMethod · 0.80
on_previousMethod · 0.80
on_nextMethod · 0.80
on_setMethod · 0.80

Calls 5

colorMethod · 0.80
cur_snap_samplerateMethod · 0.80
set_indexMethod · 0.80
set_colourMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected