input_view.hpp 469 B

123456789101112131415161718192021222324252627
  1. #ifndef QT_INPUT_VIEW_HPP
  2. #define QT_INPUT_VIEW_HPP
  3. #include "view.hpp"
  4. using namespace std;
  5. static const size_t np=10;
  6. class QtInputView:public QtView{
  7. Q_OBJECT
  8. private:
  9. int margin;
  10. int radius;
  11. float min_d;
  12. size_t selected;
  13. Point point[3*np];
  14. void drawSplinePoints(Spline& spline);
  15. void initPoints();
  16. public:
  17. QtInputView();
  18. void paintGL() override;
  19. void mousePressEvent(QMouseEvent* event);
  20. public slots:
  21. void updateGeometry();
  22. };
  23. #endif