21 #include <qmessagebox.h>
23 #include <qcombobox.h>
26 #include <qtoolbutton.h>
63 #define TR(id) OLocalizator::getString("TYSiteModelerFrame", (id))
64 #define IMG(id) OLocalizator::getPicture("TYSiteModelerFrame", (id))
115 setWindowTitle(
TR(
"id_caption") +
" " + QString(
"%1").arg(
_nbInstance));
178 void (QComboBox::*_qComboBox_activated_int)(int) = &QComboBox::activated;
179 void (QComboBox::*_qComboBox_activated_str)(
const QString&) = &QComboBox::textActivated;
202 _pAltiBtn->setIcon(QPixmap(
IMG(
"id_icon_calculalti_btn")));
231 delete _pRouteEditor;
253 QString windowTitle = this->windowTitle();
254 if (windowTitle.isEmpty())
256 QString caption(
TR(
"id_caption") +
" " + QString(
"%1").arg(
_nbInstance));
257 setWindowTitle(caption);
263 _pSite->drawGraphic(
false);
320 bool updateNeeded =
false;
348 pMaillage->updateGraphic();
367 pMaillage->updateGraphic();
541 for (
unsigned int i = 0; i < sites.size(); i++)
547 for (
unsigned int j = 0; j < pTabTerrainGeoNode->size(); j++)
549 pTabTerrainGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(
_showCrbNiv);
554 for (
unsigned int j = 0; j < pTabPlanEauGeoNode->size(); j++)
556 pTabPlanEauGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(
_showCrbNiv);
575 TYApplication::setOverrideCursor(Qt::WaitCursor);
583 QFileInfo fileInfo(
getTYApp()->getCurrentFileName());
584 QString resultMeshFilePath = fileInfo.path().replace(
"\\",
"/") +
"/" + fileInfo.baseName() +
"." +
"ply";
601 rootSite->
getAltimetry()->getGraphicObject()->setModified(
true);
605 _pSite->updateGraphicTree();
609 TYApplication::restoreOverrideCursor();
709 unsigned int counter = 0;
727 if (pMaillage->
etat() ==
true)
733 if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
750 if (
name ==
TR(
"id_none_select_maillage"))
765 if (pMaillage->
etat() ==
true)
767 pMaillage->getGraphicObject()->setVisible(
true);
768 if (pMaillage->getGraphicObject()->isBoundingBoxVisible())
771 pMaillage->getGraphicObject()->setBoundingBoxVisible(
false);
778 pMaillage->getGraphicObject()->setVisible(
true);
784 if (pMaillage->
etat() ==
true)
786 pMaillage->getGraphicObject()->setVisible(
false);
804 return renderContext;
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
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.
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)
gestion de l'edition d'un silo (fichier header)
Classe Modeler specialisee pour l'edition des sites (fichier header)
std::vector< LPTYSiteNodeGeoNode > TYTabSiteNodeGeoNode
Collection de noeuds geometriques de type TYSiteNode.
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.
gestion de l'edition d'un maillage verticale (fichier header)
static OPrototype * safeDownCast(OPrototype *pObject)
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 à jour le pas de la grille magnétique.
void setIsUpToDate(bool isUpToDate)
static void setCurrentQtDir()
Indique à 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
virtual QString getName() const
Construit l'emprise a partir des points saisis.
Construit un etage a partir des points saisis.
Indique si cet editor est actif.
Classe de definition d'un maillage.
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.
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 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)
void usePopup(bool state)
TYElementPicker * getPicker()
Methode qui retourne le picker.
void useHighlight(bool state)
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.
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
bool updateAltiRecepteurs()
LPTYSiteNode getSite()
Get du site.
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
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.
gestion de l'edition d'un silo
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)
void updateSelectMaillageBox()
TYCoursEauEditor * _pCoursEauEditor
LPTYSiteNode _pSite
Un pointeur sur le site a editer.
bool _showImageSite
Indique si on affiche ou masque l'image de site.
virtual ~TYSiteModelerFrame()
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
void updateVisibilityElementSite()
QComboBox * _pSelectMaillageBox
Combo box pour le choix du maillage.
int getMaillageRenderMode()
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
LPTYAltimetrie getAltimetry() const
TYProjet * getProjet()
Accesseurs.
void update(const bool &force=false)
virtual bool updateAltimetrie(QString resultMeshFilePath)
gestion de l'edition d'une source
Gestion de l'edition d'un maillage verticale.