Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticInterfaceWidget.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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 
145 signals:
146  void regimeChanged(int);
147 
148  // Membres
149 protected:
150  TYAcousticInterface* _pElement; // sm++ Correction de la macro TY_DECL_METIER_WIDGET
151 
152  QGroupBox* _groupBoxDensiteH;
156 
157  QGroupBox* _groupBoxDensiteV;
161 
162  QLabel* _labeUseAtt;
163  QCheckBox* _checkBoxUseAtt;
166 
167  QGroupBox* _groupBoxAtt;
168  QLineEdit* _lineEditNomAtt;
169  QPushButton* _pushButtonSpectreAtt;
170  QGroupBox* _groupBox;
171  QButtonGroup* _buttonGroupTypeDistrib;
172  QRadioButton* _pRadioButtonCalculee;
173  QRadioButton* _pRadioButtonImposee;
174 
175  QGroupBox* _groupBoxSpectre;
178 
180  QGridLayout* _groupBoxListSpLayout;
181  QGridLayout* _groupBoxAttLayout;
182  QGridLayout* _groupBoxLayout;
183 
184  // Choix du regime
185  QGroupBox* _buttonGroupBox;
186  QGridLayout* _buttonGroupBoxLayout;
188  QPushButton* _pushButtonNewRegime;
189  QPushButton* _pushButtonRemRegime;
190 
193 
195  bool _modified;
196 };
197 
198 #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.