.TH "QwtLinearColorMap" 3 "Sun Jul 18 2021" "Version 6.2.0" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtLinearColorMap \- \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 \fBMode\fP { \fBFixedColors\fP, \fBScaledColors\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtLinearColorMap\fP (\fBQwtColorMap::Format\fP=\fBQwtColorMap::RGB\fP)" .br .ti -1c .RI "\fBQwtLinearColorMap\fP (\fBconst\fP QColor &from, \fBconst\fP QColor &to, \fBQwtColorMap::Format\fP=\fBQwtColorMap::RGB\fP)" .br .ti -1c .RI "virtual \fB~QwtLinearColorMap\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "void \fBsetMode\fP (\fBMode\fP)" .br .RI "Set the mode of the color map\&. " .ti -1c .RI "\fBMode\fP \fBmode\fP () \fBconst\fP" .br .ti -1c .RI "void \fBsetColorInterval\fP (\fBconst\fP QColor &\fBcolor1\fP, \fBconst\fP QColor &\fBcolor2\fP)" .br .ti -1c .RI "void \fBaddColorStop\fP (double value, \fBconst\fP QColor &)" .br .ti -1c .RI "\fBQVector\fP< double > \fBcolorStops\fP () \fBconst\fP" .br .ti -1c .RI "QColor \fBcolor1\fP () \fBconst\fP" .br .ti -1c .RI "QColor \fBcolor2\fP () \fBconst\fP" .br .ti -1c .RI "virtual QRgb \fBrgb\fP (\fBconst\fP \fBQwtInterval\fP &, double value) \fBconst\fP override" .br .ti -1c .RI "virtual uint \fBcolorIndex\fP (int numColors, \fBconst\fP \fBQwtInterval\fP &, double value) \fBconst\fP override" .br .RI "Map a value of a given interval into a color index\&. " .in -1c .SS "Additional Inherited Members" .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 according to \fBmode()\fP\&. .PP Definition at line 98 of file qwt_color_map\&.h\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtLinearColorMap::Mode\fP" Mode of color map .PP \fBSee also\fP .RS 4 \fBsetMode()\fP, \fBmode()\fP .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fIFixedColors \fP\fP Return the color from the next lower color stop\&. .TP \fB\fIScaledColors \fP\fP Interpolating the colors of the adjacent stops\&. .PP Definition at line 105 of file qwt_color_map\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "QwtLinearColorMap::QwtLinearColorMap (\fBQwtColorMap::Format\fP format = \fC\fBQwtColorMap::RGB\fP\fP)\fC [explicit]\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 .PP Definition at line 351 of file qwt_color_map\&.cpp\&. .SS "QwtLinearColorMap::QwtLinearColorMap (\fBconst\fP QColor & color1, \fBconst\fP QColor & color2, \fBQwtColorMap::Format\fP format = \fC\fBQwtColorMap::RGB\fP\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 for the color map .RE .PP .PP Definition at line 367 of file qwt_color_map\&.cpp\&. .SH "Member Function Documentation" .PP .SS "void QwtLinearColorMap::addColorStop (double value, \fBconst\fP 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 .PP Definition at line 433 of file qwt_color_map\&.cpp\&. .SS "QColor QwtLinearColorMap::color1 () const" .PP \fBReturns\fP .RS 4 the first color of the color range .RE .PP \fBSee also\fP .RS 4 \fBsetColorInterval()\fP .RE .PP .PP Definition at line 451 of file qwt_color_map\&.cpp\&. .SS "QColor QwtLinearColorMap::color2 () const" .PP \fBReturns\fP .RS 4 the second color of the color range .RE .PP \fBSee also\fP .RS 4 \fBsetColorInterval()\fP .RE .PP .PP Definition at line 460 of file qwt_color_map\&.cpp\&. .SS "uint QwtLinearColorMap::colorIndex (int numColors, \fBconst\fP \fBQwtInterval\fP & interval, double value) const\fC [override]\fP, \fC [virtual]\fP" .PP Map a value of a given interval into a color index\&. .PP \fBParameters\fP .RS 4 \fInumColors\fP Size of the color table .br \fIinterval\fP Range for all values .br \fIvalue\fP Value to map into a color index .RE .PP \fBReturns\fP .RS 4 Index, between 0 and 255 .RE .PP \fBNote\fP .RS 4 NaN values are mapped to 0 .RE .PP .PP Reimplemented from \fBQwtColorMap\fP\&. .PP Definition at line 494 of file qwt_color_map\&.cpp\&. .SS "\fBQVector\fP< double > QwtLinearColorMap::colorStops () const" .PP \fBReturns\fP .RS 4 Positions of color stops in increasing order .RE .PP .PP Definition at line 442 of file qwt_color_map\&.cpp\&. .SS "\fBQwtLinearColorMap::Mode\fP QwtLinearColorMap::mode () const" .PP \fBReturns\fP .RS 4 Mode of the color map .RE .PP \fBSee also\fP .RS 4 \fBsetMode()\fP .RE .PP .PP Definition at line 400 of file qwt_color_map\&.cpp\&. .SS "QRgb QwtLinearColorMap::rgb (\fBconst\fP \fBQwtInterval\fP & interval, double value) const\fC [override]\fP, \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 \fBReturns\fP .RS 4 RGB value for value .RE .PP .PP Implements \fBQwtColorMap\fP\&. .PP Definition at line 473 of file qwt_color_map\&.cpp\&. .SS "void QwtLinearColorMap::setColorInterval (\fBconst\fP QColor & color1, \fBconst\fP 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 .PP Definition at line 415 of file qwt_color_map\&.cpp\&. .SS "void QwtLinearColorMap::setMode (\fBMode\fP mode)" .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 .PP Definition at line 391 of file qwt_color_map\&.cpp\&. .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.