MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / mouseMoveEvent

Method mouseMoveEvent

graph_view.cpp:135–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void MyGraphicsView::mouseMoveEvent(QMouseEvent *event){
136 if(onMiddlePress){
137 QPointF dp = mapToScene(event->pos()) - lastPos;
138 setSceneRect(sceneRect().x() - dp.x(), sceneRect().y() - dp.y(), sceneRect().width(), sceneRect().height());
139 lastPos = mapToScene(event->pos());
140 }
141 changeCursor();
142 emit mouseMoved(mapToScene(event->pos()));
143 if(itemState & ADD){
144 clearSketch();
145 sketchLine(strtVex->scenePos() + strtVex->rect().center(), mapToScene(event->pos()));
146 }
147}
148
149void MyGraphicsView::wheelEvent(QWheelEvent *event){
150 QPointF cursorPoint = event->position();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected