MCPcopy Create free account
hub / github.com/IENT/YUView / getVisibleRange

Method getVisibleRange

YUViewLib/src/ui/views/PlotViewWidget.cpp:1047–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1045}
1046
1047std::optional<Range<double>> PlotViewWidget::getVisibleRange(const Axis axis) const
1048{
1049 if (this->showStreamList.empty())
1050 return {};
1051
1052 Range<double> visibleRange{0, 0};
1053 for (int i = 0; i < this->showStreamList.size(); i++)
1054 {
1055 const auto streamIndex = this->showStreamList.at(i);
1056 const auto streamParam = this->model->getStreamParameter(streamIndex);
1057 const auto range = axis == Axis::X ? streamParam.xRange : streamParam.yRange;
1058 if (i == 0)
1059 visibleRange = range;
1060 else
1061 {
1062 visibleRange.min = std::min(visibleRange.min, range.min);
1063 visibleRange.max = std::max(visibleRange.max, range.max);
1064 }
1065 }
1066 return visibleRange;
1067}
1068
1069Range<double> PlotViewWidget::getAxisRange(Axis axis, AxisProperties axisProperties) const
1070{

Callers 3

zoomToFitInternalMethod · 0.95
setMoveOffsetMethod · 0.95
getAxisTicksToShowMethod · 0.95

Calls 3

sizeMethod · 0.45
atMethod · 0.45
getStreamParameterMethod · 0.45

Tested by

no test coverage detected