| 887 | } |
| 888 | |
| 889 | void PlotViewWidget::drawZoomRect(QPainter &painter) const |
| 890 | { |
| 891 | if (this->viewAction != ViewAction::ZOOM_RECT) |
| 892 | return; |
| 893 | |
| 894 | if (!this->fixYAxis) |
| 895 | { |
| 896 | MoveAndZoomableView::drawZoomRect(painter); |
| 897 | return; |
| 898 | } |
| 899 | |
| 900 | auto yTop = this->plotRect.top() + fadeBoxThickness; |
| 901 | auto yBottom = this->plotRect.bottom() - fadeBoxThickness; |
| 902 | const auto mouseRect = QRectF(QPointF(viewZoomingMousePosStart.x(), yTop), |
| 903 | QPointF(viewZoomingMousePos.x(), yBottom)); |
| 904 | |
| 905 | painter.setPen(ZOOM_RECT_PEN); |
| 906 | painter.setBrush(ZOOM_RECT_BRUSH); |
| 907 | painter.drawRect(mouseRect); |
| 908 | } |
| 909 | |
| 910 | void PlotViewWidget::updatePlotRectAndAxis(QPainter &painter) |
| 911 | { |
no outgoing calls
no test coverage detected