No Description

class_q_c_p_legend.tex 42KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. \hypertarget{class_q_c_p_legend}{}\section{Referencia de la Clase Q\+C\+P\+Legend}
  2. \label{class_q_c_p_legend}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  3. Manages a legend inside a \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}.
  4. Diagrama de herencias de Q\+C\+P\+Legend\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=6.000000cm]{class_q_c_p_legend}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Tipos públicos}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. enum \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}{Selectable\+Part} \{ \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a378201c07d500af7126e3ec91652eed7}{sp\+None} = 0x000,
  14. \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a0fa4758962a46fa1dc9da818abae23c4}{sp\+Legend\+Box} = 0x001,
  15. \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a768bfb95f323db4c66473375032c0af7}{sp\+Items} = 0x002
  16. \}
  17. \end{DoxyCompactItemize}
  18. \subsection*{Señales}
  19. \begin{DoxyCompactItemize}
  20. \item
  21. void \hyperlink{class_q_c_p_legend_a286149b644d5f5c884a0140219d979f6}{selection\+Changed} (Q\+C\+P\+Legend\+::\+Selectable\+Parts selection)
  22. \end{DoxyCompactItemize}
  23. \subsection*{Métodos públicos}
  24. \begin{DoxyCompactItemize}
  25. \item
  26. \hyperlink{class_q_c_p_legend_a0001a456989bd07ea378883651fabd72}{Q\+C\+P\+Legend} ()
  27. \item
  28. \hypertarget{class_q_c_p_legend_a8ffd92df86ddf43696d95f04a20e3226}{}Q\+Pen {\bfseries border\+Pen} () const \label{class_q_c_p_legend_a8ffd92df86ddf43696d95f04a20e3226}
  29. \item
  30. \hypertarget{class_q_c_p_legend_a7e5d2766e7d724f399022be8a4e8a2cb}{}Q\+Brush {\bfseries brush} () const \label{class_q_c_p_legend_a7e5d2766e7d724f399022be8a4e8a2cb}
  31. \item
  32. \hypertarget{class_q_c_p_legend_a5cf8b840bc02f7bf4edb8dde400d0f41}{}Q\+Font {\bfseries font} () const \label{class_q_c_p_legend_a5cf8b840bc02f7bf4edb8dde400d0f41}
  33. \item
  34. \hypertarget{class_q_c_p_legend_ad60a058af7491f6b140c104c6a0f9458}{}Q\+Color {\bfseries text\+Color} () const \label{class_q_c_p_legend_ad60a058af7491f6b140c104c6a0f9458}
  35. \item
  36. \hypertarget{class_q_c_p_legend_a27dfb770b14adc0e8811bef8129780a5}{}Q\+Size {\bfseries icon\+Size} () const \label{class_q_c_p_legend_a27dfb770b14adc0e8811bef8129780a5}
  37. \item
  38. \hypertarget{class_q_c_p_legend_a9d6d07042a284c4ba5f9e3cb5c9281ef}{}int {\bfseries icon\+Text\+Padding} () const \label{class_q_c_p_legend_a9d6d07042a284c4ba5f9e3cb5c9281ef}
  39. \item
  40. \hypertarget{class_q_c_p_legend_a2c4719d79630b0d0c75ef2333c59a912}{}Q\+Pen {\bfseries icon\+Border\+Pen} () const \label{class_q_c_p_legend_a2c4719d79630b0d0c75ef2333c59a912}
  41. \item
  42. \hypertarget{class_q_c_p_legend_aa90c7fdbad7a0e93527bafb1f1f49a43}{}Selectable\+Parts {\bfseries selectable\+Parts} () const \label{class_q_c_p_legend_aa90c7fdbad7a0e93527bafb1f1f49a43}
  43. \item
  44. \hypertarget{class_q_c_p_legend_abbbf1b2d6a149013527ed87b0780894a}{}Selectable\+Parts {\bfseries selected\+Parts} () const \label{class_q_c_p_legend_abbbf1b2d6a149013527ed87b0780894a}
  45. \item
  46. \hypertarget{class_q_c_p_legend_a63156bc4ce64431bada7415cfa2b4dd1}{}Q\+Pen {\bfseries selected\+Border\+Pen} () const \label{class_q_c_p_legend_a63156bc4ce64431bada7415cfa2b4dd1}
  47. \item
  48. \hypertarget{class_q_c_p_legend_a165630cad7e41f89b54f65cdef3310e8}{}Q\+Pen {\bfseries selected\+Icon\+Border\+Pen} () const \label{class_q_c_p_legend_a165630cad7e41f89b54f65cdef3310e8}
  49. \item
  50. \hypertarget{class_q_c_p_legend_a600dde0d207ddc6f5a603767360cceac}{}Q\+Brush {\bfseries selected\+Brush} () const \label{class_q_c_p_legend_a600dde0d207ddc6f5a603767360cceac}
  51. \item
  52. \hypertarget{class_q_c_p_legend_a4c1b08fc0afacb4ffd54f6a49737fa77}{}Q\+Font {\bfseries selected\+Font} () const \label{class_q_c_p_legend_a4c1b08fc0afacb4ffd54f6a49737fa77}
  53. \item
  54. \hypertarget{class_q_c_p_legend_a08005f3c17728c2c4e23b8ffc0842ffb}{}Q\+Color {\bfseries selected\+Text\+Color} () const \label{class_q_c_p_legend_a08005f3c17728c2c4e23b8ffc0842ffb}
  55. \item
  56. void \hyperlink{class_q_c_p_legend_a866a9e3f5267de7430a6c7f26a61db9f}{set\+Border\+Pen} (const Q\+Pen \&pen)
  57. \item
  58. void \hyperlink{class_q_c_p_legend_a497bbcd38baa3598c08e2b3f48103f23}{set\+Brush} (const Q\+Brush \&brush)
  59. \item
  60. void \hyperlink{class_q_c_p_legend_aa4cda8499e3cb0f3be415edc02984c73}{set\+Font} (const Q\+Font \&font)
  61. \item
  62. void \hyperlink{class_q_c_p_legend_ae1eb239ff4a4632fe1b6c3e668d845c6}{set\+Text\+Color} (const Q\+Color \&color)
  63. \item
  64. void \hyperlink{class_q_c_p_legend_a8b0740cce488bf7010da6beda6898984}{set\+Icon\+Size} (const Q\+Size \&size)
  65. \item
  66. void \hyperlink{class_q_c_p_legend_a96b1a37fd4ee6a9778e6e54fe56ab6c2}{set\+Icon\+Size} (int width, int height)
  67. \item
  68. void \hyperlink{class_q_c_p_legend_a62973bd69d5155e8ea3141366e8968f6}{set\+Icon\+Text\+Padding} (int padding)
  69. \item
  70. void \hyperlink{class_q_c_p_legend_a2f2c93d18a651f4ff294bb3f026f49b8}{set\+Icon\+Border\+Pen} (const Q\+Pen \&pen)
  71. \item
  72. void \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts} (const Selectable\+Parts \&selectable\+Parts)
  73. \item
  74. void \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts} (const Selectable\+Parts \&selected\+Parts)
  75. \item
  76. void \hyperlink{class_q_c_p_legend_a2c35d262953a25d96b6112653fbefc88}{set\+Selected\+Border\+Pen} (const Q\+Pen \&pen)
  77. \item
  78. void \hyperlink{class_q_c_p_legend_ade93aabe9bcccaf9cf46cec22c658027}{set\+Selected\+Icon\+Border\+Pen} (const Q\+Pen \&pen)
  79. \item
  80. void \hyperlink{class_q_c_p_legend_a875227f3219c9799464631dec5e8f1bd}{set\+Selected\+Brush} (const Q\+Brush \&brush)
  81. \item
  82. void \hyperlink{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}{set\+Selected\+Font} (const Q\+Font \&font)
  83. \item
  84. void \hyperlink{class_q_c_p_legend_a7674dfc7a1f30e1abd1018c0ed45e0bc}{set\+Selected\+Text\+Color} (const Q\+Color \&color)
  85. \item
  86. virtual double \hyperlink{class_q_c_p_legend_aa3892801051bc7b985e003576df844db}{select\+Test} (const Q\+Point\+F \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
  87. \item
  88. \hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} $\ast$ \hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item} (int index) const
  89. \item
  90. \hyperlink{class_q_c_p_plottable_legend_item}{Q\+C\+P\+Plottable\+Legend\+Item} $\ast$ \hyperlink{class_q_c_p_legend_a5ee80cf83f65e3b6dd386942ee3cc1ee}{item\+With\+Plottable} (const \hyperlink{class_q_c_p_abstract_plottable}{Q\+C\+P\+Abstract\+Plottable} $\ast$plottable) const
  91. \item
  92. int \hyperlink{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{item\+Count} () const
  93. \item
  94. bool \hyperlink{class_q_c_p_legend_a380dd19eb631592e1ebb9b24cc5b398a}{has\+Item} (\hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} $\ast$\hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item}) const
  95. \item
  96. bool \hyperlink{class_q_c_p_legend_a2eb1d24bdf5658e64962a656303fd61a}{has\+Item\+With\+Plottable} (const \hyperlink{class_q_c_p_abstract_plottable}{Q\+C\+P\+Abstract\+Plottable} $\ast$plottable) const
  97. \item
  98. bool \hyperlink{class_q_c_p_legend_a3ab274de52d2951faea45a6d975e6b3f}{add\+Item} (\hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} $\ast$\hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item})
  99. \item
  100. bool \hyperlink{class_q_c_p_legend_ac91595c3eaa746fe6321d2eb952c63bb}{remove\+Item} (int index)
  101. \item
  102. bool \hyperlink{class_q_c_p_legend_a2aea4ec6da2d454dd0b241a254d65082}{remove\+Item} (\hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} $\ast$\hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item})
  103. \item
  104. void \hyperlink{class_q_c_p_legend_a24795c7250eb5214fcea16b7217b4dfb}{clear\+Items} ()
  105. \item
  106. Q\+List$<$ \hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} $\ast$ $>$ \hyperlink{class_q_c_p_legend_ac93eaf236e911d67aa8b88942ef45c5e}{selected\+Items} () const
  107. \end{DoxyCompactItemize}
  108. \subsection*{Métodos protegidos}
  109. \begin{DoxyCompactItemize}
  110. \item
  111. \hypertarget{class_q_c_p_legend_a4d552c63d82742d77fb7f177bae7b1ba}{}virtual void {\bfseries parent\+Plot\+Initialized} (\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$parent\+Plot)\label{class_q_c_p_legend_a4d552c63d82742d77fb7f177bae7b1ba}
  112. \item
  113. \hypertarget{class_q_c_p_legend_a7a9795a28c9c2514b4ae50f0a63d407c}{}virtual \hyperlink{namespace_q_c_p_a2ad6bb6281c7c2d593d4277b44c2b037}{Q\+C\+P\+::\+Interaction} {\bfseries selection\+Category} () const \label{class_q_c_p_legend_a7a9795a28c9c2514b4ae50f0a63d407c}
  114. \item
  115. \hypertarget{class_q_c_p_legend_a26307f532c3458b379663b7d517a5f47}{}virtual void {\bfseries apply\+Default\+Antialiasing\+Hint} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter) const \label{class_q_c_p_legend_a26307f532c3458b379663b7d517a5f47}
  116. \item
  117. \hypertarget{class_q_c_p_legend_a4462151bf875ca85fa3815457c683fdc}{}virtual void {\bfseries draw} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter)\label{class_q_c_p_legend_a4462151bf875ca85fa3815457c683fdc}
  118. \item
  119. \hypertarget{class_q_c_p_legend_af93bf87dc5c383a9d2ada80b35f3a1a5}{}virtual void {\bfseries select\+Event} (Q\+Mouse\+Event $\ast$event, bool additive, const Q\+Variant \&details, bool $\ast$selection\+State\+Changed)\label{class_q_c_p_legend_af93bf87dc5c383a9d2ada80b35f3a1a5}
  120. \item
  121. \hypertarget{class_q_c_p_legend_a5208ead4331c9b0440f768f059777c58}{}virtual void {\bfseries deselect\+Event} (bool $\ast$selection\+State\+Changed)\label{class_q_c_p_legend_a5208ead4331c9b0440f768f059777c58}
  122. \item
  123. \hypertarget{class_q_c_p_legend_a60172c9d2212584f38f5d0c1e50970c7}{}Q\+Pen {\bfseries get\+Border\+Pen} () const \label{class_q_c_p_legend_a60172c9d2212584f38f5d0c1e50970c7}
  124. \item
  125. \hypertarget{class_q_c_p_legend_a236fe4cd617c9f88620fd9de74417f20}{}Q\+Brush {\bfseries get\+Brush} () const \label{class_q_c_p_legend_a236fe4cd617c9f88620fd9de74417f20}
  126. \end{DoxyCompactItemize}
  127. \subsection*{Atributos protegidos}
  128. \begin{DoxyCompactItemize}
  129. \item
  130. \hypertarget{class_q_c_p_legend_a52ab8342a382456131d567f962d7f9d0}{}Q\+Pen {\bfseries m\+Border\+Pen}\label{class_q_c_p_legend_a52ab8342a382456131d567f962d7f9d0}
  131. \item
  132. \hypertarget{class_q_c_p_legend_a773ae518c3149fcabff4a2906fdacbc4}{}Q\+Pen {\bfseries m\+Icon\+Border\+Pen}\label{class_q_c_p_legend_a773ae518c3149fcabff4a2906fdacbc4}
  133. \item
  134. \hypertarget{class_q_c_p_legend_a9bd7cd05a9a485e06eda513a348baf80}{}Q\+Brush {\bfseries m\+Brush}\label{class_q_c_p_legend_a9bd7cd05a9a485e06eda513a348baf80}
  135. \item
  136. \hypertarget{class_q_c_p_legend_a56ffacb184a99eefe09a0c7181d0713d}{}Q\+Font {\bfseries m\+Font}\label{class_q_c_p_legend_a56ffacb184a99eefe09a0c7181d0713d}
  137. \item
  138. \hypertarget{class_q_c_p_legend_a478b2d809a7390e9ff8f8bb70d6bd9fe}{}Q\+Color {\bfseries m\+Text\+Color}\label{class_q_c_p_legend_a478b2d809a7390e9ff8f8bb70d6bd9fe}
  139. \item
  140. \hypertarget{class_q_c_p_legend_a39b972aae6c6a3fa5aa73313ab7a5765}{}Q\+Size {\bfseries m\+Icon\+Size}\label{class_q_c_p_legend_a39b972aae6c6a3fa5aa73313ab7a5765}
  141. \item
  142. \hypertarget{class_q_c_p_legend_a8abf8843864ee9afc3f54f906c062240}{}int {\bfseries m\+Icon\+Text\+Padding}\label{class_q_c_p_legend_a8abf8843864ee9afc3f54f906c062240}
  143. \item
  144. \hypertarget{class_q_c_p_legend_a917a34dd2856baafd8d56852d94d00e2}{}Selectable\+Parts {\bfseries m\+Selected\+Parts}\label{class_q_c_p_legend_a917a34dd2856baafd8d56852d94d00e2}
  145. \item
  146. \hypertarget{class_q_c_p_legend_a179b4d5c1bea723b76e402ff48f0d7fb}{}Selectable\+Parts {\bfseries m\+Selectable\+Parts}\label{class_q_c_p_legend_a179b4d5c1bea723b76e402ff48f0d7fb}
  147. \item
  148. \hypertarget{class_q_c_p_legend_a62906c996906ae23e9f724b6ac1f7334}{}Q\+Pen {\bfseries m\+Selected\+Border\+Pen}\label{class_q_c_p_legend_a62906c996906ae23e9f724b6ac1f7334}
  149. \item
  150. \hypertarget{class_q_c_p_legend_a7429ac0e64c7b90b649b4d8f4cc5fa55}{}Q\+Pen {\bfseries m\+Selected\+Icon\+Border\+Pen}\label{class_q_c_p_legend_a7429ac0e64c7b90b649b4d8f4cc5fa55}
  151. \item
  152. \hypertarget{class_q_c_p_legend_ab3c7567c86d4784b1e48f76a84b3a1e2}{}Q\+Brush {\bfseries m\+Selected\+Brush}\label{class_q_c_p_legend_ab3c7567c86d4784b1e48f76a84b3a1e2}
  153. \item
  154. \hypertarget{class_q_c_p_legend_a86ce8f6c20a2f51a48eaf3c24ce16805}{}Q\+Font {\bfseries m\+Selected\+Font}\label{class_q_c_p_legend_a86ce8f6c20a2f51a48eaf3c24ce16805}
  155. \item
  156. \hypertarget{class_q_c_p_legend_a6c25c8796c6e73e983aae6024965f2be}{}Q\+Color {\bfseries m\+Selected\+Text\+Color}\label{class_q_c_p_legend_a6c25c8796c6e73e983aae6024965f2be}
  157. \end{DoxyCompactItemize}
  158. \subsection*{Amigas}
  159. \begin{DoxyCompactItemize}
  160. \item
  161. \hypertarget{class_q_c_p_legend_a1cdf9df76adcfae45261690aa0ca2198}{}class {\bfseries Q\+Custom\+Plot}\label{class_q_c_p_legend_a1cdf9df76adcfae45261690aa0ca2198}
  162. \item
  163. \hypertarget{class_q_c_p_legend_a8a375e31e42c68de049fcf0fd35db5b0}{}class {\bfseries Q\+C\+P\+Abstract\+Legend\+Item}\label{class_q_c_p_legend_a8a375e31e42c68de049fcf0fd35db5b0}
  164. \end{DoxyCompactItemize}
  165. \subsection{Descripción detallada}
  166. Manages a legend inside a \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}.
  167. A legend is a small box somewhere in the plot which lists plottables with their name and icon.
  168. Normally, the legend is populated by calling \hyperlink{class_q_c_p_abstract_plottable_a70f8cabfd808f7d5204b9f18c45c13f5}{Q\+C\+P\+Abstract\+Plottable\+::add\+To\+Legend}. The respective legend item can be removed with \hyperlink{class_q_c_p_abstract_plottable_aa1f350e510326d012b9a9c9249736c83}{Q\+C\+P\+Abstract\+Plottable\+::remove\+From\+Legend}. However, \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} also offers an interface to add and manipulate legend items directly\+: \hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item}, \hyperlink{class_q_c_p_legend_a5ee80cf83f65e3b6dd386942ee3cc1ee}{item\+With\+Plottable}, \hyperlink{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{item\+Count}, \hyperlink{class_q_c_p_legend_a3ab274de52d2951faea45a6d975e6b3f}{add\+Item}, \hyperlink{class_q_c_p_legend_ac91595c3eaa746fe6321d2eb952c63bb}{remove\+Item}, etc.
  169. The \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} derives from \hyperlink{class_q_c_p_layout_grid}{Q\+C\+P\+Layout\+Grid} and as such can be placed in any position a \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} may be positioned. The legend items are themselves Q\+C\+P\+Layout\+Elements which are placed in the grid layout of the legend. \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} only adds an interface specialized for handling child elements of type \hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item}, as mentioned above. In principle, any other layout elements may also be added to a legend via the normal \hyperlink{class_q_c_p_layout_grid}{Q\+C\+P\+Layout\+Grid} interface. However, the Q\+C\+P\+Abstract\+Legend\+Item-\/\+Interface will ignore those elements (e.\+g. \hyperlink{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{item\+Count} will only return the number of items with Q\+C\+P\+Abstract\+Legend\+Items type).
  170. By default, every \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} has one legend (Q\+Custom\+Plot\+::legend) which is placed in the inset layout of the main axis rect (\hyperlink{class_q_c_p_axis_rect_a4114887c7141b59650b7488f930993e5}{Q\+C\+P\+Axis\+Rect\+::inset\+Layout}). To move the legend to another position inside the axis rect, use the methods of the \hyperlink{class_q_c_p_layout_inset}{Q\+C\+P\+Layout\+Inset}. To move the legend outside of the axis rect, place it anywhere else with the Q\+C\+P\+Layout/\+Q\+C\+P\+Layout\+Element interface.
  171. \subsection{Documentación de las enumeraciones miembro de la clase}
  172. \hypertarget{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!Selectable\+Part@{Selectable\+Part}}
  173. \index{Selectable\+Part@{Selectable\+Part}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  174. \subsubsection[{Selectable\+Part}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Q\+C\+P\+Legend\+::\+Selectable\+Part}}\label{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}
  175. Defines the selectable parts of a legend
  176. \begin{DoxySeeAlso}{Ver también}
  177. \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}
  178. \end{DoxySeeAlso}
  179. \begin{Desc}
  180. \item[Valores de enumeraciones]\par
  181. \begin{description}
  182. \index{sp\+None@{sp\+None}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!sp\+None@{sp\+None}}\item[{\em
  183. \hypertarget{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a378201c07d500af7126e3ec91652eed7}{}sp\+None\label{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a378201c07d500af7126e3ec91652eed7}
  184. }]{\ttfamily 0x000} None \index{sp\+Legend\+Box@{sp\+Legend\+Box}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!sp\+Legend\+Box@{sp\+Legend\+Box}}\item[{\em
  185. \hypertarget{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a0fa4758962a46fa1dc9da818abae23c4}{}sp\+Legend\+Box\label{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a0fa4758962a46fa1dc9da818abae23c4}
  186. }]{\ttfamily 0x001} The legend box (frame) \index{sp\+Items@{sp\+Items}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!sp\+Items@{sp\+Items}}\item[{\em
  187. \hypertarget{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a768bfb95f323db4c66473375032c0af7}{}sp\+Items\label{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a768bfb95f323db4c66473375032c0af7}
  188. }]{\ttfamily 0x002} Legend items individually (see \hyperlink{class_q_c_p_legend_ac93eaf236e911d67aa8b88942ef45c5e}{selected\+Items}) \end{description}
  189. \end{Desc}
  190. \subsection{Documentación del constructor y destructor}
  191. \hypertarget{class_q_c_p_legend_a0001a456989bd07ea378883651fabd72}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  192. \index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  193. \subsubsection[{Q\+C\+P\+Legend}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Legend\+::\+Q\+C\+P\+Legend (
  194. \begin{DoxyParamCaption}
  195. {}
  196. \end{DoxyParamCaption}
  197. )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_q_c_p_legend_a0001a456989bd07ea378883651fabd72}
  198. Constructs a new \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} instance with {\itshape parent\+Plot} as the containing plot and default values.
  199. Note that by default, \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} already contains a legend ready to be used as Q\+Custom\+Plot\+::legend
  200. \subsection{Documentación de las funciones miembro}
  201. \hypertarget{class_q_c_p_legend_a3ab274de52d2951faea45a6d975e6b3f}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!add\+Item@{add\+Item}}
  202. \index{add\+Item@{add\+Item}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  203. \subsubsection[{add\+Item}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Legend\+::add\+Item (
  204. \begin{DoxyParamCaption}
  205. \item[{{\bf Q\+C\+P\+Abstract\+Legend\+Item} $\ast$}]{item}
  206. \end{DoxyParamCaption}
  207. )}\label{class_q_c_p_legend_a3ab274de52d2951faea45a6d975e6b3f}
  208. Adds {\itshape item} to the legend, if it\textquotesingle{}s not present already.
  209. Returns true on sucess, i.\+e. if the item wasn\textquotesingle{}t in the list already and has been successfuly added.
  210. The legend takes ownership of the item. \hypertarget{class_q_c_p_legend_a24795c7250eb5214fcea16b7217b4dfb}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!clear\+Items@{clear\+Items}}
  211. \index{clear\+Items@{clear\+Items}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  212. \subsubsection[{clear\+Items}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::clear\+Items (
  213. \begin{DoxyParamCaption}
  214. {}
  215. \end{DoxyParamCaption}
  216. )}\label{class_q_c_p_legend_a24795c7250eb5214fcea16b7217b4dfb}
  217. Removes all items from the legend. \hypertarget{class_q_c_p_legend_a380dd19eb631592e1ebb9b24cc5b398a}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!has\+Item@{has\+Item}}
  218. \index{has\+Item@{has\+Item}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  219. \subsubsection[{has\+Item}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Legend\+::has\+Item (
  220. \begin{DoxyParamCaption}
  221. \item[{{\bf Q\+C\+P\+Abstract\+Legend\+Item} $\ast$}]{item}
  222. \end{DoxyParamCaption}
  223. ) const}\label{class_q_c_p_legend_a380dd19eb631592e1ebb9b24cc5b398a}
  224. Returns whether the legend contains {\itshape itm}. \hypertarget{class_q_c_p_legend_a2eb1d24bdf5658e64962a656303fd61a}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!has\+Item\+With\+Plottable@{has\+Item\+With\+Plottable}}
  225. \index{has\+Item\+With\+Plottable@{has\+Item\+With\+Plottable}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  226. \subsubsection[{has\+Item\+With\+Plottable}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Legend\+::has\+Item\+With\+Plottable (
  227. \begin{DoxyParamCaption}
  228. \item[{const {\bf Q\+C\+P\+Abstract\+Plottable} $\ast$}]{plottable}
  229. \end{DoxyParamCaption}
  230. ) const}\label{class_q_c_p_legend_a2eb1d24bdf5658e64962a656303fd61a}
  231. Returns whether the legend contains a \hyperlink{class_q_c_p_plottable_legend_item}{Q\+C\+P\+Plottable\+Legend\+Item} which is associated with {\itshape plottable} (e.\+g. a \hyperlink{class_q_c_p_graph}{Q\+C\+P\+Graph}$\ast$). If such an item isn\textquotesingle{}t in the legend, returns false.
  232. \begin{DoxySeeAlso}{Ver también}
  233. \hyperlink{class_q_c_p_legend_a5ee80cf83f65e3b6dd386942ee3cc1ee}{item\+With\+Plottable}
  234. \end{DoxySeeAlso}
  235. \hypertarget{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!item@{item}}
  236. \index{item@{item}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  237. \subsubsection[{item}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Abstract\+Legend\+Item} $\ast$ Q\+C\+P\+Legend\+::item (
  238. \begin{DoxyParamCaption}
  239. \item[{int}]{index}
  240. \end{DoxyParamCaption}
  241. ) const}\label{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}
  242. Returns the item with index {\itshape i}.
  243. \begin{DoxySeeAlso}{Ver también}
  244. \hyperlink{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{item\+Count}
  245. \end{DoxySeeAlso}
  246. \hypertarget{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!item\+Count@{item\+Count}}
  247. \index{item\+Count@{item\+Count}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  248. \subsubsection[{item\+Count}]{\setlength{\rightskip}{0pt plus 5cm}int Q\+C\+P\+Legend\+::item\+Count (
  249. \begin{DoxyParamCaption}
  250. {}
  251. \end{DoxyParamCaption}
  252. ) const}\label{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}
  253. Returns the number of items currently in the legend. \begin{DoxySeeAlso}{Ver también}
  254. \hyperlink{class_q_c_p_legend_a454272d7094437beb3278a2294006da5}{item}
  255. \end{DoxySeeAlso}
  256. \hypertarget{class_q_c_p_legend_a5ee80cf83f65e3b6dd386942ee3cc1ee}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!item\+With\+Plottable@{item\+With\+Plottable}}
  257. \index{item\+With\+Plottable@{item\+With\+Plottable}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  258. \subsubsection[{item\+With\+Plottable}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Plottable\+Legend\+Item} $\ast$ Q\+C\+P\+Legend\+::item\+With\+Plottable (
  259. \begin{DoxyParamCaption}
  260. \item[{const {\bf Q\+C\+P\+Abstract\+Plottable} $\ast$}]{plottable}
  261. \end{DoxyParamCaption}
  262. ) const}\label{class_q_c_p_legend_a5ee80cf83f65e3b6dd386942ee3cc1ee}
  263. Returns the \hyperlink{class_q_c_p_plottable_legend_item}{Q\+C\+P\+Plottable\+Legend\+Item} which is associated with {\itshape plottable} (e.\+g. a \hyperlink{class_q_c_p_graph}{Q\+C\+P\+Graph}$\ast$). If such an item isn\textquotesingle{}t in the legend, returns 0.
  264. \begin{DoxySeeAlso}{Ver también}
  265. \hyperlink{class_q_c_p_legend_a2eb1d24bdf5658e64962a656303fd61a}{has\+Item\+With\+Plottable}
  266. \end{DoxySeeAlso}
  267. \hypertarget{class_q_c_p_legend_ac91595c3eaa746fe6321d2eb952c63bb}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!remove\+Item@{remove\+Item}}
  268. \index{remove\+Item@{remove\+Item}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  269. \subsubsection[{remove\+Item}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Legend\+::remove\+Item (
  270. \begin{DoxyParamCaption}
  271. \item[{int}]{index}
  272. \end{DoxyParamCaption}
  273. )}\label{class_q_c_p_legend_ac91595c3eaa746fe6321d2eb952c63bb}
  274. Removes the item with index {\itshape index} from the legend.
  275. Returns true, if successful.
  276. \begin{DoxySeeAlso}{Ver también}
  277. \hyperlink{class_q_c_p_legend_a198228e9cdc78d3a3c306fa6763d0404}{item\+Count}, \hyperlink{class_q_c_p_legend_a24795c7250eb5214fcea16b7217b4dfb}{clear\+Items}
  278. \end{DoxySeeAlso}
  279. \hypertarget{class_q_c_p_legend_a2aea4ec6da2d454dd0b241a254d65082}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!remove\+Item@{remove\+Item}}
  280. \index{remove\+Item@{remove\+Item}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  281. \subsubsection[{remove\+Item}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Legend\+::remove\+Item (
  282. \begin{DoxyParamCaption}
  283. \item[{{\bf Q\+C\+P\+Abstract\+Legend\+Item} $\ast$}]{item}
  284. \end{DoxyParamCaption}
  285. )}\label{class_q_c_p_legend_a2aea4ec6da2d454dd0b241a254d65082}
  286. Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
  287. Removes {\itshape item} from the legend.
  288. Returns true, if successful.
  289. \begin{DoxySeeAlso}{Ver también}
  290. \hyperlink{class_q_c_p_legend_a24795c7250eb5214fcea16b7217b4dfb}{clear\+Items}
  291. \end{DoxySeeAlso}
  292. \hypertarget{class_q_c_p_legend_ac93eaf236e911d67aa8b88942ef45c5e}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!selected\+Items@{selected\+Items}}
  293. \index{selected\+Items@{selected\+Items}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  294. \subsubsection[{selected\+Items}]{\setlength{\rightskip}{0pt plus 5cm}Q\+List$<$ {\bf Q\+C\+P\+Abstract\+Legend\+Item} $\ast$ $>$ Q\+C\+P\+Legend\+::selected\+Items (
  295. \begin{DoxyParamCaption}
  296. {}
  297. \end{DoxyParamCaption}
  298. ) const}\label{class_q_c_p_legend_ac93eaf236e911d67aa8b88942ef45c5e}
  299. Returns the legend items that are currently selected. If no items are selected, the list is empty.
  300. \begin{DoxySeeAlso}{Ver también}
  301. \hyperlink{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected}, set\+Selectable
  302. \end{DoxySeeAlso}
  303. \hypertarget{class_q_c_p_legend_a286149b644d5f5c884a0140219d979f6}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!selection\+Changed@{selection\+Changed}}
  304. \index{selection\+Changed@{selection\+Changed}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  305. \subsubsection[{selection\+Changed}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::selection\+Changed (
  306. \begin{DoxyParamCaption}
  307. \item[{Q\+C\+P\+Legend\+::\+Selectable\+Parts}]{selection}
  308. \end{DoxyParamCaption}
  309. )\hspace{0.3cm}{\ttfamily [signal]}}\label{class_q_c_p_legend_a286149b644d5f5c884a0140219d979f6}
  310. This signal is emitted when the selection state of this legend has changed.
  311. \begin{DoxySeeAlso}{Ver también}
  312. \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}
  313. \end{DoxySeeAlso}
  314. \hypertarget{class_q_c_p_legend_aa3892801051bc7b985e003576df844db}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!select\+Test@{select\+Test}}
  315. \index{select\+Test@{select\+Test}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  316. \subsubsection[{select\+Test}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Legend\+::select\+Test (
  317. \begin{DoxyParamCaption}
  318. \item[{const Q\+Point\+F \&}]{pos, }
  319. \item[{bool}]{only\+Selectable, }
  320. \item[{Q\+Variant $\ast$}]{details = {\ttfamily 0}}
  321. \end{DoxyParamCaption}
  322. ) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{class_q_c_p_legend_aa3892801051bc7b985e003576df844db}
  323. Layout elements are sensitive to events inside their outer rect. If {\itshape pos} is within the outer rect, this method returns a value corresponding to 0.\+99 times the parent plot\textquotesingle{}s selection tolerance. However, layout elements are not selectable by default. So if {\itshape only\+Selectable} is true, -\/1.\+0 is returned.
  324. See \hyperlink{class_q_c_p_layerable_a4001c4d0dfec55598efa4d531f2179a9}{Q\+C\+P\+Layerable\+::select\+Test} for a general explanation of this virtual method.
  325. \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} subclasses may reimplement this method to provide more specific selection test behaviour.
  326. Reimplementado de \hyperlink{class_q_c_p_layout_element_a9fcf5d0ea19f2c23b2b528bce2c6f095}{Q\+C\+P\+Layout\+Element}.
  327. \hypertarget{class_q_c_p_legend_a866a9e3f5267de7430a6c7f26a61db9f}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Border\+Pen@{set\+Border\+Pen}}
  328. \index{set\+Border\+Pen@{set\+Border\+Pen}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  329. \subsubsection[{set\+Border\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Border\+Pen (
  330. \begin{DoxyParamCaption}
  331. \item[{const Q\+Pen \&}]{pen}
  332. \end{DoxyParamCaption}
  333. )}\label{class_q_c_p_legend_a866a9e3f5267de7430a6c7f26a61db9f}
  334. Sets the pen, the border of the entire legend is drawn with. \hypertarget{class_q_c_p_legend_a497bbcd38baa3598c08e2b3f48103f23}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Brush@{set\+Brush}}
  335. \index{set\+Brush@{set\+Brush}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  336. \subsubsection[{set\+Brush}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Brush (
  337. \begin{DoxyParamCaption}
  338. \item[{const Q\+Brush \&}]{brush}
  339. \end{DoxyParamCaption}
  340. )}\label{class_q_c_p_legend_a497bbcd38baa3598c08e2b3f48103f23}
  341. Sets the brush of the legend background. \hypertarget{class_q_c_p_legend_aa4cda8499e3cb0f3be415edc02984c73}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Font@{set\+Font}}
  342. \index{set\+Font@{set\+Font}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  343. \subsubsection[{set\+Font}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Font (
  344. \begin{DoxyParamCaption}
  345. \item[{const Q\+Font \&}]{font}
  346. \end{DoxyParamCaption}
  347. )}\label{class_q_c_p_legend_aa4cda8499e3cb0f3be415edc02984c73}
  348. Sets the default font of legend text. Legend items that draw text (e.\+g. the name of a graph) will use this font by default. However, a different font can be specified on a per-\/item-\/basis by accessing the specific legend item.
  349. This function will also set {\itshape font} on all already existing legend items.
  350. \begin{DoxySeeAlso}{Ver también}
  351. \hyperlink{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Font}
  352. \end{DoxySeeAlso}
  353. \hypertarget{class_q_c_p_legend_a2f2c93d18a651f4ff294bb3f026f49b8}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Icon\+Border\+Pen@{set\+Icon\+Border\+Pen}}
  354. \index{set\+Icon\+Border\+Pen@{set\+Icon\+Border\+Pen}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  355. \subsubsection[{set\+Icon\+Border\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Icon\+Border\+Pen (
  356. \begin{DoxyParamCaption}
  357. \item[{const Q\+Pen \&}]{pen}
  358. \end{DoxyParamCaption}
  359. )}\label{class_q_c_p_legend_a2f2c93d18a651f4ff294bb3f026f49b8}
  360. Sets the pen used to draw a border around each legend icon. Legend items that draw an icon (e.\+g. a visual representation of the graph) will use this pen by default.
  361. If no border is wanted, set this to {\itshape Qt\+::\+No\+Pen}. \hypertarget{class_q_c_p_legend_a8b0740cce488bf7010da6beda6898984}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Icon\+Size@{set\+Icon\+Size}}
  362. \index{set\+Icon\+Size@{set\+Icon\+Size}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  363. \subsubsection[{set\+Icon\+Size}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Icon\+Size (
  364. \begin{DoxyParamCaption}
  365. \item[{const Q\+Size \&}]{size}
  366. \end{DoxyParamCaption}
  367. )}\label{class_q_c_p_legend_a8b0740cce488bf7010da6beda6898984}
  368. Sets the size of legend icons. Legend items that draw an icon (e.\+g. a visual representation of the graph) will use this size by default. \hypertarget{class_q_c_p_legend_a96b1a37fd4ee6a9778e6e54fe56ab6c2}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Icon\+Size@{set\+Icon\+Size}}
  369. \index{set\+Icon\+Size@{set\+Icon\+Size}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  370. \subsubsection[{set\+Icon\+Size}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Icon\+Size (
  371. \begin{DoxyParamCaption}
  372. \item[{int}]{width, }
  373. \item[{int}]{height}
  374. \end{DoxyParamCaption}
  375. )}\label{class_q_c_p_legend_a96b1a37fd4ee6a9778e6e54fe56ab6c2}
  376. Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. \hypertarget{class_q_c_p_legend_a62973bd69d5155e8ea3141366e8968f6}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Icon\+Text\+Padding@{set\+Icon\+Text\+Padding}}
  377. \index{set\+Icon\+Text\+Padding@{set\+Icon\+Text\+Padding}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  378. \subsubsection[{set\+Icon\+Text\+Padding}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Icon\+Text\+Padding (
  379. \begin{DoxyParamCaption}
  380. \item[{int}]{padding}
  381. \end{DoxyParamCaption}
  382. )}\label{class_q_c_p_legend_a62973bd69d5155e8ea3141366e8968f6}
  383. Sets the horizontal space in pixels between the legend icon and the text next to it. Legend items that draw an icon (e.\+g. a visual representation of the graph) and text (e.\+g. the name of the graph) will use this space by default. \hypertarget{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selectable\+Parts@{set\+Selectable\+Parts}}
  384. \index{set\+Selectable\+Parts@{set\+Selectable\+Parts}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  385. \subsubsection[{set\+Selectable\+Parts}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selectable\+Parts (
  386. \begin{DoxyParamCaption}
  387. \item[{const Selectable\+Parts \&}]{selectable}
  388. \end{DoxyParamCaption}
  389. )}\label{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}
  390. Sets whether the user can (de-\/)select the parts in {\itshape selectable} by clicking on the \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} surface. (When \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions} contains i\+Select\+Legend.)
  391. However, even when {\itshape selectable} is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts} directly.
  392. \begin{DoxySeeAlso}{Ver también}
  393. \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}{Selectable\+Part}, \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}
  394. \end{DoxySeeAlso}
  395. \hypertarget{class_q_c_p_legend_a2c35d262953a25d96b6112653fbefc88}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Border\+Pen@{set\+Selected\+Border\+Pen}}
  396. \index{set\+Selected\+Border\+Pen@{set\+Selected\+Border\+Pen}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  397. \subsubsection[{set\+Selected\+Border\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Border\+Pen (
  398. \begin{DoxyParamCaption}
  399. \item[{const Q\+Pen \&}]{pen}
  400. \end{DoxyParamCaption}
  401. )}\label{class_q_c_p_legend_a2c35d262953a25d96b6112653fbefc88}
  402. When the legend box is selected, this pen is used to draw the border instead of the normal pen set via \hyperlink{class_q_c_p_legend_a866a9e3f5267de7430a6c7f26a61db9f}{set\+Border\+Pen}.
  403. \begin{DoxySeeAlso}{Ver también}
  404. \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}, \hyperlink{class_q_c_p_legend_a875227f3219c9799464631dec5e8f1bd}{set\+Selected\+Brush}
  405. \end{DoxySeeAlso}
  406. \hypertarget{class_q_c_p_legend_a875227f3219c9799464631dec5e8f1bd}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Brush@{set\+Selected\+Brush}}
  407. \index{set\+Selected\+Brush@{set\+Selected\+Brush}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  408. \subsubsection[{set\+Selected\+Brush}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Brush (
  409. \begin{DoxyParamCaption}
  410. \item[{const Q\+Brush \&}]{brush}
  411. \end{DoxyParamCaption}
  412. )}\label{class_q_c_p_legend_a875227f3219c9799464631dec5e8f1bd}
  413. When the legend box is selected, this brush is used to draw the legend background instead of the normal brush set via \hyperlink{class_q_c_p_legend_a497bbcd38baa3598c08e2b3f48103f23}{set\+Brush}.
  414. \begin{DoxySeeAlso}{Ver también}
  415. \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}, \hyperlink{class_q_c_p_legend_a2c35d262953a25d96b6112653fbefc88}{set\+Selected\+Border\+Pen}
  416. \end{DoxySeeAlso}
  417. \hypertarget{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Font@{set\+Selected\+Font}}
  418. \index{set\+Selected\+Font@{set\+Selected\+Font}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  419. \subsubsection[{set\+Selected\+Font}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Font (
  420. \begin{DoxyParamCaption}
  421. \item[{const Q\+Font \&}]{font}
  422. \end{DoxyParamCaption}
  423. )}\label{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}
  424. Sets the default font that is used by legend items when they are selected.
  425. This function will also set {\itshape font} on all already existing legend items.
  426. \begin{DoxySeeAlso}{Ver también}
  427. \hyperlink{class_q_c_p_legend_aa4cda8499e3cb0f3be415edc02984c73}{set\+Font}, \hyperlink{class_q_c_p_abstract_legend_item_a91db5aee48617a9d3206e61376807365}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected\+Font}
  428. \end{DoxySeeAlso}
  429. \hypertarget{class_q_c_p_legend_ade93aabe9bcccaf9cf46cec22c658027}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Icon\+Border\+Pen@{set\+Selected\+Icon\+Border\+Pen}}
  430. \index{set\+Selected\+Icon\+Border\+Pen@{set\+Selected\+Icon\+Border\+Pen}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  431. \subsubsection[{set\+Selected\+Icon\+Border\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Icon\+Border\+Pen (
  432. \begin{DoxyParamCaption}
  433. \item[{const Q\+Pen \&}]{pen}
  434. \end{DoxyParamCaption}
  435. )}\label{class_q_c_p_legend_ade93aabe9bcccaf9cf46cec22c658027}
  436. Sets the pen legend items will use to draw their icon borders, when they are selected.
  437. \begin{DoxySeeAlso}{Ver también}
  438. \hyperlink{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{set\+Selected\+Parts}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}, \hyperlink{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}{set\+Selected\+Font}
  439. \end{DoxySeeAlso}
  440. \hypertarget{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Parts@{set\+Selected\+Parts}}
  441. \index{set\+Selected\+Parts@{set\+Selected\+Parts}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  442. \subsubsection[{set\+Selected\+Parts}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Parts (
  443. \begin{DoxyParamCaption}
  444. \item[{const Selectable\+Parts \&}]{selected}
  445. \end{DoxyParamCaption}
  446. )}\label{class_q_c_p_legend_a2aee309bb5c2a794b1987f3fc97f8ad8}
  447. Sets the selected state of the respective legend parts described by \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}{Selectable\+Part}. When a part is selected, it uses a different pen/font and brush. If some legend items are selected and {\itshape selected} doesn\textquotesingle{}t contain \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a768bfb95f323db4c66473375032c0af7}{sp\+Items}, those items become deselected.
  448. The entire selection mechanism is handled automatically when \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions} contains i\+Select\+Legend. You only need to call this function when you wish to change the selection state manually.
  449. This function can change the selection state of a part even when \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts} was set to a value that actually excludes the part.
  450. emits the \hyperlink{class_q_c_p_legend_a286149b644d5f5c884a0140219d979f6}{selection\+Changed} signal when {\itshape selected} is different from the previous selection state.
  451. Note that it doesn\textquotesingle{}t make sense to set the selected state \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1a768bfb95f323db4c66473375032c0af7}{sp\+Items} here when it wasn\textquotesingle{}t set before, because there\textquotesingle{}s no way to specify which exact items to newly select. Do this by calling \hyperlink{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected} directly on the legend item you wish to select.
  452. \begin{DoxySeeAlso}{Ver también}
  453. \hyperlink{class_q_c_p_legend_a5404de8bc1e4a994ca4ae69e2c7072f1}{Selectable\+Part}, \hyperlink{class_q_c_p_legend_a9ce60aa8bbd89f62ae4fa83ac6c60110}{set\+Selectable\+Parts}, \hyperlink{class_q_c_p_legend_aa3892801051bc7b985e003576df844db}{select\+Test}, \hyperlink{class_q_c_p_legend_a2c35d262953a25d96b6112653fbefc88}{set\+Selected\+Border\+Pen}, \hyperlink{class_q_c_p_legend_ade93aabe9bcccaf9cf46cec22c658027}{set\+Selected\+Icon\+Border\+Pen}, \hyperlink{class_q_c_p_legend_a875227f3219c9799464631dec5e8f1bd}{set\+Selected\+Brush}, \hyperlink{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}{set\+Selected\+Font}
  454. \end{DoxySeeAlso}
  455. \hypertarget{class_q_c_p_legend_a7674dfc7a1f30e1abd1018c0ed45e0bc}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Selected\+Text\+Color@{set\+Selected\+Text\+Color}}
  456. \index{set\+Selected\+Text\+Color@{set\+Selected\+Text\+Color}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  457. \subsubsection[{set\+Selected\+Text\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Selected\+Text\+Color (
  458. \begin{DoxyParamCaption}
  459. \item[{const Q\+Color \&}]{color}
  460. \end{DoxyParamCaption}
  461. )}\label{class_q_c_p_legend_a7674dfc7a1f30e1abd1018c0ed45e0bc}
  462. Sets the default text color that is used by legend items when they are selected.
  463. This function will also set {\itshape color} on all already existing legend items.
  464. \begin{DoxySeeAlso}{Ver también}
  465. \hyperlink{class_q_c_p_legend_ae1eb239ff4a4632fe1b6c3e668d845c6}{set\+Text\+Color}, \hyperlink{class_q_c_p_abstract_legend_item_a4d01d008ee1a5bfe9905b0397a421936}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected\+Text\+Color}
  466. \end{DoxySeeAlso}
  467. \hypertarget{class_q_c_p_legend_ae1eb239ff4a4632fe1b6c3e668d845c6}{}\index{Q\+C\+P\+Legend@{Q\+C\+P\+Legend}!set\+Text\+Color@{set\+Text\+Color}}
  468. \index{set\+Text\+Color@{set\+Text\+Color}!Q\+C\+P\+Legend@{Q\+C\+P\+Legend}}
  469. \subsubsection[{set\+Text\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Legend\+::set\+Text\+Color (
  470. \begin{DoxyParamCaption}
  471. \item[{const Q\+Color \&}]{color}
  472. \end{DoxyParamCaption}
  473. )}\label{class_q_c_p_legend_ae1eb239ff4a4632fe1b6c3e668d845c6}
  474. Sets the default color of legend text. Legend items that draw text (e.\+g. the name of a graph) will use this color by default. However, a different colors can be specified on a per-\/item-\/basis by accessing the specific legend item.
  475. This function will also set {\itshape color} on all already existing legend items.
  476. \begin{DoxySeeAlso}{Ver también}
  477. \hyperlink{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Text\+Color}
  478. \end{DoxySeeAlso}
  479. La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize}
  480. \item
  481. \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item
  482. \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}