summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglpaintdevice.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2012-08-30 15:22:59 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-31 21:23:38 +0200
commit3d04e4965e292be59464acc18c8306d89d3be3e1 (patch)
tree19cd345b1531c59403966c435473c3e94242bba8 /src/gui/opengl/qopenglpaintdevice.cpp
parent70bc7f8b32cbec135c398cff689cc6cc5f86b7a2 (diff)
Doc: Fix some documentation issues.
Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui/opengl/qopenglpaintdevice.cpp')
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp70
1 files changed, 68 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index e070ee6c58..09bd442892 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -111,7 +111,7 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(const QSize &size)
}
/*!
- Constructs a QOpenGLPaintDevice with the given \a size and \a ctx.
+ Constructs a QOpenGLPaintDevice with the given \a width and \a height.
The QOpenGLPaintDevice is only valid for the current context.
@@ -122,11 +122,21 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
{
}
+/*!
+ Destroys the QOpenGLPaintDevice.
+*/
+
QOpenGLPaintDevice::~QOpenGLPaintDevice()
{
delete d_ptr->engine;
}
+/*!
+ \fn int QOpenGLPaintDevice::devType() const
+ \internal
+ \reimp
+*/
+
QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz)
: size(sz)
, ctx(QOpenGLContext::currentContext())
@@ -153,6 +163,10 @@ private:
Q_GLOBAL_STATIC(QOpenGLEngineThreadStorage, qt_opengl_engine)
+/*!
+ \reimp
+*/
+
QPaintEngine *QOpenGLPaintDevice::paintEngine() const
{
if (d_ptr->engine)
@@ -167,21 +181,41 @@ QPaintEngine *QOpenGLPaintDevice::paintEngine() const
return engine;
}
+/*!
+ Returns the OpenGL context associated with the paint device.
+*/
+
QOpenGLContext *QOpenGLPaintDevice::context() const
{
return d_ptr->ctx;
}
+/*!
+ Returns the pixel size of the paint device.
+
+ \sa setSize()
+*/
+
QSize QOpenGLPaintDevice::size() const
{
return d_ptr->size;
}
+/*!
+ Sets the pixel size of the paint device to \a size.
+
+ \sa size()
+*/
+
void QOpenGLPaintDevice::setSize(const QSize &size)
{
d_ptr->size = size;
}
+/*!
+ \reimp
+*/
+
int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
{
switch (metric) {
@@ -211,34 +245,66 @@ int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
}
}
+/*!
+ Returns the number of pixels per meter horizontally.
+
+ \sa setDotsPerMeterX()
+*/
+
qreal QOpenGLPaintDevice::dotsPerMeterX() const
{
return d_ptr->dpmx;
}
+/*!
+ Returns the number of pixels per meter vertically.
+
+ \sa setDotsPerMeterY()
+*/
+
qreal QOpenGLPaintDevice::dotsPerMeterY() const
{
return d_ptr->dpmy;
}
+/*!
+ Sets the number of pixels per meter horizontally to \a dpmx.
+
+ \sa dotsPerMeterX()
+*/
+
void QOpenGLPaintDevice::setDotsPerMeterX(qreal dpmx)
{
d_ptr->dpmx = dpmx;
}
+/*!
+ Sets the number of pixels per meter vertically to \a dpmy.
+
+ \sa dotsPerMeterY()
+*/
+
void QOpenGLPaintDevice::setDotsPerMeterY(qreal dpmy)
{
d_ptr->dpmx = dpmy;
}
/*!
- Specifies whether painting should be flipped around the Y-axis or not.
+ Sets whether painting should be flipped around the Y-axis or not to \a flipped.
+
+ \sa paintFlipped()
*/
void QOpenGLPaintDevice::setPaintFlipped(bool flipped)
{
d_ptr->flipped = flipped;
}
+/*!
+ Returns true if painting is flipped around the Y-axis.
+
+ \sa setPaintFlipped()
+*/
+
bool QOpenGLPaintDevice::paintFlipped() const
{
return d_ptr->flipped;