Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYEtageEditor.h
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 
26 #ifndef __TY_ETAGE_EDITOR__
27 #define __TY_ETAGE_EDITOR__
28 
29 #include <qdialog.h>
30 #include <qradiobutton.h>
31 // Added by qt3to4:
32 #include <QBoxLayout>
33 #include <QLabel>
34 
35 #include "TYPolyLineEditor.h"
39 
40 class QRadioButton;
41 class QLabel;
42 class QBoxLayout;
43 class TabPointsWidget;
44 
51 {
52  Q_OBJECT
53 
54 public:
55  TYEtageEditor(TYModelerFrame* pModeler);
57 
58 public slots:
63  void endEtage();
64 
65 protected:
66  bool testCrossSegment(TYTabPoint& tabPts, bool& onlyEcran);
67  void forceNormals(TYTabPoint& tabPts);
68  void initZ(TYTabPoint& tabPts);
69  void computeCenter(const double initialOffset, TYTabPoint& tabPts, TYRepere& rep);
70  void buildFloor(TYTabPoint& tabPts, TYRepere& rep, double hauteur, bool closed);
71  void buildScreen(TYTabPoint& tabPts, TYRepere& rep, double height, double thickness);
72 };
73 
75 {
76  Q_OBJECT
77 
78 public:
79  TYEtageEditorPropertiesDlg(QWidget* parent, TYTabPoint& tabPts, bool onlyEcran = false);
81 
86  double getHauteur()
87  {
88  return _pHauteurLineEdit->text().toDouble();
89  }
94  double getHauteurSol()
95  {
96  return _pHauteurSolLineEdit->text().toDouble();
97  }
102  double getEpaisseur()
103  {
104  return _pEpaisseurLineEdit->text().toDouble();
105  }
106 
112  {
113  return _pBatBtn->isChecked();
114  }
115 
116  bool validate();
117 
118 protected slots:
123  void toggleButton(int i);
124 
125  virtual void accept();
126 
127 private:
128  QRadioButton* _pBatBtn;
129  QRadioButton* _pEcranBtn;
134  QBoxLayout* _pHauteurLayout;
135  QBoxLayout* _pHauteurSolLayout;
136  QBoxLayout* _pEpaisseurLayout;
137  QBoxLayout* _pEcranOuBatLayout;
138  QBoxLayout* _pBtnLayout;
139 
141 };
142 
143 #endif // __TY_ETAGE_EDITOR__
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
Parent class of Tympan Qt dialogs of type form (geader file)
outil IHM pour une entrée utilisateur (fichier header)
gestion de l'edition d'une polyligne (fichier header)
TYLineEdit * _pEpaisseurLineEdit
double getEpaisseur()
Retourne l'epaisseur saisie.
void toggleButton(int i)
Callback qd l'utilisateur selectionne la creation d'un ecran.
TYEtageEditorPropertiesDlg(QWidget *parent, TYTabPoint &tabPts, bool onlyEcran=false)
double getHauteurSol()
Retourne la hauteur au sol saisie.
Definition: TYEtageEditor.h:94
bool etageSelected()
Retourne si l'utilisateur a selectionne la construction d'un etage.
TabPointsWidget * _tabPtsW
TYLineEdit * _pHauteurSolLineEdit
double getHauteur()
Retourne la hauteur saisie.
Definition: TYEtageEditor.h:86
Construit un etage a partir des points saisis.
Definition: TYEtageEditor.h:51
void initZ(TYTabPoint &tabPts)
TYEtageEditor(TYModelerFrame *pModeler)
bool testCrossSegment(TYTabPoint &tabPts, bool &onlyEcran)
void computeCenter(const double initialOffset, TYTabPoint &tabPts, TYRepere &rep)
void buildScreen(TYTabPoint &tabPts, TYRepere &rep, double height, double thickness)
void buildFloor(TYTabPoint &tabPts, TYRepere &rep, double hauteur, bool closed)
void endEtage()
Construit un etage a partir des points saisis.
void forceNormals(TYTabPoint &tabPts)
Classe generique pour une fenetre de modeleur.
gestion de l'edition d'une polyligne