Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticPolygonWidget.cpp
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 
21 // Added by qt3to4:
22 #include <QGridLayout>
23 
28 
29 #define TR(id) OLocalizator::getString("TYAcousticPolygonWidget", (id))
30 
32  : TYWidget(pElement, _pParent)
33 {
34 
35  _accSurfW = new TYAcousticSurfaceWidget(pElement, this);
36 
37  resize(300, 680);
38  setWindowTitle(TR("id_caption"));
39  _accPolygonLayout = new QGridLayout();
40  setLayout(_accPolygonLayout);
41 
42  _accPolygonLayout->addWidget(_accSurfW, 1, 0);
43 
44  /*
45  _groupBoxPolygon = new QGroupBox( this );
46  _groupBoxPolygon->setTitle( TR( "id_polygon" ) );
47  _groupBoxPolygon->setColumnLayout(0, Qt::Vertical );
48  _groupBoxPolygon->layout()->setSpacing( 6 );
49  _groupBoxPolygon->layout()->setContentsMargins(11, 11, 11, 11);
50  _groupBoxPolygonLayout = new QGridLayout( _groupBoxPolygon->layout() );
51  _groupBoxPolygonLayout->setAlignment( Qt::AlignTop );
52 
53  _lineEditNomPolygon = new QLineEdit( _groupBoxPolygon );
54  _lineEditNomPolygon->setEnabled( false );
55  _groupBoxPolygonLayout->addWidget( _lineEditNomPolygon, 0, 0 );
56 
57  _pushButtonPolygon = new QPushButton( _groupBoxPolygon );
58  _pushButtonPolygon->setText( TR( "id_proprietes_button" ) );
59  _groupBoxPolygonLayout->addWidget( _pushButtonPolygon, 0, 1 );
60 
61  _accPolygonLayout->addWidget( _groupBoxPolygon, 2, 0 );
62 
63  connect(_pushButtonPolygon, &QPushButton::clicked,this, &TYAcousticPolygonWidget:: editPolygon);
64  */
65  updateContent();
66 }
67 
69 
71 {
73 
74  // _lineEditNomPolygon->setText( getElement()->getPolygon()->getName() );
75 }
76 
78 {
79  _accSurfW->apply();
80 
81  emit modified();
82 }
83 
85 {
86  _accSurfW->getGroupBoxMat()->hide();
87 }
88 
89 /*
90 void TYAcousticPolygonWidget::editPolygon()
91 {
92  int ret = getElement()->getPolygon()->edit(this);
93 
94  if (ret == QDialog::Accepted) {
95  _lineEditNomPolygon->setText( getElement()->getPolygon()->getName() );
96  }
97 }
98 */
#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()