\hypertarget{class_bird}{}\section{Bird Class Reference} \label{class_bird}\index{Bird@{Bird}} {\ttfamily \#include $<$bird.\+h$>$} Inheritance diagram for Bird\+:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{class_bird} \end{center} \end{figure} \subsection*{Public Types} \begin{DoxyCompactItemize} \item enum \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} \{ \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1}{U\+N\+I}, \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070}{A\+N\+G\+R\+Y}, \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049}{U\+P\+S\+E\+T}, \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008}{B\+U\+S\+H\+Y} \} \end{DoxyCompactItemize} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hyperlink{class_bird_abfe484323ac9e48a6371eef4de8538fe}{Bird} (Q\+Widget $\ast$parent=0) \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 \hyperlink{class_bird_aa9728cc9ffc34f902140c38ba732f6cc}{Bird} (int, \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type}, Q\+String, Q\+String, Q\+Widget $\ast$parent=0) \begin{DoxyCompactList}\small\item\em Constructor which accepts specification of the attributes of the bird. \end{DoxyCompactList}\item \hypertarget{class_bird_a9ca7641056d08c5f73263d2379ac47e0}{}Q\+String \hyperlink{class_bird_a9ca7641056d08c5f73263d2379ac47e0}{get\+Eye\+Color} () const \label{class_bird_a9ca7641056d08c5f73263d2379ac47e0} \begin{DoxyCompactList}\small\item\em Getter for the eye\+Color. \end{DoxyCompactList}\item \hypertarget{class_bird_a41a64913760b45a1c515047878d92583}{}Q\+String \hyperlink{class_bird_a41a64913760b45a1c515047878d92583}{get\+Face\+Color} () const \label{class_bird_a41a64913760b45a1c515047878d92583} \begin{DoxyCompactList}\small\item\em Getter for the face\+Color. \end{DoxyCompactList}\item void \hyperlink{class_bird_a835df93d19d5467ae4380273619d39e5}{set\+Eye\+Color} (Q\+String) \begin{DoxyCompactList}\small\item\em Setter for the eye\+Color. \end{DoxyCompactList}\item void \hyperlink{class_bird_a0800cd1d6974f949af715da44eec9476}{set\+Face\+Color} (Q\+String) \begin{DoxyCompactList}\small\item\em Setter for the face color. \end{DoxyCompactList}\item \hypertarget{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a}{}int \hyperlink{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a}{get\+Size} () const \label{class_bird_a48ac642e41fd1bd99ce3915c14d4bb4a} \begin{DoxyCompactList}\small\item\em Getter for the bird size. \end{DoxyCompactList}\item \hypertarget{class_bird_ac3c144d4c4e3de1821b531b6ad20e4b8}{}\hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} {\bfseries get\+Eyebrow} () const \label{class_bird_ac3c144d4c4e3de1821b531b6ad20e4b8} \item void \hyperlink{class_bird_afe637db83f012091302bc04d29a5d1be}{set\+Size} (int) \begin{DoxyCompactList}\small\item\em Setter for the bird size. \end{DoxyCompactList}\item void \hyperlink{class_bird_a631b29bf1daab6e7d029df40664a0604}{set\+Eyebrow} (\hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type}) \begin{DoxyCompactList}\small\item\em Setter for the eyebrow type. \end{DoxyCompactList}\item Qt\+::\+Global\+Color \hyperlink{class_bird_a9e62ffa00de025d9d4b003e302c70e0e}{get\+Color} (Q\+String) const \begin{DoxyCompactList}\small\item\em Converts a color specified as string to a Qt\+::\+Global\+Color. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Protected Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{class_bird_ac7c0133625489af1aed22ee376272d15}{}void \hyperlink{class_bird_ac7c0133625489af1aed22ee376272d15}{paint\+Event} (Q\+Paint\+Event $\ast$)\label{class_bird_ac7c0133625489af1aed22ee376272d15} \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} \subsection*{Private Member Functions} \begin{DoxyCompactItemize} \item int \hyperlink{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7}{rand\+Int} (int min, int max) \begin{DoxyCompactList}\small\item\em Generates a random integer in the range \mbox{[}min, max\mbox{]}. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Private Attributes} \begin{DoxyCompactItemize} \item int \hyperlink{class_bird_aa8e23a86d722c6f81f969c556cef0342}{size} \item \hyperlink{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{Eye\+Brow\+Type} \hyperlink{class_bird_a9ec579543e7139067b28fa07d6121c57}{eye\+Brow} \item Q\+String \hyperlink{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba}{color} \item Q\+String \hyperlink{class_bird_a3a2f86b733b043678c46554543689a11}{e\+Color} \end{DoxyCompactItemize} \subsection{Detailed Description} A class to represent birds. \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}\+: \begin{DoxyItemize} \item move(int x, int y)\+: to move the bird to position (x,y) \item x(), y()\+: get the x position, get the y() position \item hide()\+: to hide a bird that has been painted \end{DoxyItemize} \subsection{Member Enumeration Documentation} \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516ec}{}\index{Bird@{Bird}!Eye\+Brow\+Type@{Eye\+Brow\+Type}} \index{Eye\+Brow\+Type@{Eye\+Brow\+Type}!Bird@{Bird}} \subsubsection[{Eye\+Brow\+Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Bird\+::\+Eye\+Brow\+Type}}\label{class_bird_a1e608d95cce3b3c7b1497d86b37516ec} Enum type for the Eye\+Brow \begin{Desc} \item[Enumerator]\par \begin{description} \index{U\+N\+I@{U\+N\+I}!Bird@{Bird}}\index{Bird@{Bird}!U\+N\+I@{U\+N\+I}}\item[{\em \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1}{}U\+N\+I\label{class_bird_a1e608d95cce3b3c7b1497d86b37516ecaf9935ec07fd09a4b397eea6c57a102e1} }]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 \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070}{}A\+N\+G\+R\+Y\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca24536e544c195223cacd716d413a8070} }]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 \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049}{}U\+P\+S\+E\+T\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca670f5ceeff9e3e634754d49e77cdc049} }]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 \hypertarget{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008}{}B\+U\+S\+H\+Y\label{class_bird_a1e608d95cce3b3c7b1497d86b37516eca8e3136f10413edb87bd280f4a5c15008} }]enum value 3 \end{description} \end{Desc} \subsection{Constructor \& Destructor Documentation} \hypertarget{class_bird_abfe484323ac9e48a6371eef4de8538fe}{}\index{Bird@{Bird}!Bird@{Bird}} \index{Bird@{Bird}!Bird@{Bird}} \subsubsection[{Bird}]{\setlength{\rightskip}{0pt plus 5cm}Bird\+::\+Bird ( \begin{DoxyParamCaption} \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_bird_abfe484323ac9e48a6371eef4de8538fe} Default constructor. The properties of the bird are set as follows\+: size\+: set to random value of either 50, 100, 150 or 200. \begin{DoxyItemize} \item eye\+Brow\+: set randomly to one of the five possible values \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`\"{} \end{DoxyItemize}\hypertarget{class_bird_aa9728cc9ffc34f902140c38ba732f6cc}{}\index{Bird@{Bird}!Bird@{Bird}} \index{Bird@{Bird}!Bird@{Bird}} \subsubsection[{Bird}]{\setlength{\rightskip}{0pt plus 5cm}Bird\+::\+Bird ( \begin{DoxyParamCaption} \item[{int}]{s, } \item[{{\bf Eye\+Brow\+Type}}]{eb, } \item[{Q\+String}]{col, } \item[{Q\+String}]{eye, } \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}} \end{DoxyParamCaption} )}\label{class_bird_aa9728cc9ffc34f902140c38ba732f6cc} Constructor which accepts specification of the attributes of the bird. \begin{DoxyParams}{Parameters} {\em s} & size \\ \hline {\em eb} & eye\+Brow \\ \hline {\em col} & (face\+Color) \\ \hline {\em eye} & (eye\+Color) \\ \hline \end{DoxyParams} \subsection{Member Function Documentation} \hypertarget{class_bird_a9e62ffa00de025d9d4b003e302c70e0e}{}\index{Bird@{Bird}!get\+Color@{get\+Color}} \index{get\+Color@{get\+Color}!Bird@{Bird}} \subsubsection[{get\+Color}]{\setlength{\rightskip}{0pt plus 5cm}Qt\+::\+Global\+Color Bird\+::get\+Color ( \begin{DoxyParamCaption} \item[{Q\+String}]{color} \end{DoxyParamCaption} ) const}\label{class_bird_a9e62ffa00de025d9d4b003e302c70e0e} Converts a color specified as string to a Qt\+::\+Global\+Color. \begin{DoxyParams}{Parameters} {\em color} & string with a color \\ \hline \end{DoxyParams} \hypertarget{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7}{}\index{Bird@{Bird}!rand\+Int@{rand\+Int}} \index{rand\+Int@{rand\+Int}!Bird@{Bird}} \subsubsection[{rand\+Int}]{\setlength{\rightskip}{0pt plus 5cm}int Bird\+::rand\+Int ( \begin{DoxyParamCaption} \item[{int}]{min, } \item[{int}]{max} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a8a6fa1980da30e3bab3e2d051ce9d2f7} Generates a random integer in the range \mbox{[}min, max\mbox{]}. \begin{DoxyParams}{Parameters} {\em min} & minimum random value \\ \hline {\em max} & maximum random value \\ \hline \end{DoxyParams} \hypertarget{class_bird_a631b29bf1daab6e7d029df40664a0604}{}\index{Bird@{Bird}!set\+Eyebrow@{set\+Eyebrow}} \index{set\+Eyebrow@{set\+Eyebrow}!Bird@{Bird}} \subsubsection[{set\+Eyebrow}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Eyebrow ( \begin{DoxyParamCaption} \item[{{\bf Eye\+Brow\+Type}}]{eb} \end{DoxyParamCaption} )}\label{class_bird_a631b29bf1daab6e7d029df40664a0604} Setter for the eyebrow type. \begin{DoxyParams}{Parameters} {\em eb} & eyebrow type \\ \hline \end{DoxyParams} \hypertarget{class_bird_a835df93d19d5467ae4380273619d39e5}{}\index{Bird@{Bird}!set\+Eye\+Color@{set\+Eye\+Color}} \index{set\+Eye\+Color@{set\+Eye\+Color}!Bird@{Bird}} \subsubsection[{set\+Eye\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Eye\+Color ( \begin{DoxyParamCaption} \item[{Q\+String}]{eye} \end{DoxyParamCaption} )}\label{class_bird_a835df93d19d5467ae4380273619d39e5} Setter for the eye\+Color. \begin{DoxyParams}{Parameters} {\em eye} & eye\+Color \\ \hline \end{DoxyParams} \hypertarget{class_bird_a0800cd1d6974f949af715da44eec9476}{}\index{Bird@{Bird}!set\+Face\+Color@{set\+Face\+Color}} \index{set\+Face\+Color@{set\+Face\+Color}!Bird@{Bird}} \subsubsection[{set\+Face\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Face\+Color ( \begin{DoxyParamCaption} \item[{Q\+String}]{col} \end{DoxyParamCaption} )}\label{class_bird_a0800cd1d6974f949af715da44eec9476} Setter for the face color. \begin{DoxyParams}{Parameters} {\em col} & face Color \\ \hline \end{DoxyParams} \hypertarget{class_bird_afe637db83f012091302bc04d29a5d1be}{}\index{Bird@{Bird}!set\+Size@{set\+Size}} \index{set\+Size@{set\+Size}!Bird@{Bird}} \subsubsection[{set\+Size}]{\setlength{\rightskip}{0pt plus 5cm}void Bird\+::set\+Size ( \begin{DoxyParamCaption} \item[{int}]{s} \end{DoxyParamCaption} )}\label{class_bird_afe637db83f012091302bc04d29a5d1be} Setter for the bird size. \begin{DoxyParams}{Parameters} {\em s} & bird size \\ \hline \end{DoxyParams} \subsection{Member Data Documentation} \hypertarget{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba}{}\index{Bird@{Bird}!color@{color}} \index{color@{color}!Bird@{Bird}} \subsubsection[{color}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String Bird\+::color\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a53ffc41e40cf2c8c2ea71ffbb97e9dba} face color (cara) \hypertarget{class_bird_a3a2f86b733b043678c46554543689a11}{}\index{Bird@{Bird}!e\+Color@{e\+Color}} \index{e\+Color@{e\+Color}!Bird@{Bird}} \subsubsection[{e\+Color}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String Bird\+::e\+Color\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a3a2f86b733b043678c46554543689a11} eye color (ojos) \hypertarget{class_bird_a9ec579543e7139067b28fa07d6121c57}{}\index{Bird@{Bird}!eye\+Brow@{eye\+Brow}} \index{eye\+Brow@{eye\+Brow}!Bird@{Bird}} \subsubsection[{eye\+Brow}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eye\+Brow\+Type} Bird\+::eye\+Brow\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_a9ec579543e7139067b28fa07d6121c57} eyebrow type (ceja) \hypertarget{class_bird_aa8e23a86d722c6f81f969c556cef0342}{}\index{Bird@{Bird}!size@{size}} \index{size@{size}!Bird@{Bird}} \subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}int Bird\+::size\hspace{0.3cm}{\ttfamily [private]}}\label{class_bird_aa8e23a86d722c6f81f969c556cef0342} size of the bird The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} \item bird.\+h\item bird.\+cpp\end{DoxyCompactItemize}