1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Qwt User's Guide: QwtColorMap Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.0 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
12
<li><a href="files.html"><span>Files</span></a></li>
13
<li><a href="pages.html"><span>Related Pages</span></a></li>
17
<li><a href="classes.html"><span>Alphabetical List</span></a></li>
18
<li><a href="annotated.html"><span>Class List</span></a></li>
19
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
20
<li><a href="functions.html"><span>Class Members</span></a></li>
22
<h1>QwtColorMap Class Reference</h1><!-- doxytag: class="QwtColorMap" -->Inheritance diagram for QwtColorMap:<p><center><img src="class_qwt_color_map__inherit__graph.png" border="0" usemap="#_qwt_color_map__inherit__map" alt="Inheritance graph"></center>
23
<map name="_qwt_color_map__inherit__map">
24
<area href="class_qwt_alpha_color_map.html" shape="rect" coords="7,83,145,107" alt="">
25
<area href="class_qwt_linear_color_map.html" shape="rect" coords="169,83,311,107" alt="">
27
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_color_map-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
28
<a class="el" href="class_qwt_color_map.html">QwtColorMap</a> is used to map values into colors.
30
For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram.<p>
31
Each color map is optimized to return colors for only one of the following image formats:<p>
33
<li>QImage::Format_Indexed8<br>
34
</li><li>QImage::Format_ARGB32<br>
37
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_plot_spectrogram.html">QwtPlotSpectrogram</a>, <a class="el" href="class_qwt_scale_widget.html">QwtScaleWidget</a> </dd></dl>
42
Definition at line <a class="el" href="qwt__color__map_8h-source.html#l00044">44</a> of file <a class="el" href="qwt__color__map_8h-source.html">qwt_color_map.h</a>.<table border="0" cellpadding="0" cellspacing="0">
44
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a> { <br>
46
<b>RGB</b>,
48
<b>Indexed</b>
52
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
53
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#2ab0a6041ea6d37c0609ca2e3bd976ca">QwtColorMap</a> (<a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a>=QwtColorMap::RGB)</td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#f20e4ffdb3c5d34f5a6dc301bcbb9f7e">~QwtColorMap</a> ()</td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#6a7defcce42e779c1596e277c78986c2">format</a> () const</td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_qwt_color_map.html">QwtColorMap</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#c21886c4be363557902d24d1224c2a86">copy</a> () const=0</td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QRgb </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#6f8cae09331c9c6dbc11d7cc023e6665">rgb</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &interval, double value) const=0</td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#87086a55e99e56bd7f42677826801815">colorIndex</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &interval, double value) const=0</td></tr>
65
<tr><td class="memItemLeft" nowrap align="right" valign="top">QColor </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#4103504ea12a5b2a8f9242adceb8ef73">color</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &, double value) const</td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QVector< QRgb > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#47c081462d0d8e1bda021818eb61d73f">colorTable</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &) const</td></tr>
70
<hr><h2>Member Enumeration Documentation</h2>
71
<a class="anchor" name="9e5570790910fa3894887bca7dc5a670"></a><!-- doxytag: member="QwtColorMap::Format" ref="9e5570790910fa3894887bca7dc5a670" args="" -->
73
<div class="memproto">
74
<table class="memname">
76
<td class="memname">enum <a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">QwtColorMap::Format</a> </td>
85
The map is intended to map into QRgb values.</li><li>Indexed<br>
86
The map is intended to map into 8 bit values, that are indices into the color table.</li></ul>
88
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_color_map.html#6f8cae09331c9c6dbc11d7cc023e6665">rgb()</a>, <a class="el" href="class_qwt_color_map.html#87086a55e99e56bd7f42677826801815">colorIndex()</a>, <a class="el" href="class_qwt_color_map.html#47c081462d0d8e1bda021818eb61d73f">colorTable()</a> </dd></dl>
91
Definition at line <a class="el" href="qwt__color__map_8h-source.html#l00057">57</a> of file <a class="el" href="qwt__color__map_8h-source.html">qwt_color_map.h</a>.
94
<hr><h2>Constructor & Destructor Documentation</h2>
95
<a class="anchor" name="2ab0a6041ea6d37c0609ca2e3bd976ca"></a><!-- doxytag: member="QwtColorMap::QwtColorMap" ref="2ab0a6041ea6d37c0609ca2e3bd976ca" args="(Format=QwtColorMap::RGB)" -->
97
<div class="memproto">
98
<table class="memname">
100
<td class="memname">QwtColorMap::QwtColorMap </td>
102
<td class="paramtype"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a> </td>
103
<td class="paramname"> = <code>QwtColorMap::RGB</code> </td>
104
<td> ) </td>
105
<td width="100%"></td>
116
Definition at line <a class="el" href="qwt__color__map_8cpp-source.html#l00164">164</a> of file <a class="el" href="qwt__color__map_8cpp-source.html">qwt_color_map.cpp</a>.
119
<a class="anchor" name="f20e4ffdb3c5d34f5a6dc301bcbb9f7e"></a><!-- doxytag: member="QwtColorMap::~QwtColorMap" ref="f20e4ffdb3c5d34f5a6dc301bcbb9f7e" args="()" -->
120
<div class="memitem">
121
<div class="memproto">
122
<table class="memname">
124
<td class="memname">QwtColorMap::~QwtColorMap </td>
126
<td class="paramname"> </td>
127
<td> ) </td>
128
<td width="100%"><code> [virtual]</code></td>
139
Definition at line <a class="el" href="qwt__color__map_8cpp-source.html#l00170">170</a> of file <a class="el" href="qwt__color__map_8cpp-source.html">qwt_color_map.cpp</a>.
142
<hr><h2>Member Function Documentation</h2>
143
<a class="anchor" name="6a7defcce42e779c1596e277c78986c2"></a><!-- doxytag: member="QwtColorMap::format" ref="6a7defcce42e779c1596e277c78986c2" args="() const" -->
144
<div class="memitem">
145
<div class="memproto">
146
<table class="memname">
148
<td class="memname"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">QwtColorMap::Format</a> QwtColorMap::format </td>
150
<td class="paramname"> </td>
151
<td> ) </td>
152
<td width="100%"> const<code> [inline]</code></td>
159
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Intended format of the color map </dd></dl>
160
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a> </dd></dl>
163
Definition at line <a class="el" href="qwt__color__map_8h-source.html#l00216">216</a> of file <a class="el" href="qwt__color__map_8h-source.html">qwt_color_map.h</a>.
165
Referenced by <a class="el" href="qwt__painter_8cpp-source.html#l00653">QwtPainter::drawColorBar()</a>.
168
<a class="anchor" name="c21886c4be363557902d24d1224c2a86"></a><!-- doxytag: member="QwtColorMap::copy" ref="c21886c4be363557902d24d1224c2a86" args="() const=0" -->
169
<div class="memitem">
170
<div class="memproto">
171
<table class="memname">
173
<td class="memname">virtual <a class="el" href="class_qwt_color_map.html">QwtColorMap</a>* QwtColorMap::copy </td>
175
<td class="paramname"> </td>
176
<td> ) </td>
177
<td width="100%"> const<code> [pure virtual]</code></td>
188
Implemented in <a class="el" href="class_qwt_linear_color_map.html#9e6effbfb292375a65dddcd654da6006">QwtLinearColorMap</a>, and <a class="el" href="class_qwt_alpha_color_map.html#408726d67878352f14c6125d46465ef5">QwtAlphaColorMap</a>.
190
Referenced by <a class="el" href="qwt__scale__widget_8cpp-source.html#l00892">QwtScaleWidget::setColorMap()</a>, and <a class="el" href="qwt__plot__spectrogram_8cpp-source.html#l00202">QwtPlotSpectrogram::setColorMap()</a>.
193
<a class="anchor" name="6f8cae09331c9c6dbc11d7cc023e6665"></a><!-- doxytag: member="QwtColorMap::rgb" ref="6f8cae09331c9c6dbc11d7cc023e6665" args="(const QwtDoubleInterval &interval, double value) const=0" -->
194
<div class="memitem">
195
<div class="memproto">
196
<table class="memname">
198
<td class="memname">virtual QRgb QwtColorMap::rgb </td>
200
<td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> & </td>
201
<td class="paramname"> <em>interval</em>, </td>
204
<td class="paramkey"></td>
206
<td class="paramtype">double </td>
207
<td class="paramname"> <em>value</em></td><td> </td>
212
<td></td><td></td><td width="100%"> const<code> [pure virtual]</code></td>
219
Map a value of a given interval into a rgb value. <dl compact><dt><b>Parameters:</b></dt><dd>
220
<table border="0" cellspacing="2" cellpadding="0">
221
<tr><td valign="top"></td><td valign="top"><em>interval</em> </td><td>Range for the values </td></tr>
222
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Value </td></tr>
225
<dl class="return" compact><dt><b>Returns:</b></dt><dd>rgb value, corresponding to value </dd></dl>
228
Implemented in <a class="el" href="class_qwt_linear_color_map.html#9206d7f75ed0d038d726d2b086e58ed8">QwtLinearColorMap</a>, and <a class="el" href="class_qwt_alpha_color_map.html#5cc7d28905a48a59a7d1f99196be1ce8">QwtAlphaColorMap</a>.
230
Referenced by <a class="el" href="qwt__color__map_8h-source.html#l00198">color()</a>, <a class="el" href="qwt__color__map_8cpp-source.html#l00183">colorTable()</a>, and <a class="el" href="qwt__painter_8cpp-source.html#l00653">QwtPainter::drawColorBar()</a>.
233
<a class="anchor" name="87086a55e99e56bd7f42677826801815"></a><!-- doxytag: member="QwtColorMap::colorIndex" ref="87086a55e99e56bd7f42677826801815" args="(const QwtDoubleInterval &interval, double value) const=0" -->
234
<div class="memitem">
235
<div class="memproto">
236
<table class="memname">
238
<td class="memname">virtual unsigned char QwtColorMap::colorIndex </td>
240
<td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> & </td>
241
<td class="paramname"> <em>interval</em>, </td>
244
<td class="paramkey"></td>
246
<td class="paramtype">double </td>
247
<td class="paramname"> <em>value</em></td><td> </td>
252
<td></td><td></td><td width="100%"> const<code> [pure virtual]</code></td>
259
Map a value of a given interval into a color index <dl compact><dt><b>Parameters:</b></dt><dd>
260
<table border="0" cellspacing="2" cellpadding="0">
261
<tr><td valign="top"></td><td valign="top"><em>interval</em> </td><td>Range for the values </td></tr>
262
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Value </td></tr>
265
<dl class="return" compact><dt><b>Returns:</b></dt><dd>color index, corresponding to value </dd></dl>
268
Implemented in <a class="el" href="class_qwt_linear_color_map.html#70ac8a43518c7f2078ddfbf53e947294">QwtLinearColorMap</a>.
270
Referenced by <a class="el" href="qwt__color__map_8h-source.html#l00198">color()</a>, and <a class="el" href="qwt__painter_8cpp-source.html#l00653">QwtPainter::drawColorBar()</a>.
273
<a class="anchor" name="4103504ea12a5b2a8f9242adceb8ef73"></a><!-- doxytag: member="QwtColorMap::color" ref="4103504ea12a5b2a8f9242adceb8ef73" args="(const QwtDoubleInterval &, double value) const" -->
274
<div class="memitem">
275
<div class="memproto">
276
<table class="memname">
278
<td class="memname">QColor QwtColorMap::color </td>
280
<td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> & </td>
281
<td class="paramname"> <em>interval</em>, </td>
284
<td class="paramkey"></td>
286
<td class="paramtype">double </td>
287
<td class="paramname"> <em>value</em></td><td> </td>
292
<td></td><td></td><td width="100%"> const<code> [inline]</code></td>
299
Map a value into a color<p>
300
<dl compact><dt><b>Parameters:</b></dt><dd>
301
<table border="0" cellspacing="2" cellpadding="0">
302
<tr><td valign="top"></td><td valign="top"><em>interval</em> </td><td>Valid interval for values </td></tr>
303
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Value</td></tr>
306
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Color corresponding to value</dd></dl>
307
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>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 <a class="el" href="class_qwt_color_map.html#87086a55e99e56bd7f42677826801815">colorIndex()</a>. </dd></dl>
310
Definition at line <a class="el" href="qwt__color__map_8h-source.html#l00198">198</a> of file <a class="el" href="qwt__color__map_8h-source.html">qwt_color_map.h</a>.
312
References <a class="el" href="class_qwt_color_map.html#87086a55e99e56bd7f42677826801815">colorIndex()</a>, <a class="el" href="qwt__color__map_8cpp-source.html#l00183">colorTable()</a>, and <a class="el" href="class_qwt_color_map.html#6f8cae09331c9c6dbc11d7cc023e6665">rgb()</a>.
315
<a class="anchor" name="47c081462d0d8e1bda021818eb61d73f"></a><!-- doxytag: member="QwtColorMap::colorTable" ref="47c081462d0d8e1bda021818eb61d73f" args="(const QwtDoubleInterval &) const" -->
316
<div class="memitem">
317
<div class="memproto">
318
<table class="memname">
320
<td class="memname">QwtColorTable QwtColorMap::colorTable </td>
322
<td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> & </td>
323
<td class="paramname"> <em>interval</em> </td>
324
<td> ) </td>
325
<td width="100%"> const<code> [virtual]</code></td>
332
Build and return a color map of 256 colors<p>
333
The color table is needed for rendering indexed images in combination with using <a class="el" href="class_qwt_color_map.html#87086a55e99e56bd7f42677826801815">colorIndex()</a>.<p>
334
<dl compact><dt><b>Parameters:</b></dt><dd>
335
<table border="0" cellspacing="2" cellpadding="0">
336
<tr><td valign="top"></td><td valign="top"><em>interval</em> </td><td>Range for the values </td></tr>
339
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A color table, that can be used for a QImage </dd></dl>
342
Definition at line <a class="el" href="qwt__color__map_8cpp-source.html#l00183">183</a> of file <a class="el" href="qwt__color__map_8cpp-source.html">qwt_color_map.cpp</a>.
344
References <a class="el" href="qwt__double__interval_8h-source.html#l00200">QwtDoubleInterval::isValid()</a>, <a class="el" href="qwt__double__interval_8h-source.html#l00128">QwtDoubleInterval::minValue()</a>, <a class="el" href="class_qwt_color_map.html#6f8cae09331c9c6dbc11d7cc023e6665">rgb()</a>, and <a class="el" href="qwt__double__interval_8h-source.html#l00146">QwtDoubleInterval::width()</a>.
346
Referenced by <a class="el" href="qwt__color__map_8h-source.html#l00198">color()</a>, and <a class="el" href="qwt__painter_8cpp-source.html#l00653">QwtPainter::drawColorBar()</a>.
349
<hr size="1"><address style="align: right;"><small>Generated on Sat May 24 18:47:51 2008 for Qwt User's Guide by
350
<a href="http://www.doxygen.org/index.html">
351
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>