Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYProjetFrame.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 
23 #ifndef __TY_PROJET_FRAME__
24 #define __TY_PROJET_FRAME__
25 
26 #include <qwidget.h>
27 // Added by qt3to4:
28 #include <QKeyEvent>
29 #include <QTreeWidget>
30 
31 #include "TYAppDefines.h"
33 
34 class QMenuBar;
35 class TYSpectresManagerFrame;
36 
41 class TYProjetFrame : public QWidget
42 {
43  Q_OBJECT
44 
45 public:
49  TYProjetFrame(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = QFlag(0));
53  virtual ~TYProjetFrame();
54 
59  {
60  return _pProjet;
61  }
62 
66  void clear()
67  {
68  _pListView->clear();
69  }
70 
71  TYSpectresManagerFrame* getTYSpectresManagerFrame()
72  {
74  };
75 
79  void setCalculDone(bool state);
80 
81 public slots:
85  void setProjet(LPTYProjet pProjet);
86 
90  void updateList();
91 
96  TYElementListItem* addToList(LPTYProjet pElement, TYElementListItem* parent = NULL);
101  TYElementListItem* addToList(LPTYCalcul pElement, TYElementListItem* parent = NULL);
102 
106  virtual void contextMenuEvent(QContextMenuEvent* e);
107 
108  void keyPressEvent(QKeyEvent* e);
109 
113  void doubleClic(QTreeWidgetItem*, int);
114 
121  void apply(QTreeWidgetItem* item, int col);
122 
123 signals:
132 
133 protected:
138  TYElementListItem* addEltToList(LPTYElement pElement, TYElementListItem* parent = NULL);
139 
146  bool remFromList(TYElementListItem* item);
147 
151  void exportMaillageCSV(const LPTYMaillage pMaillage);
152 
156  void setCalculItemState(TYElementListItem* pCalcItem, bool state);
157 
161  void selectOrUnselectAll(TYElementListItem* item, const bool& bSelect);
162 
166  void updateGraphics();
167 
172  void highlight_element(TYElementGraphic* pGraphicObject, TYElement* pElement);
173 
174 protected:
175  QMenuBar* _pMenuBar;
176  QTreeWidget* _pListView;
177 
180 
183 
186 
187  TYSpectresManagerFrame* _pSpectresManagerFrame;
188 };
189 
190 #endif //__TY_PROJET_FRAME__
const char * name
classe graphique pour un element de base
Frame pour les messages de retour.
Frame pour la gestion de projet.
Definition: TYProjetFrame.h:42
void apply(QTreeWidgetItem *item, int col)
bool remFromList(TYElementListItem *item)
void setCalculDone(bool state)
LPTYProjet getProjet()
Definition: TYProjetFrame.h:58
void changeSite(LPTYSiteNode pSite)
TYElementListItem * addEltToList(LPTYElement pElement, TYElementListItem *parent=NULL)
void setCalculItemState(TYElementListItem *pCalcItem, bool state)
LPTYProjet _pProjet
Le projet.
virtual void contextMenuEvent(QContextMenuEvent *e)
void keyPressEvent(QKeyEvent *e)
void selectOrUnselectAll(TYElementListItem *item, const bool &bSelect)
TYElementListItem * addToList(LPTYProjet pElement, TYElementListItem *parent=NULL)
QMenuBar * _pMenuBar
TYProjetFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=QFlag(0))
TYElementListItem * _pCurrentCalculItem
L'item du treeview du projet.
QTreeWidget * _pListView
void setProjet(LPTYProjet pProjet)
void updateGraphics()
void updateGraphics()
void exportMaillageCSV(const LPTYMaillage pMaillage)
void changeCurrentCalcul(LPTYCalcul pCalcul)
virtual ~TYProjetFrame()
void highlight_element(TYElementGraphic *pGraphicObject, TYElement *pElement)
highlight object
LPTYCalcul _pCurrentCalcul
Le calcul courant.
void doubleClic(QTreeWidgetItem *, int)
TYSpectresManagerFrame * getTYSpectresManagerFrame()
Definition: TYProjetFrame.h:71
TYSpectresManagerFrame * _pSpectresManagerFrame