Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSiteFrame.h
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 
25 #ifndef __TY_SITE_FRAME__
26 #define __TY_SITE_FRAME__
27 
28 #include <qwidget.h>
29 #include <qtreewidget.h>
30 
31 #include "TYAppDefines.h"
32 
33 class QMenuBar;
34 
39 class TYSiteFrame : public QWidget
40 {
41  Q_OBJECT
42 
43 public:
47  TYSiteFrame(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = QFlag(0));
51  virtual ~TYSiteFrame();
52 
57  {
58  return _pSiteNodeRoot;
59  }
60 
64  void clear()
65  {
66  _pListView->clear();
67  }
68 
72  void exportEXCEL(TYElement* pElement);
73 
77  void changePos(TYElement* pElement);
78 
82  void changeRotation(TYElement* pElement);
83 
87  void localise(TYElement* pElement, TYElementGraphic* pGraphicObject);
88 
92  bool supprime(TYElementListItem* eltItem);
93 
97  void importFromLib(const unsigned int& filter, TYElement* pElement);
98 
102  void addEltXML(const char* className, TYElement* pElement);
103 
107  void newElt(const char* className, TYElement* pElement);
108 
112  void addElt(TYElement* pElement, TYElement* pElt);
113 
122 
126  void selectOrUnselectAll(TYElementListItem* item, const bool& bSelect);
127 
132  void setDMaxDefault(TYElementListItem* item);
133 
134 public slots:
138  void setSiteNodeRoot(LPTYSiteNode pSiteNode);
139 
143  void updateList();
144 
149  {
150  _pCurrentCalcul = pCalcul;
151  updateList();
152  }
153 
158  TYElementListItem* addToList(LPTYSiteNode pElement, TYElementListItem* parent = NULL);
174 
179  TYElementListItem* addToList(LPTYSpectre pElement, TYElementListItem* parent = NULL);
189  TYElementListItem* addToList(LPTYMachine pElement, TYElementListItem* parent = NULL);
194  TYElementListItem* addToList(LPTYBatiment pElement, TYElementListItem* parent = NULL);
195 
199  bool remInInfra(LPTYSiteNode _siteNode, TYElementListItem* item, const char* className);
200 
204  bool remInTopo(LPTYSiteNode _siteNode, TYElementListItem* item, const char* className);
205 
209  virtual void contextMenuEvent(QContextMenuEvent* e);
210 
217  bool remFromList(TYElementListItem* item);
218 
225  void apply(QTreeWidgetItem* item, int col);
226 
233  void openModeler(QTreeWidgetItem* item, int column);
234 
235 private:
240  bool remFromSite(TYElement* pElement);
241 
248  void setBatimentParentEmissive(const TYEtage* pEtage);
249 
250 protected:
256  const bool& chekable = false);
257 
258 protected:
259  QMenuBar* _pMenuBar;
260  QTreeWidget* _pListView;
261 
264 
267 };
268 
269 #endif //__TY_SITE_FRAME__
const char * name
classe graphique pour un element de base
Frame pour les messages de retour.
Frame pour la gestion de site.
Definition: TYSiteFrame.h:40
void clear()
Definition: TYSiteFrame.h:64
void newElt(const char *className, TYElement *pElement)
void openModeler(QTreeWidgetItem *item, int column)
void changeRotation(TYElement *pElement)
virtual ~TYSiteFrame()
Definition: TYSiteFrame.cpp:86
bool remFromList(TYElementListItem *item)
void updateList()
void setBatimentParentEmissive(const TYEtage *pEtage)
Rend émissif, dans l'état du calcul courant, le bâtiment parent de l'étage passé en paramètre.
TYSiteFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=QFlag(0))
Definition: TYSiteFrame.cpp:60
void selectOrUnselectAll(TYElementListItem *item, const bool &bSelect)
void addEltXML(const char *className, TYElement *pElement)
LPTYCalcul _pCurrentCalcul
L'Id du calcul courant.
Definition: TYSiteFrame.h:266
TYRepere getDefaultRepere(TYInfrastructure *pInfra)
Returns default repere with z coordinate corresponding to site altitude This method is used when addi...
TYSiteNode * getSiteNodeRoot()
Definition: TYSiteFrame.h:56
void setDMaxDefault(TYElementListItem *item)
void changePos(TYElement *pElement)
LPTYSiteNode _pSiteNodeRoot
Le site node root.
Definition: TYSiteFrame.h:263
QMenuBar * _pMenuBar
Definition: TYSiteFrame.h:259
void localise(TYElement *pElement, TYElementGraphic *pGraphicObject)
void addElt(TYElement *pElement, TYElement *pElt)
bool supprime(TYElementListItem *eltItem)
void setSiteNodeRoot(LPTYSiteNode pSiteNode)
Definition: TYSiteFrame.cpp:91
bool remFromSite(TYElement *pElement)
TYElementListItem * addToList(LPTYSiteNode pElement, TYElementListItem *parent=NULL)
void exportEXCEL(TYElement *pElement)
TYElementListItem * addEltToList(LPTYElement pElement, TYElementListItem *parent=NULL, const bool &chekable=false)
void importFromLib(const unsigned int &filter, TYElement *pElement)
virtual void contextMenuEvent(QContextMenuEvent *e)
QTreeWidget * _pListView
Definition: TYSiteFrame.h:260
bool remInTopo(LPTYSiteNode _siteNode, TYElementListItem *item, const char *className)
void setCurrentCalcul(LPTYCalcul pCalcul)
Definition: TYSiteFrame.h:148
bool remInInfra(LPTYSiteNode _siteNode, TYElementListItem *item, const char *className)
void apply(QTreeWidgetItem *item, int col)