暂无描述

bird_8h_source.html 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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: bird.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. <li><a href="globals.html"><span>File&#160;Members</span></a></li>
  65. </ul>
  66. </div>
  67. </div><!-- top -->
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. </div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. <div class="header">
  81. <div class="headertitle">
  82. <div class="title">bird.h</div> </div>
  83. </div><!--header-->
  84. <div class="contents">
  85. <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef BIRD_H</span></div>
  86. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define BIRD_H</span></div>
  87. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div>
  88. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;QWidget&gt;</span></div>
  89. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;QPainter&gt;</span></div>
  90. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div>
  91. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div>
  92. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div>
  93. <div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="class_bird.html"> 16</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_bird.html">Bird</a> : <span class="keyword">public</span> QWidget</div>
  94. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;{</div>
  95. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; Q_OBJECT</div>
  96. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">public</span>:</div>
  97. <div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec"> 23</a></span>&#160; <span class="keyword">enum</span> <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">EyeBrowType</a> {</div>
  98. <div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1"> 24</a></span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1">UNI</a>, </div>
  99. <div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070"> 25</a></span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070">ANGRY</a>, </div>
  100. <div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049"> 26</a></span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049">UPSET</a>, </div>
  101. <div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008"> 27</a></span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008">BUSHY</a> </div>
  102. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; };</div>
  103. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; </div>
  104. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">explicit</span> <a class="code" href="class_bird.html#abfe484323ac9e48a6371eef4de8538fe">Bird</a>(QWidget *parent = 0);</div>
  105. <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div>
  106. <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="class_bird.html#abfe484323ac9e48a6371eef4de8538fe">Bird</a>(<span class="keywordtype">int</span> , <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">EyeBrowType</a> , QString , QString, QWidget *parent = 0) ;</div>
  107. <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
  108. <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; QString <a class="code" href="class_bird.html#a9ca7641056d08c5f73263d2379ac47e0">getEyeColor</a>() <span class="keyword">const</span>;</div>
  109. <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div>
  110. <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; QString <a class="code" href="class_bird.html#a41a64913760b45a1c515047878d92583">getFaceColor</a>() <span class="keyword">const</span>;</div>
  111. <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div>
  112. <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bird.html#a835df93d19d5467ae4380273619d39e5">setEyeColor</a>(QString) ;</div>
  113. <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
  114. <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bird.html#a0800cd1d6974f949af715da44eec9476">setFaceColor</a>(QString) ;</div>
  115. <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
  116. <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_bird.html#a48ac642e41fd1bd99ce3915c14d4bb4a">getSize</a>() <span class="keyword">const</span> ;</div>
  117. <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
  118. <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">EyeBrowType</a> getEyebrow() <span class="keyword">const</span>;</div>
  119. <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
  120. <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bird.html#afe637db83f012091302bc04d29a5d1be">setSize</a>(<span class="keywordtype">int</span>) ;</div>
  121. <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div>
  122. <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bird.html#a631b29bf1daab6e7d029df40664a0604">setEyebrow</a>(<a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">EyeBrowType</a>) ;</div>
  123. <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div>
  124. <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; Qt::GlobalColor <a class="code" href="class_bird.html#a9e62ffa00de025d9d4b003e302c70e0e">getColor</a>(QString) <span class="keyword">const</span>;</div>
  125. <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div>
  126. <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;signals:</div>
  127. <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
  128. <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="keyword">public</span> slots:</div>
  129. <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
  130. <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="keyword">protected</span>:</div>
  131. <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bird.html#ac7c0133625489af1aed22ee376272d15">paintEvent</a>(QPaintEvent *);</div>
  132. <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div>
  133. <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<span class="keyword">private</span>:</div>
  134. <div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_bird.html#aa8e23a86d722c6f81f969c556cef0342"> 149</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_bird.html#aa8e23a86d722c6f81f969c556cef0342">size</a> ; </div>
  135. <div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="class_bird.html#a9ec579543e7139067b28fa07d6121c57"> 150</a></span>&#160; <a class="code" href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">EyeBrowType</a> <a class="code" href="class_bird.html#a9ec579543e7139067b28fa07d6121c57">eyeBrow</a> ; </div>
  136. <div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="class_bird.html#a53ffc41e40cf2c8c2ea71ffbb97e9dba"> 151</a></span>&#160; QString <a class="code" href="class_bird.html#a53ffc41e40cf2c8c2ea71ffbb97e9dba">color</a> ; </div>
  137. <div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="class_bird.html#a3a2f86b733b043678c46554543689a11"> 152</a></span>&#160; QString <a class="code" href="class_bird.html#a3a2f86b733b043678c46554543689a11">eColor</a> ; </div>
  138. <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_bird.html#a8a6fa1980da30e3bab3e2d051ce9d2f7">randInt</a>(<span class="keywordtype">int</span> min, <span class="keywordtype">int</span> max) ;</div>
  139. <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;};</div>
  140. <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div>
  141. <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<span class="preprocessor">#endif // BIRD_H</span></div>
  142. <div class="ttc" id="class_bird_html_abfe484323ac9e48a6371eef4de8538fe"><div class="ttname"><a href="class_bird.html#abfe484323ac9e48a6371eef4de8538fe">Bird::Bird</a></div><div class="ttdeci">Bird(QWidget *parent=0)</div><div class="ttdoc">Default constructor. The properties of the bird are set as follows: size: set to random value of eith...</div><div class="ttdef"><b>Definition:</b> bird.cpp:24</div></div>
  143. <div class="ttc" id="class_bird_html_a9ca7641056d08c5f73263d2379ac47e0"><div class="ttname"><a href="class_bird.html#a9ca7641056d08c5f73263d2379ac47e0">Bird::getEyeColor</a></div><div class="ttdeci">QString getEyeColor() const </div><div class="ttdoc">Getter for the eyeColor. </div><div class="ttdef"><b>Definition:</b> bird.cpp:66</div></div>
  144. <div class="ttc" id="class_bird_html_a53ffc41e40cf2c8c2ea71ffbb97e9dba"><div class="ttname"><a href="class_bird.html#a53ffc41e40cf2c8c2ea71ffbb97e9dba">Bird::color</a></div><div class="ttdeci">QString color</div><div class="ttdef"><b>Definition:</b> bird.h:151</div></div>
  145. <div class="ttc" id="class_bird_html_a0800cd1d6974f949af715da44eec9476"><div class="ttname"><a href="class_bird.html#a0800cd1d6974f949af715da44eec9476">Bird::setFaceColor</a></div><div class="ttdeci">void setFaceColor(QString)</div><div class="ttdoc">Setter for the face color. </div><div class="ttdef"><b>Definition:</b> bird.cpp:97</div></div>
  146. <div class="ttc" id="class_bird_html_a835df93d19d5467ae4380273619d39e5"><div class="ttname"><a href="class_bird.html#a835df93d19d5467ae4380273619d39e5">Bird::setEyeColor</a></div><div class="ttdeci">void setEyeColor(QString)</div><div class="ttdoc">Setter for the eyeColor. </div><div class="ttdef"><b>Definition:</b> bird.cpp:86</div></div>
  147. <div class="ttc" id="class_bird_html_a48ac642e41fd1bd99ce3915c14d4bb4a"><div class="ttname"><a href="class_bird.html#a48ac642e41fd1bd99ce3915c14d4bb4a">Bird::getSize</a></div><div class="ttdeci">int getSize() const </div><div class="ttdoc">Getter for the bird size. </div><div class="ttdef"><b>Definition:</b> bird.cpp:106</div></div>
  148. <div class="ttc" id="class_bird_html_ac7c0133625489af1aed22ee376272d15"><div class="ttname"><a href="class_bird.html#ac7c0133625489af1aed22ee376272d15">Bird::paintEvent</a></div><div class="ttdeci">void paintEvent(QPaintEvent *)</div><div class="ttdoc">This function is automatically invoked each time the widget or its parent receives a repaint signal...</div><div class="ttdef"><b>Definition:</b> bird.cpp:191</div></div>
  149. <div class="ttc" id="class_bird_html_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049"><div class="ttname"><a href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049">Bird::UPSET</a></div><div class="ttdef"><b>Definition:</b> bird.h:26</div></div>
  150. <div class="ttc" id="class_bird_html_a3a2f86b733b043678c46554543689a11"><div class="ttname"><a href="class_bird.html#a3a2f86b733b043678c46554543689a11">Bird::eColor</a></div><div class="ttdeci">QString eColor</div><div class="ttdef"><b>Definition:</b> bird.h:152</div></div>
  151. <div class="ttc" id="class_bird_html_a41a64913760b45a1c515047878d92583"><div class="ttname"><a href="class_bird.html#a41a64913760b45a1c515047878d92583">Bird::getFaceColor</a></div><div class="ttdeci">QString getFaceColor() const </div><div class="ttdoc">Getter for the faceColor. </div><div class="ttdef"><b>Definition:</b> bird.cpp:75</div></div>
  152. <div class="ttc" id="class_bird_html_a631b29bf1daab6e7d029df40664a0604"><div class="ttname"><a href="class_bird.html#a631b29bf1daab6e7d029df40664a0604">Bird::setEyebrow</a></div><div class="ttdeci">void setEyebrow(EyeBrowType)</div><div class="ttdoc">Setter for the eyebrow type. </div><div class="ttdef"><b>Definition:</b> bird.cpp:140</div></div>
  153. <div class="ttc" id="class_bird_html_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008"><div class="ttname"><a href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008">Bird::BUSHY</a></div><div class="ttdef"><b>Definition:</b> bird.h:27</div></div>
  154. <div class="ttc" id="class_bird_html_aa8e23a86d722c6f81f969c556cef0342"><div class="ttname"><a href="class_bird.html#aa8e23a86d722c6f81f969c556cef0342">Bird::size</a></div><div class="ttdeci">int size</div><div class="ttdef"><b>Definition:</b> bird.h:149</div></div>
  155. <div class="ttc" id="class_bird_html_a1e608d95cce3b3c7b1497d86b37516ec"><div class="ttname"><a href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ec">Bird::EyeBrowType</a></div><div class="ttdeci">EyeBrowType</div><div class="ttdef"><b>Definition:</b> bird.h:23</div></div>
  156. <div class="ttc" id="class_bird_html_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1"><div class="ttname"><a href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1">Bird::UNI</a></div><div class="ttdef"><b>Definition:</b> bird.h:24</div></div>
  157. <div class="ttc" id="class_bird_html_a8a6fa1980da30e3bab3e2d051ce9d2f7"><div class="ttname"><a href="class_bird.html#a8a6fa1980da30e3bab3e2d051ce9d2f7">Bird::randInt</a></div><div class="ttdeci">int randInt(int min, int max)</div><div class="ttdoc">Generates a random integer in the range [min, max]. </div><div class="ttdef"><b>Definition:</b> bird.cpp:178</div></div>
  158. <div class="ttc" id="class_bird_html_afe637db83f012091302bc04d29a5d1be"><div class="ttname"><a href="class_bird.html#afe637db83f012091302bc04d29a5d1be">Bird::setSize</a></div><div class="ttdeci">void setSize(int)</div><div class="ttdoc">Setter for the bird size. </div><div class="ttdef"><b>Definition:</b> bird.cpp:126</div></div>
  159. <div class="ttc" id="class_bird_html_a9e62ffa00de025d9d4b003e302c70e0e"><div class="ttname"><a href="class_bird.html#a9e62ffa00de025d9d4b003e302c70e0e">Bird::getColor</a></div><div class="ttdeci">Qt::GlobalColor getColor(QString) const </div><div class="ttdoc">Converts a color specified as string to a Qt::GlobalColor. </div><div class="ttdef"><b>Definition:</b> bird.cpp:153</div></div>
  160. <div class="ttc" id="class_bird_html"><div class="ttname"><a href="class_bird.html">Bird</a></div><div class="ttdef"><b>Definition:</b> bird.h:16</div></div>
  161. <div class="ttc" id="class_bird_html_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070"><div class="ttname"><a href="class_bird.html#a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070">Bird::ANGRY</a></div><div class="ttdef"><b>Definition:</b> bird.h:25</div></div>
  162. <div class="ttc" id="class_bird_html_a9ec579543e7139067b28fa07d6121c57"><div class="ttname"><a href="class_bird.html#a9ec579543e7139067b28fa07d6121c57">Bird::eyeBrow</a></div><div class="ttdeci">EyeBrowType eyeBrow</div><div class="ttdef"><b>Definition:</b> bird.h:150</div></div>
  163. </div><!-- fragment --></div><!-- contents -->
  164. <!-- start footer part -->
  165. <hr class="footer"/><address class="footer"><small>
  166. Generated on Fri Jun 5 2015 15:14:18 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  167. <img class="footer" src="doxygen.png" alt="doxygen"/>
  168. </a> 1.8.9.1
  169. </small></address>
  170. </body>
  171. </html>