.TH "QwtColorMap" 3 "Tue Nov 20 2012" "Version 5.2.3" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtColorMap \- .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBQwtAlphaColorMap\fP, and \fBQwtLinearColorMap\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBFormat\fP { \fBRGB\fP, \fBIndexed\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtColorMap\fP (\fBFormat\fP=QwtColorMap::RGB)" .br .ti -1c .RI "virtual \fB~QwtColorMap\fP ()" .br .ti -1c .RI "QColor \fBcolor\fP (const \fBQwtDoubleInterval\fP &, double value) const " .br .ti -1c .RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtDoubleInterval\fP &interval, double value) const =0" .br .ti -1c .RI "virtual QVector< QRgb > \fBcolorTable\fP (const \fBQwtDoubleInterval\fP &) const " .br .ti -1c .RI "virtual \fBQwtColorMap\fP * \fBcopy\fP () const =0" .br .ti -1c .RI "\fBFormat\fP \fBformat\fP () const " .br .ti -1c .RI "virtual QRgb \fBrgb\fP (const \fBQwtDoubleInterval\fP &interval, double value) const =0" .br .in -1c .SH "Detailed Description" .PP \fBQwtColorMap\fP is used to map values into colors\&. For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f\&.e in a spectrogram\&. .PP Each color map is optimized to return colors for only one of the following image formats: .PP .IP "\(bu" 2 QImage::Format_Indexed8 .br .IP "\(bu" 2 QImage::Format_ARGB32 .br .PP .PP \fBSee also:\fP .RS 4 \fBQwtPlotSpectrogram\fP, \fBQwtScaleWidget\fP .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtColorMap::Format\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 .SH "Member Function Documentation" .PP .SS "QColor QwtColorMap::color (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [inline]\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 "virtual unsigned char QwtColorMap::colorIndex (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [pure virtual]\fP" Map a value of a given interval into a color index .PP \fBParameters:\fP .RS 4 \fIinterval\fP Range for the values .br \fIvalue\fP Value .RE .PP \fBReturns:\fP .RS 4 color index, corresponding to value .RE .PP .PP Implemented in \fBQwtLinearColorMap\fP\&. .SS "QwtColorTable QwtColorMap::colorTable (const \fBQwtDoubleInterval\fP &interval) const\fC [virtual]\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::Format\fP QwtColorMap::format () const\fC [inline]\fP" \fBReturns:\fP .RS 4 Intended format of the color map .RE .PP \fBSee also:\fP .RS 4 \fBFormat\fP .RE .PP .SS "virtual QRgb QwtColorMap::rgb (const \fBQwtDoubleInterval\fP &interval, doublevalue) const\fC [pure virtual]\fP" Map a value of a given interval into a rgb value\&. .PP \fBParameters:\fP .RS 4 \fIinterval\fP Range for the values .br \fIvalue\fP Value .RE .PP \fBReturns:\fP .RS 4 rgb value, corresponding to value .RE .PP .PP Implemented in \fBQwtAlphaColorMap\fP, and \fBQwtLinearColorMap\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.