Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYCalculWidget.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
28 #ifndef __TY_CALCUL_WIDGET__
29 #define __TY_CALCUL_WIDGET__
30 
31 #include "TYWidget.h"
32 
33 #include <vector>
34 // Added by qt3to4:
35 #include <QGridLayout>
36 #include <QLabel>
38 
39 using std::vector;
40 typedef vector<TYElement*> tabPtrElement;
41 
42 class TYProjet;
43 class TYCalcul;
44 class TYEtatsWidget;
45 class QLineEdit;
46 class QGridLayout;
47 class QLabel;
48 class QGroupBox;
49 class QPushButton;
50 class QTextEdit;
51 class QDateEdit;
52 class TYElementWidget;
53 class QTableWidget;
54 class QTabWidget;
55 class QRadioButton;
56 class QButtonGroup;
57 class QComboBox;
58 
63 class TYCalculWidget : public TYWidget
64 {
65  Q_OBJECT
66 
68 
69  // Methodes
70 public:
74  TYCalculWidget(TYCalcul* pElement, QWidget* _pParent = NULL);
75 
79  virtual ~TYCalculWidget();
80 
81 public slots:
82  virtual void updateContent();
83  virtual void apply();
84  void changeSolverMethod(const QString& pSolverName);
85  void changeCalculState();
86 
90  void editResultat();
91 
95  virtual void contextMenuEvent(QContextMenuEvent* e);
96 
97 private:
98  void updateControlPointsTab(TYProjet* pProjet);
99  void updateNoiseMapsTab(TYProjet* pProjet);
100  void updateComboSolver();
101  void updateCalculState();
102  void _enableSolverParameterWidgets(bool bEnable);
103  void _enableDisableDefaultSolverWidgets(bool pIsDefaultSolverSelected);
104  void _initSolverParamsTabs();
105  void _initMeteoParamsTabs();
106 
107  // Membres
108 protected:
110  QLineEdit* _lineEditAuteur;
111  QDateEdit* _editDateCreation;
112  QDateEdit* _editDateModif;
113  QTextEdit* _lineEditComment;
114  QLabel* _labelAuteur;
117  QLabel* _labelComment;
118 
119  // Affichage du type de calcul
120  QComboBox* _comboSolver;
121 
122  QGroupBox* _groupBox;
123  QGroupBox* _groupBoxFlag;
124  QGroupBox* _groupBoxMaillage;
125  QGroupBox* _groupBoxResultat;
127  QWidget* _meteoTabWidget;
128 
129  // Presentation des resultats
131  QPushButton* _pushButtonResultat;
132 
133  // Workaround issue #138
134  // QLabel* _labelStoreGlobalMatrix;
135  // QCheckBox* _checkBoxStoreGlobalMatrix;
136 
137  QGridLayout* _calculLayout;
138 
140 
143 
144  QButtonGroup* _buttonGroupState;
145 
146  QRadioButton* _pRadioButtonActif;
147  QRadioButton* _pRadioButtonLocked;
148 
150  QTabWidget* _tabWidget;
151 
153  QTableWidget* _tableauPointControle;
154 
156  QTableWidget* _tableauMaillages;
157 };
158 
159 #endif // __TY_CALCUL_WIDGET__
vector< TYElement * > tabPtrElement
Objet permettant de gerer les differents widgets servant a parametriser le solveur.
outil IHM pour un objet metier de type TYElement (fichier header)
#define TY_DECL_METIER_WIDGET(classname)
Definition: TYWidget.h:31
classe de l'objet IHM pour un calcul
QRadioButton * _pRadioButtonActif
TYCalculWidget(TYCalcul *pElement, QWidget *_pParent=NULL)
QTableWidget * _tableauPointControle
Onglet des points de controle.
QComboBox * _comboSolver
QDateEdit * _editDateModif
QWidget * _meteoTabWidget
QTableWidget * _tableauMaillages
Onglet des points de controle.
TYSolverParamsWidgetManager * solverParamsWidgetManager
QButtonGroup * _buttonGroupState
virtual void contextMenuEvent(QContextMenuEvent *e)
QWidget * _maillagesWidget
void _enableDisableDefaultSolverWidgets(bool pIsDefaultSolverSelected)
QGroupBox * _groupBoxResultat
QLabel * _labelDateCreation
QWidget * _paramsTabWidget
QGridLayout * _calculLayout
virtual void updateContent()
QGroupBox * _groupBoxMaillage
QLabel * _labelComment
void updateNoiseMapsTab(TYProjet *pProjet)
QPushButton * _pushButtonResultat
QLabel * _labelAuteur
QLineEdit * _lineEditAuteur
QDateEdit * _editDateCreation
TYElementWidget * _elmW
void _initMeteoParamsTabs()
QLabel * _labelDateModif
void _enableSolverParameterWidgets(bool bEnable)
virtual ~TYCalculWidget()
void updateControlPointsTab(TYProjet *pProjet)
void _initSolverParamsTabs()
TYEtatsWidget * _etatsWidget
virtual void apply()
QLineEdit * _lineEditNomResultat
QTabWidget * _tabWidget
Gestion des differentes options sous forme d'onglet.
QGroupBox * _groupBox
void changeSolverMethod(const QString &pSolverName)
QGroupBox * _groupBoxFlag
QRadioButton * _pRadioButtonLocked
QTextEdit * _lineEditComment
Calculation program.
Definition: TYCalcul.h:50
classe de l'objet IHM pour un element
classe de l'outil IHM pour les Etats
Definition: TYEtatsWidget.h:50
classe de definition d'un projet.
Definition: TYProjet.h:45
classe de l'objet IHM pour un objet metier de type TYElement
Definition: TYWidget.h:43