Qt 4.8
Public Functions | Static Public Variables | Properties | List of all members
QGLGlobalShareWidget Class Reference

Public Functions

void cleanup ()
 
void destroy ()
 
bool initializing ()
 
 QGLGlobalShareWidget ()
 
QGLWidgetshareWidget ()
 

Static Public Variables

static bool cleanedUp = false
 
static bool created = false
 

Properties

bool init
 
QGLWidgetwidget
 

Detailed Description

Definition at line 184 of file qwindowsurface_gl.cpp.

Constructors and Destructors

◆ QGLGlobalShareWidget()

QGLGlobalShareWidget::QGLGlobalShareWidget ( )
inline

Definition at line 187 of file qwindowsurface_gl.cpp.

187  : widget(0), init(false) {
188  created = true;
189  }

Functions

◆ cleanup()

void QGLGlobalShareWidget::cleanup ( )
inline

Definition at line 215 of file qwindowsurface_gl.cpp.

215  {
216  QGLWidget *w = widget;
217  cleanedUp = true;
218  widget = 0;
219  delete w;
220  }
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474

◆ destroy()

void QGLGlobalShareWidget::destroy ( )
inline

Definition at line 223 of file qwindowsurface_gl.cpp.

223  {
224  if (cleanedUp)
225  return;
226 
227  QGLWidget *w = widget;
228 
229  // prevent potential recursions
230  cleanedUp = true;
231  widget = 0;
232  delete w;
233  cleanedUp = false;
234  }
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474

◆ initializing()

bool QGLGlobalShareWidget::initializing ( )
inline

Definition at line 236 of file qwindowsurface_gl.cpp.

237  {
238  return init;
239  }

◆ shareWidget()

QGLWidget* QGLGlobalShareWidget::shareWidget ( )
inline

Definition at line 191 of file qwindowsurface_gl.cpp.

191  {
192  if (!init && !widget && !cleanedUp) {
193  init = true;
195 #ifdef Q_OS_SYMBIAN
196  if (!widget->context()->isValid()) {
197  delete widget;
198  widget = 0;
199  init = false;
200  return 0;
201  }
202 #endif
203 
204  widget->resize(1, 1);
205 
206  // We don't need this internal widget to appear in QApplication::topLevelWidgets()
209  init = false;
210  }
211  return widget;
212  }
bool remove(const T &value)
Definition: qset.h:89
const QGLContext * context() const
Returns the context of this widget.
Definition: qgl.cpp:5303
The QGLFormat class specifies the display format of an OpenGL rendering context.
Definition: qgl.h:175
static QWidgetSet * allWidgets
Definition: qwidget_p.h:715
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474
void resize(int w, int h)
This corresponds to resize(QSize(w, h)).
Definition: qwidget.h:1014
bool isValid() const
Returns true if a GL rendering context has been successfully created; otherwise returns false...
Definition: qgl.cpp:3477

Properties

◆ cleanedUp

bool QGLGlobalShareWidget::cleanedUp = false
static

◆ created

bool QGLGlobalShareWidget::created = false
static

◆ init

bool QGLGlobalShareWidget::init
private

Definition at line 246 of file qwindowsurface_gl.cpp.

◆ widget

QGLWidget* QGLGlobalShareWidget::widget
private

Definition at line 245 of file qwindowsurface_gl.cpp.


The documentation for this class was generated from the following file: