From: Eskil Abrahamsen Blomfeldt Date: Thu, 4 Oct 2012 08:55:12 +0000 (+0200) Subject: doc: Update Q*PaintDevice docs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f6122a6926c190381a505d4b18fd44079927a4a;p=profile%2Fivi%2Fqtbase.git doc: Update Q*PaintDevice docs Minor syntax typo in QPagedPaintDevice. Some Qt 5 updates in QPaintDevice (QGuiApplication) and a couple of other changes: 1. Usually, we say an object is "painted" or "drawn" when it is drawn on top of another object (like drawEllipse()) not when it is the destination of the draw commands. To be more consistent I updated the language here. 2. What's commonly called a 32-bit display has 24 bits of color information and eight bits of opacity information. This gives a color count which can be accurately represented by int. To avoid confusion, the exception in the docs for colorCount() has been generalized a little. Change-Id: Iabaaed1f3e4a80e7e14dfd8855da8c3cd8b3012f Reviewed-by: Samuel Rødal --- diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp index 3d3e830..32d9381 100644 --- a/src/gui/painting/qpagedpaintdevice.cpp +++ b/src/gui/painting/qpagedpaintdevice.cpp @@ -215,7 +215,7 @@ void QPagedPaintDevice::setMargins(const Margins &margins) /*! returns the current margins of the paint device. The default is 0. - /sa setMargins + \sa setMargins */ QPagedPaintDevice::Margins QPagedPaintDevice::margins() const { diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc index 78b9d46..e07e30a 100644 --- a/src/gui/painting/qpaintdevice.qdoc +++ b/src/gui/painting/qpaintdevice.qdoc @@ -28,12 +28,12 @@ /*! \class QPaintDevice \brief The QPaintDevice class is the base class of objects that - can be painted. + can be painted on with QPainter. \ingroup painting A paint device is an abstraction of a two-dimensional space that - can be drawn using a QPainter. Its default coordinate system has + can be drawn on using a QPainter. Its default coordinate system has its origin located at the top-left position. X increases to the right and Y increases downwards. The unit is one pixel. @@ -48,7 +48,7 @@ paint engine to be able to draw on the device, i.e derive from QPaintEngine and reimplement its virtual functions. - \warning Qt requires that a QApplication object exists before + \warning Qt requires that a QGuiApplication object exists before any paint devices can be created. Paint devices access window system resources, and these resources are not initialized before an application object is created. @@ -208,9 +208,9 @@ \fn int QPaintDevice::colorCount() const Returns the number of different colors available for the paint - device. Since this value is an int, it will not be sufficient to - represent the number of colors on 32 bit displays, in this case - INT_MAX is returned instead. + device. If the number of colors available is too great to be + represented by the int data type, then INT_MAX will be returned + instead. */ /*!