Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSiteModelerFrame.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 
25 #ifndef __TY_SITE_MODELER_FRAME__
26 #define __TY_SITE_MODELER_FRAME__
27 
28 #include "TYModelerFrame.h"
30 
31 class QToolButton;
32 class QComboBox;
33 
39 {
40  Q_OBJECT
41 
42 public:
47  {
52  };
53 
57  TYSiteModelerFrame(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = Qt::WindowFlags(0));
61  TYSiteModelerFrame(LPTYProjet pProjet, QWidget* parent = 0, const char* name = 0,
62  Qt::WindowFlags f = QFlag(0));
66  TYSiteModelerFrame(LPTYSiteNode pSite, QWidget* parent = 0, const char* name = 0,
67  Qt::WindowFlags f = QFlag(0));
71  virtual ~TYSiteModelerFrame();
72 
77  void setProjet(LPTYProjet pProjet);
83  {
84  return _pProjet;
85  }
86 
90  void setSite(LPTYSiteNode pSite);
95  {
96  return _pSite;
97  }
98 
103  {
104  return _showCrbNiv;
105  }
106 
111 
114  {
139  SilosMode
140  };
141 
142 public slots:
143  virtual void setViewType(int view);
144  virtual void setRenderMode(int mode, bool bUpdateGL);
145  virtual void setEditorMode(int mode);
146  virtual void updateView(bool clipping = true, bool axesAndGrid = true);
147  virtual void updatePreferences();
148  virtual bool close();
149 
153  int getRenderMode();
158  void showCrbNiv(bool show);
163  void showAltimetrie(bool show);
168  void showImageSite(bool show);
169 
173  void calculAltimetrie();
174 
179  void updateAltiOpacity(int view = -1);
180 
184  virtual void setRenderMaillageModeSlot();
185 
189  virtual void setSelectMaillageBox(const QString& name);
190 
191 protected:
195  void init();
196 
197  virtual bool computeCurPos(int x, int y, float* pos);
198 
204 
205 protected:
210 
211  // To compute altimetry
212  QToolButton* _pAltiBtn;
214  QToolButton* _pShowCrbNivBtn;
217 
219  QToolButton* _pShowAltimetrieBtn;
222 
224  QToolButton* _pShowImageSiteBtn;
227 
230 
233 
234  // Editors.
242 #if WITH_NMPB
243  TYRouteEditor* _pRouteEditor;
244 #endif
255 
257  static int _nbInstance;
258 };
259 
260 #endif //__TY_SITE_MODELER_FRAME__
Classe generique pour une fenetre de modeleur (fichier header)
const char * name
Creation of a TYBoundaryNoiseMap.
Construit une courbe de niveau a partir des points saisis.
Construit un CoursEau a partir des points saisis.
gestion de l'edition de l'echelle
Construit l'emprise a partir des points saisis.
Construit un etage a partir des points saisis.
Definition: TYEtageEditor.h:51
Indique si cet editor est actif.
Classe generique pour une fenetre de modeleur.
edition de l'orientation
Construit un plan d'eau a partir des points saisis.
gestion de l'edition d'un point de calcul
gestion de l'edition des points de reference pour le placement des images de fond
gestion de l'edition d'un maillage rectangulaire
Construit un reseau de transport a partir des points saisis.
Construit une route a partir des points saisis.
Definition: TYRouteEditor.h:35
gestion de l'edition d'un silo
Definition: TYSilosEditor.h:36
Classe Modeler specialisee pour l'edition des sites.
TYPointRefEditor * _pPointRefEditor
static int _nbInstance
Nombre d'instance de type TYSiteModelerFrame.
TYPlanEauEditor * _pPlanEauEditor
virtual bool computeCurPos(int x, int y, float *pos)
TYBoundaryNoiseMapEditor * _pBoundaryNoiseMapEditor
TYVerticalMaillageEditor * _pVerticalMaillageEditor
TYCourbeNiveauEditor * _pCourbeNiveauEditor
QComboBox * _pRenderMaillageModeBox
Combo box pour le mode de rendu.
QToolButton * _pShowImageSiteBtn
Bouton pour l'affichage de l'image de site.
virtual void updatePreferences()
TYSilosEditor * _pSilosEditor
virtual void setEditorMode(int mode)
bool _showAltimetrie
Indique si on affiche ou masque l'altimetrie.
virtual void setSelectMaillageBox(const QString &name)
void setProjet(LPTYProjet pProjet)
LPTYProjet _pProjet
Un pointeur sur le projet a editer.
TYEchelleEditor * _pEchelleEditor
QToolButton * _pShowAltimetrieBtn
Bouton pour l'affichage de l'altimetrie.
TYPointCalculEditor * _pPointCalculEditor
virtual void setRenderMode(int mode, bool bUpdateGL)
TYEtageEditor * _pEtageEditor
LPTYSiteNode getSite()
TYOrientationEditor * _pOrientationEditor
TYEmpriseEditor * _pEmpriseEditor
virtual void setViewType(int view)
TYCoursEauEditor * _pCoursEauEditor
LPTYSiteNode _pSite
Un pointeur sur le site a editer.
bool _showImageSite
Indique si on affiche ou masque l'image de site.
bool _showCrbNiv
Indique si on affiche ou masque les courbes de niveau.
QToolButton * _pShowCrbNivBtn
Bouton pour l'affichage des courbes de niveau.
TYSiteModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=Qt::WindowFlags(0))
TYRectangularMaillageEditor * _pRectangularMaillageEditor
void updateAltiOpacity(int view=-1)
void showAltimetrie(bool show)
void showImageSite(bool show)
void setSite(LPTYSiteNode pSite)
TYReseauTransportEditor * _pReseauTransportEditor
SiteModelerMode
Les differents modes d'edition d'un site.
QComboBox * _pSelectMaillageBox
Combo box pour le choix du maillage.
TYTerrainEditor * _pTerrainEditor
TYLinearMaillageEditor * _pLinearMaillageEditor
void showCrbNiv(bool show)
TYSourceEditor * _pSourceEditor
virtual void setRenderMaillageModeSlot()
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
gestion de l'edition d'une source
Gestion de l'edition d'un maillage verticale.