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.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>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="44,8,156,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="44,8,156,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 class="see" 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>Arrow</b>,
51
<b>Ray</b>,
53
<b>TriangleStyle</b>,
55
<b>ThinStyle</b>,
57
<b>Style1</b>,
59
<b>Style2</b>,
61
<b>NoSymbol</b> = -1,
63
<b>Ellipse</b>,
65
<b>Rect</b>,
67
<b>Diamond</b>,
69
<b>Triangle</b>,
71
<b>DTriangle</b>,
73
<b>UTriangle</b>,
75
<b>LTriangle</b>,
77
<b>RTriangle</b>,
79
<b>Cross</b>,
81
<b>XCross</b>,
83
<b>HLine</b>,
85
<b>VLine</b>,
87
<b>Star1</b>,
89
<b>Star2</b>,
91
<b>Hexagon</b>,
93
<b>StyleCnt</b>
97
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
98
<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>
100
<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#10d4fd2c0fad96029ac79a856f4ef08f">draw</a> (QPainter *, const QPoint &, int length, double direction, QPalette::ColorGroup=QPalette::Active) const</td></tr>
102
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
103
<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>
105
<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>
107
<tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr>
108
<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>
111
<hr><h2>Member Enumeration Documentation</h2>
112
<a class="anchor" name="ee1d882c6ec8b680b94b59b5710a92a5"></a><!-- doxytag: member="QwtCompassMagnetNeedle::Style" ref="ee1d882c6ec8b680b94b59b5710a92a5" args="" -->
113
<div class="memitem">
114
<div class="memproto">
115
<table class="memname">
117
<td class="memname">enum <a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">QwtCompassMagnetNeedle::Style</a> </td>
128
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>.
131
<hr><h2>Constructor & Destructor Documentation</h2>
132
<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)" -->
133
<div class="memitem">
134
<div class="memproto">
135
<table class="memname">
137
<td class="memname">QwtCompassMagnetNeedle::QwtCompassMagnetNeedle </td>
139
<td class="paramtype"><a class="el" href="class_qwt_compass_magnet_needle.html#ee1d882c6ec8b680b94b59b5710a92a5">Style</a> </td>
140
<td class="paramname"> = <code>TriangleStyle</code>, </td>
143
<td class="paramkey"></td>
145
<td class="paramtype">const QColor & </td>
146
<td class="paramname"> <em>light</em> = <code>Qt::white</code>, </td>
149
<td class="paramkey"></td>
151
<td class="paramtype">const QColor & </td>
152
<td class="paramname"> <em>dark</em> = <code>Qt::red</code></td><td> </td>
157
<td></td><td></td><td width="100%"></td>
168
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>.
170
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00048">QwtDialNeedle::palette()</a>, and <a class="el" href="qwt__dial__needle_8cpp-source.html#l00040">QwtDialNeedle::setPalette()</a>.
173
<hr><h2>Member Function Documentation</h2>
174
<a class="anchor" name="10d4fd2c0fad96029ac79a856f4ef08f"></a><!-- doxytag: member="QwtCompassMagnetNeedle::draw" ref="10d4fd2c0fad96029ac79a856f4ef08f" args="(QPainter *, const QPoint &, int length, double direction, QPalette::ColorGroup=QPalette::Active) const" -->
175
<div class="memitem">
176
<div class="memproto">
177
<table class="memname">
179
<td class="memname">void QwtCompassMagnetNeedle::draw </td>
181
<td class="paramtype">QPainter * </td>
182
<td class="paramname"> <em>painter</em>, </td>
185
<td class="paramkey"></td>
187
<td class="paramtype">const QPoint & </td>
188
<td class="paramname"> <em>center</em>, </td>
191
<td class="paramkey"></td>
193
<td class="paramtype">int </td>
194
<td class="paramname"> <em>length</em>, </td>
197
<td class="paramkey"></td>
199
<td class="paramtype">double </td>
200
<td class="paramname"> <em>direction</em>, </td>
203
<td class="paramkey"></td>
205
<td class="paramtype">QPalette::ColorGroup </td>
206
<td class="paramname"> <em>colorGroup</em> = <code>QPalette::Active</code></td><td> </td>
211
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
219
<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>painter</em> </td><td>Painter </td></tr>
222
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center of the dial, start position for the needle </td></tr>
223
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
224
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction of the needle, in degrees counter clockwise </td></tr>
225
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group, used for painting </td></tr>
230
Implements <a class="el" href="class_qwt_dial_needle.html#d38b1e7d9ef0bf012f8f1b21b0972cc9">QwtDialNeedle</a>.
232
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>.
234
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>.
237
<a class="anchor" name="e26a1879af72e9b553b2a6c85afe0ca1"></a><!-- doxytag: member="QwtCompassMagnetNeedle::drawTriangleNeedle" ref="e26a1879af72e9b553b2a6c85afe0ca1" args="(QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)" -->
238
<div class="memitem">
239
<div class="memproto">
240
<table class="memname">
242
<td class="memname">void QwtCompassMagnetNeedle::drawTriangleNeedle </td>
244
<td class="paramtype">QPainter * </td>
245
<td class="paramname"> <em>painter</em>, </td>
248
<td class="paramkey"></td>
250
<td class="paramtype">const QPalette & </td>
251
<td class="paramname"> <em>palette</em>, </td>
254
<td class="paramkey"></td>
256
<td class="paramtype">QPalette::ColorGroup </td>
257
<td class="paramname"> <em>colorGroup</em>, </td>
260
<td class="paramkey"></td>
262
<td class="paramtype">const QPoint & </td>
263
<td class="paramname"> <em>center</em>, </td>
266
<td class="paramkey"></td>
268
<td class="paramtype">int </td>
269
<td class="paramname"> <em>length</em>, </td>
272
<td class="paramkey"></td>
274
<td class="paramtype">double </td>
275
<td class="paramname"> <em>direction</em></td><td> </td>
280
<td></td><td></td><td width="100%"><code> [static]</code></td>
287
Draw a compass needle<p>
288
<dl compact><dt><b>Parameters:</b></dt><dd>
289
<table border="0" cellspacing="2" cellpadding="0">
290
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
291
<tr><td valign="top"></td><td valign="top"><em>palette</em> </td><td>Palette </td></tr>
292
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group </td></tr>
293
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
294
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
295
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
300
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>.
302
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00292">draw()</a>.
305
<a class="anchor" name="786b21adb5d427b35be554eeafcce06c"></a><!-- doxytag: member="QwtCompassMagnetNeedle::drawThinNeedle" ref="786b21adb5d427b35be554eeafcce06c" args="(QPainter *, const QPalette &, QPalette::ColorGroup, const QPoint &, int length, double direction)" -->
306
<div class="memitem">
307
<div class="memproto">
308
<table class="memname">
310
<td class="memname">void QwtCompassMagnetNeedle::drawThinNeedle </td>
312
<td class="paramtype">QPainter * </td>
313
<td class="paramname"> <em>painter</em>, </td>
316
<td class="paramkey"></td>
318
<td class="paramtype">const QPalette & </td>
319
<td class="paramname"> <em>palette</em>, </td>
322
<td class="paramkey"></td>
324
<td class="paramtype">QPalette::ColorGroup </td>
325
<td class="paramname"> <em>colorGroup</em>, </td>
328
<td class="paramkey"></td>
330
<td class="paramtype">const QPoint & </td>
331
<td class="paramname"> <em>center</em>, </td>
334
<td class="paramkey"></td>
336
<td class="paramtype">int </td>
337
<td class="paramname"> <em>length</em>, </td>
340
<td class="paramkey"></td>
342
<td class="paramtype">double </td>
343
<td class="paramname"> <em>direction</em></td><td> </td>
348
<td></td><td></td><td width="100%"><code> [static]</code></td>
355
Draw a compass needle<p>
356
<dl compact><dt><b>Parameters:</b></dt><dd>
357
<table border="0" cellspacing="2" cellpadding="0">
358
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
359
<tr><td valign="top"></td><td valign="top"><em>palette</em> </td><td>Palette </td></tr>
360
<tr><td valign="top"></td><td valign="top"><em>colorGroup</em> </td><td>Color group </td></tr>
361
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
362
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
363
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
368
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>.
370
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>.
372
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00292">draw()</a>.
375
<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)" -->
376
<div class="memitem">
377
<div class="memproto">
378
<table class="memname">
380
<td class="memname">void QwtCompassMagnetNeedle::drawPointer </td>
382
<td class="paramtype">QPainter * </td>
383
<td class="paramname"> <em>painter</em>, </td>
386
<td class="paramkey"></td>
388
<td class="paramtype">const QBrush & </td>
389
<td class="paramname"> <em>brush</em>, </td>
392
<td class="paramkey"></td>
394
<td class="paramtype">int </td>
395
<td class="paramname"> <em>colorOffset</em>, </td>
398
<td class="paramkey"></td>
400
<td class="paramtype">const QPoint & </td>
401
<td class="paramname"> <em>center</em>, </td>
404
<td class="paramkey"></td>
406
<td class="paramtype">int </td>
407
<td class="paramname"> <em>length</em>, </td>
410
<td class="paramkey"></td>
412
<td class="paramtype">int </td>
413
<td class="paramname"> <em>width</em>, </td>
416
<td class="paramkey"></td>
418
<td class="paramtype">double </td>
419
<td class="paramname"> <em>direction</em></td><td> </td>
424
<td></td><td></td><td width="100%"><code> [static, protected]</code></td>
431
Draw a compass needle<p>
432
<dl compact><dt><b>Parameters:</b></dt><dd>
433
<table border="0" cellspacing="2" cellpadding="0">
434
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
435
<tr><td valign="top"></td><td valign="top"><em>brush</em> </td><td>Brush </td></tr>
436
<tr><td valign="top"></td><td valign="top"><em>colorOffset</em> </td><td>Color offset </td></tr>
437
<tr><td valign="top"></td><td valign="top"><em>center</em> </td><td>Center, where the needle starts </td></tr>
438
<tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>Length of the needle </td></tr>
439
<tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>Width of the needle </td></tr>
440
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Direction </td></tr>
445
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>.
447
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00383">drawThinNeedle()</a>.
450
<hr size="1"><address style="align: right;"><small>Generated on Sun Mar 22 16:54:21 2009 for Qwt User's Guide by
451
<a href="http://www.doxygen.org/index.html">
452
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>