MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / mouseMoveEvent

Method mouseMoveEvent

ASAP/annotation/PolyAnnotationTool.cpp:24–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void 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
41void PolyAnnotationTool::mouseDoubleClickEvent(QMouseEvent *event) {
42 QPointF scenePos = _viewer->mapToScene(event->pos());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected