1
.TH "QwtLinearColorMap" 3 "22 Mar 2009" "Version 5.1.2" "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, \fBRotateNeedle\fP, \fBRotateScale\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 "\fBQwtLinearColorMap\fP & QwtLinearColorMap::operator= (const \fBQwtLinearColorMap\fP &)"
140
Definition at line 251 of file qwt_color_map.cpp.
143
.SS "\fBQwtColorMap\fP * QwtLinearColorMap::copy () const\fC [virtual]\fP"
147
Implements \fBQwtColorMap\fP.
149
Definition at line 260 of file qwt_color_map.cpp.
151
References QwtLinearColorMap().
152
.SS "void QwtLinearColorMap::setMode (\fBMode\fP mode)"
154
Set the mode of the color map.
156
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.
165
Definition at line 277 of file qwt_color_map.cpp.
166
.SS "\fBQwtLinearColorMap::Mode\fP QwtLinearColorMap::mode () const"
170
Mode of the color map
180
Definition at line 286 of file qwt_color_map.cpp.
181
.SS "void QwtLinearColorMap::setColorInterval (const QColor & color1, const QColor & color2)"
185
Add stops at 0.0 and 1.0.
189
\fIcolor1\fP Color used for the minimum value of the value interval
191
\fIcolor2\fP Color used for the maximum value of the value interval
196
\fBcolor1()\fP, \fBcolor2()\fP
201
Definition at line 301 of file qwt_color_map.cpp.
203
Referenced by QwtLinearColorMap().
204
.SS "void QwtLinearColorMap::addColorStop (double value, const QColor & color)"
208
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)
212
\fIvalue\fP Value between [0.0, 1.0]
214
\fIcolor\fP Color stop
219
Definition at line 319 of file qwt_color_map.cpp.
220
.SS "QwtArray< double > QwtLinearColorMap::colorStops () const"
222
Return all positions of color stops in increasing order
224
Definition at line 328 of file qwt_color_map.cpp.
225
.SS "QColor QwtLinearColorMap::color1 () const"
229
the first color of the color range
234
\fBsetColorInterval()\fP
239
Definition at line 337 of file qwt_color_map.cpp.
240
.SS "QColor QwtLinearColorMap::color2 () const"
244
the second color of the color range
249
\fBsetColorInterval()\fP
254
Definition at line 346 of file qwt_color_map.cpp.
255
.SS "QRgb QwtLinearColorMap::rgb (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [virtual]\fP"
257
Map a value of a given interval into a rgb value
261
\fIinterval\fP Range for all values
263
\fIvalue\fP Value to map into a rgb value
268
Implements \fBQwtColorMap\fP.
270
Definition at line 357 of file qwt_color_map.cpp.
272
References QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().
273
.SS "unsigned char QwtLinearColorMap::colorIndex (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [virtual]\fP"
275
Map a value of a given interval into a color index, between 0 and 255
279
\fIinterval\fP Range for all values
281
\fIvalue\fP Value to map into a color index
286
Implements \fBQwtColorMap\fP.
288
Definition at line 375 of file qwt_color_map.cpp.
290
References QwtDoubleInterval::maxValue(), QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().
294
Generated automatically by Doxygen for Qwt User's Guide from the source code.