class_qwt_dial_needle.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Qwt User&#39;s Guide: QwtDialNeedle Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. </head>
  21. <body>
  22. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  23. <div id="titlearea">
  24. <table cellspacing="0" cellpadding="0">
  25. <tbody>
  26. <tr style="height: 56px;">
  27. <td id="projectalign" style="padding-left: 0.5em;">
  28. <div id="projectname">Qwt User&#39;s Guide
  29. &#160;<span id="projectnumber">6.1.6</span>
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('class_qwt_dial_needle.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-methods">Public Member Functions</a> &#124;
  85. <a href="#pro-methods">Protected Member Functions</a> &#124;
  86. <a href="class_qwt_dial_needle-members.html">List of all members</a> </div>
  87. <div class="headertitle">
  88. <div class="title">QwtDialNeedle Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <p>Base class for needles that can be used in a <a class="el" href="class_qwt_dial.html" title="QwtDial class provides a rounded range control.">QwtDial</a>.
  92. <a href="class_qwt_dial_needle.html#details">More...</a></p>
  93. <p><code>#include &lt;<a class="el" href="qwt__dial__needle_8h_source.html">qwt_dial_needle.h</a>&gt;</code></p>
  94. <div class="dynheader">
  95. Inheritance diagram for QwtDialNeedle:</div>
  96. <div class="dyncontent">
  97. <div class="center"><img src="class_qwt_dial_needle__inherit__graph.png" border="0" usemap="#a_qwt_dial_needle_inherit__map" alt="Inheritance graph"/></div>
  98. <map name="_qwt_dial_needle_inherit__map" id="a_qwt_dial_needle_inherit__map">
  99. <area shape="rect" title="Base class for needles that can be used in a QwtDial." alt="" coords="245,5,355,32"/>
  100. <area shape="rect" href="class_qwt_compass_magnet_needle.html" title="A magnet needle for compass widgets." alt="" coords="5,80,192,107"/>
  101. <area shape="rect" href="class_qwt_compass_wind_arrow.html" title="An indicator for the wind direction." alt="" coords="217,80,383,107"/>
  102. <area shape="rect" href="class_qwt_dial_simple_needle.html" title="A needle for dial widgets." alt="" coords="407,80,558,107"/>
  103. </map>
  104. <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
  105. <table class="memberdecls">
  106. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  107. Public Member Functions</h2></td></tr>
  108. <tr class="memitem:aef3af79632ce784bc4d7332f6e269a1f"><td class="memItemLeft" align="right" valign="top"><a id="aef3af79632ce784bc4d7332f6e269a1f"></a>
  109. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#aef3af79632ce784bc4d7332f6e269a1f">QwtDialNeedle</a> ()</td></tr>
  110. <tr class="memdesc:aef3af79632ce784bc4d7332f6e269a1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
  111. <tr class="separator:aef3af79632ce784bc4d7332f6e269a1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:ac23b2af4af50042967c8cea87b474247"><td class="memItemLeft" align="right" valign="top"><a id="ac23b2af4af50042967c8cea87b474247"></a>
  113. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#ac23b2af4af50042967c8cea87b474247">~QwtDialNeedle</a> ()</td></tr>
  114. <tr class="memdesc:ac23b2af4af50042967c8cea87b474247"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
  115. <tr class="separator:ac23b2af4af50042967c8cea87b474247"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:ae850883a64501136bca64d6ea2d084b9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#ae850883a64501136bca64d6ea2d084b9">setPalette</a> (const QPalette &amp;)</td></tr>
  117. <tr class="separator:ae850883a64501136bca64d6ea2d084b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:ad4c32d58f2b8e77fd66e0dfc66b7c37a"><td class="memItemLeft" align="right" valign="top">const QPalette &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#ad4c32d58f2b8e77fd66e0dfc66b7c37a">palette</a> () const</td></tr>
  119. <tr class="separator:ad4c32d58f2b8e77fd66e0dfc66b7c37a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a3b437180b9f4085485a6003d211f6efa"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#a3b437180b9f4085485a6003d211f6efa">draw</a> (QPainter *painter, const QPointF &amp;center, double length, double direction, QPalette::ColorGroup=QPalette::Active) const</td></tr>
  121. <tr class="separator:a3b437180b9f4085485a6003d211f6efa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. </table><table class="memberdecls">
  123. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  124. Protected Member Functions</h2></td></tr>
  125. <tr class="memitem:a1e4fee366fec1838edc18890d9957f2b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#a1e4fee366fec1838edc18890d9957f2b">drawNeedle</a> (QPainter *painter, double length, QPalette::ColorGroup colorGroup) const =0</td></tr>
  126. <tr class="memdesc:a1e4fee366fec1838edc18890d9957f2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the needle. <a href="class_qwt_dial_needle.html#a1e4fee366fec1838edc18890d9957f2b">More...</a><br /></td></tr>
  127. <tr class="separator:a1e4fee366fec1838edc18890d9957f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:a769a895b3fefd851b44021ca118f2422"><td class="memItemLeft" align="right" valign="top"><a id="a769a895b3fefd851b44021ca118f2422"></a>
  129. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_dial_needle.html#a769a895b3fefd851b44021ca118f2422">drawKnob</a> (QPainter *, double width, const QBrush &amp;, bool sunken) const</td></tr>
  130. <tr class="memdesc:a769a895b3fefd851b44021ca118f2422"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the knob. <br /></td></tr>
  131. <tr class="separator:a769a895b3fefd851b44021ca118f2422"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. </table>
  133. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  134. <div class="textblock"><p>Base class for needles that can be used in a <a class="el" href="class_qwt_dial.html" title="QwtDial class provides a rounded range control.">QwtDial</a>. </p>
  135. <p><a class="el" href="class_qwt_dial_needle.html" title="Base class for needles that can be used in a QwtDial.">QwtDialNeedle</a> is a pointer that indicates a value by pointing to a specific direction.</p>
  136. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_dial.html" title="QwtDial class provides a rounded range control.">QwtDial</a>, <a class="el" href="class_qwt_compass.html" title="A Compass Widget.">QwtCompass</a> </dd></dl>
  137. </div><h2 class="groupheader">Member Function Documentation</h2>
  138. <a id="a3b437180b9f4085485a6003d211f6efa"></a>
  139. <h2 class="memtitle"><span class="permalink"><a href="#a3b437180b9f4085485a6003d211f6efa">&#9670;&nbsp;</a></span>draw()</h2>
  140. <div class="memitem">
  141. <div class="memproto">
  142. <table class="mlabels">
  143. <tr>
  144. <td class="mlabels-left">
  145. <table class="memname">
  146. <tr>
  147. <td class="memname">void QwtDialNeedle::draw </td>
  148. <td>(</td>
  149. <td class="paramtype">QPainter *&#160;</td>
  150. <td class="paramname"><em>painter</em>, </td>
  151. </tr>
  152. <tr>
  153. <td class="paramkey"></td>
  154. <td></td>
  155. <td class="paramtype">const QPointF &amp;&#160;</td>
  156. <td class="paramname"><em>center</em>, </td>
  157. </tr>
  158. <tr>
  159. <td class="paramkey"></td>
  160. <td></td>
  161. <td class="paramtype">double&#160;</td>
  162. <td class="paramname"><em>length</em>, </td>
  163. </tr>
  164. <tr>
  165. <td class="paramkey"></td>
  166. <td></td>
  167. <td class="paramtype">double&#160;</td>
  168. <td class="paramname"><em>direction</em>, </td>
  169. </tr>
  170. <tr>
  171. <td class="paramkey"></td>
  172. <td></td>
  173. <td class="paramtype">QPalette::ColorGroup&#160;</td>
  174. <td class="paramname"><em>colorGroup</em> = <code>QPalette::Active</code>&#160;</td>
  175. </tr>
  176. <tr>
  177. <td></td>
  178. <td>)</td>
  179. <td></td><td> const</td>
  180. </tr>
  181. </table>
  182. </td>
  183. <td class="mlabels-right">
  184. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  185. </tr>
  186. </table>
  187. </div><div class="memdoc">
  188. <p>Draw the needle</p>
  189. <dl class="params"><dt>Parameters</dt><dd>
  190. <table class="params">
  191. <tr><td class="paramname">painter</td><td>Painter </td></tr>
  192. <tr><td class="paramname">center</td><td>Center of the dial, start position for the needle </td></tr>
  193. <tr><td class="paramname">length</td><td>Length of the needle </td></tr>
  194. <tr><td class="paramname">direction</td><td>Direction of the needle, in degrees counter clockwise </td></tr>
  195. <tr><td class="paramname">colorGroup</td><td>Color group, used for painting </td></tr>
  196. </table>
  197. </dd>
  198. </dl>
  199. </div>
  200. </div>
  201. <a id="a1e4fee366fec1838edc18890d9957f2b"></a>
  202. <h2 class="memtitle"><span class="permalink"><a href="#a1e4fee366fec1838edc18890d9957f2b">&#9670;&nbsp;</a></span>drawNeedle()</h2>
  203. <div class="memitem">
  204. <div class="memproto">
  205. <table class="mlabels">
  206. <tr>
  207. <td class="mlabels-left">
  208. <table class="memname">
  209. <tr>
  210. <td class="memname">virtual void QwtDialNeedle::drawNeedle </td>
  211. <td>(</td>
  212. <td class="paramtype">QPainter *&#160;</td>
  213. <td class="paramname"><em>painter</em>, </td>
  214. </tr>
  215. <tr>
  216. <td class="paramkey"></td>
  217. <td></td>
  218. <td class="paramtype">double&#160;</td>
  219. <td class="paramname"><em>length</em>, </td>
  220. </tr>
  221. <tr>
  222. <td class="paramkey"></td>
  223. <td></td>
  224. <td class="paramtype">QPalette::ColorGroup&#160;</td>
  225. <td class="paramname"><em>colorGroup</em>&#160;</td>
  226. </tr>
  227. <tr>
  228. <td></td>
  229. <td>)</td>
  230. <td></td><td> const</td>
  231. </tr>
  232. </table>
  233. </td>
  234. <td class="mlabels-right">
  235. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
  236. </tr>
  237. </table>
  238. </div><div class="memdoc">
  239. <p>Draw the needle. </p>
  240. <p>The origin of the needle is at position (0.0, 0.0 ) pointing in direction 0.0 ( = east ).</p>
  241. <p>The painter is already initialized with translation and rotation.</p>
  242. <dl class="params"><dt>Parameters</dt><dd>
  243. <table class="params">
  244. <tr><td class="paramname">painter</td><td>Painter </td></tr>
  245. <tr><td class="paramname">length</td><td>Length of the needle </td></tr>
  246. <tr><td class="paramname">colorGroup</td><td>Color group, used for painting</td></tr>
  247. </table>
  248. </dd>
  249. </dl>
  250. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_dial_needle.html#ae850883a64501136bca64d6ea2d084b9">setPalette()</a>, <a class="el" href="class_qwt_dial_needle.html#ad4c32d58f2b8e77fd66e0dfc66b7c37a">palette()</a> </dd></dl>
  251. <p>Implemented in <a class="el" href="class_qwt_compass_wind_arrow.html#a91977dd1ec99cb874b1a83070d99f2f5">QwtCompassWindArrow</a>, <a class="el" href="class_qwt_compass_magnet_needle.html#a3e9787b5d4fa1264e3e05ccdf049ffa9">QwtCompassMagnetNeedle</a>, and <a class="el" href="class_qwt_dial_simple_needle.html#ad11e71682e22d929c5c67b49c08e6084">QwtDialSimpleNeedle</a>.</p>
  252. </div>
  253. </div>
  254. <a id="ad4c32d58f2b8e77fd66e0dfc66b7c37a"></a>
  255. <h2 class="memtitle"><span class="permalink"><a href="#ad4c32d58f2b8e77fd66e0dfc66b7c37a">&#9670;&nbsp;</a></span>palette()</h2>
  256. <div class="memitem">
  257. <div class="memproto">
  258. <table class="memname">
  259. <tr>
  260. <td class="memname">const QPalette &amp; QwtDialNeedle::palette </td>
  261. <td>(</td>
  262. <td class="paramname"></td><td>)</td>
  263. <td> const</td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <dl class="section return"><dt>Returns</dt><dd>the palette of the needle. </dd></dl>
  268. </div>
  269. </div>
  270. <a id="ae850883a64501136bca64d6ea2d084b9"></a>
  271. <h2 class="memtitle"><span class="permalink"><a href="#ae850883a64501136bca64d6ea2d084b9">&#9670;&nbsp;</a></span>setPalette()</h2>
  272. <div class="memitem">
  273. <div class="memproto">
  274. <table class="mlabels">
  275. <tr>
  276. <td class="mlabels-left">
  277. <table class="memname">
  278. <tr>
  279. <td class="memname">void QwtDialNeedle::setPalette </td>
  280. <td>(</td>
  281. <td class="paramtype">const QPalette &amp;&#160;</td>
  282. <td class="paramname"><em>palette</em></td><td>)</td>
  283. <td></td>
  284. </tr>
  285. </table>
  286. </td>
  287. <td class="mlabels-right">
  288. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  289. </tr>
  290. </table>
  291. </div><div class="memdoc">
  292. <p>Sets the palette for the needle.</p>
  293. <dl class="params"><dt>Parameters</dt><dd>
  294. <table class="params">
  295. <tr><td class="paramname">palette</td><td>New Palette </td></tr>
  296. </table>
  297. </dd>
  298. </dl>
  299. </div>
  300. </div>
  301. </div><!-- contents -->
  302. </div><!-- doc-content -->
  303. <!-- start footer part -->
  304. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  305. <ul>
  306. <li class="navelem"><a class="el" href="class_qwt_dial_needle.html">QwtDialNeedle</a></li>
  307. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  308. </ul>
  309. </div>
  310. </body>
  311. </html>