.TH "QwtLinearColorMap" 3 "Mon Aug 1 2011" "Version 5.2.2" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtLinearColorMap \- .PP \fBQwtLinearColorMap\fP builds a color map from color stops. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBQwtColorMap\fP. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBFormat\fP { \fBRGB\fP, \fBIndexed\fP }" .br .ti -1c .RI "enum \fBMode\fP { \fBFixedColors\fP, \fBScaledColors\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "void \fBaddColorStop\fP (double value, const QColor &)" .br .ti -1c .RI "QColor \fBcolor\fP (const \fBQwtDoubleInterval\fP &, double value) const " .br .ti -1c .RI "QColor \fBcolor1\fP () const " .br .ti -1c .RI "QColor \fBcolor2\fP () const " .br .ti -1c .RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtDoubleInterval\fP &, double value) const " .br .ti -1c .RI "QwtArray< double > \fBcolorStops\fP () const " .br .ti -1c .RI "virtual QVector< QRgb > \fBcolorTable\fP (const \fBQwtDoubleInterval\fP &) const " .br .ti -1c .RI "virtual \fBQwtColorMap\fP * \fBcopy\fP () const " .br .ti -1c .RI "\fBFormat\fP \fBformat\fP () const " .br .ti -1c .RI "\fBMode\fP \fBmode\fP () const " .br .ti -1c .RI "\fBQwtLinearColorMap\fP & \fBoperator=\fP (const \fBQwtLinearColorMap\fP &)" .br .ti -1c .RI "\fBQwtLinearColorMap\fP (const QColor &from, const QColor &to, \fBQwtColorMap::Format\fP=QwtColorMap::RGB)" .br .ti -1c .RI "\fBQwtLinearColorMap\fP (\fBQwtColorMap::Format\fP=QwtColorMap::RGB)" .br .ti -1c .RI "\fBQwtLinearColorMap\fP (const \fBQwtLinearColorMap\fP &)" .br .ti -1c .RI "virtual QRgb \fBrgb\fP (const \fBQwtDoubleInterval\fP &, double value) const " .br .ti -1c .RI "void \fBsetColorInterval\fP (const QColor &color1, const QColor &color2)" .br .ti -1c .RI "void \fBsetMode\fP (\fBMode\fP)" .br .ti -1c .RI "virtual \fB~QwtLinearColorMap\fP ()" .br .in -1c .SH "Detailed Description" .PP \fBQwtLinearColorMap\fP builds a color map from color stops. 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. .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtColorMap::Format\fP\fC [inherited]\fP".IP "\(bu" 2 RGB .br The map is intended to map into QRgb values. .IP "\(bu" 2 Indexed .br The map is intended to map into 8 bit values, that are indices into the color table. .PP .PP \fBSee also:\fP .RS 4 \fBrgb()\fP, \fBcolorIndex()\fP, \fBcolorTable()\fP .RE .PP .SS "enum \fBQwtLinearColorMap::Mode\fP"Mode of color map .PP \fBSee also:\fP .RS 4 \fBsetMode()\fP, \fBmode()\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "QwtLinearColorMap::QwtLinearColorMap (\fBQwtColorMap::Format\fPformat = \fCQwtColorMap::RGB\fP)"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. .PP \fBParameters:\fP .RS 4 \fIformat\fP Preferred format of the color map .RE .PP .SS "QwtLinearColorMap::QwtLinearColorMap (const QColor &color1, const QColor &color2, \fBQwtColorMap::Format\fPformat = \fCQwtColorMap::RGB\fP)"Build a color map with two stops at 0.0 and 1.0. .PP \fBParameters:\fP .RS 4 \fIcolor1\fP Color used for the minimum value of the value interval .br \fIcolor2\fP Color used for the maximum value of the value interval .br \fIformat\fP Preferred format of the coor map .RE .PP .SS "QwtLinearColorMap::QwtLinearColorMap (const \fBQwtLinearColorMap\fP &other)" .PP Copy constructor. .SS "QwtLinearColorMap::~QwtLinearColorMap ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "void QwtLinearColorMap::addColorStop (doublevalue, const QColor &color)"Add a color stop .PP 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) .PP \fBParameters:\fP .RS 4 \fIvalue\fP Value between [0.0, 1.0] .br \fIcolor\fP Color stop .RE .PP .SS "QColor QwtColorMap::color (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [inline, inherited]\fP"Map a value into a color .PP \fBParameters:\fP .RS 4 \fIinterval\fP Valid interval for values .br \fIvalue\fP Value .RE .PP \fBReturns:\fP .RS 4 Color corresponding to value .RE .PP \fBWarning:\fP .RS 4 This method is slow for Indexed color maps. If it is necessary to map many values, its better to get the color table once and find the color using \fBcolorIndex()\fP. .RE .PP .SS "QColor QwtLinearColorMap::color1 () const"\fBReturns:\fP .RS 4 the first color of the color range .RE .PP \fBSee also:\fP .RS 4 \fBsetColorInterval()\fP .RE .PP .SS "QColor QwtLinearColorMap::color2 () const"\fBReturns:\fP .RS 4 the second color of the color range .RE .PP \fBSee also:\fP .RS 4 \fBsetColorInterval()\fP .RE .PP .SS "unsigned char QwtLinearColorMap::colorIndex (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [virtual]\fP"Map a value of a given interval into a color index, between 0 and 255 .PP \fBParameters:\fP .RS 4 \fIinterval\fP Range for all values .br \fIvalue\fP Value to map into a color index .RE .PP .PP Implements \fBQwtColorMap\fP. .SS "QwtArray< double > QwtLinearColorMap::colorStops () const"Return all positions of color stops in increasing order .SS "QwtColorTable QwtColorMap::colorTable (const \fBQwtDoubleInterval\fP &interval) const\fC [virtual, inherited]\fP"Build and return a color map of 256 colors .PP The color table is needed for rendering indexed images in combination with using \fBcolorIndex()\fP. .PP \fBParameters:\fP .RS 4 \fIinterval\fP Range for the values .RE .PP \fBReturns:\fP .RS 4 A color table, that can be used for a QImage .RE .PP .SS "\fBQwtColorMap\fP * QwtLinearColorMap::copy () const\fC [virtual]\fP" .PP Clone the color map. .PP Implements \fBQwtColorMap\fP. .SS "\fBQwtColorMap::Format\fP QwtColorMap::format () const\fC [inline, inherited]\fP"\fBReturns:\fP .RS 4 Intended format of the color map .RE .PP \fBSee also:\fP .RS 4 \fBFormat\fP .RE .PP .SS "\fBQwtLinearColorMap::Mode\fP QwtLinearColorMap::mode () const"\fBReturns:\fP .RS 4 Mode of the color map .RE .PP \fBSee also:\fP .RS 4 \fBsetMode()\fP .RE .PP .SS "\fBQwtLinearColorMap\fP & QwtLinearColorMap::operator= (const \fBQwtLinearColorMap\fP &other)" .PP Assignment operator. .SS "QRgb QwtLinearColorMap::rgb (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [virtual]\fP"Map a value of a given interval into a rgb value .PP \fBParameters:\fP .RS 4 \fIinterval\fP Range for all values .br \fIvalue\fP Value to map into a rgb value .RE .PP .PP Implements \fBQwtColorMap\fP. .SS "void QwtLinearColorMap::setColorInterval (const QColor &color1, const QColor &color2)"Set the color range .PP Add stops at 0.0 and 1.0. .PP \fBParameters:\fP .RS 4 \fIcolor1\fP Color used for the minimum value of the value interval .br \fIcolor2\fP Color used for the maximum value of the value interval .RE .PP \fBSee also:\fP .RS 4 \fBcolor1()\fP, \fBcolor2()\fP .RE .PP .SS "void QwtLinearColorMap::setMode (\fBMode\fPmode)" .PP Set the mode of the color map. 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. .PP \fBSee also:\fP .RS 4 \fBmode()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.