File: class_qwt_dial_simple_needle.html

package info (click to toggle)
libqwt 4.2.0-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,832 kB
  • ctags: 5,512
  • sloc: cpp: 22,973; ansic: 244; makefile: 66
file content (381 lines) | stat: -rw-r--r-- 16,886 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<!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: QwtDialSimpleNeedle Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>QwtDialSimpleNeedle Class Reference</h1>Inheritance diagram for QwtDialSimpleNeedle:<p><center><img src="class_qwt_dial_simple_needle__inherit__graph.png" border="0" usemap="#_qwt_dial_simple_needle__inherit__map" alt="Inheritance graph"></center>
<map name="_qwt_dial_simple_needle__inherit__map">
<area href="class_qwt_dial_needle.html" shape="rect" coords="28,18,129,42" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtDialSimpleNeedle:<p><center><img src="class_qwt_dial_simple_needle__coll__graph.png" border="0" usemap="#_qwt_dial_simple_needle__coll__map" alt="Collaboration graph"></center>
<map name="_qwt_dial_simple_needle__coll__map">
<area href="class_qwt_dial_needle.html" shape="rect" coords="28,18,129,42" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_dial_simple_needle-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A needle for dial widgets<p>
The following colors are used:<ul>
<li>QColorGroup::Mid<br>
 Pointer</li><li>QColorGroup::base<br>
 Knob</li></ul>
<p>
<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>

<p>
Definition at line <a class="el" href="qwt__dial__needle_8h-source.html#l00074">74</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>
<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><b>Style</b> { <br>
&nbsp;&nbsp;<b>Arrow</b>, 
<br>
&nbsp;&nbsp;<b>Ray</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_dial_simple_needle.html#a0">QwtDialSimpleNeedle</a> (Style, bool hasKnob=TRUE, const QColor &amp;mid=Qt::gray, const QColor &amp;base=Qt::darkGray)</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_dial_simple_needle.html#a1">draw</a> (QPainter *, const QPoint &amp;, int length, double direction, QPalette::ColorGroup=QPalette::Active) const</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_dial_simple_needle.html#a2">setWidth</a> (int width)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_qwt_dial_simple_needle.html#a3">width</a> () const</td></tr>

<tr><td colspan=2><br><h2>Static Public Member Functions</h2></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_dial_simple_needle.html#e0">drawArrowNeedle</a> (QPainter *, const QColorGroup &amp;, const QPoint &amp;, int length, int width, double direction, bool hasKnob)</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_dial_simple_needle.html#e1">drawRayNeedle</a> (QPainter *, const QColorGroup &amp;, const QPoint &amp;, int length, int width, double direction, bool hasKnob)</td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="QwtDialSimpleNeedle::QwtDialSimpleNeedle" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> QwtDialSimpleNeedle::QwtDialSimpleNeedle           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">Style&nbsp;</td>
          <td class="mdname" nowrap> <em>style</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>hasKnob</em> = <code>TRUE</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const QColor &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mid</em> = <code>Qt::gray</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const QColor &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>base</em> = <code>Qt::darkGray</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00101">101</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
<p>
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00033">QwtDialNeedle::setPalette()</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="QwtDialSimpleNeedle::draw" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void QwtDialSimpleNeedle::draw           </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></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></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>direction</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>QPalette::ColorGroup&nbsp;</td>
          <td class="mdname" nowrap> <em>cg</em> = <code>QPalette::Active</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Draw the needle<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>painter</em>&nbsp;</td><td>Painter </td></tr>
    <tr><td></td><td valign=top><em>center</em>&nbsp;</td><td>Center of the dial, start position for the needle </td></tr>
    <tr><td></td><td valign=top><em>length</em>&nbsp;</td><td>Length of the needle </td></tr>
    <tr><td></td><td valign=top><em>direction</em>&nbsp;</td><td>Direction of the needle, in degrees counter clockwise </td></tr>
    <tr><td></td><td valign=top><em>cg</em>&nbsp;</td><td>Color group, used for painting </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="class_qwt_dial_needle.html#a2">QwtDialNeedle</a>.
<p>
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00142">142</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
<p>
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00085">QwtDialNeedle::colorGroup()</a>, <a class="el" href="qwt__dial__needle_8cpp-source.html#l00208">drawArrowNeedle()</a>, and <a class="el" href="qwt__dial__needle_8cpp-source.html#l00160">drawRayNeedle()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0" doxytag="QwtDialSimpleNeedle::drawArrowNeedle" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void QwtDialSimpleNeedle::drawArrowNeedle           </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></td>
          <td class="md" nowrap>const QColorGroup &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>cg</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></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></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>direction</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>hasKnob</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Draw a needle looking like an arrow Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00208">208</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
<p>
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00047">QwtDialNeedle::drawKnob()</a>.
<p>
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00142">draw()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e1" doxytag="QwtDialSimpleNeedle::drawRayNeedle" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void QwtDialSimpleNeedle::drawRayNeedle           </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></td>
          <td class="md" nowrap>const QColorGroup &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>cg</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></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></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>direction</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>hasKnob</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Draw a needle looking like a ray Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00160">160</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
<p>
References <a class="el" href="qwt__dial__needle_8cpp-source.html#l00047">QwtDialNeedle::drawKnob()</a>.
<p>
Referenced by <a class="el" href="qwt__dial__needle_8cpp-source.html#l00142">draw()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="QwtDialSimpleNeedle::setWidth" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void QwtDialSimpleNeedle::setWidth           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>width</em>          </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>
Set the width of the needle. 
<p>
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00120">120</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.
<p>
Referenced by <a class="el" href="qwt__analog__clock_8cpp-source.html#l00008">QwtAnalogClock::QwtAnalogClock()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="QwtDialSimpleNeedle::width" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int QwtDialSimpleNeedle::width           </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> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Returns:</b></dt><dd>the width of the needle </dd></dl>
Definition at line <a class="el" href="qwt__dial__needle_8cpp-source.html#l00128">128</a> of file <a class="el" href="qwt__dial__needle_8cpp-source.html">qwt_dial_needle.cpp</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:28 2004 for Qwt User's Guide by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>