1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef GRAPHICSVIEW_H
- #define GRAPHICSVIEW_H
-
- #include <QGraphicsView>
- #include <QMouseEvent>
-
- #include "editor.h"
-
- /*
- class GraphicsView_Object : public QObject
- {
- Q_OBJECT
-
- signals:
- void onMousePress(QMouseEvent *event);
- void onMouseMove(QMouseEvent *event);
- void onMouseRelease(QMouseEvent *event);
- };
- */
-
- class GraphicsView : public QGraphicsView
- {
- public:
- GraphicsView() : QGraphicsView() {}
- GraphicsView(QWidget *parent) : QGraphicsView(parent) {}
-
- public:
- // GraphicsView_Object object;
- Editor *editor = NULL;
- protected:
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
- };
-
- //Q_DECLARE_METATYPE(GraphicsView)
-
- #endif // GRAPHICSVIEW_H
|