Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSurfaceInterfaceWidget.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 
23 // Added by qt3to4:
24 #include <QGridLayout>
25 #include <QLabel>
26 #include <QtWidgets>
27 
30 
31 #define TR(id) OLocalizator::getString("TYSurfaceInterfaceWidget", (id))
32 
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:914
TYSurfaceInterface * getElement()
TYSurfaceInterfaceWidget(TYSurfaceInterface *pElement, QWidget *_pParent=NULL)