Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticInterfaceWidget.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 
27 #ifndef __TY_ACOUSTICINTERFACE_WIDGET__
28 #define __TY_ACOUSTICINTERFACE_WIDGET__
29 
30 #include "TYWidget.h"
31 // Added by qt3to4:
32 #include <QGridLayout>
33 #include <QLabel>
34 
36 class TYLineEdit;
37 class QLineEdit;
38 class QGridLayout;
39 class QLabel;
40 class QCheckBox;
41 class QGroupBox;
42 class QPushButton;
43 class QButtonGroup;
44 class QWidget;
45 class QComboBox;
46 class QRadioButton;
47 
52 class TYAcousticInterfaceWidget : public QWidget
53 {
54  Q_OBJECT
55 
56  // Methodes
57 public:
61  TYAcousticInterfaceWidget(TYAcousticInterface* pElement, QWidget* _pParent = NULL);
66 
70  void updateComboRegime();
71 
76 
80  void saveCurrentRegime();
81 
85  void setCheckBoxRayonnantState(const bool& active);
86 
91 
93  {
94  return _pElement;
95  } // sm++ Correction de la macro TY_DECL_METIER_WIDGET
96 
97 protected:
98  bool eventFilter(QObject* obj, QEvent* ev);
99 
100 public slots:
101  virtual void updateContent();
102  virtual void apply();
103  virtual void reject();
104 
108  void createNewRegime();
109 
113  void deleteRegime();
114 
118  void changeRegime(int regime);
119 
123  void renameRegime();
124 
128  void editAtt();
129 
130  void useAttenuateur();
131 
133  void updateDensite();
134 
138  void showSpectre();
139 
143  void updateRayonnant();
144 
148  void disableDistribType();
149 
150 signals:
151  void regimeChanged(int);
152 
153  // Membres
154 protected:
155  TYAcousticInterface* _pElement; // sm++ Correction de la macro TY_DECL_METIER_WIDGET
156 
157  QGroupBox* _groupBoxDensiteH;
161 
162  QGroupBox* _groupBoxDensiteV;
166 
167  QLabel* _labeUseAtt;
168  QCheckBox* _checkBoxUseAtt;
171 
172  QGroupBox* _groupBoxAtt;
173  QLineEdit* _lineEditNomAtt;
174  QPushButton* _pushButtonSpectreAtt;
175  QGroupBox* _groupBox;
176  QButtonGroup* _buttonGroupTypeDistrib;
177  QRadioButton* _pRadioButtonCalculee;
178  QRadioButton* _pRadioButtonImposee;
179 
180  QGroupBox* _groupBoxSpectre;
183 
185  QGridLayout* _groupBoxListSpLayout;
186  QGridLayout* _groupBoxAttLayout;
187  QGridLayout* _groupBoxLayout;
188 
189  // Choix du regime
190  QGroupBox* _buttonGroupBox;
191  QGridLayout* _buttonGroupBoxLayout;
193  QPushButton* _pushButtonNewRegime;
194  QPushButton* _pushButtonRemRegime;
195 
198 
200  bool _modified;
201 };
202 
203 #endif // __TY_ACOUSTICINTERFACE_WIDGET__
outil IHM pour un objet metier de type TYElement (fichier header)
classe de l'objet IHM pour une interface acoustique
bool eventFilter(QObject *obj, QEvent *ev)
bool _modified
Signale une modification des parametres.
bool _bAddRemRegimeOk
Autorise ou non l'ajout et la suppression de regime.
TYAcousticInterfaceWidget(TYAcousticInterface *pElement, QWidget *_pParent=NULL)
TYAcousticInterface * getElement()
void setCheckBoxRayonnantState(const bool &active)
void updateDensite()
Note que la densite de source a ete modifiee.