Qt 4.8
Public Functions | Properties | List of all members
QWSGLWindowSurface Class Reference

The QWSGLWindowSurface class provides the drawing area for top-level windows with Qt for Embedded Linux on EGL/OpenGL ES. More...

#include <qglwindowsurface_qws_p.h>

Inheritance diagram for QWSGLWindowSurface:
QWSWindowSurface QWindowSurface EGLNullWSWindowSurface PvrEglWindowSurface

Public Functions

QGLContextcontext () const
 Returns the QGLContext of the window surface. More...
 
 QWSGLWindowSurface (QWidget *widget)
 Constructs an empty QWSGLWindowSurface for the given top-level window. More...
 
 QWSGLWindowSurface ()
 Constructs an empty QWSGLWindowSurface. More...
 
void setContext (QGLContext *context)
 Sets the QGLContext for this window surface to context. More...
 
 ~QWSGLWindowSurface ()
 Destroys the QWSGLWindowSurface object and frees any allocated resources. More...
 
- Public Functions inherited from QWSWindowSurface
virtual void beginPaint (const QRegion &)
 This function is called before painting onto the surface begins, with the region in which the painting will occur. More...
 
const QRegion clipRegion () const
 Returns the region currently visible on the screen. More...
 
virtual void endPaint (const QRegion &)
 This function is called after painting onto the surface has ended, with the region in which the painting was performed. More...
 
virtual void flush (QWidget *widget, const QRegion &region, const QPoint &offset)
 Flushes the given region from the specified widget onto the screen. More...
 
virtual QImage image () const =0
 Implement this function to return an image of the top-level window. More...
 
bool isBuffered () const
 Returns true if the QWSWindowSurface::Buffered is set; otherwise returns false. More...
 
bool isOpaque () const
 Returns true if the QWSWindowSurface::Opaque is set; otherwise returns false. More...
 
bool isRegionReserved () const
 Returns true if the QWSWindowSurface::RegionReserved is set; otherwise returns false. More...
 
virtual bool isValid () const =0
 Implement this function to return true if the surface is a valid surface for the given top-level window; otherwise return false. More...
 
virtual QString key () const =0
 Implement this function to return a string that uniquely identifies the class of this surface. More...
 
virtual bool lock (int timeout=-1)
 
virtual bool move (const QPoint &offset)
 Move the surface with the given offset. More...
 
virtual QRegion move (const QPoint &offset, const QRegion &newClip)
 Move the surface with the given offset. More...
 
virtual QPaintDevicepaintDevice ()=0
 Implement this function to return the appropriate paint device. More...
 
virtual QPoint painterOffset () const
 Returns the offset to be used when painting. More...
 
virtual QByteArray permanentState () const
 Implement this function to return the data required for creating a server-side representation of the surface. More...
 
 QWSWindowSurface ()
 Constructs an empty surface. More...
 
 QWSWindowSurface (QWidget *widget)
 Constructs an empty surface for the given top-level widget. More...
 
virtual void releaseSurface ()
 
void setClipRegion (const QRegion &)
 Sets the region currently visible on the screen to be the given clip region. More...
 
virtual void setGeometry (const QRect &rect)
 Sets the currently allocated area to be the given rect. More...
 
virtual void setGeometry (const QRect &rect, const QRegion &mask)
 
virtual void setPermanentState (const QByteArray &state)
 Implement this function to attach a server-side surface instance to the corresponding client side instance using the given data. More...
 
virtual void setTransientState (const QByteArray &state)
 
SurfaceFlags surfaceFlags () const
 Returns the surface flags describing the contents of this surface. More...
 
virtual QByteArray transientState () const
 
virtual void unlock ()
 
int winId () const
 
 ~QWSWindowSurface ()
 
- Public Functions inherited from QWindowSurface
virtual QImagebuffer (const QWidget *widget)
 Returns a QImage pointer which represents the actual buffer the widget is drawn into or 0 if this is unavailable. More...
 
virtual WindowSurfaceFeatures features () const
 
QRect geometry () const
 Returns the currently allocated area on the screen. More...
 
virtual QPixmap grabWidget (const QWidget *widget, const QRect &rectangle=QRect()) const
 Returns a QPixmap generated from the part of the backing store corresponding to widget. More...
 
bool hasFeature (WindowSurfaceFeature feature) const
 
virtual QPoint offset (const QWidget *widget) const
 Returns the offset of widget in the coordinates of this window surface. More...
 
 QWindowSurface (QWidget *window, bool setDefaultSurface=true)
 Constructs an empty surface for the given top-level window. More...
 
QRect rect (const QWidget *widget) const
 Returns the rectangle for widget in the coordinates of this window surface. More...
 
