Ei kuvausta

graphicsview.cpp 600B

1234567891011121314151617181920212223
  1. #include "graphicsview.h"
  2. #include "editor.h"
  3. void GraphicsView::mousePressEvent(QMouseEvent *event) {
  4. QGraphicsView::mousePressEvent(event);
  5. if (editor) {
  6. editor->objectsView_onMousePress(event);
  7. }
  8. }
  9. void GraphicsView::mouseMoveEvent(QMouseEvent *event) {
  10. QGraphicsView::mouseMoveEvent(event);
  11. if (editor) {
  12. editor->objectsView_onMouseMove(event);
  13. }
  14. }
  15. void GraphicsView::mouseReleaseEvent(QMouseEvent *event) {
  16. QGraphicsView::mouseReleaseEvent(event);
  17. if (editor) {
  18. editor->objectsView_onMouseRelease(event);
  19. }
  20. }