| 226 | } |
| 227 | |
| 228 | void PlotViewWidget::mouseMoveEvent(QMouseEvent *mouseMoveEvent) |
| 229 | { |
| 230 | MoveAndZoomableView::mouseMoveEvent(mouseMoveEvent); |
| 231 | |
| 232 | QMap<unsigned, QMap<unsigned, unsigned>> newHoverePointIndexPerStreamAndPlot; |
| 233 | if (this->model) |
| 234 | { |
| 235 | const auto pos = mouseMoveEvent->pos(); |
| 236 | const auto mouseHoverPos = this->convertPixelPosToPlotPos(pos); |
| 237 | for (unsigned streamIndex = 0; streamIndex < this->model->getNrStreams(); streamIndex++) |
| 238 | { |
| 239 | const auto streamParam = model->getStreamParameter(streamIndex); |
| 240 | for (unsigned plotIndex = 0; plotIndex < streamParam.getNrPlots(); plotIndex++) |
| 241 | { |
| 242 | const auto pointIndex = model->getPointIndex(streamIndex, plotIndex, mouseHoverPos); |
| 243 | if (pointIndex) |
| 244 | newHoverePointIndexPerStreamAndPlot[streamIndex][plotIndex] = *pointIndex; |
| 245 | } |
| 246 | } |
| 247 | mouseMoveEvent->accept(); |
| 248 | } |
| 249 | |
| 250 | if (this->currentlyHoveredPointPerStreamAndPlot != newHoverePointIndexPerStreamAndPlot) |
| 251 | { |
| 252 | this->currentlyHoveredPointPerStreamAndPlot = newHoverePointIndexPerStreamAndPlot; |
| 253 | update(); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | void PlotViewWidget::setMoveOffset(QPointF offset) |
| 258 | { |
nothing calls this directly
no test coverage detected