Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYRenderWindow.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 
26 #ifndef __TY_RENDER_WINDOW__
27 #define __TY_RENDER_WINDOW__
28 
29 #include <qgl.h>
30 
31 #include "TYOpenGLRenderer.h"
32 
33 class OGLTextElement;
34 
39 class TYRenderWindow : public QGLWidget
40 {
41  Q_OBJECT
42 
43 public:
51  TYRenderWindow(QGLFormat glf, QWidget* pParent = 0, const char* name = 0);
52 
59  TYRenderWindow(QWidget* pParent = 0, const char* name = 0);
60 
65 
72 
76  bool getShowInfos()
77  {
78  return _showInfos;
79  }
80 
81 public slots:
85  virtual void updateGL();
89  void showInfos(bool state);
90 
91 protected:
95  virtual void initializeGL();
99  virtual void resizeGL(int w, int h);
103  virtual void paintGL();
104 
105  inline QSizePolicy sizePolicy() const
106  {
107  return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
108  }
109  inline QSize sizeHint() const
110  {
111  return QSize(50, 50);
112  }
113  inline QSize minimumSizeHint() const
114  {
115  return QSize(50, 50);
116  }
117 
118 private:
123  void initRenderWindow();
124 
125 private:
130 };
131 
132 #endif // __TY_RENDER_WINDOW__
Realise le rendu VTK et le rendu OpenGL (fichier header)
const char * name
Realise le rendu VTK et le rendu OpenGL.
Combine QGLWidget de Qt pour Tympan.
virtual void updateGL()
virtual void initializeGL()
QSize sizeHint() const
QSizePolicy sizePolicy() const
TYRenderWindow(QGLFormat glf, QWidget *pParent=0, const char *name=0)
virtual void resizeGL(int w, int h)
QSize minimumSizeHint() const
TYOpenGLRenderer * _pRenderer
void showInfos(bool state)
TYOpenGLRenderer * getRenderer()
virtual void paintGL()
OGLTextElement * _pOGLTextInfoLabel