Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYResultatTreeDialog.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 
27 #ifndef __TY_RESULTAT_TREE_DIALOG__
28 #define __TY_RESULTAT_TREE_DIALOG__
29 
31 
32 #include <qdialog.h>
33 #include <qmap.h>
34 // Added by qt3to4:
35 #include <QShowEvent>
36 #include <QCloseEvent>
37 class QPushButton;
38 class QTreeWidget;
39 class QTreeWidgetItem;
40 
41 typedef struct
42 {
43  // Utilisation d'un map la ou un set aurait suffit, mais ca voulait pas compiler
44  std::map<TYElement*, TYElement*> pChildsList;
47 
52 class TYResultatTreeDialog : public QDialog
53 {
54  Q_OBJECT
55 
56 public:
60  TYResultatTreeDialog(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = QFlag(0));
64  virtual ~TYResultatTreeDialog();
65 
66  void followChilds(QMap<TYElement*, childTreeItem*>& mapElementChilds,
67  QMap<TYElement*, childTreeItem*>::iterator it,
68  QMap<TYElement*, QTreeWidgetItem*>& mapParentItem, QTreeWidgetItem* pCurItem);
69 
70 public slots:
74  void set(LPTYResultat pResultat, LPTYPointCalcul pPtCalcul);
75 
79  void updateContent();
80 
81 protected:
82  virtual void showEvent(QShowEvent* pEvent);
83  virtual void closeEvent(QCloseEvent* pEvent);
84 
85 protected:
87  QPushButton* _pCloseButton;
88 
90  QTreeWidget* _pListView;
91 
94 
97 };
98 
99 #endif //__TY_RESULTAT_TREE_DIALOG__
const char * name
Boite de dialogue pour la representation par une arborescence des elements contribuant au resultat d'...
QTreeWidget * _pListView
La liste pour la representation de l'arborescence.
LPTYResultat _pResultat
Le resultat associe.
TYResultatTreeDialog(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=QFlag(0))
void set(LPTYResultat pResultat, LPTYPointCalcul pPtCalcul)
void followChilds(QMap< TYElement *, childTreeItem * > &mapElementChilds, QMap< TYElement *, childTreeItem * >::iterator it, QMap< TYElement *, QTreeWidgetItem * > &mapParentItem, QTreeWidgetItem *pCurItem)
QPushButton * _pCloseButton
Bouton pour fermer la boite de dialogue.
virtual void closeEvent(QCloseEvent *pEvent)
LPTYPointCalcul _pPtCalcul
Le point de calcul associe.
virtual void showEvent(QShowEvent *pEvent)
std::map< TYElement *, TYElement * > pChildsList