- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

# QGLWidget Class Reference

Search for all occurrences

## Detailed Description

Definition at line 452 of file qgl.h.

`#include <qgl.h>`

Inheritance diagram for QGLWidget:
[legend]

List of all members.

## Public Slots
virtual void | updateGL ()
virtual void | updateOverlayGL ()
## Public Member Functions
| QGLWidget (QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0)
| QGLWidget (QGLContext *context, QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0)
| QGLWidget (const QGLFormat &format, QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0)
| ~QGLWidget ()
void | qglColor (const QColor &c) const
void | qglClearColor (const QColor &c) const
bool | isValid () const
bool | isSharing () const
void | makeCurrent ()
void | doneCurrent ()
bool | doubleBuffer () const
void | swapBuffers ()
QGLFormat | format () const
void | setFormat (const QGLFormat &format)
const QGLContext * | context () const
void | setContext (QGLContext *context, const QGLContext *shareContext=0, bool deleteOldContext=true)
QPixmap | renderPixmap (int w=0, int h=0, bool useContext=false)
QImage | grabFrameBuffer (bool withAlpha=false)
void | makeOverlayCurrent ()
const QGLContext * | overlayContext () const
void | setMouseTracking (bool enable)
const QGLColormap & | colormap () const
void | setColormap (const QGLColormap &map)
void | renderText (int x, int y, const QString &str, const QFont &fnt=QFont(), int listBase=2000)
void | renderText (double x, double y, double z, const QString &str, const QFont &fnt=QFont(), int listBase=2000)
QPaintEngine * | paintEngine () const
GLuint | bindTexture (const QImage &image, GLenum target, GLint format, QGLContext::BindOptions options)
GLuint | bindTexture (const QPixmap &pixmap, GLenum target, GLint format, QGLContext::BindOptions options)
GLuint | bindTexture (const QImage &image, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
GLuint | bindTexture (const QPixmap &pixmap, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
GLuint | bindTexture (const QString &fileName)
void | deleteTexture (GLuint tx_id)
void | drawTexture (const QRectF &target, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
void | drawTexture (const QPointF &point, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
## Static Public Member Functions
static QImage | convertToGLFormat (const QImage &img)
## Protected Member Functions
bool | event (QEvent *)
virtual void | initializeGL ()
virtual void | resizeGL (int w, int h)
virtual void | paintGL ()
virtual void | initializeOverlayGL ()
virtual void | resizeOverlayGL (int w, int h)
virtual void | paintOverlayGL ()
void | setAutoBufferSwap (bool on)
bool | autoBufferSwap () const
void | paintEvent (QPaintEvent *)
void | resizeEvent (QResizeEvent *)
virtual void | glInit ()
virtual void | glDraw ()
int | fontDisplayListBase (const QFont &fnt, int listBase=2000)
## Friends
class | QGLDrawable
class | QGLPixelBuffer
class | QGLPixelBufferPrivate
class | QGLContext
class | QGLContextPrivate
class | QGLOverlayWidget
class | QOpenGLPaintEngine
class | QGLPaintDevice
class | QGLWidgetGLPaintDevice

## Constructor & Destructor Documentation

QGLWidget | ( | QWidget * | parent = `0`,
|  | const QGLWidget * | shareWidget = `0`,
|  | Qt::WindowFlags | f = `0`
| ) |  | `[explicit]`

QGLWidget | ( | QGLContext * | context,
|  | QWidget * | parent = `0`,
|  | const QGLWidget * | shareWidget = `0`,
|  | Qt::WindowFlags | f = `0`
| ) |  | `[explicit]`

QGLWidget | ( | const QGLFormat & | format,
|  | QWidget * | parent = `0`,
|  | const QGLWidget * | shareWidget = `0`,
|  | Qt::WindowFlags | f = `0`
| ) |  | `[explicit]`

~QGLWidget | ( |  | ) |

## Member Function Documentation

void qglColor | ( | const QColor & | c | ) | const

Search for all occurrences

void qglClearColor | ( | const QColor & | c | ) | const

Search for all occurrences

bool isValid | ( |  | ) | const

Search for all occurrences

bool isSharing | ( |  | ) | const

Search for all occurrences

void makeCurrent | ( |  | ) |

Search for all occurrences

void doneCurrent | ( |  | ) |

Search for all occurrences

bool doubleBuffer | ( |  | ) | const

Search for all occurrences

void swapBuffers | ( |  | ) |

Search for all occurrences

QGLFormat format | ( |  | ) | const

Search for all occurrences

void setFormat | ( | const QGLFormat & | format | ) |

Search for all occurrences

const QGLContext* context | ( |  | ) | const

Search for all occurrences

void setContext | ( | QGLContext * | context,
|  | const QGLContext * | shareContext = `0`,
|  | bool | deleteOldContext = `true`
| ) |  |

Search for all occurrences

QPixmap renderPixmap | ( | int | w = `0`,
|  | int | h = `0`,
|  | bool | useContext = `false`
| ) |  |

Search for all occurrences

QImage grabFrameBuffer | ( | bool | withAlpha = `false` | ) |

Search for all occurrences

void makeOverlayCurrent | ( |  | ) |

Search for all occurrences

const QGLContext* overlayContext | ( |  | ) | const

Search for all occurrences

static QImage convertToGLFormat | ( | const QImage & | img | ) | `[static]`

Search for all occurrences

void setMouseTracking | ( | bool | enable | ) |

Search for all occurrences

Reimplemented from QWidget.

const QGLColormap& colormap | ( |  | ) | const

Search for all occurrences

void setColormap | ( | const QGLColormap & | map | ) |

Search for all occurrences

void renderText | ( | int | x,
|  | int | y,
|  | const QString & | str,
|  | const QFont & | fnt = `QFont()`,
|  | int | listBase = `2000`
| ) |  |

Search for all occurrences

void renderText | ( | double | x,
|  | double | y,
|  | double | z,
|  | const QString & | str,
|  | const QFont & | fnt = `QFont()`,
|  | int | listBase = `2000`
| ) |  |

Search for all occurrences

QPaintEngine* paintEngine | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

GLuint bindTexture | ( | const QImage & | image,
|  | GLenum | target,
|  | GLint | format,
|  | QGLContext::BindOptions | options
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QPixmap & | pixmap,
|  | GLenum | target,
|  | GLint | format,
|  | QGLContext::BindOptions | options
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QImage & | image,
|  | GLenum | target = `GL_TEXTURE_2D`,
|  | GLint | format = `GL_RGBA`
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QPixmap & | pixmap,
|  | GLenum | target = `GL_TEXTURE_2D`,
|  | GLint | format = `GL_RGBA`
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QString & | fileName | ) |

Search for all occurrences

void deleteTexture | ( | GLuint | tx_id | ) |

Search for all occurrences

void drawTexture | ( | const QRectF & | target,
|  | GLuint | textureId,
|  | GLenum | textureTarget = `GL_TEXTURE_2D`
| ) |  |

Search for all occurrences

void drawTexture | ( | const QPointF & | point,
|  | GLuint | textureId,
|  | GLenum | textureTarget = `GL_TEXTURE_2D`
| ) |  |

Search for all occurrences

virtual void updateGL | ( |  | ) | `[virtual, slot]`

Search for all occurrences

virtual void updateOverlayGL | ( |  | ) | `[virtual, slot]`

Search for all occurrences

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

virtual void initializeGL | ( |  | ) | `[protected, virtual]`

Search for all occurrences

virtual void resizeGL | ( | int | w,
|  | int | h
| ) |  | `[protected, virtual]`

Search for all occurrences

virtual void paintGL | ( |  | ) | `[protected, virtual]`

Search for all occurrences

virtual void initializeOverlayGL | ( |  | ) | `[protected, virtual]`

Search for all occurrences

virtual void resizeOverlayGL | ( | int | w,
|  | int | h
| ) |  | `[protected, virtual]`

Search for all occurrences

virtual void paintOverlayGL | ( |  | ) | `[protected, virtual]`

Search for all occurrences

void setAutoBufferSwap | ( | bool | on | ) | `[protected]`

Search for all occurrences

bool autoBufferSwap | ( |  | ) | const `[protected]`

Search for all occurrences

void paintEvent | ( | QPaintEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void resizeEvent | ( | QResizeEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

virtual void glInit | ( |  | ) | `[protected, virtual]`

Search for all occurrences

virtual void glDraw | ( |  | ) | `[protected, virtual]`

Search for all occurrences

int fontDisplayListBase | ( | const QFont & | fnt,
|  | int | listBase = `2000`
| ) |  | `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QGLDrawable `[friend]`

Search for all occurrences

Definition at line 575 of file qgl.h.

friend class QGLPixelBuffer `[friend]`

Search for all occurrences

Definition at line 576 of file qgl.h.

friend class QGLPixelBufferPrivate `[friend]`

Search for all occurrences

Definition at line 577 of file qgl.h.

friend class QGLContext `[friend]`

Search for all occurrences

Reimplemented from QWidget.

Definition at line 578 of file qgl.h.

friend class QGLContextPrivate `[friend]`

Search for all occurrences

Definition at line 579 of file qgl.h.

friend class QGLOverlayWidget `[friend]`

Search for all occurrences

Definition at line 580 of file qgl.h.

friend class QOpenGLPaintEngine `[friend]`

Search for all occurrences

Definition at line 581 of file qgl.h.

friend class QGLPaintDevice `[friend]`

Search for all occurrences

Definition at line 582 of file qgl.h.

friend class QGLWidgetGLPaintDevice `[friend]`

Search for all occurrences

Definition at line 583 of file qgl.h.

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

- QtOpenGL/qgl.h

QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget
QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget QGLWidget