Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | Related Functions

GLWidget Class Reference

[0] More...

#include <glwidget.h>

Inheritance diagram for GLWidget:
Inheritance graph
Collaboration diagram for GLWidget:
Collaboration graph

List of all members.

Public Types

enum  PaintDeviceMetric {
  PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM,
  PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY,
  PdmPhysicalDpiX, PdmPhysicalDpiY
enum  RenderFlag { DrawWindowBackground = 0x1, DrawChildren = 0x2, IgnoreMask = 0x4 }

Public Slots

void animate ()
void animate (qreal)
void animate (qreal)
void animFinished ()
void animFinished ()
bool close ()
void draw ()
void draw ()
void hide ()
void lower ()
void raise ()
void repaint ()
void setDisabled (bool)
void setEnabled (bool)
void setFocus ()
void setHidden (bool hidden)
void setLogo ()
void setLogo ()
void setScaling (int scale)
void setScaling (int scale)
QT_MOC_COMPAT void setShown (bool shown)
void setStyleSheet (const QString &styleSheet)
void setTexture ()
void setTexture ()
virtual void setVisible (bool visible)
void setWindowModified (bool)
void setWindowTitle (const QString &)
void setXRotation (int angle)
void setXRotation (int angle)
void setXRotation (int angle)
void setYRotation (int angle)
void setYRotation (int angle)
void setYRotation (int angle)
void setZRotation (int angle)
void setZRotation (int angle)
void setZRotation (int angle)
void show ()
void showBubbles (bool)
void showBubbles (bool)
void showFullScreen ()
void showMaximized ()
void showMinimized ()
void showNormal ()
void update ()
virtual void updateGL ()
virtual void updateOverlayGL ()


void clicked ()
void customContextMenuRequested (const QPoint &pos)
void xRotationChanged (int angle)
void xRotationChanged (int angle)
void yRotationChanged (int angle)
void yRotationChanged (int angle)
void zRotationChanged (int angle)
void zRotationChanged (int angle)

Public Member Functions

bool acceptDrops () const
QString accessibleDescription () const
QString accessibleName () const
QList< QAction * > actions () const
void activateWindow ()
void addAction (QAction *action)
void addActions (QList< QAction * > actions)
void adjustSize ()
bool autoFillBackground () const
QPalette::ColorRole backgroundRole () const
QSize baseSize () const
GLuint bindTexture (const QPixmap &pixmap, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
GLuint bindTexture (const QString &fileName)
GLuint bindTexture (const QImage &image, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
QWidgetchildAt (int x, int y) const
QWidgetchildAt (const QPoint &p) const
QRect childrenRect () const
QRegion childrenRegion () const
void clearFocus ()
void clearMask ()
const QGLColormapcolormap () const
QRect contentsRect () const
const QGLContextcontext () const
Qt::ContextMenuPolicy contextMenuPolicy () const
void createWinId ()
QCursor cursor () const
void deleteTexture (GLuint tx_id)
int depth () const
int devType () const
void doneCurrent ()
bool doubleBuffer () const
void drawCube (int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp)
void drawCube (int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp)
void drawTexture (const QRectF &target, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
void drawTexture (const QPointF &point, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
WId effectiveWinId () const
void ensurePolished () const
Qt::FocusPolicy focusPolicy () const
QWidgetfocusProxy () const
QWidgetfocusWidget () const
const QFontfont () const
QFontInfo fontInfo () const
QFontMetrics fontMetrics () const
QPalette::ColorRole foregroundRole () const
QGLFormat format () const
QRect frameGeometry () const
QSize frameSize () const
const QRectgeometry () const
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 GLWidget (QWidget *parent=0)
 GLWidget (QWidget *parent=0)
 GLWidget (Helper *helper, QWidget *parent)
 GLWidget (QWidget *parent)
 GLWidget (QWidget *parent)
 GLWidget (QWidget *parent=0)
 GLWidget (QWidget *parent)
 GLWidget (QWidget *parent=0)
 GLWidget (QWidget *parent)
 GLWidget (QWidget *parent=0)
 GLWidget (QWidget *parent)
 GLWidget (QWidget *parent=0, QGLWidget *shareWidget=0)
QImage grabFrameBuffer (bool withAlpha=false)
void grabKeyboard ()
void grabMouse ()
void grabMouse (const QCursor &)
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut)
QGraphicsProxyWidgetgraphicsProxyWidget () const
Qt::HANDLE handle () const
bool hasFocus () const
bool hasMouseTracking () const
int height () const
virtual int heightForWidth (int) const
int heightMM () const
void initCommon ()
void initializeGL ()
void initializeGL ()
void initPbuffer ()
QInputContextinputContext ()
virtual QVariant inputMethodQuery (Qt::InputMethodQuery) const
void insertAction (QAction *before, QAction *action)
void insertActions (QAction *before, QList< QAction * > actions)
WId internalWinId () const
bool isActiveWindow () const
bool isAncestorOf (const QWidget *child) const
bool isEnabled () const
bool isEnabledTo (QWidget *) const
bool isEnabledToTLW () const
bool isFullScreen () const
bool isHidden () const
bool isLeftToRight () const
bool isMaximized () const
bool isMinimized () const
bool isModal () const
bool isRightToLeft () const
bool isSharing () const
bool isTopLevel () const
bool isValid () const
bool isVisible () const
bool isVisibleTo (QWidget *) const
bool isWindow () const
bool isWindowModified () const
QLayoutlayout () const
Qt::LayoutDirection layoutDirection () const
QLocale locale () const
int logicalDpiX () const
int logicalDpiY () const
void makeCurrent ()
void makeOverlayCurrent ()
QPoint mapFrom (QWidget *, const QPoint &) const
QPoint mapFromGlobal (const QPoint &) const
QPoint mapFromParent (const QPoint &) const
QPoint mapTo (QWidget *, const QPoint &) const
QPoint mapToGlobal (const QPoint &) const
QPoint mapToParent (const QPoint &) const
QRegion mask () const
int maximumHeight () const
QSize maximumSize () const
int maximumWidth () const
int minimumHeight () const
QSize minimumSize () const
QSize minimumSizeHint () const
QSize minimumSizeHint () const
int minimumWidth () const
void mouseDoubleClickEvent (QMouseEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void move (int x, int y)
void move (const QPoint &)
QWidgetnativeParentWidget () const
QWidgetnextInFocusChain () const
QRect normalGeometry () const
int numColors () const
const QGLContextoverlayContext () const
void overrideWindowFlags (Qt::WindowFlags type)
void overrideWindowState (Qt::WindowStates state)
QPaintEnginepaintEngine () const
void paintEvent (QPaintEvent *)
void paintEvent (QPaintEvent *)
void paintGL ()
void paintGL ()
bool paintingActive () const
const QPalettepalette () const
QWidgetparentWidget () const
int physicalDpiX () const
int physicalDpiY () const
QPoint pos () const
void qglClearColor (const QColor &c) const
void qglColor (const QColor &c) const
QRect rect () const
void releaseKeyboard ()
void releaseMouse ()
void releaseShortcut (int id)
void removeAction (QAction *action)
void render (QPaintDevice *target, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren))
void render (QPainter *painter, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren))
QPixmap renderPixmap (int w=0, int h=0, bool useContext=false)
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)
void repaint (const QRect &)
void repaint (int x, int y, int w, int h)
void repaint (const QRegion &)
void resize (int w, int h)
void resize (const QSize &)
void resizeGL (int w, int h)
void resizeGL (int w, int h)
bool restoreGeometry (const QByteArray &geometry)
void restoreGLState ()
void restoreGLState ()
void rotateBy (int xAngle, int yAngle, int zAngle)
QByteArray saveGeometry () const
void saveGLState ()
void saveGLState ()
void scroll (int dx, int dy)
void scroll (int dx, int dy, const QRect &)
void setAcceptDrops (bool on)
void setAccessibleDescription (const QString &description)
void setAccessibleName (const QString &name)
void setAttribute (Qt::WidgetAttribute, bool on=true)
void setAutoFillBackground (bool enabled)
void setBackgroundRole (QPalette::ColorRole)
void setBaseSize (const QSize &)
void setBaseSize (int basew, int baseh)
void setClearColor (const QColor &color)
void setColormap (const QGLColormap &map)
void setContentsMargins (int left, int top, int right, int bottom)
void setContext (QGLContext *context, const QGLContext *shareContext=0, bool deleteOldContext=true)
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
void setCursor (const QCursor &)
void setFixedHeight (int h)
void setFixedSize (const QSize &)
void setFixedSize (int w, int h)
void setFixedWidth (int w)
void setFocus (Qt::FocusReason reason)
void setFocusPolicy (Qt::FocusPolicy policy)
void setFocusProxy (QWidget *)
void setFont (const QFont &)
void setForegroundRole (QPalette::ColorRole)
void setFormat (const QGLFormat &format)
void setGeometry (int x, int y, int w, int h)
void setGeometry (const QRect &)
void setInputContext (QInputContext *)
void setLayout (QLayout *)
void setLayoutDirection (Qt::LayoutDirection direction)
void setLocale (const QLocale &locale)
void setMask (const QBitmap &)
void setMask (const QRegion &)
void setMaximumHeight (int maxh)
void setMaximumSize (const QSize &)
void setMaximumSize (int maxw, int maxh)
void setMaximumWidth (int maxw)
void setMinimumHeight (int minh)
void setMinimumSize (const QSize &)
void setMinimumSize (int minw, int minh)
void setMinimumWidth (int minw)
void setMouseTracking (bool enable)
void setPalette (const QPalette &)
void setParent (QWidget *parent)
void setParent (QWidget *parent, Qt::WindowFlags f)
void setShortcutAutoRepeat (int id, bool enable=true)
void setShortcutEnabled (int id, bool enable=true)
void setSizeIncrement (const QSize &)
void setSizeIncrement (int w, int h)
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
void setSizePolicy (QSizePolicy)
void setStatusTip (const QString &)
void setStyle (QStyle *)
void setToolTip (const QString &)
void setUpdatesEnabled (bool enable)
void setWhatsThis (const QString &)
void setWindowFilePath (const QString &filePath)
void setWindowFlags (Qt::WindowFlags type)
void setWindowIcon (const QIcon &icon)
void setWindowIconText (const QString &)
void setWindowModality (Qt::WindowModality windowModality)
void setWindowOpacity (qreal level)
void setWindowRole (const QString &)
void setWindowState (Qt::WindowStates state)
void setWindowSurface (QWindowSurface *surface)
QSize size () const
QSize sizeHint () const
QSize sizeHint () const
QSize sizeHint () const
QSize sizeIncrement () const
QSizePolicy sizePolicy () const
void stackUnder (QWidget *)
QString statusTip () const
QStylestyle () const
QString styleSheet () const
void swapBuffers ()
bool testAttribute (Qt::WidgetAttribute) const
void timerEvent (QTimerEvent *)
void timerEvent (QTimerEvent *)
void timerEvent (QTimerEvent *)
void timerEvent (QTimerEvent *)
QString toolTip () const
QWidgettopLevelWidget () const
bool underMouse () const
void unsetCursor ()
void unsetLayoutDirection ()
void unsetLocale ()
void update (const QRect &)
void update (const QRegion &)
void update (int x, int y, int w, int h)
void updateGeometry ()
bool updatesEnabled () const
QRegion visibleRegion () const
QString whatsThis () const
void wheelEvent (QWheelEvent *)
void wheelEvent (QWheelEvent *)
int width () const
int widthMM () const
QWidgetwindow () const
QString windowFilePath () const
Qt::WindowFlags windowFlags () const
QIcon windowIcon () const
QString windowIconText () const
Qt::WindowModality windowModality () const
qreal windowOpacity () const
QString windowRole () const
Qt::WindowStates windowState () const
QWindowSurfacewindowSurface () const
QString windowTitle () const
Qt::WindowType windowType () const
WId winId () const
int x () const
int xRotation () const
int xRotation () const
int y () const
int yRotation () const
int yRotation () const
int zRotation () const
int zRotation () const
 ~GLWidget ()

Static Public Member Functions

static QImage convertToGLFormat (const QImage &img)
static QWidgetfind (WId)
static QWidgetkeyboardGrabber ()
static QWidgetmouseGrabber ()
static void setTabOrder (QWidget *, QWidget *)

Protected Slots

void updateMicroFocus ()

Protected Member Functions

virtual void actionEvent (QActionEvent *)
bool autoBufferSwap () const
virtual void changeEvent (QEvent *)
virtual void closeEvent (QCloseEvent *)
virtual void contextMenuEvent (QContextMenuEvent *)
void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
void destroy (bool destroyWindow=true, bool destroySubWindows=true)
virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dragLeaveEvent (QDragLeaveEvent *)
virtual void dragMoveEvent (QDragMoveEvent *)
virtual void dropEvent (QDropEvent *)
virtual void enabledChange (bool)
virtual void enterEvent (QEvent *)
bool event (QEvent *)
virtual void focusInEvent (QFocusEvent *)
bool focusNextChild ()
virtual bool focusNextPrevChild (bool next)
virtual void focusOutEvent (QFocusEvent *)
bool focusPreviousChild ()
virtual void fontChange (const QFont &)
int fontDisplayListBase (const QFont &fnt, int listBase=2000)
virtual void glDraw ()
virtual void glInit ()
virtual void hideEvent (QHideEvent *)
void initializeGL ()
void initializeGL ()
void initializeGL ()
void initializeGL ()
void initializeGL ()
void initializeGL ()
void initializeGL ()
virtual void initializeOverlayGL ()
virtual void inputMethodEvent (QInputMethodEvent *)
virtual void keyPressEvent (QKeyEvent *)
virtual void keyReleaseEvent (QKeyEvent *)
virtual void languageChange ()
virtual void leaveEvent (QEvent *)
void makeObject ()
int metric (PaintDeviceMetric) const
void mouseMoveEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
virtual void moveEvent (QMoveEvent *)
void paintEvent (QPaintEvent *event)
void paintEvent (QPaintEvent *event)
void paintGL ()
void paintGL ()
void paintGL ()
void paintGL ()
void paintGL ()
void paintGL ()
virtual void paintOverlayGL ()
virtual void paletteChange (const QPalette &)
void quad (GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2, GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
void resetInputContext ()
void resizeEvent (QResizeEvent *)
void resizeGL (int width, int height)
void resizeGL (int width, int height)
void resizeGL (int width, int height)
void resizeGL (int width, int height)
void resizeGL (int w, int h)
virtual void resizeOverlayGL (int w, int h)
void setAutoBufferSwap (bool on)
void showEvent (QShowEvent *event)
virtual void styleChange (QStyle &)
virtual void tabletEvent (QTabletEvent *)
void timerEvent (QTimerEvent *)
virtual void windowActivationChange (bool)

Protected Attributes

ushort painters


bool acceptDrops
 whether drop events are enabled for this widget
QString accessibleDescription
 the widget's description as seen by assistive technologies
QString accessibleName
 the widget's name as seen by assistive technologies
bool autoFillBackground
 whether the widget background is filled automatically
QSize baseSize
 the base size of the widget
QRect childrenRect
 the bounding rectangle of the widget's children
QRegion childrenRegion
 the combined region occupied by the widget's children
Qt::ContextMenuPolicy contextMenuPolicy
 how the widget shows a context menu
QCursor cursor
 the cursor shape for this widget
bool enabled
 whether the widget is enabled
bool focus
 whether this widget (or its focus proxy) has the keyboard input focus
Qt::FocusPolicy focusPolicy
 the way the widget accepts keyboard focus
QFont font
 the font currently set for the widget
QRect frameGeometry
 geometry of the widget relative to its parent including any window frame
QSize frameSize
 the size of the widget including any window frame
bool fullScreen
 whether the widget is shown in full screen mode
QRect geometry
 the geometry of the widget relative to its parent and excluding the window frame
int height
 the height of the widget excluding any window frame
bool isActiveWindow
 whether this widget's window is the active window
Qt::LayoutDirection layoutDirection
 the layout direction for this widget
QLocale locale
 the widget's locale
bool maximized
 whether this widget is maximized
int maximumHeight
 the widget's maximum height in pixels
QSize maximumSize
 the widget's maximum size in pixels
int maximumWidth
 the widget's maximum width in pixels
bool minimized
 whether this widget is minimized (iconified)
int minimumHeight
 the widget's minimum height in pixels
QSize minimumSize
 the widget's minimum size
QSize minimumSizeHint
 the recommended minimum size for the widget
int minimumWidth
 the widget's minimum width in pixels
bool modal
 whether the widget is a modal widget
bool mouseTracking
 whether mouse tracking is enabled for the widget
QRect normalGeometry
 the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget
QPalette palette
 the widget's palette
QPoint pos
 the position of the widget within its parent widget
QRect rect
 the internal geometry of the widget excluding any window frame
QSize size
 the size of the widget excluding any window frame
QSize sizeHint
 the recommended size for the widget
QSize sizeIncrement
 the size increment of the widget
QSizePolicy sizePolicy
 the default layout behavior of the widget
QString statusTip
 the widget's status tip
QString styleSheet
 the widget's style sheet
QString toolTip
 the widget's tooltip
bool updatesEnabled
 whether updates are enabled
bool visible
 whether the widget is visible
QString whatsThis
 the widget's What's This help text.
int width
 the width of the widget excluding any window frame
QString windowFilePath
 the file path associated with a widget
QIcon windowIcon
 the widget's icon
QString windowIconText
 the widget's icon text
Qt::WindowModality windowModality
 which windows are blocked by the modal widget
bool windowModified
 whether the document shown in the window has unsaved changes
double windowOpacity
 The level of opacity for the window.
QString windowTitle
 the window title (caption)
int x
 the x coordinate of the widget relative to its parent including any window frame
int y
 the y coordinate of the widget relative to its parent and including any window frame

Private Slots

void advanceGears ()
void animate ()

Private Member Functions

void createBubbles (int number)
void createBubbles (int number)
void createBubbles (int number)
void createGeometry ()
void createGeometry ()
void drawGear (GLuint gear, GLdouble dx, GLdouble dy, GLdouble dz, GLdouble angle)
void drawInstructions (QPainter *painter)
void extrude (qreal x1, qreal y1, qreal x2, qreal y2)
void extrude (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
void extrude (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
void extrude (qreal x1, qreal y1, qreal x2, qreal y2)
GLuint makeGear (const GLfloat *reflectance, GLdouble innerRadius, GLdouble outerRadius, GLdouble thickness, GLdouble toothSize, GLint toothCount)
GLuint makeObject ()
GLuint makeObject ()
GLuint makeObject ()
void normalizeAngle (int *angle)
void normalizeAngle (int *angle)
void normalizeAngle (int *angle)
void paintQtLogo ()
void paintQtLogo ()
void paintTexturedCube ()
void paintTexturedCube ()
void quad (qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
void quad (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2, GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
void quad (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2, GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
void quad (qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
void setupViewport (int width, int height)

Private Attributes

QPoint anchor
QTimer animationTimer
QList< Bubble * > bubbles
QColor clearColor
q_vertexType * createdNormals
GLfloat * createdNormals
q_vertexType * createdVertices
GLfloat * createdVertices
GLuint cubeTexture
GLuint dynamicTexture
int elapsed
int frames
GLuint gear1
int gear1Rot
GLuint gear2
GLuint gear3
bool hasDynamicTextureUpdate
QPoint lastPos
GLuint list
QImage logo
qreal m_fAngle
qreal m_fScale
bool m_showBubbles
GLuint m_uiTexture
int m_vertexNumber
GLuint matrixUniform1
GLuint matrixUniform2
GLuint normalAttr1
GLuint normalAttr2
QList< qreal > normals
GLuint object
GLuint pbufferList
GLuint program1
GLuint program2
bool qtLogo
GLfloat rot [3]
float rot_x
float rot_y
float rot_z
float scale
GLuint texCoordAttr2
GLuint textureUniform2
GLuint tile_list
QTime time
int timerId
QColor trolltechGreen
QColor trolltechPurple
GLuint vertexAttr1
GLuint vertexAttr2
QList< qreal > vertices
GLfloat * wave
GLfloat xInc [3]
GLfloat xOffs [3]
int xRot
GLfloat yOffs [3]
int yRot
int zRot

Static Private Attributes

static int refCount = 0
static GLuint sharedObject = 0

Related Functions

(Note that these are not member functions.)

const Q_GUI_EXPORT QX11Infoqt_x11Info (const QPaintDevice *pd)

Detailed Description


Definition at line 54 of file glwidget.h.

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

Generated by  Doxygen 1.6.0   Back to index