1
.TH "QwtLinearColorMap" 3 "26 Feb 2007" "Version 5.0.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtColorMap\fP.
11
.SH "Detailed Description"
13
\fBQwtLinearColorMap\fP builds a color map from color stops.
15
A color stop is a color at a specific position. The valid range for the positions is [0.0, 1.0]. When mapping a value into a color it is translated into this interval. If \fBmode()\fP == FixedColors the color is calculated from the next lower color stop. If \fBmode()\fP == ScaledColors the color is calculated by interpolating the colors of the adjacent stops.
17
Definition at line 111 of file qwt_color_map.h.
22
.RI "enum \fBMode\fP { \fBFixedColors\fP, \fBScaledColors\fP }"
25
.SS "Public Member Functions"
29
.RI "\fBQwtLinearColorMap\fP (\fBQwtColorMap::Format\fP=QwtColorMap::RGB)"
32
.RI "\fBQwtLinearColorMap\fP (const QColor &from, const QColor &to, \fBQwtColorMap::Format\fP=QwtColorMap::RGB)"
35
.RI "\fBQwtLinearColorMap\fP (const \fBQwtLinearColorMap\fP &)"
38
.RI "virtual \fB~QwtLinearColorMap\fP ()"
41
.RI "\fBQwtLinearColorMap\fP & \fBoperator=\fP (const \fBQwtLinearColorMap\fP &)"
44
.RI "virtual \fBQwtColorMap\fP * \fBcopy\fP () const "
47
.RI "void \fBsetMode\fP (\fBMode\fP)"
50
.RI "\fBMode\fP \fBmode\fP () const "
53
.RI "void \fBsetColorInterval\fP (const QColor &color1, const QColor &color2)"
56
.RI "void \fBaddColorStop\fP (double value, const QColor &)"
59
.RI "QwtArray< double > \fBcolorStops\fP () const "
62
.RI "QColor \fBcolor1\fP () const "
65
.RI "QColor \fBcolor2\fP () const "
68
.RI "virtual QRgb \fBrgb\fP (const \fBQwtDoubleInterval\fP &, double value) const "
71
.RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtDoubleInterval\fP &, double value) const "
74
.SH "Member Enumeration Documentation"
76
.SS "enum \fBQwtLinearColorMap::Mode\fP"
82
\fBsetMode()\fP, \fBmode()\fP
87
Definition at line 118 of file qwt_color_map.h.
88
.SH "Constructor & Destructor Documentation"
90
.SS "QwtLinearColorMap::QwtLinearColorMap (\fBQwtColorMap::Format\fP format = \fCQwtColorMap::RGB\fP)"
92
Build a color map with two stops at 0.0 and 1.0. The color at 0.0 is Qt::blue, at 1.0 it is Qt::yellow.
96
\fIformat\fP Preferred format of the color map
101
Definition at line 211 of file qwt_color_map.cpp.
103
References setColorInterval().
105
Referenced by copy().
106
.SS "QwtLinearColorMap::QwtLinearColorMap (const QColor & color1, const QColor & color2, \fBQwtColorMap::Format\fP format = \fCQwtColorMap::RGB\fP)"
108
Build a color map with two stops at 0.0 and 1.0.
112
\fIcolor1\fP Color used for the minimum value of the value interval
114
\fIcolor2\fP Color used for the maximum value of the value interval
116
\fIformat\fP Preferred format of the coor map
121
Definition at line 235 of file qwt_color_map.cpp.
123
References setColorInterval().
124
.SS "QwtLinearColorMap::QwtLinearColorMap (const \fBQwtLinearColorMap\fP &)"
128
Definition at line 221 of file qwt_color_map.cpp.
129
.SS "QwtLinearColorMap::~QwtLinearColorMap ()\fC [virtual]\fP"
133
Definition at line 245 of file qwt_color_map.cpp.
134
.SH "Member Function Documentation"
136
.SS "void QwtLinearColorMap::addColorStop (double value, const QColor & color)"
140
The value has to be in the range [0.0, 1.0]. F.e. a stop at position 17.0 for a range [10.0,20.0] must be passed as: (17.0 - 10.0) / (20.0 - 10.0)
144
\fIvalue\fP Value between [0.0, 1.0]
146
\fIcolor\fP Color stop
151
Definition at line 319 of file qwt_color_map.cpp.
152
.SS "QColor QwtLinearColorMap::color1 () const"
156
the first color of the color range
161
\fBsetColorInterval()\fP
166
Definition at line 337 of file qwt_color_map.cpp.
167
.SS "QColor QwtLinearColorMap::color2 () const"
171
the second color of the color range
176
\fBsetColorInterval()\fP
181
Definition at line 346 of file qwt_color_map.cpp.
182
.SS "unsigned char QwtLinearColorMap::colorIndex (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [virtual]\fP"
184
Map a value of a given interval into a color index, between 0 and 255
188
\fIinterval\fP Range for all values
190
\fIvalue\fP Value to map into a color index
195
Implements \fBQwtColorMap\fP.
197
Definition at line 370 of file qwt_color_map.cpp.
199
References QwtDoubleInterval::isValid(), QwtDoubleInterval::maxValue(), QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().
200
.SS "QwtArray< double > QwtLinearColorMap::colorStops () const"
202
Return all positions of color stops in increasing order
204
Definition at line 328 of file qwt_color_map.cpp.
205
.SS "\fBQwtColorMap\fP * QwtLinearColorMap::copy () const\fC [virtual]\fP"
209
Implements \fBQwtColorMap\fP.
211
Definition at line 260 of file qwt_color_map.cpp.
213
References QwtLinearColorMap().
214
.SS "\fBQwtLinearColorMap::Mode\fP QwtLinearColorMap::mode () const"
218
Mode of the color map
228
Definition at line 286 of file qwt_color_map.cpp.
229
.SS "\fBQwtLinearColorMap\fP & QwtLinearColorMap::operator= (const \fBQwtLinearColorMap\fP &)"
233
Definition at line 251 of file qwt_color_map.cpp.
236
.SS "QRgb QwtLinearColorMap::rgb (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [virtual]\fP"
238
Map a value of a given interval into a rgb value
242
\fIinterval\fP Range for all values
244
\fIvalue\fP Value to map into a rgb value
249
Implements \fBQwtColorMap\fP.
251
Definition at line 357 of file qwt_color_map.cpp.
253
References QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().
254
.SS "void QwtLinearColorMap::setColorInterval (const QColor & color1, const QColor & color2)"
258
Add stops at 0.0 and 1.0.
262
\fIcolor1\fP Color used for the minimum value of the value interval
264
\fIcolor2\fP Color used for the maximum value of the value interval
269
\fBcolor1()\fP, \fBcolor2()\fP
274
Definition at line 301 of file qwt_color_map.cpp.
276
Referenced by QwtLinearColorMap().
277
.SS "void QwtLinearColorMap::setMode (\fBMode\fP mode)"
279
Set the mode of the color map.
281
FixedColors means the color is calculated from the next lower color stop. ScaledColors means the color is calculated by interpolating the colors of the adjacent stops.
290
Definition at line 277 of file qwt_color_map.cpp.
294
Generated automatically by Doxygen for Qwt User's Guide from the source code.