\hypertarget{class_q_c_p_abstract_legend_item}{}\section{Q\+C\+P\+Abstract\+Legend\+Item Class Reference} \label{class_q_c_p_abstract_legend_item}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} The abstract base class for all entries in a \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend}. Inheritance diagram for Q\+C\+P\+Abstract\+Legend\+Item\+:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=5.000000cm]{class_q_c_p_abstract_legend_item} \end{center} \end{figure} \subsection*{Signals} \begin{DoxyCompactItemize} \item void \hyperlink{class_q_c_p_abstract_legend_item_a7cb61fdfbaf69c590bacb8f9e7099d9e}{selection\+Changed} (bool selected) \end{DoxyCompactItemize} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hyperlink{class_q_c_p_abstract_legend_item_afaff87610e8da0fa238ecf552872d774}{Q\+C\+P\+Abstract\+Legend\+Item} (\hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} $\ast$parent) \item \hypertarget{class_q_c_p_abstract_legend_item_afcd683e43058f99a47d6546eedffc5c1}{}\hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} $\ast$ {\bfseries parent\+Legend} () const \label{class_q_c_p_abstract_legend_item_afcd683e43058f99a47d6546eedffc5c1} \item \hypertarget{class_q_c_p_abstract_legend_item_ae476404706638d84fadc01021df2b19e}{}Q\+Font {\bfseries font} () const \label{class_q_c_p_abstract_legend_item_ae476404706638d84fadc01021df2b19e} \item \hypertarget{class_q_c_p_abstract_legend_item_a444caef8565ac8d8653269f14d82b42d}{}Q\+Color {\bfseries text\+Color} () const \label{class_q_c_p_abstract_legend_item_a444caef8565ac8d8653269f14d82b42d} \item \hypertarget{class_q_c_p_abstract_legend_item_afccfe665eb8483cec924a9c0a53ddf2b}{}Q\+Font {\bfseries selected\+Font} () const \label{class_q_c_p_abstract_legend_item_afccfe665eb8483cec924a9c0a53ddf2b} \item \hypertarget{class_q_c_p_abstract_legend_item_a076db1717257b82875b12a15ecf99ba3}{}Q\+Color {\bfseries selected\+Text\+Color} () const \label{class_q_c_p_abstract_legend_item_a076db1717257b82875b12a15ecf99ba3} \item \hypertarget{class_q_c_p_abstract_legend_item_a0a0205f33f37edae50826c24cb8f1983}{}bool {\bfseries selectable} () const \label{class_q_c_p_abstract_legend_item_a0a0205f33f37edae50826c24cb8f1983} \item \hypertarget{class_q_c_p_abstract_legend_item_ac776e68e3367704452131c6aa9908bb9}{}bool {\bfseries selected} () const \label{class_q_c_p_abstract_legend_item_ac776e68e3367704452131c6aa9908bb9} \item void \hyperlink{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{set\+Font} (const Q\+Font \&font) \item void \hyperlink{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{set\+Text\+Color} (const Q\+Color \&color) \item void \hyperlink{class_q_c_p_abstract_legend_item_a91db5aee48617a9d3206e61376807365}{set\+Selected\+Font} (const Q\+Font \&font) \item void \hyperlink{class_q_c_p_abstract_legend_item_a4d01d008ee1a5bfe9905b0397a421936}{set\+Selected\+Text\+Color} (const Q\+Color \&color) \item void \hyperlink{class_q_c_p_abstract_legend_item_a9913ef48730551b696e7f98a2391c599}{set\+Selectable} (bool selectable) \item void \hyperlink{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b}{set\+Selected} (bool selected) \item virtual double \hyperlink{class_q_c_p_abstract_legend_item_ad0480d5cad34627a294a2921caa4a62f}{select\+Test} (const Q\+Point\+F \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const \end{DoxyCompactItemize} \subsection*{Protected Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_abstract_legend_item_a53a80054ab329beaca072fb08c08944b}{}virtual \hyperlink{namespace_q_c_p_a2ad6bb6281c7c2d593d4277b44c2b037}{Q\+C\+P\+::\+Interaction} {\bfseries selection\+Category} () const \label{class_q_c_p_abstract_legend_item_a53a80054ab329beaca072fb08c08944b} \item \hypertarget{class_q_c_p_abstract_legend_item_a71c3baeda42ba78d2cccd97e74110a5e}{}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_abstract_legend_item_a71c3baeda42ba78d2cccd97e74110a5e} \item \hypertarget{class_q_c_p_abstract_legend_item_abcb540c331b49ef7ee0ea1abbd0dcac3}{}virtual Q\+Rect {\bfseries clip\+Rect} () const \label{class_q_c_p_abstract_legend_item_abcb540c331b49ef7ee0ea1abbd0dcac3} \item \hypertarget{class_q_c_p_abstract_legend_item_a97dedc084c672359710f16b31d046d1d}{}virtual void {\bfseries draw} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter)=0\label{class_q_c_p_abstract_legend_item_a97dedc084c672359710f16b31d046d1d} \item \hypertarget{class_q_c_p_abstract_legend_item_abcfe9e335d99c7fac74e03d26723c1b7}{}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_abstract_legend_item_abcfe9e335d99c7fac74e03d26723c1b7} \item \hypertarget{class_q_c_p_abstract_legend_item_ae64e667e7c5b85cd92c9b91928faef28}{}virtual void {\bfseries deselect\+Event} (bool $\ast$selection\+State\+Changed)\label{class_q_c_p_abstract_legend_item_ae64e667e7c5b85cd92c9b91928faef28} \end{DoxyCompactItemize} \subsection*{Protected Attributes} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_abstract_legend_item_aafcd9fc6fcb10f4a8d46037011afafe8}{}\hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} $\ast$ {\bfseries m\+Parent\+Legend}\label{class_q_c_p_abstract_legend_item_aafcd9fc6fcb10f4a8d46037011afafe8} \item \hypertarget{class_q_c_p_abstract_legend_item_ae916a78ac0d2a60e20a17ca2f24f9754}{}Q\+Font {\bfseries m\+Font}\label{class_q_c_p_abstract_legend_item_ae916a78ac0d2a60e20a17ca2f24f9754} \item \hypertarget{class_q_c_p_abstract_legend_item_a974b21e9930227d281344bd2242d289d}{}Q\+Color {\bfseries m\+Text\+Color}\label{class_q_c_p_abstract_legend_item_a974b21e9930227d281344bd2242d289d} \item \hypertarget{class_q_c_p_abstract_legend_item_ab971df604306b192875a7d097feb1e21}{}Q\+Font {\bfseries m\+Selected\+Font}\label{class_q_c_p_abstract_legend_item_ab971df604306b192875a7d097feb1e21} \item \hypertarget{class_q_c_p_abstract_legend_item_a4965c13854d970b24c284f0a4f005fbd}{}Q\+Color {\bfseries m\+Selected\+Text\+Color}\label{class_q_c_p_abstract_legend_item_a4965c13854d970b24c284f0a4f005fbd} \item \hypertarget{class_q_c_p_abstract_legend_item_aa84029f57b1b32f642fb7db63c3fc2c2}{}bool {\bfseries m\+Selectable}\label{class_q_c_p_abstract_legend_item_aa84029f57b1b32f642fb7db63c3fc2c2} \item \hypertarget{class_q_c_p_abstract_legend_item_ae58ebebbd0c36cc6fe897483369984d2}{}bool {\bfseries m\+Selected}\label{class_q_c_p_abstract_legend_item_ae58ebebbd0c36cc6fe897483369984d2} \end{DoxyCompactItemize} \subsection*{Friends} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_abstract_legend_item_a8429035e7adfbd7f05805a6530ad5e3b}{}class {\bfseries Q\+C\+P\+Legend}\label{class_q_c_p_abstract_legend_item_a8429035e7adfbd7f05805a6530ad5e3b} \end{DoxyCompactItemize} \subsection{Detailed Description} The abstract base class for all entries in a \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend}. It defines a very basic interface for entries in a \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend}. For representing plottables in the legend, the subclass \hyperlink{class_q_c_p_plottable_legend_item}{Q\+C\+P\+Plottable\+Legend\+Item} is more suitable. Only derive directly from this class when you need absolute freedom (e.\+g. a custom legend entry that\textquotesingle{}s not even associated with a plottable). You must implement the following pure virtual functions\+: \begin{DoxyItemize} \item draw (from \hyperlink{class_q_c_p_layerable}{Q\+C\+P\+Layerable})\end{DoxyItemize} You inherit the following members you may use\+: \begin{TabularC}{2} \hline \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} $\ast${\bfseries m\+Parent\+Legend} &A pointer to the parent \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend}. \\\cline{1-2} Q\+Font {\bfseries m\+Font} &The generic font of the item. You should use this font for all or at least the most prominent text of the item. \\\cline{1-2} \end{TabularC} \subsection{Constructor \& Destructor Documentation} \hypertarget{class_q_c_p_abstract_legend_item_afaff87610e8da0fa238ecf552872d774}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{Q\+C\+P\+Abstract\+Legend\+Item}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Abstract\+Legend\+Item\+::\+Q\+C\+P\+Abstract\+Legend\+Item ( \begin{DoxyParamCaption} \item[{{\bf Q\+C\+P\+Legend} $\ast$}]{parent} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_q_c_p_abstract_legend_item_afaff87610e8da0fa238ecf552872d774} Constructs a \hyperlink{class_q_c_p_abstract_legend_item}{Q\+C\+P\+Abstract\+Legend\+Item} and associates it with the \hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend} {\itshape parent}. This does not cause the item to be added to {\itshape parent}, so \hyperlink{class_q_c_p_legend_a3ab274de52d2951faea45a6d975e6b3f}{Q\+C\+P\+Legend\+::add\+Item} must be called separately. \subsection{Member Function Documentation} \hypertarget{class_q_c_p_abstract_legend_item_a7cb61fdfbaf69c590bacb8f9e7099d9e}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!selection\+Changed@{selection\+Changed}} \index{selection\+Changed@{selection\+Changed}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{selection\+Changed}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::selection\+Changed ( \begin{DoxyParamCaption} \item[{bool}]{selected} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [signal]}}\label{class_q_c_p_abstract_legend_item_a7cb61fdfbaf69c590bacb8f9e7099d9e} This signal is emitted when the selection state of this legend item has changed, either by user interaction or by a direct call to \hyperlink{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b}{set\+Selected}. \hypertarget{class_q_c_p_abstract_legend_item_ad0480d5cad34627a294a2921caa4a62f}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!select\+Test@{select\+Test}} \index{select\+Test@{select\+Test}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{select\+Test}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Abstract\+Legend\+Item\+::select\+Test ( \begin{DoxyParamCaption} \item[{const Q\+Point\+F \&}]{pos, } \item[{bool}]{only\+Selectable, } \item[{Q\+Variant $\ast$}]{details = {\ttfamily 0}} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{class_q_c_p_abstract_legend_item_ad0480d5cad34627a294a2921caa4a62f} 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. See \hyperlink{class_q_c_p_layerable_a4001c4d0dfec55598efa4d531f2179a9}{Q\+C\+P\+Layerable\+::select\+Test} for a general explanation of this virtual method. \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} subclasses may reimplement this method to provide more specific selection test behaviour. Reimplemented from \hyperlink{class_q_c_p_layout_element_a9fcf5d0ea19f2c23b2b528bce2c6f095}{Q\+C\+P\+Layout\+Element}. \hypertarget{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Font@{set\+Font}} \index{set\+Font@{set\+Font}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Font}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Font ( \begin{DoxyParamCaption} \item[{const Q\+Font \&}]{font} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265} Sets the default font of this specific legend item to {\itshape font}. \begin{DoxySeeAlso}{See also} \hyperlink{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{set\+Text\+Color}, \hyperlink{class_q_c_p_legend_aa4cda8499e3cb0f3be415edc02984c73}{Q\+C\+P\+Legend\+::set\+Font} \end{DoxySeeAlso} \hypertarget{class_q_c_p_abstract_legend_item_a9913ef48730551b696e7f98a2391c599}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Selectable@{set\+Selectable}} \index{set\+Selectable@{set\+Selectable}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Selectable}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selectable ( \begin{DoxyParamCaption} \item[{bool}]{selectable} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a9913ef48730551b696e7f98a2391c599} Sets whether this specific legend item is selectable. \begin{DoxySeeAlso}{See also} set\+Selected\+Parts, \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions} \end{DoxySeeAlso} \hypertarget{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Selected@{set\+Selected}} \index{set\+Selected@{set\+Selected}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Selected}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected ( \begin{DoxyParamCaption} \item[{bool}]{selected} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a6eed93b0ab99cb3eabb043fb08179c2b} Sets whether this specific legend item is selected. It is possible to set the selection state of this item by calling this function directly, even if set\+Selectable is set to false. \begin{DoxySeeAlso}{See also} set\+Selectable\+Parts, \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions} \end{DoxySeeAlso} \hypertarget{class_q_c_p_abstract_legend_item_a91db5aee48617a9d3206e61376807365}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Selected\+Font@{set\+Selected\+Font}} \index{set\+Selected\+Font@{set\+Selected\+Font}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Selected\+Font}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected\+Font ( \begin{DoxyParamCaption} \item[{const Q\+Font \&}]{font} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a91db5aee48617a9d3206e61376807365} When this legend item is selected, {\itshape font} is used to draw generic text, instead of the normal font set with \hyperlink{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{set\+Font}. \begin{DoxySeeAlso}{See also} \hyperlink{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{set\+Font}, \hyperlink{class_q_c_p_legend_ab580a01c3c0a239374ed66c29edf5ad2}{Q\+C\+P\+Legend\+::set\+Selected\+Font} \end{DoxySeeAlso} \hypertarget{class_q_c_p_abstract_legend_item_a4d01d008ee1a5bfe9905b0397a421936}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Selected\+Text\+Color@{set\+Selected\+Text\+Color}} \index{set\+Selected\+Text\+Color@{set\+Selected\+Text\+Color}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Selected\+Text\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Selected\+Text\+Color ( \begin{DoxyParamCaption} \item[{const Q\+Color \&}]{color} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a4d01d008ee1a5bfe9905b0397a421936} When this legend item is selected, {\itshape color} is used to draw generic text, instead of the normal color set with \hyperlink{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{set\+Text\+Color}. \begin{DoxySeeAlso}{See also} \hyperlink{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{set\+Text\+Color}, \hyperlink{class_q_c_p_legend_a7674dfc7a1f30e1abd1018c0ed45e0bc}{Q\+C\+P\+Legend\+::set\+Selected\+Text\+Color} \end{DoxySeeAlso} \hypertarget{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e}{}\index{Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}!set\+Text\+Color@{set\+Text\+Color}} \index{set\+Text\+Color@{set\+Text\+Color}!Q\+C\+P\+Abstract\+Legend\+Item@{Q\+C\+P\+Abstract\+Legend\+Item}} \subsubsection[{set\+Text\+Color}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Abstract\+Legend\+Item\+::set\+Text\+Color ( \begin{DoxyParamCaption} \item[{const Q\+Color \&}]{color} \end{DoxyParamCaption} )}\label{class_q_c_p_abstract_legend_item_a6ebace6aaffaedcdab2d74e88acc2d1e} Sets the default text color of this specific legend item to {\itshape color}. \begin{DoxySeeAlso}{See also} \hyperlink{class_q_c_p_abstract_legend_item_a409c53455d8112f71d70c0c43eb10265}{set\+Font}, \hyperlink{class_q_c_p_legend_ae1eb239ff4a4632fe1b6c3e668d845c6}{Q\+C\+P\+Legend\+::set\+Text\+Color} \end{DoxySeeAlso} The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} \item \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}