No Description

class_q_c_p_item_ellipse.tex 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. \hypertarget{class_q_c_p_item_ellipse}{}\section{Referencia de la Clase Q\+C\+P\+Item\+Ellipse}
  2. \label{class_q_c_p_item_ellipse}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  3. An ellipse.
  4. Diagrama de herencias de Q\+C\+P\+Item\+Ellipse\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=4.000000cm]{class_q_c_p_item_ellipse}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Métodos públicos}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. \hyperlink{class_q_c_p_item_ellipse_a759b77ef002515eba0263b5447ecb3fb}{Q\+C\+P\+Item\+Ellipse} (\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$parent\+Plot)
  14. \item
  15. \hypertarget{class_q_c_p_item_ellipse_adb67471eabaf1214c99767f1653ca0ed}{}Q\+Pen {\bfseries pen} () const \label{class_q_c_p_item_ellipse_adb67471eabaf1214c99767f1653ca0ed}
  16. \item
  17. \hypertarget{class_q_c_p_item_ellipse_ac52ab52225d238365ff3264b4b69130f}{}Q\+Pen {\bfseries selected\+Pen} () const \label{class_q_c_p_item_ellipse_ac52ab52225d238365ff3264b4b69130f}
  18. \item
  19. \hypertarget{class_q_c_p_item_ellipse_ac012e4fd59fdb1afb6554937bae8f7e1}{}Q\+Brush {\bfseries brush} () const \label{class_q_c_p_item_ellipse_ac012e4fd59fdb1afb6554937bae8f7e1}
  20. \item
  21. \hypertarget{class_q_c_p_item_ellipse_a0043e401a912d54ea3195bab0967b394}{}Q\+Brush {\bfseries selected\+Brush} () const \label{class_q_c_p_item_ellipse_a0043e401a912d54ea3195bab0967b394}
  22. \item
  23. void \hyperlink{class_q_c_p_item_ellipse_adb81a663ed2420fcfa011e49f678d1a6}{set\+Pen} (const Q\+Pen \&pen)
  24. \item
  25. void \hyperlink{class_q_c_p_item_ellipse_a6c542fba1dc918041c583f58a50dde99}{set\+Selected\+Pen} (const Q\+Pen \&pen)
  26. \item
  27. void \hyperlink{class_q_c_p_item_ellipse_a49fc74e6965834e873d027d026def798}{set\+Brush} (const Q\+Brush \&brush)
  28. \item
  29. void \hyperlink{class_q_c_p_item_ellipse_a9693501cfaa43a099655c75bed0dab3f}{set\+Selected\+Brush} (const Q\+Brush \&brush)
  30. \item
  31. virtual double \hyperlink{class_q_c_p_item_ellipse_acd7e5f9528630b2ab5987e2a5782eb7c}{select\+Test} (const Q\+Point\+F \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
  32. \end{DoxyCompactItemize}
  33. \subsection*{Atributos públicos}
  34. \begin{DoxyCompactItemize}
  35. \item
  36. \hypertarget{class_q_c_p_item_ellipse_a12fd8420c06718d0c8a2303d6a652848}{}\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position} $\ast$const {\bfseries top\+Left}\label{class_q_c_p_item_ellipse_a12fd8420c06718d0c8a2303d6a652848}
  37. \item
  38. \hypertarget{class_q_c_p_item_ellipse_ab73c8deafc0d8d1ef7d75b6cdcc37159}{}\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position} $\ast$const {\bfseries bottom\+Right}\label{class_q_c_p_item_ellipse_ab73c8deafc0d8d1ef7d75b6cdcc37159}
  39. \item
  40. \hypertarget{class_q_c_p_item_ellipse_a33ebd2a751b63b9240edc9aa46c19eff}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries top\+Left\+Rim}\label{class_q_c_p_item_ellipse_a33ebd2a751b63b9240edc9aa46c19eff}
  41. \item
  42. \hypertarget{class_q_c_p_item_ellipse_ad50f907d6f9d1402c6c5d302dca5c5d5}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries top}\label{class_q_c_p_item_ellipse_ad50f907d6f9d1402c6c5d302dca5c5d5}
  43. \item
  44. \hypertarget{class_q_c_p_item_ellipse_a744446970b38a4a3bbea46d722b7c54d}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries top\+Right\+Rim}\label{class_q_c_p_item_ellipse_a744446970b38a4a3bbea46d722b7c54d}
  45. \item
  46. \hypertarget{class_q_c_p_item_ellipse_a50091a3bd8761d3ce0d95d9c727e4a82}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries right}\label{class_q_c_p_item_ellipse_a50091a3bd8761d3ce0d95d9c727e4a82}
  47. \item
  48. \hypertarget{class_q_c_p_item_ellipse_a5c8404be601d61b7fafeaaf1c05c4c42}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries bottom\+Right\+Rim}\label{class_q_c_p_item_ellipse_a5c8404be601d61b7fafeaaf1c05c4c42}
  49. \item
  50. \hypertarget{class_q_c_p_item_ellipse_a2dc80ff9f5db600eae0133bdde65066f}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries bottom}\label{class_q_c_p_item_ellipse_a2dc80ff9f5db600eae0133bdde65066f}
  51. \item
  52. \hypertarget{class_q_c_p_item_ellipse_a31f31a9e9f9098c90fb47573094276c5}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries bottom\+Left\+Rim}\label{class_q_c_p_item_ellipse_a31f31a9e9f9098c90fb47573094276c5}
  53. \item
  54. \hypertarget{class_q_c_p_item_ellipse_aa259cd03efaedf60cf5b1019b20e4f2b}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries left}\label{class_q_c_p_item_ellipse_aa259cd03efaedf60cf5b1019b20e4f2b}
  55. \item
  56. \hypertarget{class_q_c_p_item_ellipse_a8b6dd0e854f99239c5806ffdf2f590b3}{}\hyperlink{class_q_c_p_item_anchor}{Q\+C\+P\+Item\+Anchor} $\ast$const {\bfseries center}\label{class_q_c_p_item_ellipse_a8b6dd0e854f99239c5806ffdf2f590b3}
  57. \end{DoxyCompactItemize}
  58. \subsection*{Tipos protegidos}
  59. \begin{DoxyCompactItemize}
  60. \item
  61. \hypertarget{class_q_c_p_item_ellipse_a415009889543169f35b70795f415e45e}{}enum {\bfseries Anchor\+Index} \{ \\*
  62. {\bfseries ai\+Top\+Left\+Rim},
  63. {\bfseries ai\+Top},
  64. {\bfseries ai\+Top\+Right\+Rim},
  65. {\bfseries ai\+Right},
  66. \\*
  67. {\bfseries ai\+Bottom\+Right\+Rim},
  68. {\bfseries ai\+Bottom},
  69. {\bfseries ai\+Bottom\+Left\+Rim},
  70. {\bfseries ai\+Left},
  71. \\*
  72. {\bfseries ai\+Center}
  73. \}\label{class_q_c_p_item_ellipse_a415009889543169f35b70795f415e45e}
  74. \end{DoxyCompactItemize}
  75. \subsection*{Métodos protegidos}
  76. \begin{DoxyCompactItemize}
  77. \item
  78. \hypertarget{class_q_c_p_item_ellipse_afe97ec827adb05f000fe007783faae3c}{}virtual void {\bfseries draw} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter)\label{class_q_c_p_item_ellipse_afe97ec827adb05f000fe007783faae3c}
  79. \item
  80. \hypertarget{class_q_c_p_item_ellipse_ad3c607304dba081e2f778b6a81b903bb}{}virtual Q\+Point\+F {\bfseries anchor\+Pixel\+Point} (int anchor\+Id) const \label{class_q_c_p_item_ellipse_ad3c607304dba081e2f778b6a81b903bb}
  81. \item
  82. \hypertarget{class_q_c_p_item_ellipse_afc78d49ed5ffa886bccf18f297f83d30}{}Q\+Pen {\bfseries main\+Pen} () const \label{class_q_c_p_item_ellipse_afc78d49ed5ffa886bccf18f297f83d30}
  83. \item
  84. \hypertarget{class_q_c_p_item_ellipse_a2a9757204877c9d0fd07adfb26d6b1d8}{}Q\+Brush {\bfseries main\+Brush} () const \label{class_q_c_p_item_ellipse_a2a9757204877c9d0fd07adfb26d6b1d8}
  85. \end{DoxyCompactItemize}
  86. \subsection*{Atributos protegidos}
  87. \begin{DoxyCompactItemize}
  88. \item
  89. \hypertarget{class_q_c_p_item_ellipse_a16ad9389acf028a7e4ac8fd7a550b2e4}{}Q\+Pen {\bfseries m\+Pen}\label{class_q_c_p_item_ellipse_a16ad9389acf028a7e4ac8fd7a550b2e4}
  90. \item
  91. \hypertarget{class_q_c_p_item_ellipse_a57b047abfce6f1a84ed46ca668c90e21}{}Q\+Pen {\bfseries m\+Selected\+Pen}\label{class_q_c_p_item_ellipse_a57b047abfce6f1a84ed46ca668c90e21}
  92. \item
  93. \hypertarget{class_q_c_p_item_ellipse_a6fa59478cd3ad1b10e6c1f6cedc84bd6}{}Q\+Brush {\bfseries m\+Brush}\label{class_q_c_p_item_ellipse_a6fa59478cd3ad1b10e6c1f6cedc84bd6}
  94. \item
  95. \hypertarget{class_q_c_p_item_ellipse_a2e49d5547478aa36910ed8a2dcc8a5c0}{}Q\+Brush {\bfseries m\+Selected\+Brush}\label{class_q_c_p_item_ellipse_a2e49d5547478aa36910ed8a2dcc8a5c0}
  96. \end{DoxyCompactItemize}
  97. \subsection*{Otros miembros heredados}
  98. \subsection{Descripción detallada}
  99. An ellipse.
  100. It has two positions, {\itshape top\+Left} and {\itshape bottom\+Right}, which define the rect the ellipse will be drawn in.
  101. \subsection{Documentación del constructor y destructor}
  102. \hypertarget{class_q_c_p_item_ellipse_a759b77ef002515eba0263b5447ecb3fb}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  103. \index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  104. \subsubsection[{Q\+C\+P\+Item\+Ellipse}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Item\+Ellipse\+::\+Q\+C\+P\+Item\+Ellipse (
  105. \begin{DoxyParamCaption}
  106. \item[{{\bf Q\+Custom\+Plot} $\ast$}]{parent\+Plot}
  107. \end{DoxyParamCaption}
  108. )}\label{class_q_c_p_item_ellipse_a759b77ef002515eba0263b5447ecb3fb}
  109. Creates an ellipse item and sets default values.
  110. The constructed item can be added to the plot with \hyperlink{class_q_custom_plot_aa500620379262321685cb7a7674cbd2a}{Q\+Custom\+Plot\+::add\+Item}.
  111. \subsection{Documentación de las funciones miembro}
  112. \hypertarget{class_q_c_p_item_ellipse_acd7e5f9528630b2ab5987e2a5782eb7c}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!select\+Test@{select\+Test}}
  113. \index{select\+Test@{select\+Test}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  114. \subsubsection[{select\+Test}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Item\+Ellipse\+::select\+Test (
  115. \begin{DoxyParamCaption}
  116. \item[{const Q\+Point\+F \&}]{pos, }
  117. \item[{bool}]{only\+Selectable, }
  118. \item[{Q\+Variant $\ast$}]{details = {\ttfamily 0}}
  119. \end{DoxyParamCaption}
  120. ) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{class_q_c_p_item_ellipse_acd7e5f9528630b2ab5987e2a5782eb7c}
  121. This function is used to decide whether a click hits a layerable object or not.
  122. {\itshape pos} is a point in pixel coordinates on the \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn\textquotesingle{}t be determined, -\/1.\+0 is returned. Further, if {\itshape only\+Selectable} is true and the object is not selectable, -\/1.\+0 is returned, too.
  123. If the item is represented not by single lines but by an area like \hyperlink{class_q_c_p_item_rect}{Q\+C\+P\+Item\+Rect} or \hyperlink{class_q_c_p_item_text}{Q\+C\+P\+Item\+Text}, a click inside the area returns a constant value greater zero (typically the selection\+Tolerance of the parent \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} multiplied by 0.\+99). If the click lies outside the area, this function returns -\/1.\+0.
  124. Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.\+e. closer than 0.\+99$\ast$selection\+Tolerance).
  125. The actual setting of the selection state is not done by this function. This is handled by the parent \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} when the mouse\+Release\+Event occurs, and the finally selected object is notified via the select\+Event/deselect\+Event methods.
  126. {\itshape details} is an optional output parameter. Every layerable subclass may place any information in {\itshape details}. This information will be passed to select\+Event when the parent \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} decides on the basis of this select\+Test call, that the object was successfully selected. The subsequent call to select\+Event will carry the {\itshape details}. This is useful for multi-\/part objects (like \hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}). This way, a possibly complex calculation to decide which part was clicked is only done once in \hyperlink{class_q_c_p_item_ellipse_acd7e5f9528630b2ab5987e2a5782eb7c}{select\+Test}. The result (i.\+e. the actually clicked part) can then be placed in {\itshape details}. So in the subsequent select\+Event, the decision which part was selected doesn\textquotesingle{}t have to be done a second time for a single selection operation.
  127. You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details.
  128. \begin{DoxySeeAlso}{Ver también}
  129. select\+Event, deselect\+Event, \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions}
  130. \end{DoxySeeAlso}
  131. Implementa \hyperlink{class_q_c_p_abstract_item_a96d522d10ffc0413b9a366c6f7f0476b}{Q\+C\+P\+Abstract\+Item}.
  132. \hypertarget{class_q_c_p_item_ellipse_a49fc74e6965834e873d027d026def798}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!set\+Brush@{set\+Brush}}
  133. \index{set\+Brush@{set\+Brush}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  134. \subsubsection[{set\+Brush}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Ellipse\+::set\+Brush (
  135. \begin{DoxyParamCaption}
  136. \item[{const Q\+Brush \&}]{brush}
  137. \end{DoxyParamCaption}
  138. )}\label{class_q_c_p_item_ellipse_a49fc74e6965834e873d027d026def798}
  139. Sets the brush that will be used to fill the ellipse. To disable filling, set {\itshape brush} to Qt\+::\+No\+Brush.
  140. \begin{DoxySeeAlso}{Ver también}
  141. \hyperlink{class_q_c_p_item_ellipse_a9693501cfaa43a099655c75bed0dab3f}{set\+Selected\+Brush}, \hyperlink{class_q_c_p_item_ellipse_adb81a663ed2420fcfa011e49f678d1a6}{set\+Pen}
  142. \end{DoxySeeAlso}
  143. \hypertarget{class_q_c_p_item_ellipse_adb81a663ed2420fcfa011e49f678d1a6}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!set\+Pen@{set\+Pen}}
  144. \index{set\+Pen@{set\+Pen}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  145. \subsubsection[{set\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Ellipse\+::set\+Pen (
  146. \begin{DoxyParamCaption}
  147. \item[{const Q\+Pen \&}]{pen}
  148. \end{DoxyParamCaption}
  149. )}\label{class_q_c_p_item_ellipse_adb81a663ed2420fcfa011e49f678d1a6}
  150. Sets the pen that will be used to draw the line of the ellipse
  151. \begin{DoxySeeAlso}{Ver también}
  152. \hyperlink{class_q_c_p_item_ellipse_a6c542fba1dc918041c583f58a50dde99}{set\+Selected\+Pen}, \hyperlink{class_q_c_p_item_ellipse_a49fc74e6965834e873d027d026def798}{set\+Brush}
  153. \end{DoxySeeAlso}
  154. \hypertarget{class_q_c_p_item_ellipse_a9693501cfaa43a099655c75bed0dab3f}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!set\+Selected\+Brush@{set\+Selected\+Brush}}
  155. \index{set\+Selected\+Brush@{set\+Selected\+Brush}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  156. \subsubsection[{set\+Selected\+Brush}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Ellipse\+::set\+Selected\+Brush (
  157. \begin{DoxyParamCaption}
  158. \item[{const Q\+Brush \&}]{brush}
  159. \end{DoxyParamCaption}
  160. )}\label{class_q_c_p_item_ellipse_a9693501cfaa43a099655c75bed0dab3f}
  161. Sets the brush that will be used to fill the ellipse when selected. To disable filling, set {\itshape brush} to Qt\+::\+No\+Brush.
  162. \begin{DoxySeeAlso}{Ver también}
  163. \hyperlink{class_q_c_p_item_ellipse_a49fc74e6965834e873d027d026def798}{set\+Brush}
  164. \end{DoxySeeAlso}
  165. \hypertarget{class_q_c_p_item_ellipse_a6c542fba1dc918041c583f58a50dde99}{}\index{Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}!set\+Selected\+Pen@{set\+Selected\+Pen}}
  166. \index{set\+Selected\+Pen@{set\+Selected\+Pen}!Q\+C\+P\+Item\+Ellipse@{Q\+C\+P\+Item\+Ellipse}}
  167. \subsubsection[{set\+Selected\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Ellipse\+::set\+Selected\+Pen (
  168. \begin{DoxyParamCaption}
  169. \item[{const Q\+Pen \&}]{pen}
  170. \end{DoxyParamCaption}
  171. )}\label{class_q_c_p_item_ellipse_a6c542fba1dc918041c583f58a50dde99}
  172. Sets the pen that will be used to draw the line of the ellipse when selected
  173. \begin{DoxySeeAlso}{Ver también}
  174. \hyperlink{class_q_c_p_item_ellipse_adb81a663ed2420fcfa011e49f678d1a6}{set\+Pen}, \hyperlink{class_q_c_p_abstract_item_a203de94ad586cc44d16c9565f49d3378}{set\+Selected}
  175. \end{DoxySeeAlso}
  176. La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize}
  177. \item
  178. \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item
  179. \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}