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: QwtCompassMagnetNeedle 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.4.6 -->
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>QwtCompassMagnetNeedle Class Reference</h1><!-- doxytag: class="QwtCompassMagnetNeedle" --><!-- doxytag: inherits="QwtDialNeedle" -->Inheritance diagram for QwtCompassMagnetNeedle:<p><center><img src="class_qwt_compass_magnet_needle__inherit__graph.png" border="0" usemap="#_qwt_compass_magnet_needle__inherit__map" alt="Inheritance graph"></center>
23
<map name="_qwt_compass_magnet_needle__inherit__map">
24
<area href="class_qwt_dial_needle.html" shape="rect" coords="45,8,155,32" alt="">
26
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtCompassMagnetNeedle:<p><center><img src="class_qwt_compass_magnet_needle__coll__graph.png" border="0" usemap="#_qwt_compass_magnet_needle__coll__map" alt="Collaboration graph"></center>
27
<map name="_qwt_compass_magnet_needle__coll__map">
28
<area href="class_qwt_dial_needle.html" shape="rect" coords="45,8,155,32" alt="">
30
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_compass_magnet_needle-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
31
A magnet needle for compass widgets.
33
A magnet needle points to two opposite directions indicating north and south.<p>
34
The following colors are used:<ul>
35
<li>QColorGroup::Light<br>
36
Used for pointing south</li><li>QColorGroup::Dark<br>
37
Used for pointing north</li><li>QColorGroup::Base<br>
38
Knob (ThinStyle only)</li></ul>
40
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_dial.html">QwtDial</a>, <a class="el" href="class_qwt_compass.html">QwtCompass</a> </dd></dl>
45
Definition at line <a class="el" href="qwt__dial__needle_8h-source.html#l00125">125</a> of file <a class="el" href="qwt__dial__needle_8h-source.html">qwt_dial_needle.h</a>.<table border="0" cellpadding="0" cellspacing="0">
47
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">Style</a> { <br>
49
<b>TriangleStyle</b>,
51
<b>ThinStyle</b>
55
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
56
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#3422e6490d44c527289bafdcceecd741">QwtCompassMagnetNeedle</a> (<a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">Style</a>=TriangleStyle, const QColor &light=Qt::white, const QColor &dark=Qt::red)</td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#5f70372a381eb8953728def1a5cb8bc2">draw</a> (QPainter *, const QPoint &, int length, double direction, QPalette::ColorGroup=QPalette::Active) const </td></tr>
60
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#e26a1879af72e9b553b2a6c85afe0ca1">drawTriangleNeedle</a> (QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)</td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#786b21adb5d427b35be554eeafcce06c">drawThinNeedle</a> (QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)</td></tr>
65
<tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr>
66
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_compass_magnet_needle.html#d8ca9ebf795e69c1058b00f1c00c5963">drawPointer</a> (QPainter *painter, const QBrush &brush, int colorOffset, const QPoint &center, int length, int width, double direction)</td></tr>
69
<hr><h2>Member Enumeration Documentation</h2>
70
<a class="anchor" name="ee1d882c6ec8b680b94b59b5710a92a5"></a><!-- doxytag: member="QwtCompassMagnetNeedle::Style" ref="ee1d882c6ec8b680b94b59b5710a92a5" args="" --><p>
71
<table class="mdTable" cellpadding="2" cellspacing="0">
74
<table cellpadding="0" cellspacing="0" border="0">
76
<td class="md" nowrap valign="top">enum <a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">QwtCompassMagnetNeedle::Style</a> </td>
82
<table cellspacing="5" cellpadding="0" border="0">
94
Definition at line <a class="el" href="qwt__dial__needle_8h-source.html#l00129">129</a> of file <a class="el" href="qwt__dial__needle_8h-source.html">qwt_dial_needle.h</a>. </td>
97
<hr><h2>Constructor & Destructor Documentation</h2>
98
<a class="anchor" name="3422e6490d44c527289bafdcceecd741"></a><!-- doxytag: member="QwtCompassMagnetNeedle::QwtCompassMagnetNeedle" ref="3422e6490d44c527289bafdcceecd741" args="(Style=TriangleStyle, const QColor &light=Qt::white, const QColor &dark=Qt::red)" --><p>
99
<table class="mdTable" cellpadding="2" cellspacing="0">
102
<table cellpadding="0" cellspacing="0" border="0">
104
<td class="md" nowrap valign="top">QwtCompassMagnetNeedle::QwtCompassMagnetNeedle </td>
105
<td class="md" valign="top">( </td>
106
<td class="md" nowrap valign="top"><a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">Style</a> </td>
107
<td class="mdname" nowrap> = <code>TriangleStyle</code>, </td>
110
<td class="md" nowrap align="right"></td>
112
<td class="md" nowrap>const QColor & </td>
113
<td class="mdname" nowrap> <em>light</em> = <code>Qt::white</code>, </td>
116
<td class="md" nowrap align="right"></td>
118
<td class="md" nowrap>const QColor & </td>
119
<td class="mdname" nowrap> <em>dark</em> = <code>Qt::red</code></td>
123
<td class="md">) </td>
124
<td class="md" colspan="2"></td>
130
<table cellspacing="5" cellpadding="0" border="0">
142
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00265">265</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
144
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00048">QwtDialNeedle::palette()</a>. </td>
147
<hr><h2>Member Function Documentation</h2>
148
<a class="anchor" name="5f70372a381eb8953728def1a5cb8bc2"></a><!-- doxytag: member="QwtCompassMagnetNeedle::draw" ref="5f70372a381eb8953728def1a5cb8bc2" args="(QPainter *, const QPoint &, int length, double direction, QPalette::ColorGroup=QPalette::Active) const " --><p>
149
<table class="mdTable" cellpadding="2" cellspacing="0">
152
<table cellpadding="0" cellspacing="0" border="0">
154
<td class="md" nowrap valign="top">void QwtCompassMagnetNeedle::draw </td>
155
<td class="md" valign="top">( </td>
156
<td class="md" nowrap valign="top">QPainter * </td>
157
<td class="mdname" nowrap> <em>painter</em>, </td>
160
<td class="md" nowrap align="right"></td>
162
<td class="md" nowrap>const QPoint & </td>
163
<td class="mdname" nowrap> <em>center</em>, </td>
166
<td class="md" nowrap align="right"></td>
168
<td class="md" nowrap>int </td>
169
<td class="mdname" nowrap> <em>length</em>, </td>
172
<td class="md" nowrap align="right"></td>
174
<td class="md" nowrap>double </td>
175
<td class="mdname" nowrap> <em>direction</em>, </td>
178
<td class="md" nowrap align="right"></td>
180
<td class="md" nowrap>QPalette::ColorGroup </td>
181
<td class="mdname" nowrap> <em>colorGroup</em> = <code>QPalette::Active</code></td>
185
<td class="md">) </td>
186
<td class="md" colspan="2"> const<code> [virtual]</code></td>
192
<table cellspacing="5" cellpadding="0" border="0">
201
<dl compact><dt><b>Parameters:</b></dt><dd>
202
<table border="0" cellspacing="2" cellpadding="0">
203
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
204
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center of the dial, start position for the needle </td></tr>
205
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
206
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction of the needle, in degrees counter clockwise </td></tr>
207
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group, used for painting </td></tr>
212
Implements <a class="el" href="class_qwt_dial_needle.html#6076eecfa9fc39235435d098cf146a2c">QwtDialNeedle</a>.
214
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00292">292</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
216
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00383">drawThinNeedle()</a>, <a class="el" href="qwt__dial__needle_8cpp-source.html#l00317">drawTriangleNeedle()</a>, and <a class="el" href="qwt__dial__needle_8cpp-source.html#l00048">QwtDialNeedle::palette()</a>. </td>
219
<a class="anchor" name="d8ca9ebf795e69c1058b00f1c00c5963"></a><!-- doxytag: member="QwtCompassMagnetNeedle::drawPointer" ref="d8ca9ebf795e69c1058b00f1c00c5963" args="(QPainter *painter, const QBrush &brush, int colorOffset, const QPoint &center, int length, int width, double direction)" --><p>
220
<table class="mdTable" cellpadding="2" cellspacing="0">
223
<table cellpadding="0" cellspacing="0" border="0">
225
<td class="md" nowrap valign="top">void QwtCompassMagnetNeedle::drawPointer </td>
226
<td class="md" valign="top">( </td>
227
<td class="md" nowrap valign="top">QPainter * </td>
228
<td class="mdname" nowrap> <em>painter</em>, </td>
231
<td class="md" nowrap align="right"></td>
233
<td class="md" nowrap>const QBrush & </td>
234
<td class="mdname" nowrap> <em>brush</em>, </td>
237
<td class="md" nowrap align="right"></td>
239
<td class="md" nowrap>int </td>
240
<td class="mdname" nowrap> <em>colorOffset</em>, </td>
243
<td class="md" nowrap align="right"></td>
245
<td class="md" nowrap>const QPoint & </td>
246
<td class="mdname" nowrap> <em>center</em>, </td>
249
<td class="md" nowrap align="right"></td>
251
<td class="md" nowrap>int </td>
252
<td class="mdname" nowrap> <em>length</em>, </td>
255
<td class="md" nowrap align="right"></td>
257
<td class="md" nowrap>int </td>
258
<td class="mdname" nowrap> <em>width</em>, </td>
261
<td class="md" nowrap align="right"></td>
263
<td class="md" nowrap>double </td>
264
<td class="mdname" nowrap> <em>direction</em></td>
268
<td class="md">) </td>
269
<td class="md" colspan="2"><code> [static, protected]</code></td>
275
<table cellspacing="5" cellpadding="0" border="0">
283
Draw a compass needle<p>
284
<dl compact><dt><b>Parameters:</b></dt><dd>
285
<table border="0" cellspacing="2" cellpadding="0">
286
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
287
<tr><td valign="top"></td><td valign="top"><em>brush</em> </td><td>Brush </td></tr>
288
<tr><td valign="top"></td><td valign="top"><em>colorOffset</em> </td><td>Color offset </td></tr>
289
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
290
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
291
<tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>Width of the needle </td></tr>
292
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
297
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00419">419</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
299
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00383">drawThinNeedle()</a>. </td>
302
<a class="anchor" name="786b21adb5d427b35be554eeafcce06c"></a><!-- doxytag: member="QwtCompassMagnetNeedle::drawThinNeedle" ref="786b21adb5d427b35be554eeafcce06c" args="(QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)" --><p>
303
<table class="mdTable" cellpadding="2" cellspacing="0">
306
<table cellpadding="0" cellspacing="0" border="0">
308
<td class="md" nowrap valign="top">void QwtCompassMagnetNeedle::drawThinNeedle </td>
309
<td class="md" valign="top">( </td>
310
<td class="md" nowrap valign="top">QPainter * </td>
311
<td class="mdname" nowrap> <em>painter</em>, </td>
314
<td class="md" nowrap align="right"></td>
316
<td class="md" nowrap>const QPalette & </td>
317
<td class="mdname" nowrap> <em>palette</em>, </td>
320
<td class="md" nowrap align="right"></td>
322
<td class="md" nowrap>QPalette::ColorGroup </td>
323
<td class="mdname" nowrap> <em>colorGroup</em>, </td>
326
<td class="md" nowrap align="right"></td>
328
<td class="md" nowrap>const QPoint & </td>
329
<td class="mdname" nowrap> <em>center</em>, </td>
332
<td class="md" nowrap align="right"></td>
334
<td class="md" nowrap>int </td>
335
<td class="mdname" nowrap> <em>length</em>, </td>
338
<td class="md" nowrap align="right"></td>
340
<td class="md" nowrap>double </td>
341
<td class="mdname" nowrap> <em>direction</em></td>
345
<td class="md">) </td>
346
<td class="md" colspan="2"><code> [static]</code></td>
352
<table cellspacing="5" cellpadding="0" border="0">
360
Draw a compass needle<p>
361
<dl compact><dt><b>Parameters:</b></dt><dd>
362
<table border="0" cellspacing="2" cellpadding="0">
363
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
364
<tr><td valign="top"></td><td valign="top"><em>palette</em> </td><td>Palette </td></tr>
365
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group </td></tr>
366
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
367
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
368
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
373
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00383">383</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
375
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00054">QwtDialNeedle::drawKnob()</a>, and <a class="el" href="qwt__dial__needle_8cpp-source.html#l00419">drawPointer()</a>.
377
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00292">draw()</a>. </td>
380
<a class="anchor" name="e26a1879af72e9b553b2a6c85afe0ca1"></a><!-- doxytag: member="QwtCompassMagnetNeedle::drawTriangleNeedle" ref="e26a1879af72e9b553b2a6c85afe0ca1" args="(QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)" --><p>
381
<table class="mdTable" cellpadding="2" cellspacing="0">
384
<table cellpadding="0" cellspacing="0" border="0">
386
<td class="md" nowrap valign="top">void QwtCompassMagnetNeedle::drawTriangleNeedle </td>
387
<td class="md" valign="top">( </td>
388
<td class="md" nowrap valign="top">QPainter * </td>
389
<td class="mdname" nowrap> <em>painter</em>, </td>
392
<td class="md" nowrap align="right"></td>
394
<td class="md" nowrap>const QPalette & </td>
395
<td class="mdname" nowrap> <em>palette</em>, </td>
398
<td class="md" nowrap align="right"></td>
400
<td class="md" nowrap>QPalette::ColorGroup </td>
401
<td class="mdname" nowrap> <em>colorGroup</em>, </td>
404
<td class="md" nowrap align="right"></td>
406
<td class="md" nowrap>const QPoint & </td>
407
<td class="mdname" nowrap> <em>center</em>, </td>
410
<td class="md" nowrap align="right"></td>
412
<td class="md" nowrap>int </td>
413
<td class="mdname" nowrap> <em>length</em>, </td>
416
<td class="md" nowrap align="right"></td>
418
<td class="md" nowrap>double </td>
419
<td class="mdname" nowrap> <em>direction</em></td>
423
<td class="md">) </td>
424
<td class="md" colspan="2"><code> [static]</code></td>
430
<table cellspacing="5" cellpadding="0" border="0">
438
Draw a compass needle<p>
439
<dl compact><dt><b>Parameters:</b></dt><dd>
440
<table border="0" cellspacing="2" cellpadding="0">
441
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
442
<tr><td valign="top"></td><td valign="top"><em>palette</em> </td><td>Palette </td></tr>
443
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group </td></tr>
444
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
445
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
446
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
451
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00317">317</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
453
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00292">draw()</a>. </td>
456
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 11 07:41:52 2007 for Qwt User's Guide by
457
<a href="http://www.doxygen.org/index.html">
458
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>