class_qwt_color_map.html

来自「QWT5.01用于Qt开发的二维图形库程序」· HTML 代码 · 共 426 行 · 第 1/2 页

HTML
426
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Qwt User&apos;s Guide: QwtColorMap Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.6 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li id="current"><a href="classes.html"><span>Classes</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><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><map name="_qwt_color_map__inherit__map"><area href="class_qwt_alpha_color_map.html" shape="rect" coords="7,83,143,107" alt=""><area href="class_qwt_linear_color_map.html" shape="rect" coords="167,83,305,107" alt=""></map><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><a class="el" href="class_qwt_color_map.html">QwtColorMap</a> is used to map values into colors. <p>For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram.<p>Each color map is optimized to return colors for only one of the following image formats:<p><ul><li>QImage::Format_Indexed8<br></li><li>QImage::Format_ARGB32<br></li></ul><p><dl 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><p><p>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"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Types</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a> { <br>&nbsp;&nbsp;<b>RGB</b>, <br>&nbsp;&nbsp;<b>Indexed</b><br> }</td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</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><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#f20e4ffdb3c5d34f5a6dc301bcbb9f7e">~QwtColorMap</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#436802833ae1d4694f376655bc3d75be">format</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_qwt_color_map.html">QwtColorMap</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#97c746ff74f5fe96867dde5bde3e23f5">copy</a> () const =0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QRgb&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#be172f151f0a8c24f4a7e0908b0b983f">rgb</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;interval, double value) const =0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#3b5be7f953330d308eef24351dfa789b">colorIndex</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;interval, double value) const =0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">QColor&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#f5f3c1df460cee0ec48005e7f161423d">color</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;, double value) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QVector&lt; QRgb &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#082823238104fbc6cb146e7aafa571f6">colorTable</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;) const </td></tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="9e5570790910fa3894887bca7dc5a670"></a><!-- doxytag: member="QwtColorMap::Format" ref="9e5570790910fa3894887bca7dc5a670" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">enum <a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">QwtColorMap::Format</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><ul><li>RGB<br> The map is intended to map into QRgb values.</li><li>Indexed<br> The map is intended to map into 8 bit values, that are indices into the color table.</li></ul><p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_color_map.html#be172f151f0a8c24f4a7e0908b0b983f">rgb()</a>, <a class="el" href="class_qwt_color_map.html#3b5be7f953330d308eef24351dfa789b">colorIndex()</a>, <a class="el" href="class_qwt_color_map.html#082823238104fbc6cb146e7aafa571f6">colorTable()</a> </dd></dl><p>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>.    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="2ab0a6041ea6d37c0609ca2e3bd976ca"></a><!-- doxytag: member="QwtColorMap::QwtColorMap" ref="2ab0a6041ea6d37c0609ca2e3bd976ca" args="(Format=QwtColorMap::RGB)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">QwtColorMap::QwtColorMap           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_qwt_color_map.html#9e5570790910fa3894887bca7dc5a670">Format</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> = <code>QwtColorMap::RGB</code>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Constructor. <p><p>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>.    </td>  </tr></table><a class="anchor" name="f20e4ffdb3c5d34f5a6dc301bcbb9f7e"></a><!-- doxytag: member="QwtColorMap::~QwtColorMap" ref="f20e4ffdb3c5d34f5a6dc301bcbb9f7e" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">QwtColorMap::~QwtColorMap           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Destructor. <p><p>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>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="f5f3c1df460cee0ec48005e7f161423d"></a><!-- doxytag: member="QwtColorMap::color" ref="f5f3c1df460cee0ec48005e7f161423d" args="(const QwtDoubleInterval &amp;, double value) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">QColor QwtColorMap::color           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>interval</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap> <em>value</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Map a value into a color<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>interval</em>&nbsp;</td><td>Valid interval for values </td></tr>    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Value</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Color corresponding to value</dd></dl><dl 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#3b5be7f953330d308eef24351dfa789b">colorIndex()</a>. </dd></dl><p>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>.<p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?