geometry.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef QT_INPUT_GEOMETRY_HPP
  2. #define QT_INPUT_GEOMETRY_HPP
  3. #include <iostream>
  4. #include <fstream>
  5. #include <QWidget>
  6. #include <QVBoxLayout>
  7. #include <QLabel>
  8. #include <QLineEdit>
  9. #include <QDoubleValidator>
  10. #include <QIntValidator>
  11. #include <QPushButton>
  12. #include <QMessageBox>
  13. #include "qt/input/data.hpp"
  14. using namespace std;
  15. class QtInputGeometry:public QWidget{
  16. Q_OBJECT
  17. private:
  18. QtInputData* data;
  19. QVBoxLayout* main_layout;
  20. QLabel* lX_label;
  21. QLabel* nX_label;
  22. QLabel* nZ_max_label;
  23. QLabel* depth_label;
  24. QLineEdit* lX_input;
  25. QLineEdit* nX_input;
  26. QLineEdit* nZ_max_input;
  27. QLineEdit* depth_input;
  28. QPushButton* refresh_button;
  29. QDoubleValidator* positive_double_validator;
  30. QIntValidator* positive_int_validator;
  31. public:
  32. QtInputGeometry(QtInputData* data);
  33. ~QtInputGeometry();
  34. QWidget* validate();
  35. void setGeometry();
  36. void getGeometry();
  37. public slots:
  38. void emitGeometryChanged();
  39. signals:
  40. void geometryChanged();
  41. };
  42. inline
  43. QtInputGeometry::~QtInputGeometry(){
  44. delete positive_double_validator;
  45. delete positive_int_validator;
  46. }
  47. #endif