| 55 | } |
| 56 | |
| 57 | void GraphicsView::mouseReleaseEvent(QMouseEvent *event) { |
| 58 | QGraphicsView::mouseReleaseEvent(event); |
| 59 | |
| 60 | if(event->button() == Qt::RightButton) { |
| 61 | //rightclick -> reset image scale to 1:1 |
| 62 | emit rightClick(); |
| 63 | } |
| 64 | else if(event->button() == Qt::MiddleButton) { |
| 65 | //middle click -> fit image to view |
| 66 | emit middleClick(); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | void GraphicsView::wheelEvent(QWheelEvent *event) { |
| 71 | if(event->delta() > 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected