Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSurfaceInterfaceWidget.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 
23 // Added by qt3to4:
24 #include <QGridLayout>
25 #include <QLabel>
26 
29 
30 #define TR(id) OLocalizator::getString("TYSurfaceInterfaceWidget", (id))
31 
37 
39  : QWidget(_pParent), _pElement(pElement)
40 {
41 
42  resize(300, 540);
43  setWindowTitle(TR("id_caption"));
44  QGridLayout* _surfaceInterfaceLayout = new QGridLayout();
45 
46  _groupBox = new QGroupBox(this);
47  _groupBox->setTitle(TR(""));
48  _groupBoxLayout = new QGridLayout();
49  _groupBox->setLayout(_groupBoxLayout);
50 
52  _lineEditAire->setEnabled(false);
53  _groupBoxLayout->addWidget(_lineEditAire, 0, 1);
54 
55  _labelAire = new QLabel(_groupBox);
56  _labelAire->setText(TR("id_aire_label"));
57  _groupBoxLayout->addWidget(_labelAire, 0, 0);
58 
59  QLabel* pUnit = new QLabel(_groupBox);
60  pUnit->setText(TR("id_unite_aire"));
61  _groupBoxLayout->addWidget(pUnit, 0, 2);
62 
63  _surfaceInterfaceLayout->addWidget(_groupBox, 0, 0);
64 
65  updateContent();
66 }
67 
69 
71 {
72  _lineEditAire->setText(QString().setNum(getElement()->surface()));
73 }
74 
76 {
78  // emit modified();
79 }
All base classes related to 3D manipulation.
outil IHM pour une entrée utilisateur (fichier header)
#define TR(id)
outil IHM pour la gestion des objets de type SurfaceInterface (fichier header)
static void setIsSavedOk(const bool &toSave)
Definition: TYElement.h:915
TYSurfaceInterface * getElement()
TYSurfaceInterfaceWidget(TYSurfaceInterface *pElement, QWidget *_pParent=NULL)