No Description

graphicsview.h 788B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef GRAPHICSVIEW_H
  2. #define GRAPHICSVIEW_H
  3. #include <QGraphicsView>
  4. #include <QMouseEvent>
  5. class Editor;
  6. /*
  7. class GraphicsView_Object : public QObject
  8. {
  9. Q_OBJECT
  10. signals:
  11. void onMousePress(QMouseEvent *event);
  12. void onMouseMove(QMouseEvent *event);
  13. void onMouseRelease(QMouseEvent *event);
  14. };
  15. */
  16. class GraphicsView : public QGraphicsView
  17. {
  18. public:
  19. GraphicsView() : QGraphicsView() {}
  20. GraphicsView(QWidget *parent) : QGraphicsView(parent) {}
  21. public:
  22. // GraphicsView_Object object;
  23. Editor *editor;
  24. protected:
  25. void mousePressEvent(QMouseEvent *event);
  26. void mouseMoveEvent(QMouseEvent *event);
  27. void mouseReleaseEvent(QMouseEvent *event);
  28. };
  29. //Q_DECLARE_METATYPE(GraphicsView)
  30. #endif // GRAPHICSVIEW_H