Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAttenuateurWidget.cpp
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 
21 // Added by qt3to4:
22 #include <QGridLayout>
23 #include <QLabel>
24 
28 #include "TYAttenuateurWidget.h"
29 #include "TYElementWidget.h"
30 
31 #define TR(id) OLocalizator::getString("TYAttenuateurWidget", (id))
32 
33 TYAttenuateurWidget::TYAttenuateurWidget(TYAttenuateur* pElement, QWidget* _pParent /*=NULL*/)
34  : TYWidget(pElement, _pParent)
35 {
36  _elmW = new TYElementWidget(pElement, this);
37  resize(300, 200);
38  setWindowTitle(TR("id_caption"));
39  _attenuateurLayout = new QGridLayout();
40 
41  _attenuateurLayout->addWidget(_elmW, 0, 0);
42 
43  TYSpectre& spectre = (static_cast<TYAttenuateur*>(_pElement))->getSpectreAtt();
44  _spectreW = new TYSpectreWidget(&spectre, this);
45  _attenuateurLayout->addWidget(_spectreW, 1, 0);
46  setLayout(_attenuateurLayout);
47 
48  updateContent();
49 }
50 
52 
54 {
57 }
58 
60 {
61  _elmW->apply();
62  _spectreW->apply();
63 
64  emit modified();
65 }
#define TR(id)
outil IHM pour un attenuateur (fichier header)
outil IHM pour un element (fichier header)
outil IHM pour un spectre (fichier header)
TYAttenuateurWidget(TYAttenuateur *pElement, QWidget *_pParent=NULL)
TYElementWidget * _elmW
QGridLayout * _attenuateurLayout
TYSpectreWidget * _spectreW
virtual void updateContent()
classe de l'objet IHM pour un element
virtual void apply()
virtual void updateContent()
classe de l'objet IHM pour un spectre
virtual void apply()
virtual void updateContent()
classe de l'objet IHM pour un objet metier de type TYElement
Definition: TYWidget.h:43
TYElement * _pElement
Definition: TYWidget.h:114
void modified()