Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticPolygonWidget.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 <QtWidgets>
24 
29 
30 #define TR(id) OLocalizator::getString("TYAcousticPolygonWidget", (id))
31 
33  : TYWidget(pElement, _pParent)
34 {
35 
36  _accSurfW = new TYAcousticSurfaceWidget(pElement, this);
37 
38  resize(300, 680);
39  setWindowTitle(TR("id_caption"));
40  _accPolygonLayout = new QGridLayout();
41  setLayout(_accPolygonLayout);
42 
43  _accPolygonLayout->addWidget(_accSurfW, 1, 0);
44 
45  /*
46  _groupBoxPolygon = new QGroupBox( this );
47  _groupBoxPolygon->setTitle( TR( "id_polygon" ) );
48  _groupBoxPolygon->setColumnLayout(0, Qt::Vertical );
49  _groupBoxPolygon->layout()->setSpacing( 6 );
50  _groupBoxPolygon->layout()->setContentsMargins(11, 11, 11, 11);
51  _groupBoxPolygonLayout = new QGridLayout( _groupBoxPolygon->layout() );
52  _groupBoxPolygonLayout->setAlignment( Qt::AlignTop );
53 
54  _lineEditNomPolygon = new QLineEdit( _groupBoxPolygon );
55  _lineEditNomPolygon->setEnabled( false );
56  _groupBoxPolygonLayout->addWidget( _lineEditNomPolygon, 0, 0 );
57 
58  _pushButtonPolygon = new QPushButton( _groupBoxPolygon );
59  _pushButtonPolygon->setText( TR( "id_proprietes_button" ) );
60  _groupBoxPolygonLayout->addWidget( _pushButtonPolygon, 0, 1 );
61 
62  _accPolygonLayout->addWidget( _groupBoxPolygon, 2, 0 );
63 
64  connect(_pushButtonPolygon, &QPushButton::clicked,this, &TYAcousticPolygonWidget:: editPolygon);
65  */
66  updateContent();
67 }
68 
70 
72 {
74 
75  // _lineEditNomPolygon->setText( getElement()->getPolygon()->getName() );
76 }
77 
79 {
80  _accSurfW->apply();
81 
82  emit modified();
83 }
84 
86 {
87  _accSurfW->getGroupBoxMat()->hide();
88 }
89 
90 /*
91 void TYAcousticPolygonWidget::editPolygon()
92 {
93  int ret = getElement()->getPolygon()->edit(this);
94 
95  if (ret == QDialog::Accepted) {
96  _lineEditNomPolygon->setText( getElement()->getPolygon()->getName() );
97  }
98 }
99 */
#define TR(id)
objet IHM pour un polygone acoustique (fichier header)
outil IHM pour une surface acoustique (fichier header)
TYAcousticSurfaceWidget * _accSurfW
TYAcousticPolygonWidget(TYAcousticPolygon *pElement, QWidget *_pParent=NULL)
Classe de l'objet IHM pour une surface acoustique.
classe de l'objet IHM pour un objet metier de type TYElement
Definition: TYWidget.h:43
void modified()