virtual bool scroll (const QRegion &area, int dx, int dy)
 Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative. More...
 
void setStaticContents (const QRegion &region)
 
QRegion staticContents () const
 
QWidgetwindow () const
 Returns a pointer to the top-level window associated with this surface. More...
 
virtual ~QWindowSurface ()
 Destroys this surface. More...
 

Properties

QWSGLWindowSurfacePrivated_ptr
 

Additional Inherited Members

- Public Types inherited from QWSWindowSurface
enum  SurfaceFlag { RegionReserved = 0x1, Buffered = 0x2, Opaque = 0x4 }
 This enum is used to describe the window surface's contents. More...
 
- Public Types inherited from QWindowSurface
enum  WindowSurfaceFeature { PartialUpdates = 0x00000001, PreservedContents = 0x00000002, StaticContents = 0x00000004, AllFeatures = 0xffffffff }
 
- Protected Functions inherited from QWSWindowSurface
void setSurfaceFlags (SurfaceFlags type)
 Sets the surface flags describing the contents of this surface, to be the given flags. More...
 
void setWinId (int id)
 
- Protected Functions inherited from QWindowSurface
bool hasStaticContents () const
 

Detailed Description

The QWSGLWindowSurface class provides the drawing area for top-level windows with Qt for Embedded Linux on EGL/OpenGL ES.

It also provides the drawing area for QGLWidget whether they are top-level windows or children of another QWidget.

Since
4.3

This function is under development and subject to change.

Note that this class is only available in Qt for Embedded Linux and only available if Qt is configured with OpenGL support.

Definition at line 71 of file qglwindowsurface_qws_p.h.

Constructors and Destructors

◆ QWSGLWindowSurface() [1/2]

QWSGLWindowSurface::QWSGLWindowSurface ( QWidget window)

Constructs an empty QWSGLWindowSurface for the given top-level window.

The window surface is later initialized from chooseContext() and resources for it is typically allocated in setGeometry().

Definition at line 83 of file qglwindowsurface_qws.cpp.

84  : QWSWindowSurface(window),
86 {
87 }
QWSGLWindowSurfacePrivate * d_ptr
QWSWindowSurface()
Constructs an empty surface.

◆ QWSGLWindowSurface() [2/2]

QWSGLWindowSurface::QWSGLWindowSurface ( )

Constructs an empty QWSGLWindowSurface.

Definition at line 92 of file qglwindowsurface_qws.cpp.

◆ ~QWSGLWindowSurface()

QWSGLWindowSurface::~QWSGLWindowSurface ( )

Destroys the QWSGLWindowSurface object and frees any allocated resources.

Definition at line 101 of file qglwindowsurface_qws.cpp.

102 {
104  if (d->ownsContext)
105  delete d->qglContext;
106  delete d;
107 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QWSGLWindowSurface class provides the drawing area for top-level windows with Qt for Embedded Lin...

Functions

◆ context()

QGLContext * QWSGLWindowSurface::context ( ) const

Returns the QGLContext of the window surface.

Definition at line 112 of file qglwindowsurface_qws.cpp.

Referenced by setContext().

113 {
114  Q_D(const QWSGLWindowSurface);
115  if (!d->qglContext) {
116  QWSGLWindowSurface *that = const_cast<QWSGLWindowSurface*>(this);
118  that->d_func()->ownsContext = true;
119  }
120  return d->qglContext;
121 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
void setContext(QGLContext *context)
Sets the QGLContext for this window surface to context.
The QGLContext class encapsulates an OpenGL rendering context.
Definition: qgl.h:310
static QGLFormat defaultFormat()
Definition: qgl.cpp:1518
The QWSGLWindowSurface class provides the drawing area for top-level windows with Qt for Embedded Lin...

◆ setContext()

void QWSGLWindowSurface::setContext ( QGLContext context)

Sets the QGLContext for this window surface to context.

Definition at line 126 of file qglwindowsurface_qws.cpp.

Referenced by context().

127 {
129  if (d->ownsContext) {
130  delete d->qglContext;
131  d->ownsContext = false;
132  }
133  d->qglContext = context;
134 }
double d
Definition: qnumeric_p.h:62
QGLContext * context() const
Returns the QGLContext of the window surface.
#define Q_D(Class)
Definition: qglobal.h:2482
The QWSGLWindowSurface class provides the drawing area for top-level windows with Qt for Embedded Lin...

Properties

◆ d_ptr

QWSGLWindowSurfacePrivate* QWSGLWindowSurface::d_ptr
private

Definition at line 84 of file qglwindowsurface_qws_p.h.


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