⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_qwt_compass.html

📁 QWT5.01用于Qt开发的二维图形库程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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: QwtCompass 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>QwtCompass Class Reference</h1><!-- doxytag: class="QwtCompass" --><!-- doxytag: inherits="QwtDial" -->Inheritance diagram for QwtCompass:<p><center><img src="class_qwt_compass__inherit__graph.png" border="0" usemap="#_qwt_compass__inherit__map" alt="Inheritance graph"></center><map name="_qwt_compass__inherit__map"><area href="class_qwt_dial.html" shape="rect" coords="37,157,104,181" alt=""><area href="class_qwt_abstract_slider.html" shape="rect" coords="7,83,135,107" alt=""><area href="class_qwt_double_range.html" shape="rect" coords="8,8,133,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtCompass:<p><center><img src="class_qwt_compass__coll__graph.png" border="0" usemap="#_qwt_compass__coll__map" alt="Collaboration graph"></center><map name="_qwt_compass__coll__map"><area href="class_qwt_dial.html" shape="rect" coords="37,157,104,181" alt=""><area href="class_qwt_abstract_slider.html" shape="rect" coords="7,83,135,107" alt=""><area href="class_qwt_double_range.html" shape="rect" coords="8,8,133,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_compass-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>A Compass Widget. <p><a class="el" href="class_qwt_compass.html">QwtCompass</a> is a widget to display and enter directions. It consists of a scale, an optional needle and rose.<p><div align="center"><img src="dials1.png" alt="dials1.png"></div><p><dl compact><dt><b>Note:</b></dt><dd>The examples/dials example shows how to use <a class="el" href="class_qwt_compass.html">QwtCompass</a>. </dd></dl><p><p>Definition at line <a class="el" href="qwt__compass_8h-source.html#l00048">48</a> of file <a class="el" href="qwt__compass_8h-source.html">qwt_compass.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></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_compass.html#05357e2950a3dc534e68e3c21f6c6b94">QwtCompass</a> (QWidget *parent=NULL)</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_compass.html#f6cc3b946f3761f7ce53d3a2ec000817">~QwtCompass</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#06456c0c52107bfa8b1d1267fba5b86f">setRose</a> (<a class="el" href="class_qwt_compass_rose.html">QwtCompassRose</a> *rose)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_qwt_compass_rose.html">QwtCompassRose</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#7405a44d947e16f53b11dea4544d7683">rose</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_compass_rose.html">QwtCompassRose</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#99477d676bd866acd1a418615cba423b">rose</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const QMap&lt; double, QString &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#ccc25cd9b9b23769711b7f04f9a4c464">labelMap</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">QMap&lt; double, QString &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#39b3cfa870ef0172b49d54fa2559a875">labelMap</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#b0f2460851db3d5b7169fe0991fdb945">setLabelMap</a> (const QMap&lt; double, QString &gt; &amp;map)</td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_qwt_text.html">QwtText</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#091c7ac5792d87e20bfc7efce9eeeb16">scaleLabel</a> (double value) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#f97ae99ae987472ee89deff90c1bf6d4">drawRose</a> (QPainter *, const QPoint &amp;center, int radius, double north, QPalette::ColorGroup) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#375701893fa3c0aeadaf23dd316fe69f">drawScaleContents</a> (QPainter *, const QPoint &amp;center, int radius) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass.html#d4f31e6837ea045834fe67d192a4209d">keyPressEvent</a> (QKeyEvent *)</td></tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="05357e2950a3dc534e68e3c21f6c6b94"></a><!-- doxytag: member="QwtCompass::QwtCompass" ref="05357e2950a3dc534e68e3c21f6c6b94" args="(QWidget *parent=NULL)" --><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">QwtCompass::QwtCompass           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">QWidget *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>parent</em> = <code>NULL</code>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [explicit]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Constructor. <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>parent</em>&nbsp;</td><td>Parent widget</td></tr>  </table></dl>Create a compass widget with a scale, no needle and no rose. The default origin is 270.0 with no valid value. It accepts mouse and keyboard inputs and has no step size. The default mode is QwtDial::RotateNeedle. <p>Definition at line <a class="el" href="qwt__compass_8cpp-source.html#l00050">50</a> of file <a class="el" href="qwt__compass_8cpp-source.html">qwt_compass.cpp</a>.    </td>  </tr></table><a class="anchor" name="f6cc3b946f3761f7ce53d3a2ec000817"></a><!-- doxytag: member="QwtCompass::~QwtCompass" ref="f6cc3b946f3761f7ce53d3a2ec000817" 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">QwtCompass::~QwtCompass           </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__compass_8cpp-source.html#l00077">77</a> of file <a class="el" href="qwt__compass_8cpp-source.html">qwt_compass.cpp</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="f97ae99ae987472ee89deff90c1bf6d4"></a><!-- doxytag: member="QwtCompass::drawRose" ref="f97ae99ae987472ee89deff90c1bf6d4" args="(QPainter *, const QPoint &amp;center, int radius, double north, QPalette::ColorGroup) 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">void QwtCompass::drawRose           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">QPainter *&nbsp;</td>          <td class="mdname" nowrap> <em>painter</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const QPoint &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>center</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>radius</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>north</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>QPalette::ColorGroup&nbsp;</td>          <td class="mdname" nowrap> <em>cg</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Draw the compass rose<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>painter</em>&nbsp;</td><td>Painter </td></tr>    <tr><td valign="top"></td><td valign="top"><em>center</em>&nbsp;</td><td>Center of the compass </td></tr>    <tr><td valign="top"></td><td valign="top"><em>radius</em>&nbsp;</td><td>of the circle, where to paint the rose </td></tr>    <tr><td valign="top"></td><td valign="top"><em>north</em>&nbsp;</td><td>Direction pointing north, in degrees counter clockwise </td></tr>    <tr><td valign="top"></td><td valign="top"><em>cg</em>&nbsp;</td><td>Color group </td></tr>  </table></dl><p>Definition at line <a class="el" href="qwt__compass_8cpp-source.html#l00143">143</a> of file <a class="el" href="qwt__compass_8cpp-source.html">qwt_compass.cpp</a>.<p>Referenced by <a class="el" href="qwt__compass_8cpp-source.html#l00114">drawScaleContents()</a>.    </td>  </tr></table><a class="anchor" name="375701893fa3c0aeadaf23dd316fe69f"></a><!-- doxytag: member="QwtCompass::drawScaleContents" ref="375701893fa3c0aeadaf23dd316fe69f" args="(QPainter *, const QPoint &amp;center, int radius) 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">void QwtCompass::drawScaleContents           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">QPainter *&nbsp;</td>          <td class="mdname" nowrap>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const QPoint &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>center</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>radius</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Draw the contents of the scale. <p><p>Reimplemented from <a class="el" href="class_qwt_dial.html#25ef28fbf217e510b60f2b01c14a1fc9">QwtDial</a>.<p>Definition at line <a class="el" href="qwt__compass_8cpp-source.html#l00114">114</a> of file <a class="el" href="qwt__compass_8cpp-source.html">qwt_compass.cpp</a>.<p>References <a class="el" href="qwt__compass_8cpp-source.html#l00143">drawRose()</a>, <a class="el" href="qwt__abstract__slider_8h-source.html#l00087">QwtAbstractSlider::isValid()</a>, <a class="el" href="qwt__dial_8cpp-source.html#l00382">QwtDial::mode()</a>, <a class="el" href="qwt__dial_8cpp-source.html#l00965">QwtDial::origin()</a>, and <a class="el" href="qwt__double__range_8cpp-source.html#l00360">QwtDoubleRange::value()</a>.    </td>  </tr></table><a class="anchor" name="d4f31e6837ea045834fe67d192a4209d"></a><!-- doxytag: member="QwtCompass::keyPressEvent" ref="d4f31e6837ea045834fe67d192a4209d" args="(QKeyEvent *)" --><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">void QwtCompass::keyPressEvent           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">QKeyEvent *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>kev</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>

⌨️ 快捷键说明

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