summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-10-09 16:45:44 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-10-09 16:57:41 (GMT)
commit7566a1f15ea32504c10d9467fb69a6399a06c325 (patch)
treec14591fa1e662f1d61233c1af580b4db6b7cab84 /src/gui
parentdb77c5b9c74dc022fc2b37fae73ddbbe89e89c07 (diff)
downloadQt-7566a1f15ea32504c10d9467fb69a6399a06c325.zip
Qt-7566a1f15ea32504c10d9467fb69a6399a06c325.tar.gz
Qt-7566a1f15ea32504c10d9467fb69a6399a06c325.tar.bz2
Doc: Created a snippet to generate the global colors image.
Reviewed-by: Trust Me
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qcolor.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index d9b824b..4da993b 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -176,22 +176,25 @@ QT_BEGIN_NAMESPACE
\section1 Predefined Colors
- There are 20 predefined QColors: Qt::white, Qt::black,
- Qt::red, Qt::darkRed, Qt::green, Qt::darkGreen, Qt::blue,
- Qt::darkBlue, Qt::cyan, Qt::darkCyan, Qt::magenta,
- Qt::darkMagenta, Qt::yellow, Qt::darkYellow, Qt::gray,
- Qt::darkGray, Qt::lightGray, Qt::color0, Qt::color1, and
- Qt::transparent.
+ There are 20 predefined QColors described by the Qt::GlobalColor enum,
+ including black, white, primary and secondary colors, darker versions
+ of these colors and three shades of gray. QColor also recognizes a
+ variety of color names; the static colorNames() function returns a
+ QStringList color names that QColor knows about.
\img qt-colors.png Qt Colors
- QColor provides the static colorNames() function which returns a
- QStringList containing the color names Qt knows about.
+ Additionally, the Qt::color0, Qt::color1 and Qt::transparent colors
+ are used for special purposes.
- The colors Qt::color0 (zero pixel value) and Qt::color1 (non-zero
- pixel value) are special colors for drawing in QBitmaps. Painting with
- Qt::color0 sets the bitmap bits to 0 (transparent, i.e. background), and
- painting with Qt::color1 sets the bits to 1 (opaque, i.e. foreground).
+ Qt::color0 (zero pixel value) and Qt::color1 (non-zero pixel value)
+ are special colors for drawing in QBitmaps. Painting with Qt::color0
+ sets the bitmap bits to 0 (transparent; i.e., background), and painting
+ with Qt::color1 sets the bits to 1 (opaque; i.e., foreground).
+
+ Qt::transparent is used to indicate a transparent pixel. When painting
+ with this value, a pixel value will be used that is appropriate for the
+ underlying pixel format in use.
\section1 The HSV Color Model