No Description

class_bird.tex 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. \hypertarget{class_bird}{}\section{Bird Class Reference}
  2. \label{class_bird}\index{Bird@{Bird}}
  3. {\ttfamily \#include $<$bird.\+h$>$}
  4. Inheritance diagram for Bird\+:\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=2.000000cm]{class_bird}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Public Types}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. enum \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} \{ \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1}{U\+N\+I},
  14. \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070}{A\+N\+G\+R\+Y},
  15. \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049}{U\+P\+S\+E\+T},
  16. \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008}{B\+U\+S\+H\+Y}
  17. \}
  18. \end{DoxyCompactItemize}
  19. \subsection*{Public Member Functions}
  20. \begin{DoxyCompactItemize}
  21. \item
  22. \hyperlink{class_bird_abfe484323ac9e48a6371eef4de8538fe}{Bird} (Q\+Widget $\ast$parent=0)
  23. \begin{DoxyCompactList}\small\item\em Default constructor. The properties of the bird are set as follows\+: size\+: set to random value of either 50, 100, 150 or 200. \end{DoxyCompactList}\item
  24. \hyperlink{class_bird_aa9728cc9ffc34f902140c38ba732f6cc}{Bird} (int, \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type}, Q\+String, Q\+String, Q\+Widget $\ast$parent=0)
  25. \begin{DoxyCompactList}\small\item\em Constructor which accepts specification of the attributes of the bird. \end{DoxyCompactList}\item
  26. \hypertarget{class_bird_a9ca7641056d08c5f73263d2379ac47e0}{}Q\+String \hyperlink{class_bird_a9ca7641056d08c5f73263d2379ac47e0}{get\+Eye\+Color} () const \label{class_bird_a9ca7641056d08c5f73263d2379ac47e0}
  27. \begin{DoxyCompactList}\small\item\em Getter for the eye\+Color. \end{DoxyCompactList}\item
  28. \hypertarget{class_bird_a41a64913760b45a1c515047878d92583}{}Q\+String \hyperlink{class_bird_a41a64913760b45a1c515047878d92583}{get\+Face\+Color} () const \label{class_bird_a41a64913760b45a1c515047878d92583}
  29. \begin{DoxyCompactList}\small\item\em Getter for the face\+Color. \end{DoxyCompactList}\item
  30. void \hyperlink{class_bird_a835df93d19d5467ae4380273619d39e5}{set\+Eye\+Color} (Q\+String)
  31. \begin{DoxyCompactList}\small\item\em Setter for the eye\+Color. \end{DoxyCompactList}\item
  32. void \hyperlink{class_bird_a0800cd1d6974f949af715da44eec9476}{set\+Face\+Color} (Q\+String)
  33. \begin{DoxyCompactList}\small\item\em Setter for the face color. \end{DoxyCompactList}\item
  34. \hypertarget{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a}{}int \hyperlink{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a}{get\+Size} () const \label{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a}
  35. \begin{DoxyCompactList}\small\item\em Getter for the bird size. \end{DoxyCompactList}\item
  36. \hypertarget{class_bird_ac3c144d4c4e3de1821b531b6ad20e4b8}{}\hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} {\bfseries get\+Eyebrow} () const \label{class_bird_ac3c144d4c4e3de1821b531b6ad20e4b8}
  37. \item
  38. void \hyperlink{class_bird_afe637db83f012091302bc04d29a5d1be}{set\+Size} (int)
  39. \begin{DoxyCompactList}\small\item\em Setter for the bird size. \end{DoxyCompactList}\item
  40. void \hyperlink{class_bird_a631b29bf1daab6e7d029df40664a0604}{set\+Eyebrow} (\hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type})
  41. \begin{DoxyCompactList}\small\item\em Setter for the eyebrow type. \end{DoxyCompactList}\item
  42. Qt\+::\+Global\+Color \hyperlink{class_bird_a9e62ffa00de025d9d4b003e302c70e0e}{get\+Color} (Q\+String) const
  43. \begin{DoxyCompactList}\small\item\em Converts a color specified as string to a Qt\+::\+Global\+Color. \end{DoxyCompactList}\end{DoxyCompactItemize}
  44. \subsection*{Protected Member Functions}
  45. \begin{DoxyCompactItemize}
  46. \item
  47. \hypertarget{class_bird_ac7c0133625489af1aed22ee376272d15}{}void \hyperlink{class_bird_ac7c0133625489af1aed22ee376272d15}{paint\+Event} (Q\+Paint\+Event $\ast$)\label{class_bird_ac7c0133625489af1aed22ee376272d15}
  48. \begin{DoxyCompactList}\small\item\em This function is automatically invoked each time the widget or its parent receives a repaint signal. \end{DoxyCompactList}\end{DoxyCompactItemize}
  49. \subsection*{Private Member Functions}
  50. \begin{DoxyCompactItemize}
  51. \item
  52. int \hyperlink{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7}{rand\+Int} (int min, int max)
  53. \begin{DoxyCompactList}\small\item\em Generates a random integer in the range \mbox{[}min, max\mbox{]}. \end{DoxyCompactList}\end{DoxyCompactItemize}
  54. \subsection*{Private Attributes}
  55. \begin{DoxyCompactItemize}
  56. \item
  57. int \hyperlink{class_bird_aa8e23a86d722c6f81f969c556cef0342}{size}
  58. \item
  59. \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} \hyperlink{class_bird_a9ec579543e7139067b28fa07d6121c57}{eye\+Brow}
  60. \item
  61. Q\+String \hyperlink{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba}{color}
  62. \item
  63. Q\+String \hyperlink{class_bird_a3a2f86b733b043678c46554543689a11}{e\+Color}
  64. \end{DoxyCompactItemize}
  65. \subsection{Detailed Description}
  66. A class to represent birds.
  67. \hyperlink{class_bird}{Bird} is a subclass of Q\+Widget. This means that the following Q\+Widget functions are also available for objects of the class \hyperlink{class_bird}{Bird}\+:
  68. \begin{DoxyItemize}
  69. \item move(int x, int y)\+: to move the bird to position (x,y)
  70. \item x(), y()\+: get the x position, get the y() position
  71. \item hide()\+: to hide a bird that has been painted
  72. \end{DoxyItemize}
  73. \subsection{Member Enumeration Documentation}
  74. \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{}\index{Bird@{Bird}!Eye\+Brow\+Type@{Eye\+Brow\+Type}}
  75. \index{Eye\+Brow\+Type@{Eye\+Brow\+Type}!Bird@{Bird}}
  76. \subsubsection[{Eye\+Brow\+Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Bird\+::\+Eye\+Brow\+Type}}\label{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}
  77. Enum type for the Eye\+Brow \begin{Desc}
  78. \item[Enumerator]\par
  79. \begin{description}
  80. \index{U\+N\+I@{U\+N\+I}!Bird@{Bird}}\index{Bird@{Bird}!U\+N\+I@{U\+N\+I}}\item[{\em
  81. \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1}{}U\+N\+I\label{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1}
  82. }]enum value 0 \index{A\+N\+G\+R\+Y@{A\+N\+G\+R\+Y}!Bird@{Bird}}\index{Bird@{Bird}!A\+N\+G\+R\+Y@{A\+N\+G\+R\+Y}}\item[{\em
  83. \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070}{}A\+N\+G\+R\+Y\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070}
  84. }]enum value 1 \index{U\+P\+S\+E\+T@{U\+P\+S\+E\+T}!Bird@{Bird}}\index{Bird@{Bird}!U\+P\+S\+E\+T@{U\+P\+S\+E\+T}}\item[{\em
  85. \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049}{}U\+P\+S\+E\+T\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049}
  86. }]enum value 2 \index{B\+U\+S\+H\+Y@{B\+U\+S\+H\+Y}!Bird@{Bird}}\index{Bird@{Bird}!B\+U\+S\+H\+Y@{B\+U\+S\+H\+Y}}\item[{\em
  87. \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008}{}B\+U\+S\+H\+Y\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008}
  88. }]enum value 3 \end{description}
  89. \end{Desc}
  90. \subsection{Constructor \& Destructor Documentation}
  91. \hypertarget{class_bird_abfe484323ac9e48a6371eef4de8538fe}{}\index{Bird@{Bird}!Bird@{Bird}}
  92. \index{Bird@{Bird}!Bird@{Bird}}
  93. \subsubsection[{Bird}]{\setlength{\rightskip}{0pt plus 5cm}Bird\+::\+Bird (
  94. \begin{DoxyParamCaption}
  95. \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}}
  96. \end{DoxyParamCaption}
  97. )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_bird_abfe484323ac9e48a6371eef4de8538fe}
  98. Default constructor. The properties of the bird are set as follows\+: size\+: set to random value of either 50, 100, 150 or 200.
  99. \begin{DoxyItemize}
  100. \item eye\+Brow\+: set randomly to one of the five possible values
  101. \item color and e\+Color\+: set randomly to one of the five possible colors\+: \char`\"{}green\char`\"{}, \char`\"{}blue\char`\"{}, \char`\"{}red\char`\"{}, \char`\"{}yellow\char`\"{}, \char`\"{}white\char`\"{}
  102. \end{DoxyItemize}\hypertarget{class_bird_aa9728cc9ffc34f902140c38ba732f6cc}{}\index{Bird@{Bird}!Bird@{Bird}}
  103. \index{Bird@{Bird}!Bird@{Bird}}
  104. \subsubsection[{Bird}]{\setlength{\rightskip}{0pt plus 5cm}Bird\+::\+Bird (
  105. \begin{DoxyParamCaption}
  106. \item[{int}]{s, }
  107. \item[{{\bf Eye\+Brow\+Type}}]{eb, }
  108. \item[{Q\+String}]{col, }
  109. \item[{Q\+String}]{eye, }
  110. \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}}
  111. \end{DoxyParamCaption}
  112. )}\label{class_bird_aa9728cc9ffc34f902140c38ba732f6cc}
  113. Constructor which accepts specification of the attributes of the bird.
  114. \begin{DoxyParams}{Parameters}
  115. {\em s} & size \\
  116. \hline
  117. {\em eb} & eye\+Brow \\
  118. \hline
  119. {\em col} & (face\+Color) \\
  120. \hline
  121. {\em eye} & (eye\+Color) \\
  122. \hline
  123. \end{DoxyParams}
  124. \subsection{Member Function Documentation}
  125. \hypertarget{class_bird_a9e62ffa00de025d9d4b003e302c70e0e}{}\index{Bird@{Bird}!get\+Color@{get\+Color}}
  126. \index{get\+Color@{get\+Color}!Bird@{Bird}}
  127. \subsubsection[{get\+Color}]{\setlength{\rightskip}{0pt plus 5cm}Qt\+::\+Global\+Color Bird\+::get\+Color (
  128. \begin{DoxyParamCaption}
  129. \item[{Q\+String}]{color}
  130. \end{DoxyParamCaption}
  131. ) const}\label{class_bird_a9e62ffa00de025d9d4b003e302c70e0e}
  132. Converts a color specified as string to a Qt\+::\+Global\+Color.
  133. \begin{DoxyParams}{Parameters}
  134. {\em color} & string with a color \\
  135. \hline
  136. \end{DoxyParams}
  137. \hypertarget{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7}{}\index{Bird@{Bird}!rand\+Int@{rand\+Int}}
  138. \index{rand\+Int@{rand\+Int}!Bird@{Bird}}
  139. \subsubsection[{rand\+Int}]{\setlength{\rightskip}{0pt plus 5cm}int Bird\+::rand\+Int (
  140. \begin{DoxyParamCaption}
  141. \item[{int}]{min, }
  142. \item[{int}]{max}
  143. \end{DoxyParamCaption}
  144. )\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7}
  145. Generates a random integer in the range \mbox{[}min, max\mbox{]}.
  146. \begin{DoxyParams}{Parameters}
  147. {\em min} & minimum random value \\
  148. \hline
  149. {\em max} & maximum random value \\
  150. \hline
  151. \end{DoxyParams}
  152. \hypertarget{class_bird_a631b29bf1daab6e7d029df40664a0604}{}\index{Bird@{Bird}!set\+Eyebrow@{set\+Eyebrow}}
  153. \index{set\+Eyebrow@{set\+Eyebrow}!Bird@{Bird}}
  154. \subsubsection[{set\+Eyebrow}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Eyebrow (
  155. \begin{DoxyParamCaption}
  156. \item[{{\bf Eye\+Brow\+Type}}]{eb}
  157. \end{DoxyParamCaption}
  158. )}\label{class_bird_a631b29bf1daab6e7d029df40664a0604}
  159. Setter for the eyebrow type.
  160. \begin{DoxyParams}{Parameters}
  161. {\em eb} & eyebrow type \\
  162. \hline
  163. \end{DoxyParams}
  164. \hypertarget{class_bird_a835df93d19d5467ae4380273619d39e5}{}\index{Bird@{Bird}!set\+Eye\+Color@{set\+Eye\+Color}}
  165. \index{set\+Eye\+Color@{set\+Eye\+Color}!Bird@{Bird}}
  166. \subsubsection[{set\+Eye\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Eye\+Color (
  167. \begin{DoxyParamCaption}
  168. \item[{Q\+String}]{eye}
  169. \end{DoxyParamCaption}
  170. )}\label{class_bird_a835df93d19d5467ae4380273619d39e5}
  171. Setter for the eye\+Color.
  172. \begin{DoxyParams}{Parameters}
  173. {\em eye} & eye\+Color \\
  174. \hline
  175. \end{DoxyParams}
  176. \hypertarget{class_bird_a0800cd1d6974f949af715da44eec9476}{}\index{Bird@{Bird}!set\+Face\+Color@{set\+Face\+Color}}
  177. \index{set\+Face\+Color@{set\+Face\+Color}!Bird@{Bird}}
  178. \subsubsection[{set\+Face\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Face\+Color (
  179. \begin{DoxyParamCaption}
  180. \item[{Q\+String}]{col}
  181. \end{DoxyParamCaption}
  182. )}\label{class_bird_a0800cd1d6974f949af715da44eec9476}
  183. Setter for the face color.
  184. \begin{DoxyParams}{Parameters}
  185. {\em col} & face Color \\
  186. \hline
  187. \end{DoxyParams}
  188. \hypertarget{class_bird_afe637db83f012091302bc04d29a5d1be}{}\index{Bird@{Bird}!set\+Size@{set\+Size}}
  189. \index{set\+Size@{set\+Size}!Bird@{Bird}}
  190. \subsubsection[{set\+Size}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Size (
  191. \begin{DoxyParamCaption}
  192. \item[{int}]{s}
  193. \end{DoxyParamCaption}
  194. )}\label{class_bird_afe637db83f012091302bc04d29a5d1be}
  195. Setter for the bird size.
  196. \begin{DoxyParams}{Parameters}
  197. {\em s} & bird size \\
  198. \hline
  199. \end{DoxyParams}
  200. \subsection{Member Data Documentation}
  201. \hypertarget{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba}{}\index{Bird@{Bird}!color@{color}}
  202. \index{color@{color}!Bird@{Bird}}
  203. \subsubsection[{color}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String Bird\+::color\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba}
  204. face color (cara) \hypertarget{class_bird_a3a2f86b733b043678c46554543689a11}{}\index{Bird@{Bird}!e\+Color@{e\+Color}}
  205. \index{e\+Color@{e\+Color}!Bird@{Bird}}
  206. \subsubsection[{e\+Color}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String Bird\+::e\+Color\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a3a2f86b733b043678c46554543689a11}
  207. eye color (ojos) \hypertarget{class_bird_a9ec579543e7139067b28fa07d6121c57}{}\index{Bird@{Bird}!eye\+Brow@{eye\+Brow}}
  208. \index{eye\+Brow@{eye\+Brow}!Bird@{Bird}}
  209. \subsubsection[{eye\+Brow}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eye\+Brow\+Type} Bird\+::eye\+Brow\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a9ec579543e7139067b28fa07d6121c57}
  210. eyebrow type (ceja) \hypertarget{class_bird_aa8e23a86d722c6f81f969c556cef0342}{}\index{Bird@{Bird}!size@{size}}
  211. \index{size@{size}!Bird@{Bird}}
  212. \subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}int Bird\+::size\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_aa8e23a86d722c6f81f969c556cef0342}
  213. size of the bird
  214. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  215. \item
  216. bird.\+h\item
  217. bird.\+cpp\end{DoxyCompactItemize}