Nav apraksta

line_8h_source.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.9.1"/>
  7. <title>My Project: line.h Source File</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td style="padding-left: 0.5em;">
  26. <div id="projectname">My Project
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="annotated.html"><span>Classes</span></a></li>
  42. <li class="current"><a href="files.html"><span>Files</span></a></li>
  43. <li>
  44. <div id="MSearchBox" class="MSearchBoxInactive">
  45. <span class="left">
  46. <img id="MSearchSelect" src="search/mag_sel.png"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. alt=""/>
  50. <input type="text" id="MSearchField" value="Search" accesskey="S"
  51. onfocus="searchBox.OnSearchFieldFocus(true)"
  52. onblur="searchBox.OnSearchFieldFocus(false)"
  53. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  54. </span><span class="right">
  55. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  56. </span>
  57. </div>
  58. </li>
  59. </ul>
  60. </div>
  61. <div id="navrow2" class="tabs2">
  62. <ul class="tablist">
  63. <li><a href="files.html"><span>File&#160;List</span></a></li>
  64. </ul>
  65. </div>
  66. </div><!-- top -->
  67. <!-- window showing the filter options -->
  68. <div id="MSearchSelectWindow"
  69. onmouseover="return searchBox.OnSearchSelectShow()"
  70. onmouseout="return searchBox.OnSearchSelectHide()"
  71. onkeydown="return searchBox.OnSearchSelectKey(event)">
  72. </div>
  73. <!-- iframe showing the search results (closed by default) -->
  74. <div id="MSearchResultsWindow">
  75. <iframe src="javascript:void(0)" frameborder="0"
  76. name="MSearchResults" id="MSearchResults">
  77. </iframe>
  78. </div>
  79. <div class="header">
  80. <div class="headertitle">
  81. <div class="title">line.h</div> </div>
  82. </div><!--header-->
  83. <div class="contents">
  84. <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef LINE_H</span></div>
  85. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define LINE_H</span></div>
  86. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div>
  87. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;QWidget&gt;</span></div>
  88. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;QPainter&gt;</span></div>
  89. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div>
  90. <div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_line.html"> 11</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_line.html">Line</a> : <span class="keyword">public</span> QWidget</div>
  91. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;{</div>
  92. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; Q_OBJECT</div>
  93. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="keyword">public</span>:</div>
  94. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div>
  95. <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; <span class="keyword">explicit</span> <a class="code" href="class_line.html#a4d475f9d634f50933ca84e25d7cf32f9">Line</a>(QWidget *parent = 0);</div>
  96. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
  97. <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="class_line.html#a4d475f9d634f50933ca84e25d7cf32f9">Line</a>(<span class="keywordtype">int</span> fromX, <span class="keywordtype">int</span> fromY, <span class="keywordtype">int</span> toX, <span class="keywordtype">int</span> toY, <span class="keywordtype">int</span> w, QColor c, QWidget *parent = 0);</div>
  98. <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div>
  99. <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="class_line.html#a4d475f9d634f50933ca84e25d7cf32f9">Line</a>(<span class="keywordtype">int</span> fromX, <span class="keywordtype">int</span> fromY, <span class="keywordtype">int</span> length, <span class="keywordtype">double</span> angle, <span class="keywordtype">int</span> w, QColor c, QWidget *parent = 0);</div>
  100. <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
  101. <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_line.html#ac1475ffee823a7c05b2ac91bfe61596d">setCoords</a>(<span class="keywordtype">int</span> fromX, <span class="keywordtype">int</span> fromY, <span class="keywordtype">int</span> toX, <span class="keywordtype">int</span> toY);</div>
  102. <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div>
  103. <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_line.html#ac5b6d8e786cf3820fa36b8bda7130823">setpenColor</a>(QColor c);</div>
  104. <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;</div>
  105. <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_line.html#a346d88820371b5a4710eed8a638fc451">setPenWidth</a>(<span class="keywordtype">int</span> w);</div>
  106. <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div>
  107. <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a0e23ee7edc154bd73fefab4d88cae150">getX0</a>();</div>
  108. <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
  109. <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a971146fd8bbf711123f03e45daf923c9">getY0</a>();</div>
  110. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
  111. <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a1f51d8df03219f5f63d656bc0e9b2830">getX1</a>();</div>
  112. <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div>
  113. <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a9cc398fdcf93212a3e4db28ac26a88a9">getY1</a>();</div>
  114. <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
  115. <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;signals:</div>
  116. <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
  117. <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="keyword">public</span> slots:</div>
  118. <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;</div>
  119. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="keyword">protected</span>:</div>
  120. <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_line.html#a7e1f30fa9d7375fd67a2b4cf5a1b6a76">paintEvent</a>(QPaintEvent *);</div>
  121. <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div>
  122. <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="keyword">private</span>:</div>
  123. <div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_line.html#a850c96af61bd595a68b5e867540204f1"> 154</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a647f6f5c0e2b197e3671f8bdb9ff64a2">x0</a>, </div>
  124. <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <a class="code" href="class_line.html#a8e276229892969c7d82f56581e0c168b">y0</a>, </div>
  125. <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <a class="code" href="class_line.html#a1c37aeef714f6c96454c2a9a2dadb69a">x1</a>, </div>
  126. <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <a class="code" href="class_line.html#a850c96af61bd595a68b5e867540204f1">y1</a>; </div>
  127. <div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="class_line.html#a4fc1d856f822dd0b88676e6c22a65f14"> 158</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_line.html#a4fc1d856f822dd0b88676e6c22a65f14">penWidth</a>; </div>
  128. <div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="class_line.html#a8778d952d4d2867bd2f31e5857c368b4"> 159</a></span>&#160; QColor <a class="code" href="class_line.html#a8778d952d4d2867bd2f31e5857c368b4">penColor</a>; </div>
  129. <div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;};</div>
  130. <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
  131. <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="preprocessor">#endif // LINE_H</span></div>
  132. <div class="ttc" id="class_line_html_a4d475f9d634f50933ca84e25d7cf32f9"><div class="ttname"><a href="class_line.html#a4d475f9d634f50933ca84e25d7cf32f9">Line::Line</a></div><div class="ttdeci">Line(QWidget *parent=0)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> line.cpp:12</div></div>
  133. <div class="ttc" id="class_line_html_a1c37aeef714f6c96454c2a9a2dadb69a"><div class="ttname"><a href="class_line.html#a1c37aeef714f6c96454c2a9a2dadb69a">Line::x1</a></div><div class="ttdeci">int x1</div><div class="ttdef"><b>Definition:</b> line.h:154</div></div>
  134. <div class="ttc" id="class_line_html_a8778d952d4d2867bd2f31e5857c368b4"><div class="ttname"><a href="class_line.html#a8778d952d4d2867bd2f31e5857c368b4">Line::penColor</a></div><div class="ttdeci">QColor penColor</div><div class="ttdef"><b>Definition:</b> line.h:159</div></div>
  135. <div class="ttc" id="class_line_html_a8e276229892969c7d82f56581e0c168b"><div class="ttname"><a href="class_line.html#a8e276229892969c7d82f56581e0c168b">Line::y0</a></div><div class="ttdeci">int y0</div><div class="ttdef"><b>Definition:</b> line.h:154</div></div>
  136. <div class="ttc" id="class_line_html_a850c96af61bd595a68b5e867540204f1"><div class="ttname"><a href="class_line.html#a850c96af61bd595a68b5e867540204f1">Line::y1</a></div><div class="ttdeci">int y1</div><div class="ttdef"><b>Definition:</b> line.h:154</div></div>
  137. <div class="ttc" id="class_line_html_ac1475ffee823a7c05b2ac91bfe61596d"><div class="ttname"><a href="class_line.html#ac1475ffee823a7c05b2ac91bfe61596d">Line::setCoords</a></div><div class="ttdeci">void setCoords(int fromX, int fromY, int toX, int toY)</div><div class="ttdoc">Setter for the line coordinates. </div><div class="ttdef"><b>Definition:</b> line.cpp:87</div></div>
  138. <div class="ttc" id="class_line_html_a1f51d8df03219f5f63d656bc0e9b2830"><div class="ttname"><a href="class_line.html#a1f51d8df03219f5f63d656bc0e9b2830">Line::getX1</a></div><div class="ttdeci">int getX1()</div><div class="ttdoc">Getter for the ending coordinate x. </div><div class="ttdef"><b>Definition:</b> line.cpp:138</div></div>
  139. <div class="ttc" id="class_line_html_a346d88820371b5a4710eed8a638fc451"><div class="ttname"><a href="class_line.html#a346d88820371b5a4710eed8a638fc451">Line::setPenWidth</a></div><div class="ttdeci">void setPenWidth(int w)</div><div class="ttdoc">Setter for the pen width. </div><div class="ttdef"><b>Definition:</b> line.cpp:111</div></div>
  140. <div class="ttc" id="class_line_html_a9cc398fdcf93212a3e4db28ac26a88a9"><div class="ttname"><a href="class_line.html#a9cc398fdcf93212a3e4db28ac26a88a9">Line::getY1</a></div><div class="ttdeci">int getY1()</div><div class="ttdoc">Getter for the ending coordinate y. </div><div class="ttdef"><b>Definition:</b> line.cpp:147</div></div>
  141. <div class="ttc" id="class_line_html"><div class="ttname"><a href="class_line.html">Line</a></div><div class="ttdef"><b>Definition:</b> line.h:11</div></div>
  142. <div class="ttc" id="class_line_html_a647f6f5c0e2b197e3671f8bdb9ff64a2"><div class="ttname"><a href="class_line.html#a647f6f5c0e2b197e3671f8bdb9ff64a2">Line::x0</a></div><div class="ttdeci">int x0</div><div class="ttdef"><b>Definition:</b> line.h:154</div></div>
  143. <div class="ttc" id="class_line_html_a4fc1d856f822dd0b88676e6c22a65f14"><div class="ttname"><a href="class_line.html#a4fc1d856f822dd0b88676e6c22a65f14">Line::penWidth</a></div><div class="ttdeci">int penWidth</div><div class="ttdef"><b>Definition:</b> line.h:158</div></div>
  144. <div class="ttc" id="class_line_html_a971146fd8bbf711123f03e45daf923c9"><div class="ttname"><a href="class_line.html#a971146fd8bbf711123f03e45daf923c9">Line::getY0</a></div><div class="ttdeci">int getY0()</div><div class="ttdoc">Getter for the starting coordinate y. </div><div class="ttdef"><b>Definition:</b> line.cpp:129</div></div>
  145. <div class="ttc" id="class_line_html_a0e23ee7edc154bd73fefab4d88cae150"><div class="ttname"><a href="class_line.html#a0e23ee7edc154bd73fefab4d88cae150">Line::getX0</a></div><div class="ttdeci">int getX0()</div><div class="ttdoc">Getter for the starting coordinate x. </div><div class="ttdef"><b>Definition:</b> line.cpp:120</div></div>
  146. <div class="ttc" id="class_line_html_a7e1f30fa9d7375fd67a2b4cf5a1b6a76"><div class="ttname"><a href="class_line.html#a7e1f30fa9d7375fd67a2b4cf5a1b6a76">Line::paintEvent</a></div><div class="ttdeci">void paintEvent(QPaintEvent *)</div><div class="ttdoc">The paint event function is automatically invoked whenever a resize or repaint happens. </div><div class="ttdef"><b>Definition:</b> line.cpp:156</div></div>
  147. <div class="ttc" id="class_line_html_ac5b6d8e786cf3820fa36b8bda7130823"><div class="ttname"><a href="class_line.html#ac5b6d8e786cf3820fa36b8bda7130823">Line::setpenColor</a></div><div class="ttdeci">void setpenColor(QColor c)</div><div class="ttdoc">Setter for the pen color. </div><div class="ttdef"><b>Definition:</b> line.cpp:102</div></div>
  148. </div><!-- fragment --></div><!-- contents -->
  149. <!-- start footer part -->
  150. <hr class="footer"/><address class="footer"><small>
  151. Generated on Mon Jun 22 2015 15:30:51 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  152. <img class="footer" src="doxygen.png" alt="doxygen"/>
  153. </a> 1.8.9.1
  154. </small></address>
  155. </body>
  156. </html>