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: qwt_compass_rose.h Source File</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><a href="classes.html"><span>Classes</span></a></li>
12
<li id="current"><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="files.html"><span>File List</span></a></li>
18
<li><a href="globals.html"><span>File Members</span></a></li>
20
<h1>qwt_compass_rose.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
21
<a name="l00002"></a>00002 <span class="comment"> * Qwt Widget Library</span>
22
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span>
23
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span>
24
<a name="l00005"></a>00005 <span class="comment"> * </span>
25
<a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
26
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
27
<a name="l00008"></a>00008 <span class="comment"> *****************************************************************************/</span>
28
<a name="l00009"></a>00009
29
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef QWT_COMPASS_ROSE_H</span>
30
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define QWT_COMPASS_ROSE_H 1</span>
31
<a name="l00012"></a>00012 <span class="preprocessor"></span>
32
<a name="l00013"></a>00013 <span class="preprocessor">#include <qpalette.h></span>
33
<a name="l00014"></a>00014 <span class="preprocessor">#include "qwt_global.h"</span>
34
<a name="l00015"></a>00015
35
<a name="l00016"></a>00016 <span class="keyword">class </span>QPainter;
36
<a name="l00017"></a>00017
37
<a name="l00021"></a><a class="code" href="class_qwt_compass_rose.html">00021</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_compass_rose.html">QwtCompassRose</a>
38
<a name="l00022"></a>00022 {
39
<a name="l00023"></a>00023 <span class="keyword">public</span>:
40
<a name="l00024"></a><a class="code" href="class_qwt_compass_rose.html#9e3e5086d7225152cad3a276096753be">00024</a> <span class="keyword">virtual</span> ~<a class="code" href="class_qwt_compass_rose.html">QwtCompassRose</a>() {};
41
<a name="l00025"></a>00025
42
<a name="l00026"></a><a class="code" href="class_qwt_compass_rose.html#d69f887ed012d6bf6bf2ffeb133e26d5">00026</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPalette(<span class="keyword">const</span> QPalette &p) { d_palette = p; }
43
<a name="l00027"></a><a class="code" href="class_qwt_compass_rose.html#d825ddd8422f480c312bad1dcd8bf681">00027</a> <span class="keyword">const</span> QPalette &palette()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_palette; }
44
<a name="l00028"></a>00028
45
<a name="l00038"></a>00038 <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(QPainter *painter, <span class="keyword">const</span> QPoint &center,
46
<a name="l00039"></a>00039 <span class="keywordtype">int</span> radius, <span class="keywordtype">double</span> north,
47
<a name="l00040"></a>00040 QPalette::ColorGroup colorGroup = QPalette::Active) <span class="keyword">const </span>= 0;
48
<a name="l00041"></a>00041
49
<a name="l00042"></a>00042 <span class="keyword">private</span>:
50
<a name="l00043"></a>00043 QPalette d_palette;
51
<a name="l00044"></a>00044 };
52
<a name="l00045"></a>00045
53
<a name="l00049"></a><a class="code" href="class_qwt_simple_compass_rose.html">00049</a> <span class="keyword">class </span>QWT_EXPORT QwtSimpleCompassRose: <span class="keyword">public</span> <a class="code" href="class_qwt_compass_rose.html">QwtCompassRose</a>
54
<a name="l00050"></a>00050 {
55
<a name="l00051"></a>00051 <span class="keyword">public</span>:
56
<a name="l00052"></a>00052 QwtSimpleCompassRose(<span class="keywordtype">int</span> numThorns = 8, <span class="keywordtype">int</span> numThornLevels = -1);
57
<a name="l00053"></a>00053
58
<a name="l00054"></a>00054 <span class="keywordtype">void</span> setWidth(<span class="keywordtype">double</span> w);
59
<a name="l00055"></a><a class="code" href="class_qwt_simple_compass_rose.html#3dbac7f18d6b4de2c202ddc7761d20f2">00055</a> <span class="keywordtype">double</span> width()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_width; }
60
<a name="l00056"></a>00056
61
<a name="l00057"></a>00057 <span class="keywordtype">void</span> setNumThorns(<span class="keywordtype">int</span> count);
62
<a name="l00058"></a>00058 <span class="keywordtype">int</span> numThorns() <span class="keyword">const</span>;
63
<a name="l00059"></a>00059
64
<a name="l00060"></a>00060 <span class="keywordtype">void</span> setNumThornLevels(<span class="keywordtype">int</span> count);
65
<a name="l00061"></a>00061 <span class="keywordtype">int</span> numThornLevels() <span class="keyword">const</span>;
66
<a name="l00062"></a>00062
67
<a name="l00063"></a><a class="code" href="class_qwt_simple_compass_rose.html#faf84e19eb8eb2360306860b02d46cfc">00063</a> <span class="keywordtype">void</span> setShrinkFactor(<span class="keywordtype">double</span> factor) { d_shrinkFactor = factor; }
68
<a name="l00064"></a><a class="code" href="class_qwt_simple_compass_rose.html#60278de80aa517aaa0ab7af22d262c30">00064</a> <span class="keywordtype">double</span> shrinkFactor()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_shrinkFactor; }
69
<a name="l00065"></a>00065
70
<a name="l00066"></a>00066 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_compass_rose.html#871090e18973be379ffd7f09e876f8de">draw</a>(QPainter *, <span class="keyword">const</span> QPoint &center, <span class="keywordtype">int</span> radius,
71
<a name="l00067"></a>00067 <span class="keywordtype">double</span> north, QPalette::ColorGroup = QPalette::Active) <span class="keyword">const</span>;
72
<a name="l00068"></a>00068
73
<a name="l00069"></a>00069 <span class="keyword">static</span> <span class="keywordtype">void</span> drawRose(QPainter *,
74
<a name="l00070"></a>00070 #<span class="keywordflow">if</span> QT_VERSION < 0x040000
75
<a name="l00071"></a>00071 <span class="keyword">const</span> QColorGroup &,
76
<a name="l00072"></a>00072 #<span class="keywordflow">else</span>
77
<a name="l00073"></a>00073 <span class="keyword">const</span> QPalette &,
78
<a name="l00074"></a>00074 #endif
79
<a name="l00075"></a>00075 <span class="keyword">const</span> QPoint &center, <span class="keywordtype">int</span> radius, <span class="keywordtype">double</span> origin, <span class="keywordtype">double</span> width,
80
<a name="l00076"></a>00076 <span class="keywordtype">int</span> numThorns, <span class="keywordtype">int</span> numThornLevels, <span class="keywordtype">double</span> shrinkFactor);
81
<a name="l00077"></a>00077
82
<a name="l00078"></a>00078 <span class="keyword">private</span>:
83
<a name="l00079"></a>00079 <span class="keywordtype">double</span> d_width;
84
<a name="l00080"></a>00080 <span class="keywordtype">int</span> d_numThorns;
85
<a name="l00081"></a>00081 <span class="keywordtype">int</span> d_numThornLevels;
86
<a name="l00082"></a>00082 <span class="keywordtype">double</span> d_shrinkFactor;
87
<a name="l00083"></a>00083 };
88
<a name="l00084"></a>00084
89
<a name="l00085"></a>00085 <span class="preprocessor">#endif // QWT_COMPASS_ROSE_H</span>
90
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 22 16:54:06 2009 for Qwt User's Guide by
91
<a href="http://www.doxygen.org/index.html">
92
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>