summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurface.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2012-01-19 12:51:43 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-02 17:20:24 +0100
commit75711510b1ad7d4ac4434ad41a0ed71cfc0344dc (patch)
treefc8fae2ea9c623d76cb670e3b9cda9a0e125f573 /src/gui/kernel/qsurface.cpp
parent6181676ca61f39f389a8c3ca293c369e7f80b1e8 (diff)
Improve QSurface / QWindow API a bit and use that to avoid errors
Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel/qsurface.cpp')
-rw-r--r--src/gui/kernel/qsurface.cpp47
1 files changed, 44 insertions, 3 deletions
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index 24079c55ab..eb2676802b 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -43,12 +43,53 @@
QT_BEGIN_NAMESPACE
-QSurface::QSurface(SurfaceType type)
- : m_type(type)
+
+/*!
+ \class QSurface
+ \brief 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.
+ */
+
+
+/*!
+ \enum QSurface::SurfaceClass
+
+ The SurfaceClass enum describes the actual subclass of the surface.
+
+ \value Window The surface is an instance of QWindow.
+ */
+
+
+/*!
+ \enum QSurface::SurfaceType
+
+ The SurfaceType enum describes what type of surface the.
+
+ \value RasterSurface The surface is is composed of pixels and can be rendered to using
+ a software rasterizer like Qt's raster paint engine.
+ \value OpenGLSurface The surface is an OpenGL compatible surface and can be used
+ in conjunction with QOpenGLContext.
+ */
+
+
+/*!
+ QSize QSurface::size() const
+
+ Returns the size of the surface in pixels.
+ */
+
+
+
+QSurface::QSurface(SurfaceClass type)
+ : m_type(type), m_reserved(0)
{
}
-QSurface::SurfaceType QSurface::surfaceType() const
+
+
+QSurface::SurfaceClass QSurface::surfaceClass() const
{
return m_type;
}