Serial-Studio/libs/QMapControl/html/arrowpoint_8h_source.html
2021-12-06 10:56:03 -06:00

123 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>QMapControl: arrowpoint.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">QMapControl
&#160;<span id="projectnumber">0.9.7.4</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">arrowpoint.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">* This file is part of QMapControl,</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">* an open-source cross-platform map widget</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">* Copyright (C) 2010 Jeffery MacEachern</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">* Based on CirclePoint code by Kai Winter</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">* This program is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">* it under the terms of the GNU Lesser General Public License as published by</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">* the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">* (at your option) any later version.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">* This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">* but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">* GNU Lesser General Public License for more details.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">* You should have received a copy of the GNU Lesser General Public License</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">* along with QMapControl. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">* Contact e-mail: kaiwinter@gmx.de</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">* Program URL : http://qmapcontrol.sourceforge.net/</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#ifndef ARROWPOINT_H</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#define ARROWPOINT_H</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;QBrush&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;qmapcontrol_global.h&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;math.h&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;point.h&quot;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceqmapcontrol.html">qmapcontrol</a></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classqmapcontrol_1_1ArrowPoint.html"> 45</a></span>&#160; <span class="keyword">class </span>QMAPCONTROL_EXPORT <a class="code" href="classqmapcontrol_1_1ArrowPoint.html">ArrowPoint</a> : <span class="keyword">public</span> <a class="code" href="classqmapcontrol_1_1Point.html">Point</a></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; {</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="classqmapcontrol_1_1ArrowPoint.html">ArrowPoint</a>(qreal x, qreal y, <span class="keywordtype">int</span> sideLength, qreal heading, QString name = QString(), <a class="code" href="classqmapcontrol_1_1Point.html#acdfaca60ec19c0265bac2692d7982726">Alignment</a> alignment = Middle, QPen* pen=0);</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keyword">virtual</span> ~<a class="code" href="classqmapcontrol_1_1ArrowPoint.html">ArrowPoint</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPen(QPen* pen);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">void</span> setHeading(qreal heading);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; qreal getHeading() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordtype">void</span> drawArrow();</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="comment">// Heading</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; qreal h;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="comment">// Brush to fill the arrow with - solid colour, same as pen</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; QBrush mybrush;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; };</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;}</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="classqmapcontrol_1_1Point_html_acdfaca60ec19c0265bac2692d7982726"><div class="ttname"><a href="classqmapcontrol_1_1Point.html#acdfaca60ec19c0265bac2692d7982726">qmapcontrol::Point::Alignment</a></div><div class="ttdeci">Alignment</div><div class="ttdoc">sets where the point should be aligned </div><div class="ttdef"><b>Definition:</b> point.h:75</div></div>
<div class="ttc" id="classqmapcontrol_1_1Point_html"><div class="ttname"><a href="classqmapcontrol_1_1Point.html">qmapcontrol::Point</a></div><div class="ttdoc">A geometric point to draw objects into maps. </div><div class="ttdef"><b>Definition:</b> point.h:66</div></div>
<div class="ttc" id="classqmapcontrol_1_1ArrowPoint_html"><div class="ttname"><a href="classqmapcontrol_1_1ArrowPoint.html">qmapcontrol::ArrowPoint</a></div><div class="ttdoc">Draws a directed arrow (showing orientation) into the map. </div><div class="ttdef"><b>Definition:</b> arrowpoint.h:45</div></div>
<div class="ttc" id="namespaceqmapcontrol_html"><div class="ttname"><a href="namespaceqmapcontrol.html">qmapcontrol</a></div><div class="ttdoc">QMapControl namespace. </div><div class="ttdef"><b>Definition:</b> arrowpoint.cpp:28</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Nov 16 2014 18:28:17 for QMapControl by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>