QSurface Class
The QSurface class is an abstraction of renderable surfaces in Qt. More...
#include <QSurface>
Inherited by: QWindow.
This class was introduced in QtGui 5.0.
Public Types
enum | SurfaceClass { Window } |
enum | SurfaceType { RasterSurface, OpenGLSurface } |
Public Functions
virtual | ~QSurface() |
virtual QSurfaceFormat | format() const = 0 |
virtual QSize | size() const = 0 |
SurfaceClass | surfaceClass() const |
virtual QPlatformSurface * | surfaceHandle() const = 0 |
virtual SurfaceType | surfaceType() const = 0 |
Protected Functions
QSurface(SurfaceClass type) |
Detailed Description
The QSurface class is an abstraction of renderable surfaces in Qt.
The size of the surface is accessible with the size() function. The rendering specific attributes of the surface are accessible through the format() function.
Member Type Documentation
enum QSurface::SurfaceClass
The SurfaceClass enum describes the actual subclass of the surface.
Constant | Value | Description |
---|---|---|
QSurface::Window | 0 | The surface is an instance of QWindow. |
enum QSurface::SurfaceType
The SurfaceType enum describes what type of surface this is.
Constant | Value | Description |
---|---|---|
QSurface::RasterSurface | 0 | The surface is is composed of pixels and can be rendered to using a software rasterizer like Qt's raster paint engine. |
QSurface::OpenGLSurface | 1 | The surface is an OpenGL compatible surface and can be used in conjunction with QOpenGLContext. |
Member Function Documentation
QSurface::QSurface(SurfaceClass type) [protected]
Creates a surface with the given type.
QSurface::~QSurface() [virtual]
Destroys the surface.
QSurfaceFormat QSurface::format() const [pure virtual]
Returns the format of the surface.
QSize QSurface::size() const [pure virtual]
Returns the size of the surface in pixels.
SurfaceClass QSurface::surfaceClass() const
Returns the surface class of this surface.
QPlatformSurface * QSurface::surfaceHandle() const [pure virtual]
Returns a handle to the platform-specific implementation of the surface.
SurfaceType QSurface::surfaceType() const [pure virtual]
Returns the type of the surface.