gui.h 498 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef GUI_H
  2. #define GUI_H
  3. #include <QMainWindow>
  4. #include <QGraphicsScene>
  5. #include <QMouseEvent>
  6. namespace Ui {
  7. class GUI;
  8. }
  9. class GUI : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit GUI(QWidget *parent = 0);
  14. ~GUI();
  15. QWidget* mainContentScene();
  16. private:
  17. Ui::GUI *ui_;
  18. protected:
  19. void mouseMoveEvent( QMouseEvent* e );
  20. void mousePressEvent( QMouseEvent* e );
  21. void mouseReleaseEvent( QMouseEvent* e );
  22. private:
  23. int dx_;
  24. int dy_;
  25. };
  26. #endif // GUI_H