.TH "QwtColorMap" 3 "Fri Apr 15 2011" "Version 6.0.0" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtColorMap \- .PP \fBQwtColorMap\fP is used to map values into colors. .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 "\fBFormat\fP \fBformat\fP () const " .br .ti -1c .RI "virtual QRgb \fBrgb\fP (const \fBQwtInterval\fP &interval, double value) const =0" .br .ti -1c .RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtInterval\fP &interval, double value) const =0" .br .ti -1c .RI "QColor \fBcolor\fP (const \fBQwtInterval\fP &, double value) const " .br .ti -1c .RI "virtual QVector< QRgb > \fBcolorTable\fP (const \fBQwtInterval\fP &) const " .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"Format for color mapping .PP \fBSee also:\fP .RS 4 \fBrgb()\fP, \fBcolorIndex()\fP, \fBcolorTable()\fP .RE .PP .PP \fBEnumerator: \fP .in +1c .TP \fB\fIRGB \fP\fP The map is intended to map into QRgb values. .TP \fB\fIIndexed \fP\fP The map is intended to map into 8 bit values, that are indices into the color table. .SH "Constructor & Destructor Documentation" .PP .SS "QwtColorMap::QwtColorMap (\fBFormat\fPformat = \fCQwtColorMap::RGB\fP)" .PP Constructor. .SS "QwtColorMap::~QwtColorMap ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "QColor QwtColorMap::color (const \fBQwtInterval\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 \fBQwtInterval\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 \fBQwtInterval\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 \fBQwtInterval\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 \fBQwtLinearColorMap\fP, and \fBQwtAlphaColorMap\fP. .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.