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 #if WITH_NMPB
47 #endif
59 #include "TYSiteModelerFrame.h"
60 
61 #define TR(id) OLocalizator::getString("TYSiteModelerFrame", (id))
62 #define IMG(id) OLocalizator::getPicture("TYSiteModelerFrame", (id))
63 
65 
66 TYSiteModelerFrame::TYSiteModelerFrame(QWidget* parent, const char* name, Qt::WindowFlags f)
67  : TYModelerFrame(parent, name, f)
68 {
69  init();
70  setProjet(new TYProjet());
71  _pAltiBtn->setEnabled(true);
72  setSelectMaillageBox(TR("id_none_select_maillage"));
75 }
76 
77 TYSiteModelerFrame::TYSiteModelerFrame(LPTYProjet pProjet, QWidget* parent, const char* name,
78  Qt::WindowFlags f)
79  : TYModelerFrame(parent, name, f)
80 {
81  init();
82 
83  assert(pProjet);
84  setProjet(pProjet);
85  _pAltiBtn->setEnabled(true);
86  setSelectMaillageBox(TR("id_none_select_maillage"));
89 }
90 
91 TYSiteModelerFrame::TYSiteModelerFrame(LPTYSiteNode pSite, QWidget* parent, const char* name,
92  Qt::WindowFlags f)
93  : TYModelerFrame(parent, name, f)
94 {
95  init();
96 
97  assert(pSite);
98  setSite(pSite);
99  // Check if altimetry is up to date on the root site node.
100  // If it is, no need to enable the button triggering its computation
101  if (_pSite->getProjet() != nullptr)
102  {
103  _pAltiBtn->setEnabled(true);
104  }
105  setSelectMaillageBox(TR("id_none_select_maillage"));
108 }
109 
111 {
112  _nbInstance++;
113  setWindowTitle(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
114 
115  // Btn Show CrbNiv
116  _showCrbNiv = true;
117  _pShowCrbNivBtn = new QToolButton(this);
118  _pShowCrbNivBtn->setIcon(QPixmap(IMG("id_icon_crbniv")));
119  _pShowCrbNivBtn->setText(TR("id_show_crbniv_btn"));
120  _pShowCrbNivBtn->setToolTip(TR("id_show_crbniv_btn"));
121  _pShowCrbNivBtn->setCheckable(true);
122  _pShowCrbNivBtn->setChecked(_showCrbNiv);
123  _pShowCrbNivBtn->setFixedSize(24, 24);
124  _pCtrlLayout->addWidget(_pShowCrbNivBtn, 0);
125  connect(_pShowCrbNivBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showCrbNiv);
126 
127  // Btn Show Altimetrie
128  _showAltimetrie = false;
129  _pShowAltimetrieBtn = new QToolButton(this);
130  _pShowAltimetrieBtn->setIcon(QPixmap(IMG("id_icon_altimetrie")));
131  _pShowAltimetrieBtn->setText(TR("id_show_altimetrie_btn"));
132  _pShowAltimetrieBtn->setToolTip(TR("id_show_altimetrie_btn"));
133  _pShowAltimetrieBtn->setCheckable(true);
135  _pShowAltimetrieBtn->setFixedSize(24, 24);
136  _pCtrlLayout->addWidget(_pShowAltimetrieBtn, 0);
137  connect(_pShowAltimetrieBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showAltimetrie);
138 
139  // Btn Show ImageSite
140  _showImageSite = true;
141  _pShowImageSiteBtn = new QToolButton(this);
142  _pShowImageSiteBtn->setIcon(QPixmap(IMG("id_icon_imagesite")));
143  _pShowImageSiteBtn->setText(TR("id_show_imagesite_btn"));
144  _pShowImageSiteBtn->setToolTip(TR("id_show_imagesite_btn"));
145  _pShowImageSiteBtn->setCheckable(true);
146  _pShowImageSiteBtn->setChecked(_showImageSite);
147  _pShowImageSiteBtn->setFixedSize(24, 24);
148  _pCtrlLayout->addWidget(_pShowImageSiteBtn, 0);
149  connect(_pShowImageSiteBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showImageSite);
150 
151  // Editors
152  _pEchelleEditor = new TYEchelleEditor(this);
155  _pEmpriseEditor = new TYEmpriseEditor(this);
157  _pPlanEauEditor = new TYPlanEauEditor(this);
158  _pTerrainEditor = new TYTerrainEditor(this);
159 #if WITH_NMPB
160  _pRouteEditor = new TYRouteEditor(this);
161 #endif
163  _pEtageEditor = new TYEtageEditor(this);
164  _pSilosEditor = new TYSilosEditor(this);
172 
173  _pCtrlLayout->addSpacing(10);
174 
175  // Disambiguate the overloaded signal QComboBox::activated
176  void (QComboBox::*_qComboBox_activated_int)(int) = &QComboBox::activated;
177  void (QComboBox::*_qComboBox_activated_str)(const QString&) = &QComboBox::textActivated;
178 
179  // Combo box mode de Rendu
180  _pMaillageRenderModeBox = new QComboBox(this);
181  _pCtrlLayout->addWidget(_pMaillageRenderModeBox, 0);
182  _pMaillageRenderModeBox->setToolTip(TR("id_render_maillage_mode"));
183  _pMaillageRenderModeBox->insertItem(Surface, TR("id_surface_maillage_mode"));
184  _pMaillageRenderModeBox->insertItem(Lines, TR("id_lines_maillage_mode"));
185  _pMaillageRenderModeBox->insertItem(Mixed, TR("id_mixed_maillage_mode"));
186  connect(_pMaillageRenderModeBox, &QComboBox::activated, this,
188 
189  _pCtrlLayout->addSpacing(10);
190 
191  _pSelectMaillageBox = new QComboBox(this);
192  _pCtrlLayout->addWidget(_pSelectMaillageBox, 0);
193  _pSelectMaillageBox->setToolTip(TR("id_select_maillage"));
194  connect(_pSelectMaillageBox, _qComboBox_activated_str, this, &TYSiteModelerFrame::setSelectMaillageBox);
195 
196  _pCtrlLayout->addSpacing(10);
197 
198  // Btn MaJ Altimetrie
199  _pAltiBtn = new QToolButton(this);
200  _pAltiBtn->setIcon(QPixmap(IMG("id_icon_calculalti_btn")));
201  _pAltiBtn->setText(TR("id_calculalti_btn"));
202  _pAltiBtn->setToolTip(TR("id_calculalti_btn"));
203  _pCtrlLayout->addWidget(_pAltiBtn, 0);
204  _pAltiBtn->setFixedSize(24, 24);
205  _pAltiBtn->setEnabled(false);
206  connect(_pAltiBtn, &QToolButton::clicked, this, &TYSiteModelerFrame::calculAltimetrie);
207 
209  _pCtrlLayout->addStretch(1);
210 
211  // Vue de dessus
213 
215 }
216 
218 {
219  _nbInstance--;
220 
221  if (_pSite)
222  {
223  _pSite->drawGraphic(false);
224  }
225 
226  delete _pEchelleEditor;
227  delete _pPointRefEditor;
228  delete _pOrientationEditor;
229  delete _pEmpriseEditor;
230  delete _pCourbeNiveauEditor;
231  delete _pPlanEauEditor;
232  delete _pTerrainEditor;
233 #if WITH_NMPB
234  delete _pRouteEditor;
235 #endif
237  delete _pEtageEditor;
238  delete _pSilosEditor;
239  delete _pCoursEauEditor;
240  delete _pSourceEditor;
241  delete _pPointCalculEditor;
243  delete _pLinearMaillageEditor;
246 }
247 
249 {
250  return TYModelerFrame::close();
251 }
252 
254 {
255  // If window title is empty, then create it
256  QString windowTitle = this->windowTitle();
257  if (windowTitle.isEmpty())
258  {
259  QString caption(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
260  setWindowTitle(caption);
261  }
262 
263  // Hide previous site, unless it's the same (fix issue #148)
264  if ((_pSite) && (_pSite != pSite))
265  {
266  _pSite->drawGraphic(false);
267  }
268 
269  if (pSite)
270  {
271  _pSite = pSite;
272  _pElement = pSite;
273 
275 
276  if (_pProjet)
277  {
279  }
280 
281  if (!_pElement->getName().isEmpty())
282  {
283  windowTitle += QString(" : %1").arg(_pElement->getName());
284  }
285 
286  // On affiche le site dans ce renderer
287  _pElement->drawGraphic();
288  }
289 
291 
292  updateView();
293 }
294 
296 {
297  if (_pProjet)
298  {
299  _pProjet->drawGraphic(false);
300  }
301 
302  if (pProjet)
303  {
304  _pProjet = pProjet;
305  }
306 
307  setSite(pProjet->getSite());
308 }
309 
311 {
313 }
314 
316 {
317  int mode = _pMaillageRenderModeBox->currentIndex();
318  if ((mode < 0) || (mode >= NbOfRenderMaillageMode))
319  {
320  return;
321  } // sanity check
322 
323  bool updateNeeded = false;
324 
325  // Les maillages ont leur propre type d'interpolation
326  if (getProjet() && getProjet()->getCurrentCalcul())
327  {
328  // Pour chaque maillage
329  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
330  {
331  // Recuperation de l'objet graphique du maillage
332  TYMaillage* pMaillage = getProjet()->getMaillage(i);
333  LPTYElementGraphic pMGraphic = pMaillage->getGraphicObject();
334 
335  if (TYRectangularMaillageGraphic* pRectGraphic =
336  dynamic_cast<TYRectangularMaillageGraphic*>(pMGraphic.getRealPointer()))
337  {
338  switch (mode)
339  {
340  case Surface:
341  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_SURF);
342  break;
343  case Lines:
344  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_LINES);
345  break;
346  case Mixed:
347  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_MIXED);
348  break;
349  }
350 
351  pMaillage->updateGraphic();
352  updateNeeded = true;
353  }
354  else if (TYBoundaryNoiseMapGraphic* pBoundGraphic =
355  dynamic_cast<TYBoundaryNoiseMapGraphic*>(pMGraphic.getRealPointer()))
356  {
357  switch (mode)
358  {
359  case Surface:
360  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_SURF);
361  break;
362  case Lines:
363  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_LINES);
364  break;
365  case Mixed:
366  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_MIXED);
367  break;
368  }
369 
370  pMaillage->updateGraphic();
371  updateNeeded = true;
372  }
373  }
374 
375  if (updateNeeded)
376  {
378  updateView();
379  }
380  }
381 }
382 
384 {
385  if (!_editorModeAccepted)
386  {
387  getPickEditor()->usePopup(true);
388  getPickEditor()->useHighlight(false);
389 
390  if (_pCurrentEditor)
391  {
394  }
395 
396  _editorModeAccepted = true;
397 
398  switch (mode)
399  {
400  case EchelleMode:
402  break;
403  case PointRefMode:
405  break;
406  case OrientationMode:
408  break;
409  case EmpriseMode:
411  break;
412  case CourbeNiveauMode:
414  break;
415  case TerrainMode:
417  break;
418  case PlanEauMode:
420  break;
421  case CoursEauMode:
423  break;
424  case SrcPonctMode:
426  break;
427  case RecepteurMode:
429  break;
430 #if WITH_NMPB
431  case RouteMode:
432  _pCurrentEditor = _pRouteEditor;
433  break;
434 #endif
435  case ReseauTransportMode:
437  break;
438  case EtageMode:
440  break;
441  case SilosMode:
443  break;
444  case MaillageRectMode:
446  break;
447  case MaillageLinearMode:
449  break;
452  break;
455  break;
456  case PointsCtrlMode:
458  break;
459  default:
460  _editorModeAccepted = false;
461  }
462  }
463 
465 }
466 
467 void TYSiteModelerFrame::updateView(bool clipping /*=true*/, bool axesAndGrid /*=true*/)
468 {
469  // Appel de la methode parent
471  TYModelerFrame::updateView(clipping, axesAndGrid);
472 }
473 
475 {
476  if (_showCrbNiv == show)
477  {
478  return;
479  }
480 
481  _showCrbNiv = show;
482 
485  updateView();
486 
487  _pShowCrbNivBtn->setChecked(_showCrbNiv);
488 }
489 
491 {
492  _pShowAltimetrieBtn->setEnabled(enable);
493 }
494 
496 {
497  if (_showAltimetrie == show)
498  {
499  return;
500  }
501 
502  _showAltimetrie = show;
503 
506  updateView();
507 
509 }
510 
512 {
513  _showImageSite = show;
514 
517  updateView();
518 
519  _pShowImageSiteBtn->setChecked(_showImageSite);
520 }
521 
523 {
524  if (!_pSite)
525  {
526  return;
527  }
528 
529  TYTabCourbeNiveauGeoNode* pTabCrbNivGeoNode = NULL;
530  TYTabTerrainGeoNode* pTabTerrainGeoNode = NULL;
531  TYTabPlanEauGeoNode* pTabPlanEauGeoNode = NULL;
532 
533  // Collecte les site nodes de facon recursive
534  TYTabSiteNodeGeoNode sites;
535 
536  // On collecte l'ensemble des sites
537  sites = _pSite->collectSites();
538 
539  // Pour chaque site
540  for (unsigned int i = 0; i < sites.size(); i++)
541  {
542  // Collecte des courbes
543  pTabCrbNivGeoNode =
544  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListCrbNiv());
545 
546  // On recupere tous les actors constituant les courbes de niveau
547  for (unsigned int j = 0; j < pTabCrbNivGeoNode->size(); j++)
548  {
549  pTabCrbNivGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
550  }
551 
552  // Collecte des terrains et des plans d'eau
553  pTabTerrainGeoNode =
554  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListTerrain());
555  for (unsigned int j = 0; j < pTabTerrainGeoNode->size(); j++)
556  {
557  pTabTerrainGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
558  }
559 
560  pTabPlanEauGeoNode =
561  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListPlanEau());
562  for (unsigned int j = 0; j < pTabPlanEauGeoNode->size(); j++)
563  {
564  pTabPlanEauGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
565  }
566  sites[i]->getElement()->getGraphicObject()->setVisible(_showImageSite);
567  }
568 
569  // Pour l'altimetrie (seul le site root a une alti)
570  _pSite->getAltimetry()->getGraphicObject()->setVisible(_showAltimetrie);
571 
572  // Mise a jour de la transparence de l'altimetrie
574 }
575 
577 {
578  // Called when _pAltiBtn button is pressed
579  if (!_pSite)
580  {
581  return;
582  }
583 
584  TYApplication::setOverrideCursor(Qt::WaitCursor);
585 
586  writeOutputMsg(TR("id_msg_calculalti"));
587 
588  // Retrieve the root SiteNode to compute altimetry
589  LPTYSiteNode rootSite = _pSite->getProjet()->getSite();
590  // One global altimetry update for all the sites
591 
592  QFileInfo fileInfo(getTYApp()->getCurrentFileName());
593  QString resultMeshFilePath = fileInfo.path().replace("\\", "/") + "/" + fileInfo.baseName() + "." + "ply";
595  rootSite->updateAltimetrie(resultMeshFilePath);
596  // Check altimetry update went well before using it
597  if (rootSite->getAltimetry()->containsData())
598  {
599  // This method uses the altimetry above-computed to update the infrastructure
600  // as well as the receptors and sources and recurses on the current site and
601  // all its subsites
602  rootSite->update();
603 
604  if (_pProjet)
605  {
606  writeOutputMsg(TR("id_msg_updatealtimaillages"));
608  }
609  rootSite->getAltimetry()->setIsUpToDate(true);
610  getTYMainWnd()->updateModelers(false, false);
611  }
612 
613  _pSite->updateGraphicTree();
615  updateView();
616 
617  TYApplication::restoreOverrideCursor();
618 }
619 
621 {
622  if (!_pSite)
623  {
624  return;
625  }
626 }
627 
629 {
630  float ret = 0.0f;
631  // If the site has a landtake with an altitude defined, then take it as default Z coordinate for site
632  // modeler and its editors.
633  if (_pSite != nullptr)
634  {
635  ret = _pSite->getAltiEmprise();
636  }
637  _defaultZCoord = ret;
638  return ret;
639 }
640 
642 {
643  // Grille
644  _gridDimX = 4000.0f;
645  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimXSite"))
646  {
647  _gridDimX = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite");
648  }
649  else
650  {
651  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite", _gridDimX);
652  }
653 
654  _gridDimY = 4000.0f;
655  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimYSite"))
656  {
657  _gridDimY = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite");
658  }
659  else
660  {
661  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite", _gridDimY);
662  }
663 
664  _gridStep = 500.0f;
665  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridStepSite"))
666  {
667  _gridStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridStepSite");
668  }
669  else
670  {
671  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridStepSite", _gridStep);
672  }
673 
674  _gridMagnStep = 5.0f;
675  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridMagnStepSite"))
676  {
677  _gridMagnStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite");
678  }
679  else
680  {
681  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite", _gridMagnStep);
682  }
683 
691 #if WITH_NMPB
692  _pRouteEditor->setGridMagnStep(_gridMagnStep);
693 #endif
704  resizeGrid();
707  (_curViewType == LeftView));
708 
710 }
711 
713 {
714  _pSelectMaillageBox->clear();
715 
716  // Compteur
717  unsigned int counter = 0;
718 
719  // Pas d'element clicke
720  bool isNull = true;
721 
722  // Premier element vide
723  _pSelectMaillageBox->insertItem(counter++, TR("id_none_select_maillage"));
724 
725  // Les maillages ont leur propre type d'interpolation
726  if (getProjet() && getProjet()->getCurrentCalcul())
727  {
728  // Pour chaque maillage
729  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); ++i)
730  {
731  // Recuperation du maillage
732  TYMaillage* pMaillage = getProjet()->getMaillage(i);
733 
734  // Si il est actif, on le fait apparaitre dans la liste
735  if (pMaillage->etat() == true)
736  {
737  _pSelectMaillageBox->insertItem(counter++, pMaillage->getName());
738  }
739 
740  // Si l'element est picke, on le selectionne dans la liste
741  if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
742  {
743  _pSelectMaillageBox->setCurrentIndex(counter - 1);
744  isNull = false;
745  }
746  }
747 
748  if (isNull)
749  {
750  setSelectMaillageBox(TR("id_none_select_maillage"));
751  }
752  }
753 }
754 
756 {
757  bool isNull = false;
758  if (name == TR("id_none_select_maillage"))
759  {
760  isNull = true;
761  }
762 
763  if (getProjet() && getProjet()->getCurrentCalcul())
764  {
765  // Pour chaque maillage
766  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
767  {
768  // Recuperation de l'objet graphique du maillage
769  TYMaillage* pMaillage = getProjet()->getMaillage(i);
770 
771  if (isNull)
772  {
773  if (pMaillage->etat() == true)
774  {
775  pMaillage->getGraphicObject()->setVisible(true);
776  if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
777  {
778  getPickEditor()->getPicker()->reset();
779  pMaillage->getGraphicObject()->setBoundingBoxVisible(false);
781  }
782  }
783  }
784  else if (pMaillage->getName() == name)
785  {
786  pMaillage->getGraphicObject()->setVisible(true);
787  getPickEditor()->getPicker()->highlightElement(pMaillage);
789  }
790  else
791  {
792  if (pMaillage->etat() == true)
793  {
794  pMaillage->getGraphicObject()->setVisible(false);
796  }
797  }
798  }
799  }
800 }
801 
803 {
804  return _pMaillageRenderModeBox->currentIndex();
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)
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)
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:706
virtual QString getName() const
Definition: TYElement.h:691
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()
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:643
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.
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:628
gestion de l'edition d'une source
Gestion de l'edition d'un maillage verticale.