12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef QT_INPUT_PHYSICS_HPP
- #define QT_INPUT_PHYSICS_HPP
- #include <iostream>
- #include <QLabel>
- #include <QWidget>
- #include <QGroupBox>
- #include <QComboBox>
- #include <QHBoxLayout>
- #include <QVBoxLayout>
- #include <QLineEdit>
- #include <QDoubleValidator>
- #include "../physics.hpp"
- using namespace std;
- static const double def_g=9.81;
- static const double def_rho=1e3;
- static const double def_phi=3e-1;
- static const double def_k0=3e-5;
- static const double def_nivrivsat=1e-2;
- //Brooks & Corey
- static const double BC_psat=-2000;
- static const double BC_sres=0;
- static const double BC_lambda=3;
- static const double BC_alpha=11;
- static const size_t max_model_parameters=6;
- class QtInputPhysics:public QWidget{
- Q_OBJECT
- private:
- QGroupBox* phy_common_box;
- QGroupBox* phy_model_box;
- QComboBox* phy_model_selection_box;
- QLabel* g_label;
- QLabel* rho_label;
- QLabel* phi_label;
- QLabel* k0_label;
- QLabel* nivrivsat_label;
- QLabel* model_label[max_model_parameters];
- QLineEdit* g_input;
- QLineEdit* rho_input;
- QLineEdit* phi_input;
- QLineEdit* k0_input;
- QLineEdit* nivrivsat_input;
- QLineEdit* model_input[max_model_parameters];
- QHBoxLayout* base_layout;
- QVBoxLayout* phy_common_layout;
- QVBoxLayout* phy_model_layout;
- QSpacerItem* phy_model_layout_spacer;
- QDoubleValidator* double_validator;
- QDoubleValidator* positive_double_validator;
- size_t nb_model_parameters;
- public:
- QtInputPhysics();
- ~QtInputPhysics();
- private slots:
- void modelChoosed(int index);
- };
- #endif
|