Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPointWidget.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_POINT_WIDGET__
28 #define __TY_POINT_WIDGET__
29 
30 #include "TYWidget.h"
31 #include <qlayout.h>
32 // Added by qt3to4:
33 #include <QGridLayout>
34 #include <QLabel>
35 
36 class TYPoint;
37 class TYLineEdit;
38 class QGridLayout;
39 class QLabel;
40 class QGroupBox;
41 class TYElementWidget;
43 
48 class TYPointWidget : public TYWidget
49 {
50  Q_OBJECT
51 
53 
54  // Methodes
55 public:
59  TYPointWidget(TYPoint* pElement, QWidget* _pParent = NULL);
63  virtual ~TYPointWidget();
64 
71  void setLayoutSpacing(int margin, int spacing)
72  {
73  _pointLayout->setContentsMargins(margin, margin, margin, margin);
74  _pointLayout->setSpacing(spacing);
75  }
76 
77  void disableZ();
78  void enableZ();
79 
80 public slots:
81  virtual void updateContent();
82  virtual void apply();
83 
84  // Membres
85 protected:
86  QGroupBox* _groupBox;
87  QLabel* _labelX;
88  QLabel* _labelZ;
89  QLabel* _labelY;
93 
94  QGridLayout* _pointLayout;
95  QGridLayout* _groupBoxLayout;
96 
97  // TYElementWidget * _elmW;
99 };
100 
101 #endif // __TY_POINT_WIDGET__
outil IHM pour un objet metier de type TYElement (fichier header)
#define TY_DECL_METIER_WIDGET(classname)
Definition: TYWidget.h:31
classe de l'objet IHM pour l'objet ColorInterface
classe de l'objet IHM pour un element
classe de l'objet IHM pour un point
Definition: TYPointWidget.h:49
TYLineEdit * _lineEditZ
Definition: TYPointWidget.h:92
QGroupBox * _groupBox
Definition: TYPointWidget.h:86
void setLayoutSpacing(int margin, int spacing)
Definition: TYPointWidget.h:71
virtual void apply()
TYColorInterfaceWidget * _colorW
Definition: TYPointWidget.h:98
QGridLayout * _pointLayout
Definition: TYPointWidget.h:94
QLabel * _labelX
Definition: TYPointWidget.h:87
QLabel * _labelY
Definition: TYPointWidget.h:89
virtual ~TYPointWidget()
TYPointWidget(TYPoint *pElement, QWidget *_pParent=NULL)
QLabel * _labelZ
Definition: TYPointWidget.h:88
QGridLayout * _groupBoxLayout
Definition: TYPointWidget.h:95
virtual void updateContent()
TYLineEdit * _lineEditX
Definition: TYPointWidget.h:90
TYLineEdit * _lineEditY
Definition: TYPointWidget.h:91
classe de l'objet IHM pour un objet metier de type TYElement
Definition: TYWidget.h:43