No Description

class_drawing_window.tex 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. \hypertarget{class_drawing_window}{}\section{Referencia de la Clase Drawing\+Window}
  2. \label{class_drawing_window}\index{Drawing\+Window@{Drawing\+Window}}
  3. Diagrama de herencias de Drawing\+Window\begin{figure}[H]
  4. \begin{center}
  5. \leavevmode
  6. \includegraphics[height=2.000000cm]{class_drawing_window}
  7. \end{center}
  8. \end{figure}
  9. \subsection*{Métodos públicos}
  10. \begin{DoxyCompactItemize}
  11. \item
  12. \hyperlink{class_drawing_window_aff3d1b3cbeee8f0e92b49c050d8ca494}{Drawing\+Window} (Q\+Widget $\ast$parent=0)
  13. \begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item
  14. void \hyperlink{class_drawing_window_a3097e096223530c9f93737441d77422f}{add\+Line} (int x0, int y0, int x1, int y1, int width, Q\+Color color)
  15. \begin{DoxyCompactList}\small\item\em Anade una linea a la ventana, especificando las coordenadas de los puntos inciales y finales. \end{DoxyCompactList}\item
  16. void \hyperlink{class_drawing_window_ae03504caa7648347ec56eb58cf5b5db4}{add\+Line\+Polar} (int x0, int y0, int length, double angle, int width, Q\+Color color)
  17. \begin{DoxyCompactList}\small\item\em Anade una linea a la ventana, especificando las coordenadas del punto inicial, el largo y el angulo. \end{DoxyCompactList}\item
  18. void \hyperlink{class_drawing_window_a34dec0c13dc01eaa303589e28acecf95}{box} (int x, int y, int side\+Length, Q\+Color c)
  19. \begin{DoxyCompactList}\small\item\em Dibuja una caja con los lados del tamano side\+Length. \end{DoxyCompactList}\item
  20. void \hyperlink{class_drawing_window_aa58d7247e92b513920c788523187fcbd}{boxes} (int x, int y, int side\+Length, double shrink\+Factor, int smallest\+Length, Q\+Color c)
  21. \begin{DoxyCompactList}\small\item\em Funcion recursiva que dibuja cajas mas pequenas dentro de las cuatro esquenas de las cajas. \end{DoxyCompactList}\item
  22. void \hyperlink{class_drawing_window_a5a5f640d60404722d029ec14896692a0}{snow\+Helper} (int size, int level)
  23. \begin{DoxyCompactList}\small\item\em function de interface para la funcion recursiva snowflake \end{DoxyCompactList}\item
  24. void \hyperlink{class_drawing_window_a13d52d1571e4a34d1bd3cb09a71dfa5f}{snowflake} (int x, int y, int size, double angle, int level, Q\+Color c)
  25. \begin{DoxyCompactList}\small\item\em Figura recursiva, el copo de nieve presentado en\+: \href{https://sites.google.com/a/wellesley.edu/wellesley-cs118-spring13/lectures-labs/lab-6-turtle-recursion}{\tt https\+://sites.\+google.\+com/a/wellesley.\+edu/wellesley-\/cs118-\/spring13/lectures-\/labs/lab-\/6-\/turtle-\/recursion} sf = sf(n-\/1) + 60 grados sf(n-\/1) + 60 grados sf(n-\/1) + s(n-\/1) sf(0) = line. \end{DoxyCompactList}\end{DoxyCompactItemize}
  26. \subsection*{Métodos protegidos}
  27. \begin{DoxyCompactItemize}
  28. \item
  29. \hypertarget{class_drawing_window_aceb9c5cc4f2ef40d99aca7d3fbd4e91a}{}void \hyperlink{class_drawing_window_aceb9c5cc4f2ef40d99aca7d3fbd4e91a}{paint\+Event} (Q\+Paint\+Event $\ast$)\label{class_drawing_window_aceb9c5cc4f2ef40d99aca7d3fbd4e91a}
  30. \begin{DoxyCompactList}\small\item\em Funcion invocada en un evento de pintar. \end{DoxyCompactList}\end{DoxyCompactItemize}
  31. \subsection*{Atributos privados}
  32. \begin{DoxyCompactItemize}
  33. \item
  34. \hypertarget{class_drawing_window_ad58ced401c1eaf6cfaf67a0f8f94ce18}{}Ui\+::\+Drawing\+Window $\ast$ {\bfseries ui}\label{class_drawing_window_ad58ced401c1eaf6cfaf67a0f8f94ce18}
  35. \item
  36. \hypertarget{class_drawing_window_a6e1effc34bb2f2c43becfd1df203b693}{}vector$<$ \hyperlink{class_line}{Line} $\ast$ $>$ $\ast$ {\bfseries v\+L}\label{class_drawing_window_a6e1effc34bb2f2c43becfd1df203b693}
  37. \end{DoxyCompactItemize}
  38. \subsection{Documentación del constructor y destructor}
  39. \hypertarget{class_drawing_window_aff3d1b3cbeee8f0e92b49c050d8ca494}{}\index{Drawing\+Window@{Drawing\+Window}!Drawing\+Window@{Drawing\+Window}}
  40. \index{Drawing\+Window@{Drawing\+Window}!Drawing\+Window@{Drawing\+Window}}
  41. \subsubsection[{Drawing\+Window}]{\setlength{\rightskip}{0pt plus 5cm}Drawing\+Window\+::\+Drawing\+Window (
  42. \begin{DoxyParamCaption}
  43. \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}}
  44. \end{DoxyParamCaption}
  45. )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_drawing_window_aff3d1b3cbeee8f0e92b49c050d8ca494}
  46. Constructor.
  47. \begin{DoxyParams}{Parámetros}
  48. {\em parent} & ventana padre \\
  49. \hline
  50. \end{DoxyParams}
  51. \subsection{Documentación de las funciones miembro}
  52. \hypertarget{class_drawing_window_a3097e096223530c9f93737441d77422f}{}\index{Drawing\+Window@{Drawing\+Window}!add\+Line@{add\+Line}}
  53. \index{add\+Line@{add\+Line}!Drawing\+Window@{Drawing\+Window}}
  54. \subsubsection[{add\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::add\+Line (
  55. \begin{DoxyParamCaption}
  56. \item[{int}]{x0, }
  57. \item[{int}]{y0, }
  58. \item[{int}]{x1, }
  59. \item[{int}]{y1, }
  60. \item[{int}]{width, }
  61. \item[{Q\+Color}]{color}
  62. \end{DoxyParamCaption}
  63. )}\label{class_drawing_window_a3097e096223530c9f93737441d77422f}
  64. Anade una linea a la ventana, especificando las coordenadas de los puntos inciales y finales.
  65. \begin{DoxyParams}{Parámetros}
  66. {\em x0} & x inicial \\
  67. \hline
  68. {\em y0} & y inicial \\
  69. \hline
  70. {\em x1} & x final \\
  71. \hline
  72. {\em y1} & y final \\
  73. \hline
  74. {\em width} & ancho de la linea \\
  75. \hline
  76. {\em color} & color de la linea \\
  77. \hline
  78. \end{DoxyParams}
  79. \hypertarget{class_drawing_window_ae03504caa7648347ec56eb58cf5b5db4}{}\index{Drawing\+Window@{Drawing\+Window}!add\+Line\+Polar@{add\+Line\+Polar}}
  80. \index{add\+Line\+Polar@{add\+Line\+Polar}!Drawing\+Window@{Drawing\+Window}}
  81. \subsubsection[{add\+Line\+Polar}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::add\+Line\+Polar (
  82. \begin{DoxyParamCaption}
  83. \item[{int}]{x0, }
  84. \item[{int}]{y0, }
  85. \item[{int}]{length, }
  86. \item[{double}]{angle, }
  87. \item[{int}]{width, }
  88. \item[{Q\+Color}]{color}
  89. \end{DoxyParamCaption}
  90. )}\label{class_drawing_window_ae03504caa7648347ec56eb58cf5b5db4}
  91. Anade una linea a la ventana, especificando las coordenadas del punto inicial, el largo y el angulo.
  92. \begin{DoxyParams}{Parámetros}
  93. {\em x0} & x incial \\
  94. \hline
  95. {\em y0} & y inicial \\
  96. \hline
  97. {\em length} & largo de la linea \\
  98. \hline
  99. {\em angle} & angulo de la linea \\
  100. \hline
  101. {\em width} & ancho de la linea \\
  102. \hline
  103. {\em color} & color de la linea \\
  104. \hline
  105. \end{DoxyParams}
  106. \hypertarget{class_drawing_window_a34dec0c13dc01eaa303589e28acecf95}{}\index{Drawing\+Window@{Drawing\+Window}!box@{box}}
  107. \index{box@{box}!Drawing\+Window@{Drawing\+Window}}
  108. \subsubsection[{box}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::box (
  109. \begin{DoxyParamCaption}
  110. \item[{int}]{x, }
  111. \item[{int}]{y, }
  112. \item[{int}]{side\+Length, }
  113. \item[{Q\+Color}]{c}
  114. \end{DoxyParamCaption}
  115. )}\label{class_drawing_window_a34dec0c13dc01eaa303589e28acecf95}
  116. Dibuja una caja con los lados del tamano side\+Length.
  117. \begin{DoxyParams}{Parámetros}
  118. {\em x} & coordenada inicial x de la caja \\
  119. \hline
  120. {\em y} & coordenada inicial y de la caja \\
  121. \hline
  122. {\em side\+Length} & largo de los lados de la caja \\
  123. \hline
  124. {\em c} & color de la caja \\
  125. \hline
  126. \end{DoxyParams}
  127. \hypertarget{class_drawing_window_aa58d7247e92b513920c788523187fcbd}{}\index{Drawing\+Window@{Drawing\+Window}!boxes@{boxes}}
  128. \index{boxes@{boxes}!Drawing\+Window@{Drawing\+Window}}
  129. \subsubsection[{boxes}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::boxes (
  130. \begin{DoxyParamCaption}
  131. \item[{int}]{x, }
  132. \item[{int}]{y, }
  133. \item[{int}]{side\+Length, }
  134. \item[{double}]{shrink\+Factor, }
  135. \item[{int}]{smallest\+Length, }
  136. \item[{Q\+Color}]{c}
  137. \end{DoxyParamCaption}
  138. )}\label{class_drawing_window_aa58d7247e92b513920c788523187fcbd}
  139. Funcion recursiva que dibuja cajas mas pequenas dentro de las cuatro esquenas de las cajas.
  140. \begin{DoxyParams}{Parámetros}
  141. {\em x} & coordenada inicial x \\
  142. \hline
  143. {\em y} & coordenada inicial y \\
  144. \hline
  145. {\em side\+Length} & largo de los lados de la caja \\
  146. \hline
  147. {\em shrink\+Factor} & factor para disminuir el tamano de los lados en la recursion para las cajas interiores \\
  148. \hline
  149. {\em smallest\+Length} & largo mas pequeno de el tamano de el lado de las cajas \\
  150. \hline
  151. {\em c} & color de las cajas \\
  152. \hline
  153. \end{DoxyParams}
  154. \hypertarget{class_drawing_window_a13d52d1571e4a34d1bd3cb09a71dfa5f}{}\index{Drawing\+Window@{Drawing\+Window}!snowflake@{snowflake}}
  155. \index{snowflake@{snowflake}!Drawing\+Window@{Drawing\+Window}}
  156. \subsubsection[{snowflake}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::snowflake (
  157. \begin{DoxyParamCaption}
  158. \item[{int}]{x, }
  159. \item[{int}]{y, }
  160. \item[{int}]{size, }
  161. \item[{double}]{angle, }
  162. \item[{int}]{level, }
  163. \item[{Q\+Color}]{c}
  164. \end{DoxyParamCaption}
  165. )}\label{class_drawing_window_a13d52d1571e4a34d1bd3cb09a71dfa5f}
  166. Figura recursiva, el copo de nieve presentado en\+: \href{https://sites.google.com/a/wellesley.edu/wellesley-cs118-spring13/lectures-labs/lab-6-turtle-recursion}{\tt https\+://sites.\+google.\+com/a/wellesley.\+edu/wellesley-\/cs118-\/spring13/lectures-\/labs/lab-\/6-\/turtle-\/recursion} sf = sf(n-\/1) + 60 grados sf(n-\/1) + 60 grados sf(n-\/1) + s(n-\/1) sf(0) = line.
  167. \begin{DoxyParams}{Parámetros}
  168. {\em x} & coordenada inicial x \\
  169. \hline
  170. {\em y} & coordenada inicial y \\
  171. \hline
  172. {\em size} & tamano del copo de nieve \\
  173. \hline
  174. {\em angle} & angulo de la linea del copo de nieve \\
  175. \hline
  176. {\em level} & profundidad de la recursion \\
  177. \hline
  178. {\em c} & color de las lineas (copo de nieve) \\
  179. \hline
  180. \end{DoxyParams}
  181. \hypertarget{class_drawing_window_a5a5f640d60404722d029ec14896692a0}{}\index{Drawing\+Window@{Drawing\+Window}!snow\+Helper@{snow\+Helper}}
  182. \index{snow\+Helper@{snow\+Helper}!Drawing\+Window@{Drawing\+Window}}
  183. \subsubsection[{snow\+Helper}]{\setlength{\rightskip}{0pt plus 5cm}void Drawing\+Window\+::snow\+Helper (
  184. \begin{DoxyParamCaption}
  185. \item[{int}]{size, }
  186. \item[{int}]{level}
  187. \end{DoxyParamCaption}
  188. )}\label{class_drawing_window_a5a5f640d60404722d029ec14896692a0}
  189. function de interface para la funcion recursiva snowflake
  190. \begin{DoxyParams}{Parámetros}
  191. {\em size} & tamano del copo de nieve \\
  192. \hline
  193. {\em level} & profundidad de la recursion \\
  194. \hline
  195. \end{DoxyParams}
  196. La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize}
  197. \item
  198. drawing\+Window.\+h\item
  199. boxes.\+cpp\item
  200. drawing\+Window.\+cpp\item
  201. snowflake.\+cpp\end{DoxyCompactItemize}