| 22 | } |
| 23 | |
| 24 | void PolyAnnotationTool::mouseMoveEvent(QMouseEvent *event) { |
| 25 | if (_viewer) { |
| 26 | if (_generating) { |
| 27 | if (!_activeLine) { |
| 28 | _activeLine = new QGraphicsLineItem(); |
| 29 | _activeLine->setZValue(std::numeric_limits<float>::max()); |
| 30 | _viewer->scene()->addItem(_activeLine); |
| 31 | } |
| 32 | QPointF scenePos = _viewer->mapToScene(event->pos()); |
| 33 | _activeLine->setPen(QPen(QBrush(Qt::green), 3. / _viewer->transform().m11(), Qt::PenStyle::DashLine)); |
| 34 | _activeLine->setLine(_last.getX(), _last.getY(), scenePos.x(), scenePos.y()); |
| 35 | } |
| 36 | AnnotationTool::mouseMoveEvent(event); |
| 37 | event->accept(); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | void PolyAnnotationTool::mouseDoubleClickEvent(QMouseEvent *event) { |
| 42 | QPointF scenePos = _viewer->mapToScene(event->pos()); |
nothing calls this directly
no outgoing calls
no test coverage detected