summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-06 09:36:38 (GMT)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-06 15:10:02 (GMT)
commit8d4f3c94411d21f0b7d851b56f951ad54d64340f (patch)
treefc84e1c710012c723e6b1806d1439976c00533e7 /src/gui/embedded
parente53c26b52c890f242491e0dfed4201313d98f720 (diff)
downloadQt-8d4f3c94411d21f0b7d851b56f951ad54d64340f.zip
Qt-8d4f3c94411d21f0b7d851b56f951ad54d64340f.tar.gz
Qt-8d4f3c94411d21f0b7d851b56f951ad54d64340f.tar.bz2
API review: Rename numCols() -> colorCount()
The name numCols is ambiguous, as sometimes it's refering to the number of columns, and sometimes the number of colors. It also does not match the typical Qt naming convention *Count(). Reviewed-by: Tom Cooksey Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/gui/embedded')
-rw-r--r--src/gui/embedded/qscreen_qws.cpp14
-rw-r--r--src/gui/embedded/qscreen_qws.h3
2 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 911a77e..0dbfd05 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -1385,7 +1385,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
QScreen provides several functions to retrieve information about
the color palette: The clut() function returns a pointer to the
- color lookup table (i.e. its color palette). Use the numCols()
+ color lookup table (i.e. its color palette). Use the colorCount()
function to determine the number of entries in this table, and the
alloc() function to retrieve the palette index of the color that
is the closest match to a given RGB value.
@@ -1998,12 +1998,20 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
i.e. in modes where only the palette indexes (and not the actual
color values) are stored in memory.
- \sa alloc(), depth(), numCols()
+ \sa alloc(), depth(), colorCount()
*/
/*!
+ \obsolete
\fn int QScreen::numCols()
+ \sa colorCount()
+*/
+
+/*!
+ \since 4.6
+ \fn int QScreen::colorCount()
+
Returns the number of entries in the screen's color lookup table
(i.e. its color palette). A pointer to the color table can be
retrieved using the clut() function.
@@ -2103,7 +2111,7 @@ void QScreen::setPixelFormat(QImage::Format format)
i.e. in modes where only the palette indexes (and not the actual
color values) are stored in memory.
- \sa clut(), numCols()
+ \sa clut(), colorCount()
*/
int QScreen::alloc(unsigned int r,unsigned int g,unsigned int b)
diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h
index d20d709..b3246f9 100644
--- a/src/gui/embedded/qscreen_qws.h
+++ b/src/gui/embedded/qscreen_qws.h
@@ -243,7 +243,8 @@ public:
int totalSize() const { return mapsize; }
QRgb * clut() { return screenclut; }
- int numCols() { return screencols; }
+ QT_DEPRECATED int numCols() { return screencols; }
+ int colorCount() { return screencols; }
virtual QSize mapToDevice(const QSize &) const;
virtual QSize mapFromDevice(const QSize &) const;