Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSiteModelerFrame.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 
21 #include <qmessagebox.h>
22 #include <qtooltip.h>
23 #include <qcombobox.h>
24 #include <qlayout.h>
25 #include <qcursor.h>
26 #include <qtoolbutton.h>
27 #include <qpixmap.h>
28 
45 #include "gui/app/TYModelerFrame.h"
46 #include "gui/gl/TYRenderContext.h"
47 #if WITH_NMPB
49 #endif
61 #include "TYSiteModelerFrame.h"
62 
63 #define TR(id) OLocalizator::getString("TYSiteModelerFrame", (id))
64 #define IMG(id) OLocalizator::getPicture("TYSiteModelerFrame", (id))
65 
67 
68 TYSiteModelerFrame::TYSiteModelerFrame(QWidget* parent, const char* name, Qt::WindowFlags f)
69  : TYModelerFrame(parent, name, f)
70 {
71  init();
72  setProjet(new TYProjet());
73  _pAltiBtn->setEnabled(true);
74  setSelectMaillageBox(TR("id_none_select_maillage"));
77 }
78 
79 TYSiteModelerFrame::TYSiteModelerFrame(LPTYProjet pProjet, QWidget* parent, const char* name,
80  Qt::WindowFlags f)
81  : TYModelerFrame(parent, name, f)
82 {
83  init();
84 
85  assert(pProjet);
86  setProjet(pProjet);
87  _pAltiBtn->setEnabled(true);
88  setSelectMaillageBox(TR("id_none_select_maillage"));
91 }
92 
93 TYSiteModelerFrame::TYSiteModelerFrame(LPTYSiteNode pSite, QWidget* parent, const char* name,
94  Qt::WindowFlags f)
95  : TYModelerFrame(parent, name, f)
96 {
97  init();
98 
99  assert(pSite);
100  setSite(pSite);
101  // Check if altimetry is up to date on the root site node.
102  // If it is, no need to enable the button triggering its computation
103  if (_pSite->getProjet() != nullptr)
104  {
105  _pAltiBtn->setEnabled(true);
106  }
107  setSelectMaillageBox(TR("id_none_select_maillage"));
110 }
111 
113 {
114  _nbInstance++;
115  setWindowTitle(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
116 
117  // Btn Show CrbNiv
118  _showCrbNiv = true;
119  _pShowCrbNivBtn = new QToolButton(this);
120  _pShowCrbNivBtn->setIcon(QPixmap(IMG("id_icon_crbniv")));
121  _pShowCrbNivBtn->setText(TR("id_show_crbniv_btn"));
122  _pShowCrbNivBtn->setToolTip(TR("id_show_crbniv_btn"));
123  _pShowCrbNivBtn->setCheckable(true);
124  _pShowCrbNivBtn->setChecked(_showCrbNiv);
125  _pShowCrbNivBtn->setFixedSize(24, 24);
126  _pCtrlLayout->addWidget(_pShowCrbNivBtn, 0);
127  connect(_pShowCrbNivBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showCrbNiv);
128 
129  // Btn Show Altimetrie
130  _showAltimetrie = false;
131  _pShowAltimetrieBtn = new QToolButton(this);
132  _pShowAltimetrieBtn->setIcon(QPixmap(IMG("id_icon_altimetrie")));
133  _pShowAltimetrieBtn->setText(TR("id_show_altimetrie_btn"));
134  _pShowAltimetrieBtn->setToolTip(TR("id_show_altimetrie_btn"));
135  _pShowAltimetrieBtn->setCheckable(true);
137  _pShowAltimetrieBtn->setFixedSize(24, 24);
138  _pCtrlLayout->addWidget(_pShowAltimetrieBtn, 0);
139  connect(_pShowAltimetrieBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showAltimetrie);
140 
141  // Btn Show ImageSite
142  _showImageSite = true;
143  _pShowImageSiteBtn = new QToolButton(this);
144  _pShowImageSiteBtn->setIcon(QPixmap(IMG("id_icon_imagesite")));
145  _pShowImageSiteBtn->setText(TR("id_show_imagesite_btn"));
146  _pShowImageSiteBtn->setToolTip(TR("id_show_imagesite_btn"));
147  _pShowImageSiteBtn->setCheckable(true);
148  _pShowImageSiteBtn->setChecked(_showImageSite);
149  _pShowImageSiteBtn->setFixedSize(24, 24);
150  _pCtrlLayout->addWidget(_pShowImageSiteBtn, 0);
151  connect(_pShowImageSiteBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showImageSite);
152 
153  // Editors
154  _pEchelleEditor = new TYEchelleEditor(this);
157  _pEmpriseEditor = new TYEmpriseEditor(this);
159  _pPlanEauEditor = new TYPlanEauEditor(this);
160  _pTerrainEditor = new TYTerrainEditor(this);
161 #if WITH_NMPB
162  _pRouteEditor = new TYRouteEditor(this);
163 #endif
165  _pEtageEditor = new TYEtageEditor(this);
166  _pSilosEditor = new TYSilosEditor(this);
174 
175  _pCtrlLayout->addSpacing(10);
176 
177  // Disambiguate the overloaded signal QComboBox::activated
178  void (QComboBox::*_qComboBox_activated_int)(int) = &QComboBox::activated;
179  void (QComboBox::*_qComboBox_activated_str)(const QString&) = &QComboBox::textActivated;
180 
181  // Combo box mode de Rendu
182  _pMaillageRenderModeBox = new QComboBox(this);
183  _pCtrlLayout->addWidget(_pMaillageRenderModeBox, 0);
184  _pMaillageRenderModeBox->setToolTip(TR("id_render_maillage_mode"));
185  _pMaillageRenderModeBox->insertItem(Surface, TR("id_surface_maillage_mode"));
186  _pMaillageRenderModeBox->insertItem(Lines, TR("id_lines_maillage_mode"));
187  _pMaillageRenderModeBox->insertItem(Mixed, TR("id_mixed_maillage_mode"));
188  connect(_pMaillageRenderModeBox, &QComboBox::activated, this,
190 
191  _pCtrlLayout->addSpacing(10);
192 
193  _pSelectMaillageBox = new QComboBox(this);
194  _pCtrlLayout->addWidget(_pSelectMaillageBox, 0);
195  _pSelectMaillageBox->setToolTip(TR("id_select_maillage"));
196  connect(_pSelectMaillageBox, _qComboBox_activated_str, this, &TYSiteModelerFrame::setSelectMaillageBox);
197 
198  _pCtrlLayout->addSpacing(10);
199 
200  // Btn MaJ Altimetrie
201  _pAltiBtn = new QToolButton(this);
202  _pAltiBtn->setIcon(QPixmap(IMG("id_icon_calculalti_btn")));
203  _pAltiBtn->setText(TR("id_calculalti_btn"));
204  _pAltiBtn->setToolTip(TR("id_calculalti_btn"));
205  _pCtrlLayout->addWidget(_pAltiBtn, 0);
206  _pAltiBtn->setFixedSize(24, 24);
207  _pAltiBtn->setEnabled(false);
208  connect(_pAltiBtn, &QToolButton::clicked, this, &TYSiteModelerFrame::calculAltimetrie);
209 
211  _pCtrlLayout->addStretch(1);
212 
213  // Vue de dessus
215 
217 }
218 
220 {
221  _nbInstance--;
222 
223  delete _pEchelleEditor;
224  delete _pPointRefEditor;
225  delete _pOrientationEditor;
226  delete _pEmpriseEditor;
227  delete _pCourbeNiveauEditor;
228  delete _pPlanEauEditor;
229  delete _pTerrainEditor;
230 #if WITH_NMPB
231  delete _pRouteEditor;
232 #endif
234  delete _pEtageEditor;
235  delete _pSilosEditor;
236  delete _pCoursEauEditor;
237  delete _pSourceEditor;
238  delete _pPointCalculEditor;
240  delete _pLinearMaillageEditor;
243 }
244 
246 {
247  return TYModelerFrame::close();
248 }
249 
251 {
252  // If window title is empty, then create it
253  QString windowTitle = this->windowTitle();
254  if (windowTitle.isEmpty())
255  {
256  QString caption(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
257  setWindowTitle(caption);
258  }
259 
260  // Hide previous site, unless it's the same (fix issue #148)
261  if ((_pSite) && (_pSite != pSite))
262  {
263  _pSite->drawGraphic(false);
264  }
265 
266  if (pSite)
267  {
268  _pSite = pSite;
269  _pElement = pSite;
270 
272 
273  if (_pProjet)
274  {
276  }
277 
278  if (!_pElement->getName().isEmpty())
279  {
280  windowTitle += QString(" : %1").arg(_pElement->getName());
281  }
282 
283  // On affiche le site dans ce renderer
284  _pElement->drawGraphic();
285  }
286 
288 
289  updateView();
290 }
291 
293 {
294  if (_pProjet)
295  {
296  _pProjet->drawGraphic(false);
297  }
298 
299  if (pProjet)
300  {
301  _pProjet = pProjet;
302  }
303 
304  setSite(pProjet->getSite());
305 }
306 
308 {
310 }
311 
313 {
314  int mode = _pMaillageRenderModeBox->currentIndex();
315  if ((mode < 0) || (mode >= NbOfRenderMaillageMode))
316  {
317  return;
318  } // sanity check
319 
320  bool updateNeeded = false;
321 
322  // Les maillages ont leur propre type d'interpolation
323  if (getProjet() && getProjet()->getCurrentCalcul())
324  {
325  // Pour chaque maillage
326  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
327  {
328  // Recuperation de l'objet graphique du maillage
329  TYMaillage* pMaillage = getProjet()->getMaillage(i);
330  LPTYElementGraphic pMGraphic = pMaillage->getGraphicObject();
331 
332  if (TYRectangularMaillageGraphic* pRectGraphic =
333  dynamic_cast<TYRectangularMaillageGraphic*>(pMGraphic.getRealPointer()))
334  {
335  switch (mode)
336  {
337  case Surface:
338  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_SURF);
339  break;
340  case Lines:
341  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_LINES);
342  break;
343  case Mixed:
344  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_MIXED);
345  break;
346  }
347 
348  pMaillage->updateGraphic();
349  updateNeeded = true;
350  }
351  else if (TYBoundaryNoiseMapGraphic* pBoundGraphic =
352  dynamic_cast<TYBoundaryNoiseMapGraphic*>(pMGraphic.getRealPointer()))
353  {
354  switch (mode)
355  {
356  case Surface:
357  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_SURF);
358  break;
359  case Lines:
360  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_LINES);
361  break;
362  case Mixed:
363  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_MIXED);
364  break;
365  }
366 
367  pMaillage->updateGraphic();
368  updateNeeded = true;
369  }
370  }
371 
372  if (updateNeeded)
373  {
375  updateView();
376  }
377  }
378 }
379 
381 {
382  if (!_editorModeAccepted)
383  {
384  getPickEditor()->usePopup(true);
385  getPickEditor()->useHighlight(false);
386 
387  if (_pCurrentEditor)
388  {
391  }
392 
393  _editorModeAccepted = true;
394 
395  switch (mode)
396  {
397  case EchelleMode:
399  break;
400  case PointRefMode:
402  break;
403  case OrientationMode:
405  break;
406  case EmpriseMode:
408  break;
409  case CourbeNiveauMode:
411  break;
412  case TerrainMode:
414  break;
415  case PlanEauMode:
417  break;
418  case CoursEauMode:
420  break;
421  case SrcPonctMode:
423  break;
424  case RecepteurMode:
426  break;
427 #if WITH_NMPB
428  case RouteMode:
429  _pCurrentEditor = _pRouteEditor;
430  break;
431 #endif
432  case ReseauTransportMode:
434  break;
435  case EtageMode:
437  break;
438  case SilosMode:
440  break;
441  case MaillageRectMode:
443  break;
444  case MaillageLinearMode:
446  break;
449  break;
452  break;
453  case PointsCtrlMode:
455  break;
456  default:
457  _editorModeAccepted = false;
458  }
459  }
460 
462 }
463 
464 void TYSiteModelerFrame::updateView(bool clipping /*=true*/, bool axesAndGrid /*=true*/)
465 {
466  // Appel de la methode parent
468  TYModelerFrame::updateView(clipping, axesAndGrid);
469 }
470 
472 {
473  if (_showCrbNiv == show)
474  {
475  return;
476  }
477 
478  _showCrbNiv = show;
479 
482  updateView();
483 
484  _pShowCrbNivBtn->setChecked(_showCrbNiv);
485 }
486 
488 {
489  _pShowAltimetrieBtn->setEnabled(enable);
490 }
491 
493 {
494  if (_showAltimetrie == show)
495  {
496  return;
497  }
498 
499  _showAltimetrie = show;
500 
503  updateView();
504 
506 }
508 {
509  return _showImageSite;
510 };
511 
513 {
514  _showImageSite = show;
515 
518  updateView();
519 
520  _pShowImageSiteBtn->setChecked(_showImageSite);
521 }
522 
524 {
525  if (!_pSite)
526  {
527  return;
528  }
529 
530  TYTabCourbeNiveauGeoNode* pTabCrbNivGeoNode = NULL;
531  TYTabTerrainGeoNode* pTabTerrainGeoNode = NULL;
532  TYTabPlanEauGeoNode* pTabPlanEauGeoNode = NULL;
533 
534  // Collecte les site nodes de facon recursive
535  TYTabSiteNodeGeoNode sites;
536 
537  // On collecte l'ensemble des sites
538  sites = _pSite->collectSites();
539 
540  // Pour chaque site
541  for (unsigned int i = 0; i < sites.size(); i++)
542  {
543 
544  // Collecte des terrains et des plans d'eau
545  pTabTerrainGeoNode =
546  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListTerrain());
547  for (unsigned int j = 0; j < pTabTerrainGeoNode->size(); j++)
548  {
549  pTabTerrainGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
550  }
551 
552  pTabPlanEauGeoNode =
553  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListPlanEau());
554  for (unsigned int j = 0; j < pTabPlanEauGeoNode->size(); j++)
555  {
556  pTabPlanEauGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
557  }
558  }
559 
560  // Pour l'altimetrie (seul le site root a une alti)
561  _pSite->getAltimetry()->getGraphicObject()->setVisible(_showAltimetrie);
562 
563  // Mise a jour de la transparence de l'altimetrie
565 }
566 
568 {
569  // Called when _pAltiBtn button is pressed
570  if (!_pSite)
571  {
572  return;
573  }
574 
575  TYApplication::setOverrideCursor(Qt::WaitCursor);
576 
577  writeOutputMsg(TR("id_msg_calculalti"));
578 
579  // Retrieve the root SiteNode to compute altimetry
580  LPTYSiteNode rootSite = _pSite->getProjet()->getSite();
581  // One global altimetry update for all the sites
582 
583  QFileInfo fileInfo(getTYApp()->getCurrentFileName());
584  QString resultMeshFilePath = fileInfo.path().replace("\\", "/") + "/" + fileInfo.baseName() + "." + "ply";
586  rootSite->updateAltimetrie(resultMeshFilePath);
587  // Check altimetry update went well before using it
588  if (rootSite->getAltimetry()->containsData())
589  {
590  // This method uses the altimetry above-computed to update the infrastructure
591  // as well as the receptors and sources and recurses on the current site and
592  // all its subsites
593  rootSite->update();
594 
595  if (_pProjet)
596  {
597  writeOutputMsg(TR("id_msg_updatealtimaillages"));
599  }
600  rootSite->getAltimetry()->setIsUpToDate(true);
601  rootSite->getAltimetry()->getGraphicObject()->setModified(true);
602  getTYMainWnd()->updateModelers(false, false);
603  }
604 
605  _pSite->updateGraphicTree();
607  updateView();
608 
609  TYApplication::restoreOverrideCursor();
610 }
611 
613 {
614  if (!_pSite)
615  {
616  return;
617  }
618 }
619 
621 {
622  float ret = 0.0f;
623  // If the site has a landtake with an altitude defined, then take it as default Z coordinate for site
624  // modeler and its editors.
625  if (_pSite != nullptr)
626  {
627  ret = _pSite->getAltiEmprise();
628  }
629  _defaultZCoord = ret;
630  return ret;
631 }
632 
634 {
635  // Grille
636  _gridDimX = 4000.0f;
637  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimXSite"))
638  {
639  _gridDimX = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite");
640  }
641  else
642  {
643  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite", _gridDimX);
644  }
645 
646  _gridDimY = 4000.0f;
647  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimYSite"))
648  {
649  _gridDimY = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite");
650  }
651  else
652  {
653  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite", _gridDimY);
654  }
655 
656  _gridStep = 500.0f;
657  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridStepSite"))
658  {
659  _gridStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridStepSite");
660  }
661  else
662  {
663  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridStepSite", _gridStep);
664  }
665 
666  _gridMagnStep = 5.0f;
667  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridMagnStepSite"))
668  {
669  _gridMagnStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite");
670  }
671  else
672  {
673  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite", _gridMagnStep);
674  }
675 
683 #if WITH_NMPB
684  _pRouteEditor->setGridMagnStep(_gridMagnStep);
685 #endif
696  resizeGrid();
699  (_curViewType == LeftView));
700 
702 }
703 
705 {
706  _pSelectMaillageBox->clear();
707 
708  // Compteur
709  unsigned int counter = 0;
710 
711  // Pas d'element clicke
712  bool isNull = true;
713 
714  // Premier element vide
715  _pSelectMaillageBox->insertItem(counter++, TR("id_none_select_maillage"));
716 
717  // Les maillages ont leur propre type d'interpolation
718  if (getProjet() && getProjet()->getCurrentCalcul())
719  {
720  // Pour chaque maillage
721  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); ++i)
722  {
723  // Recuperation du maillage
724  TYMaillage* pMaillage = getProjet()->getMaillage(i);
725 
726  // Si il est actif, on le fait apparaitre dans la liste
727  if (pMaillage->etat() == true)
728  {
729  _pSelectMaillageBox->insertItem(counter++, pMaillage->getName());
730  }
731 
732  // Si l'element est picke, on le selectionne dans la liste
733  if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
734  {
735  _pSelectMaillageBox->setCurrentIndex(counter - 1);
736  isNull = false;
737  }
738  }
739 
740  if (isNull)
741  {
742  setSelectMaillageBox(TR("id_none_select_maillage"));
743  }
744  }
745 }
746 
748 {
749  bool isNull = false;
750  if (name == TR("id_none_select_maillage"))
751  {
752  isNull = true;
753  }
754 
755  if (getProjet() && getProjet()->getCurrentCalcul())
756  {
757  // Pour chaque maillage
758  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
759  {
760  // Recuperation de l'objet graphique du maillage
761  TYMaillage* pMaillage = getProjet()->getMaillage(i);
762 
763  if (isNull)
764  {
765  if (pMaillage->etat() == true)
766  {
767  pMaillage->getGraphicObject()->setVisible(true);
768  if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
769  {
770  getPickEditor()->getPicker()->reset();
771  pMaillage->getGraphicObject()->setBoundingBoxVisible(false);
773  }
774  }
775  }
776  else if (pMaillage->getName() == name)
777  {
778  pMaillage->getGraphicObject()->setVisible(true);
779  getPickEditor()->getPicker()->highlightElement(pMaillage);
781  }
782  else
783  {
784  if (pMaillage->etat() == true)
785  {
786  pMaillage->getGraphicObject()->setVisible(false);
788  }
789  }
790  }
791  }
792 }
793 
795 {
796  return _pMaillageRenderModeBox->currentIndex();
797 }
798 
800 {
802  renderContext.showBackgroundImage = _showImageSite;
803  renderContext.showLevelCurves = _showCrbNiv;
804  return renderContext;
805 }
gestion de l'interaction entre la vue graphique (2D ou 3D) et le clavier et la souris (fichier header...
void writeOutputMsg(QString msg)
Affiche un message dans la fenetre de sortie.
TYApplication * getTYApp()
Retourne le pointeur sur l'application.
TYMainWindow * getTYMainWnd()
Retourne le pointeur sur la fenetre principale.
pour l'application Tympan (fichier header)
Creation of a TYBoundaryNoiseMap (header file)
Graphical representation of the BoundaryNoiseMap entity (header file)
Construit une courbe de niveau a partir des points saisis (fichier header)
std::vector< LPTYCourbeNiveauGeoNode > TYTabCourbeNiveauGeoNode
Collection de noeuds geometriques de type TYCourbeNiveau.
Construit un CoursEau a partir des points saisis (fichier header)
gestion de l'edition de l'echelle (fichier header)
#define TYDIRPREFERENCEMANAGER
Definition: TYElement.h:51
Construit l'emprise a partir des points saisis (fichier header)
Construit un etage a partir des points saisis (fichier header)
Indique si cet editor est actif (fichier header)
Classe generique pour une fenetre de modeleur (fichier header)
edition de l'orientation (fichier header)
gestion de l'element actionne par picking (fichier header)
Construit un plan d'eau a partir des points saisis (fichier header)
std::vector< LPTYPlanEauGeoNode > TYTabPlanEauGeoNode
Collection de noeuds geometriques de type TYPlanEau.
Definition: TYPlanEau.h:202
gestion de l'edition d'un point de calcul (fichier header)
gestion de l'edition des points de reference pour le placement des images de fond (fichier header)
gestion de l'edition d'un maillage rectangulaire (fichier header)
Representation graphique d'un maillage rectangulaire (fichier header)
Contexte de rendu utilisé par les fonctions d'affichage.
Construit un reseau de transport a partir des points saisis (fichier header)
Construit une route a partir des points saisis (fichier header)
const char * name
gestion de l'edition d'un silo (fichier header)
#define IMG(id)
#define TR(id)
Classe Modeler specialisee pour l'edition des sites (fichier header)
std::vector< LPTYSiteNodeGeoNode > TYTabSiteNodeGeoNode
Collection de noeuds geometriques de type TYSiteNode.
Definition: TYSiteNode.h:40
gestion de l'edition d'une source (fichier header)
Construit un sol a partir des points saisis (fichier header)
std::vector< LPTYTerrainGeoNode > TYTabTerrainGeoNode
Collection de noeuds geometriques de type TYTerrain.
Definition: TYTerrain.h:181
gestion de l'edition d'un maillage verticale (fichier header)
static OPrototype * safeDownCast(OPrototype *pObject)
Definition: TYElement.cpp:71
T * getRealPointer()
Definition: smartptr.h:291
virtual void close()
Appeler apres l'utilisation de l'editor.
virtual void disconnect()
Deconnecte cet editor a l'interactor associe.
void setGridMagnStep(float gridMagnStep=1.0)
Met Ã&#160; jour le pas de la grille magnétique.
bool containsData()
Definition: TYAltimetrie.h:251
void setIsUpToDate(bool isUpToDate)
static void setCurrentQtDir()
Indique Ã&#160; Qt le chemin du répertoire courant.
Creation of a TYBoundaryNoiseMap.
Rendering class for the BoundaryNoiseMap entity.
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
void reset()
Retourne dans son etat initial.
void highlightElement(TYElement *pElt)
Dessine la boite englobante de l'element passe.
TYElement * getParent() const
Definition: TYElement.h:697
virtual QString getName() const
Definition: TYElement.h:682
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 de definition d'un maillage.
Definition: TYMaillage.h:51
virtual bool etat()
Definition: TYMaillage.cpp:616
void updateModelers(bool clipping=true, bool axesAndGrid=true, bool displayList=true)
Generic class for a modeler window.
int _curViewType
The type of the current view.
LPTYElement getElement()
TYCameraEditor * _pCameraEditor
Manages the camera.
bool _editorModeAccepted
Indicates if the editing mode has been processed.
LPTYElement _pElement
A pointer to the element to edit.
TYRenderWindowInteractor * getView()
TYAbstractSceneEditor * _pCurrentEditor
The current editor.
void setGridLinesActorsVisibility(bool showGridXY, bool showGridXZ, bool showGridZY)
QBoxLayout * _pCtrlLayout
The layout where buttons, etc., are located.
virtual void setViewType(int view)
TYRenderWindowInteractor * _pView
The graphics window.
virtual bool close()
virtual TYRenderContext createRenderContext()
float _gridDimX
Grid dimension in X.
float _gridDimY
Grid dimension in Y.
float _gridStep
Grid step.
virtual void updatePreferences()
float _gridMagnStep
Magnetic grid step.
TYPickEditor * getPickEditor()
virtual void setEditorMode(int mode)
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
float _defaultZCoord
Default Z coordinate for editors.
void invalidateScene(void)
edition de l'orientation
void usePopup(bool state)
Definition: TYPickEditor.h:104
TYElementPicker * getPicker()
Methode qui retourne le picker.
Definition: TYPickEditor.h:51
void useHighlight(bool state)
Definition: TYPickEditor.h:97
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
classe de definition d'un projet.
Definition: TYProjet.h:45
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
Definition: TYProjet.h:261
bool updateAltiRecepteurs()
Definition: TYProjet.cpp:632
LPTYSiteNode getSite()
Get du site.
Definition: TYProjet.h:169
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
Definition: TYProjet.h:318
gestion de l'edition d'un maillage rectangulaire
classe graphique pour un maillage rectangulaire
TYOpenGLRenderer * getRenderer()
Construit un reseau de transport a partir des points saisis.
Construit une route a partir des points saisis.
Definition: TYRouteEditor.h:34
gestion de l'edition d'un silo
Definition: TYSilosEditor.h:36
TYPointRefEditor * _pPointRefEditor
static int _nbInstance
Nombre d'instance de type TYSiteModelerFrame.
TYPlanEauEditor * _pPlanEauEditor
TYBoundaryNoiseMapEditor * _pBoundaryNoiseMapEditor
TYVerticalMaillageEditor * _pVerticalMaillageEditor
TYCourbeNiveauEditor * _pCourbeNiveauEditor
QComboBox * _pMaillageRenderModeBox
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)
TYSiteModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=Qt::SubWindow)
void setProjet(LPTYProjet pProjet)
LPTYProjet _pProjet
Un pointeur sur le projet a editer.
TYRenderContext createRenderContext() override
TYEchelleEditor * _pEchelleEditor
QToolButton * _pShowAltimetrieBtn
Bouton pour l'affichage de l'altimetrie.
TYPointCalculEditor * _pPointCalculEditor
virtual void setMaillageRenderModeSlot()
TYEtageEditor * _pEtageEditor
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.
TYRectangularMaillageEditor * _pRectangularMaillageEditor
void updateAltiOpacity(int view=-1)
void showAltimetrie(bool show)
void showImageSite(bool show)
void setSite(LPTYSiteNode pSite)
TYReseauTransportEditor * _pReseauTransportEditor
QComboBox * _pSelectMaillageBox
Combo box pour le choix du maillage.
TYTerrainEditor * _pTerrainEditor
virtual float getDefaultZCoord()
Returns default Z coordinate for editors This value will depend on the type of modeler and of the fix...
TYLinearMaillageEditor * _pLinearMaillageEditor
void showCrbNiv(bool show)
TYSourceEditor * _pSourceEditor
void enableAltimetrieButton(bool enable)
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
TYTabSiteNodeGeoNode collectSites(bool include=true) const
const double getAltiEmprise() const
Definition: TYSiteNode.h:141
LPTYAltimetrie getAltimetry() const
TYProjet * getProjet()
Accesseurs.
Definition: TYSiteNode.h:106
void update(const bool &force=false)
virtual bool updateAltimetrie(QString resultMeshFilePath)
Definition: TYSiteNode.cpp:625
gestion de l'edition d'une source
Gestion de l'edition d'un maillage verticale.