Brak opisu

class_line.tex 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. \hypertarget{class_line}{}\section{Line Class Reference}
  2. \label{class_line}\index{Line@{Line}}
  3. {\ttfamily \#include $<$line.\+h$>$}
  4. Inheritance diagram for Line\+:\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=2.000000cm]{class_line}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Public Member Functions}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. \hypertarget{class_line_a4d475f9d634f50933ca84e25d7cf32f9}{}\hyperlink{class_line_a4d475f9d634f50933ca84e25d7cf32f9}{Line} (Q\+Widget $\ast$parent=0)\label{class_line_a4d475f9d634f50933ca84e25d7cf32f9}
  14. \begin{DoxyCompactList}\small\item\em Constructor sets coordinates to 0, pen color to black and pen width to 1. \end{DoxyCompactList}\item
  15. \hyperlink{class_line_a37f70dab8d5cc7560e6362093a3aa1b9}{Line} (int from\+X, int from\+Y, int to\+X, int to\+Y, int w, Q\+Color c, Q\+Widget $\ast$parent=0)
  16. \begin{DoxyCompactList}\small\item\em Constructor for a line, specifying the (from\+X,from\+Y) and (to\+X,to\+Y) \end{DoxyCompactList}\item
  17. \hyperlink{class_line_a742b2aea487313953635d1e504c6b866}{Line} (int from\+X, int from\+Y, int length, double angle, int w, Q\+Color c, Q\+Widget $\ast$parent=0)
  18. \begin{DoxyCompactList}\small\item\em Constructor for a line, specifying (from\+X, from\+Y) and the {\bfseries length} and {\bfseries angle}. \end{DoxyCompactList}\item
  19. void \hyperlink{class_line_ac1475ffee823a7c05b2ac91bfe61596d}{set\+Coords} (int from\+X, int from\+Y, int to\+X, int to\+Y)
  20. \begin{DoxyCompactList}\small\item\em Setter for the line coordinates. \end{DoxyCompactList}\item
  21. void \hyperlink{class_line_ac5b6d8e786cf3820fa36b8bda7130823}{setpen\+Color} (Q\+Color c)
  22. \begin{DoxyCompactList}\small\item\em Setter for the pen color. \end{DoxyCompactList}\item
  23. void \hyperlink{class_line_a346d88820371b5a4710eed8a638fc451}{set\+Pen\+Width} (int w)
  24. \begin{DoxyCompactList}\small\item\em Setter for the pen width. \end{DoxyCompactList}\item
  25. int \hyperlink{class_line_a0e23ee7edc154bd73fefab4d88cae150}{get\+X0} ()
  26. \begin{DoxyCompactList}\small\item\em Getter for the starting coordinate x. \end{DoxyCompactList}\item
  27. int \hyperlink{class_line_a971146fd8bbf711123f03e45daf923c9}{get\+Y0} ()
  28. \begin{DoxyCompactList}\small\item\em Getter for the starting coordinate y. \end{DoxyCompactList}\item
  29. int \hyperlink{class_line_a1f51d8df03219f5f63d656bc0e9b2830}{get\+X1} ()
  30. \begin{DoxyCompactList}\small\item\em Getter for the ending coordinate x. \end{DoxyCompactList}\item
  31. int \hyperlink{class_line_a9cc398fdcf93212a3e4db28ac26a88a9}{get\+Y1} ()
  32. \begin{DoxyCompactList}\small\item\em Getter for the ending coordinate y. \end{DoxyCompactList}\end{DoxyCompactItemize}
  33. \subsection*{Protected Member Functions}
  34. \begin{DoxyCompactItemize}
  35. \item
  36. \hypertarget{class_line_a7e1f30fa9d7375fd67a2b4cf5a1b6a76}{}void \hyperlink{class_line_a7e1f30fa9d7375fd67a2b4cf5a1b6a76}{paint\+Event} (Q\+Paint\+Event $\ast$)\label{class_line_a7e1f30fa9d7375fd67a2b4cf5a1b6a76}
  37. \begin{DoxyCompactList}\small\item\em The paint event function is automatically invoked whenever a resize or repaint happens. \end{DoxyCompactList}\end{DoxyCompactItemize}
  38. \subsection*{Private Attributes}
  39. \begin{DoxyCompactItemize}
  40. \item
  41. int \hyperlink{class_line_a647f6f5c0e2b197e3671f8bdb9ff64a2}{x0}
  42. \item
  43. int \hyperlink{class_line_a8e276229892969c7d82f56581e0c168b}{y0}
  44. \item
  45. int \hyperlink{class_line_a1c37aeef714f6c96454c2a9a2dadb69a}{x1}
  46. \item
  47. int \hyperlink{class_line_a850c96af61bd595a68b5e867540204f1}{y1}
  48. \item
  49. int \hyperlink{class_line_a4fc1d856f822dd0b88676e6c22a65f14}{pen\+Width}
  50. \item
  51. Q\+Color \hyperlink{class_line_a8778d952d4d2867bd2f31e5857c368b4}{pen\+Color}
  52. \end{DoxyCompactItemize}
  53. \subsection{Detailed Description}
  54. A class to describe lines.
  55. \subsection{Constructor \& Destructor Documentation}
  56. \hypertarget{class_line_a37f70dab8d5cc7560e6362093a3aa1b9}{}\index{Line@{Line}!Line@{Line}}
  57. \index{Line@{Line}!Line@{Line}}
  58. \subsubsection[{Line}]{\setlength{\rightskip}{0pt plus 5cm}Line\+::\+Line (
  59. \begin{DoxyParamCaption}
  60. \item[{int}]{from\+X, }
  61. \item[{int}]{from\+Y, }
  62. \item[{int}]{to\+X, }
  63. \item[{int}]{to\+Y, }
  64. \item[{int}]{w, }
  65. \item[{Q\+Color}]{c, }
  66. \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}}
  67. \end{DoxyParamCaption}
  68. )}\label{class_line_a37f70dab8d5cc7560e6362093a3aa1b9}
  69. Constructor for a line, specifying the (from\+X,from\+Y) and (to\+X,to\+Y)
  70. \begin{DoxyParams}{Parameters}
  71. {\em from\+X} & starting x coordinate \\
  72. \hline
  73. {\em from\+Y} & starting y coordinate \\
  74. \hline
  75. {\em to\+X} & end x coordinate \\
  76. \hline
  77. {\em to\+Y} & end y coordinate \\
  78. \hline
  79. {\em w} & pen width \\
  80. \hline
  81. {\em c} & line color \\
  82. \hline
  83. {\em parent} & parent of this line \\
  84. \hline
  85. \end{DoxyParams}
  86. \hypertarget{class_line_a742b2aea487313953635d1e504c6b866}{}\index{Line@{Line}!Line@{Line}}
  87. \index{Line@{Line}!Line@{Line}}
  88. \subsubsection[{Line}]{\setlength{\rightskip}{0pt plus 5cm}Line\+::\+Line (
  89. \begin{DoxyParamCaption}
  90. \item[{int}]{from\+X, }
  91. \item[{int}]{from\+Y, }
  92. \item[{int}]{length, }
  93. \item[{double}]{angle, }
  94. \item[{int}]{w, }
  95. \item[{Q\+Color}]{c, }
  96. \item[{Q\+Widget $\ast$}]{parent = {\ttfamily 0}}
  97. \end{DoxyParamCaption}
  98. )}\label{class_line_a742b2aea487313953635d1e504c6b866}
  99. Constructor for a line, specifying (from\+X, from\+Y) and the {\bfseries length} and {\bfseries angle}.
  100. \begin{DoxyParams}{Parameters}
  101. {\em from\+X} & starting x coordinate \\
  102. \hline
  103. {\em from\+Y} & starting y coordinate \\
  104. \hline
  105. {\em length} & length of the line \\
  106. \hline
  107. {\em angle} & angle \\
  108. \hline
  109. {\em w} & pen width \\
  110. \hline
  111. {\em c} & line color \\
  112. \hline
  113. {\em parent} & parent of this line \\
  114. \hline
  115. \end{DoxyParams}
  116. \subsection{Member Function Documentation}
  117. \hypertarget{class_line_a0e23ee7edc154bd73fefab4d88cae150}{}\index{Line@{Line}!get\+X0@{get\+X0}}
  118. \index{get\+X0@{get\+X0}!Line@{Line}}
  119. \subsubsection[{get\+X0}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::get\+X0 (
  120. \begin{DoxyParamCaption}
  121. {}
  122. \end{DoxyParamCaption}
  123. )}\label{class_line_a0e23ee7edc154bd73fefab4d88cae150}
  124. Getter for the starting coordinate x.
  125. \begin{DoxyReturn}{Returns}
  126. starting coordinate x.
  127. \end{DoxyReturn}
  128. \hypertarget{class_line_a1f51d8df03219f5f63d656bc0e9b2830}{}\index{Line@{Line}!get\+X1@{get\+X1}}
  129. \index{get\+X1@{get\+X1}!Line@{Line}}
  130. \subsubsection[{get\+X1}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::get\+X1 (
  131. \begin{DoxyParamCaption}
  132. {}
  133. \end{DoxyParamCaption}
  134. )}\label{class_line_a1f51d8df03219f5f63d656bc0e9b2830}
  135. Getter for the ending coordinate x.
  136. \begin{DoxyReturn}{Returns}
  137. ending coordinate x.
  138. \end{DoxyReturn}
  139. \hypertarget{class_line_a971146fd8bbf711123f03e45daf923c9}{}\index{Line@{Line}!get\+Y0@{get\+Y0}}
  140. \index{get\+Y0@{get\+Y0}!Line@{Line}}
  141. \subsubsection[{get\+Y0}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::get\+Y0 (
  142. \begin{DoxyParamCaption}
  143. {}
  144. \end{DoxyParamCaption}
  145. )}\label{class_line_a971146fd8bbf711123f03e45daf923c9}
  146. Getter for the starting coordinate y.
  147. \begin{DoxyReturn}{Returns}
  148. starting coordinate y.
  149. \end{DoxyReturn}
  150. \hypertarget{class_line_a9cc398fdcf93212a3e4db28ac26a88a9}{}\index{Line@{Line}!get\+Y1@{get\+Y1}}
  151. \index{get\+Y1@{get\+Y1}!Line@{Line}}
  152. \subsubsection[{get\+Y1}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::get\+Y1 (
  153. \begin{DoxyParamCaption}
  154. {}
  155. \end{DoxyParamCaption}
  156. )}\label{class_line_a9cc398fdcf93212a3e4db28ac26a88a9}
  157. Getter for the ending coordinate y.
  158. \begin{DoxyReturn}{Returns}
  159. ending coordinate y.
  160. \end{DoxyReturn}
  161. \hypertarget{class_line_ac1475ffee823a7c05b2ac91bfe61596d}{}\index{Line@{Line}!set\+Coords@{set\+Coords}}
  162. \index{set\+Coords@{set\+Coords}!Line@{Line}}
  163. \subsubsection[{set\+Coords}]{\setlength{\rightskip}{0pt plus 5cm}void Line\+::set\+Coords (
  164. \begin{DoxyParamCaption}
  165. \item[{int}]{from\+X, }
  166. \item[{int}]{from\+Y, }
  167. \item[{int}]{to\+X, }
  168. \item[{int}]{to\+Y}
  169. \end{DoxyParamCaption}
  170. )}\label{class_line_ac1475ffee823a7c05b2ac91bfe61596d}
  171. Setter for the line coordinates.
  172. \begin{DoxyParams}{Parameters}
  173. {\em from\+X} & starting x coordinate \\
  174. \hline
  175. {\em from\+Y} & starting y coordinate \\
  176. \hline
  177. {\em to\+X} & end x coordinate \\
  178. \hline
  179. {\em to\+Y} & end y coordinate \\
  180. \hline
  181. \end{DoxyParams}
  182. \hypertarget{class_line_ac5b6d8e786cf3820fa36b8bda7130823}{}\index{Line@{Line}!setpen\+Color@{setpen\+Color}}
  183. \index{setpen\+Color@{setpen\+Color}!Line@{Line}}
  184. \subsubsection[{setpen\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Line\+::setpen\+Color (
  185. \begin{DoxyParamCaption}
  186. \item[{Q\+Color}]{c}
  187. \end{DoxyParamCaption}
  188. )}\label{class_line_ac5b6d8e786cf3820fa36b8bda7130823}
  189. Setter for the pen color.
  190. \begin{DoxyParams}{Parameters}
  191. {\em c} & line color \\
  192. \hline
  193. \end{DoxyParams}
  194. \hypertarget{class_line_a346d88820371b5a4710eed8a638fc451}{}\index{Line@{Line}!set\+Pen\+Width@{set\+Pen\+Width}}
  195. \index{set\+Pen\+Width@{set\+Pen\+Width}!Line@{Line}}
  196. \subsubsection[{set\+Pen\+Width}]{\setlength{\rightskip}{0pt plus 5cm}void Line\+::set\+Pen\+Width (
  197. \begin{DoxyParamCaption}
  198. \item[{int}]{w}
  199. \end{DoxyParamCaption}
  200. )}\label{class_line_a346d88820371b5a4710eed8a638fc451}
  201. Setter for the pen width.
  202. \begin{DoxyParams}{Parameters}
  203. {\em w} & pen width \\
  204. \hline
  205. \end{DoxyParams}
  206. \subsection{Member Data Documentation}
  207. \hypertarget{class_line_a8778d952d4d2867bd2f31e5857c368b4}{}\index{Line@{Line}!pen\+Color@{pen\+Color}}
  208. \index{pen\+Color@{pen\+Color}!Line@{Line}}
  209. \subsubsection[{pen\+Color}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Color Line\+::pen\+Color\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a8778d952d4d2867bd2f31e5857c368b4}
  210. pen color / color del boligrafo \hypertarget{class_line_a4fc1d856f822dd0b88676e6c22a65f14}{}\index{Line@{Line}!pen\+Width@{pen\+Width}}
  211. \index{pen\+Width@{pen\+Width}!Line@{Line}}
  212. \subsubsection[{pen\+Width}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::pen\+Width\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a4fc1d856f822dd0b88676e6c22a65f14}
  213. pen width / ancho del boligrafo \hypertarget{class_line_a647f6f5c0e2b197e3671f8bdb9ff64a2}{}\index{Line@{Line}!x0@{x0}}
  214. \index{x0@{x0}!Line@{Line}}
  215. \subsubsection[{x0}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::x0\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a647f6f5c0e2b197e3671f8bdb9ff64a2}
  216. initial coord x / coordenada inicial x \hypertarget{class_line_a1c37aeef714f6c96454c2a9a2dadb69a}{}\index{Line@{Line}!x1@{x1}}
  217. \index{x1@{x1}!Line@{Line}}
  218. \subsubsection[{x1}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::x1\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a1c37aeef714f6c96454c2a9a2dadb69a}
  219. ending coord x / coordenada final x \hypertarget{class_line_a8e276229892969c7d82f56581e0c168b}{}\index{Line@{Line}!y0@{y0}}
  220. \index{y0@{y0}!Line@{Line}}
  221. \subsubsection[{y0}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::y0\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a8e276229892969c7d82f56581e0c168b}
  222. initial coord y / coordenada inicial y \hypertarget{class_line_a850c96af61bd595a68b5e867540204f1}{}\index{Line@{Line}!y1@{y1}}
  223. \index{y1@{y1}!Line@{Line}}
  224. \subsubsection[{y1}]{\setlength{\rightskip}{0pt plus 5cm}int Line\+::y1\hspace{0.3cm}{\ttfamily [private]}}\label{class_line_a850c96af61bd595a68b5e867540204f1}
  225. ending coord y / coordenada final y
  226. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  227. \item
  228. line.\+h\item
  229. line.\+cpp\end{DoxyCompactItemize}