MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / resizeEvent

Method resizeEvent

DSView/pv/view/view.cpp:910–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

908}
909
910void View::resizeEvent(QResizeEvent*)
911{
912 int width = get_view_width();
913
914 if (width == 0){
915 return;
916 }
917
918 reconstruct();
919 setViewportMargins(headerWidth(), RulerHeight, 0, 0);
920 update_margins();
921 update_scroll();
922 signals_changed(NULL);
923
924 if (_device_agent->get_work_mode() == DSO){
925 _scale = _session->cur_view_time() / width;
926 }
927
928 if (_device_agent->get_work_mode() != DSO)
929 _maxscale = _session->cur_sampletime() / (width * MaxViewRate);
930 else
931 _maxscale = 1e9;
932
933 _scale = min(_scale, _maxscale);
934
935 _ruler->update();
936 _header->header_resize();
937 set_update(_time_viewport, true);
938 set_update(_fft_viewport, true);
939 resize();
940}
941
942void View::h_scroll_value_changed(int value)
943{

Callers

nothing calls this directly

Calls 5

get_work_modeMethod · 0.80
cur_view_timeMethod · 0.80
cur_sampletimeMethod · 0.80
header_resizeMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected