\hypertarget{class_q_c_p_item_line}{}\section{Referencia de la Clase Q\+C\+P\+Item\+Line} \label{class_q_c_p_item_line}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} A line from one point to another. Diagrama de herencias de Q\+C\+P\+Item\+Line\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=4.000000cm]{class_q_c_p_item_line} \end{center} \end{figure} \subsection*{Métodos públicos} \begin{DoxyCompactItemize} \item \hyperlink{class_q_c_p_item_line_a17804b7f64961c6accf25b61e85142e3}{Q\+C\+P\+Item\+Line} (\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$parent\+Plot) \item \hypertarget{class_q_c_p_item_line_a235779dd079a263bedb20b3daecc40eb}{}Q\+Pen {\bfseries pen} () const \label{class_q_c_p_item_line_a235779dd079a263bedb20b3daecc40eb} \item \hypertarget{class_q_c_p_item_line_a9fde5e95a1a369008252e18f1925650c}{}Q\+Pen {\bfseries selected\+Pen} () const \label{class_q_c_p_item_line_a9fde5e95a1a369008252e18f1925650c} \item \hypertarget{class_q_c_p_item_line_a5f6cbc5c763feae9dfbce71748fc43f1}{}\hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} {\bfseries head} () const \label{class_q_c_p_item_line_a5f6cbc5c763feae9dfbce71748fc43f1} \item \hypertarget{class_q_c_p_item_line_a5d2ca0f784933e80f3e6e1d15dceebb3}{}\hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} {\bfseries tail} () const \label{class_q_c_p_item_line_a5d2ca0f784933e80f3e6e1d15dceebb3} \item void \hyperlink{class_q_c_p_item_line_a572528dab61c1abe205822fbd5db4b27}{set\+Pen} (const Q\+Pen \&pen) \item void \hyperlink{class_q_c_p_item_line_a3e2fec44503277e77717e9c24f87f1ea}{set\+Selected\+Pen} (const Q\+Pen \&pen) \item void \hyperlink{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3}{set\+Head} (const \hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} \&head) \item void \hyperlink{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f}{set\+Tail} (const \hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} \&tail) \item virtual double \hyperlink{class_q_c_p_item_line_a7541e5d9378ca121d07b0df3b24f7178}{select\+Test} (const Q\+Point\+F \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const \end{DoxyCompactItemize} \subsection*{Atributos públicos} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_item_line_a602da607a09498b0f152ada1d6851bc5}{}\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position} $\ast$const {\bfseries start}\label{class_q_c_p_item_line_a602da607a09498b0f152ada1d6851bc5} \item \hypertarget{class_q_c_p_item_line_a15598864c1c22a2497a1979c4980c4e1}{}\hyperlink{class_q_c_p_item_position}{Q\+C\+P\+Item\+Position} $\ast$const {\bfseries end}\label{class_q_c_p_item_line_a15598864c1c22a2497a1979c4980c4e1} \end{DoxyCompactItemize} \subsection*{Métodos protegidos} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_item_line_a1fc045dd33919f8006df0692aeb0e84a}{}virtual void {\bfseries draw} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter)\label{class_q_c_p_item_line_a1fc045dd33919f8006df0692aeb0e84a} \item \hypertarget{class_q_c_p_item_line_a36e8620019a221ccea4357f0287b81c2}{}Q\+Line\+F {\bfseries get\+Rect\+Clipped\+Line} (const Q\+Vector2\+D \&start, const Q\+Vector2\+D \&end, const Q\+Rect \&rect) const \label{class_q_c_p_item_line_a36e8620019a221ccea4357f0287b81c2} \item \hypertarget{class_q_c_p_item_line_a7b5bc4ebacb55774b87c91b308ca7912}{}Q\+Pen {\bfseries main\+Pen} () const \label{class_q_c_p_item_line_a7b5bc4ebacb55774b87c91b308ca7912} \end{DoxyCompactItemize} \subsection*{Atributos protegidos} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_item_line_abbb544d5bb927dfe4e81a7f3ca4c65ac}{}Q\+Pen {\bfseries m\+Pen}\label{class_q_c_p_item_line_abbb544d5bb927dfe4e81a7f3ca4c65ac} \item \hypertarget{class_q_c_p_item_line_aff858ad6dde3b90024814ca4b116f278}{}Q\+Pen {\bfseries m\+Selected\+Pen}\label{class_q_c_p_item_line_aff858ad6dde3b90024814ca4b116f278} \item \hypertarget{class_q_c_p_item_line_a51603f28ab7ddb1c1a95ea384791d3ed}{}\hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} {\bfseries m\+Head}\label{class_q_c_p_item_line_a51603f28ab7ddb1c1a95ea384791d3ed} \item \hypertarget{class_q_c_p_item_line_ab8ed61dfe15bbb1cbf9b95eae95e242f}{}\hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} {\bfseries m\+Tail}\label{class_q_c_p_item_line_ab8ed61dfe15bbb1cbf9b95eae95e242f} \end{DoxyCompactItemize} \subsection*{Otros miembros heredados} \subsection{Descripción detallada} A line from one point to another. It has two positions, {\itshape start} and {\itshape end}, which define the end points of the line. With \hyperlink{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3}{set\+Head} and \hyperlink{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f}{set\+Tail} you may set different line ending styles, e.\+g. to create an arrow. \subsection{Documentación del constructor y destructor} \hypertarget{class_q_c_p_item_line_a17804b7f64961c6accf25b61e85142e3}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{Q\+C\+P\+Item\+Line}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Item\+Line\+::\+Q\+C\+P\+Item\+Line ( \begin{DoxyParamCaption} \item[{{\bf Q\+Custom\+Plot} $\ast$}]{parent\+Plot} \end{DoxyParamCaption} )}\label{class_q_c_p_item_line_a17804b7f64961c6accf25b61e85142e3} Creates a line item and sets default values. The constructed item can be added to the plot with \hyperlink{class_q_custom_plot_aa500620379262321685cb7a7674cbd2a}{Q\+Custom\+Plot\+::add\+Item}. \subsection{Documentación de las funciones miembro} \hypertarget{class_q_c_p_item_line_a7541e5d9378ca121d07b0df3b24f7178}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!select\+Test@{select\+Test}} \index{select\+Test@{select\+Test}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{select\+Test}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Item\+Line\+::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_item_line_a7541e5d9378ca121d07b0df3b24f7178} This function is used to decide whether a click hits a layerable object or not. {\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. 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. 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). 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. {\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_line_a7541e5d9378ca121d07b0df3b24f7178}{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. You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details. \begin{DoxySeeAlso}{Ver también} select\+Event, deselect\+Event, \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions} \end{DoxySeeAlso} Implementa \hyperlink{class_q_c_p_abstract_item_a96d522d10ffc0413b9a366c6f7f0476b}{Q\+C\+P\+Abstract\+Item}. \hypertarget{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!set\+Head@{set\+Head}} \index{set\+Head@{set\+Head}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{set\+Head}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Line\+::set\+Head ( \begin{DoxyParamCaption} \item[{const {\bf Q\+C\+P\+Line\+Ending} \&}]{head} \end{DoxyParamCaption} )}\label{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3} Sets the line ending style of the head. The head corresponds to the {\itshape end} position. Note that due to the overloaded \hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} constructor, you may directly specify a \hyperlink{class_q_c_p_line_ending_a5ef16e6876b4b74959c7261d8d4c2cd5}{Q\+C\+P\+Line\+Ending\+::\+Ending\+Style} here, e.\+g. \begin{DoxyCode} \hyperlink{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3}{setHead}(\hyperlink{class_q_c_p_line_ending_a5ef16e6876b4b74959c7261d8d4c2cd5ab9964d0d03f812d1e79de15edbeb2cbf}{QCPLineEnding::esSpikeArrow}) \end{DoxyCode} \begin{DoxySeeAlso}{Ver también} \hyperlink{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f}{set\+Tail} \end{DoxySeeAlso} \hypertarget{class_q_c_p_item_line_a572528dab61c1abe205822fbd5db4b27}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!set\+Pen@{set\+Pen}} \index{set\+Pen@{set\+Pen}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{set\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Line\+::set\+Pen ( \begin{DoxyParamCaption} \item[{const Q\+Pen \&}]{pen} \end{DoxyParamCaption} )}\label{class_q_c_p_item_line_a572528dab61c1abe205822fbd5db4b27} Sets the pen that will be used to draw the line \begin{DoxySeeAlso}{Ver también} \hyperlink{class_q_c_p_item_line_a3e2fec44503277e77717e9c24f87f1ea}{set\+Selected\+Pen} \end{DoxySeeAlso} \hypertarget{class_q_c_p_item_line_a3e2fec44503277e77717e9c24f87f1ea}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!set\+Selected\+Pen@{set\+Selected\+Pen}} \index{set\+Selected\+Pen@{set\+Selected\+Pen}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{set\+Selected\+Pen}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Line\+::set\+Selected\+Pen ( \begin{DoxyParamCaption} \item[{const Q\+Pen \&}]{pen} \end{DoxyParamCaption} )}\label{class_q_c_p_item_line_a3e2fec44503277e77717e9c24f87f1ea} Sets the pen that will be used to draw the line when selected \begin{DoxySeeAlso}{Ver también} \hyperlink{class_q_c_p_item_line_a572528dab61c1abe205822fbd5db4b27}{set\+Pen}, \hyperlink{class_q_c_p_abstract_item_a203de94ad586cc44d16c9565f49d3378}{set\+Selected} \end{DoxySeeAlso} \hypertarget{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f}{}\index{Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}!set\+Tail@{set\+Tail}} \index{set\+Tail@{set\+Tail}!Q\+C\+P\+Item\+Line@{Q\+C\+P\+Item\+Line}} \subsubsection[{set\+Tail}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Item\+Line\+::set\+Tail ( \begin{DoxyParamCaption} \item[{const {\bf Q\+C\+P\+Line\+Ending} \&}]{tail} \end{DoxyParamCaption} )}\label{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f} Sets the line ending style of the tail. The tail corresponds to the {\itshape start} position. Note that due to the overloaded \hyperlink{class_q_c_p_line_ending}{Q\+C\+P\+Line\+Ending} constructor, you may directly specify a \hyperlink{class_q_c_p_line_ending_a5ef16e6876b4b74959c7261d8d4c2cd5}{Q\+C\+P\+Line\+Ending\+::\+Ending\+Style} here, e.\+g. \begin{DoxyCode} \hyperlink{class_q_c_p_item_line_ac264222c3297a7efe33df9345c811a5f}{setTail}(\hyperlink{class_q_c_p_line_ending_a5ef16e6876b4b74959c7261d8d4c2cd5ab9964d0d03f812d1e79de15edbeb2cbf}{QCPLineEnding::esSpikeArrow}) \end{DoxyCode} \begin{DoxySeeAlso}{Ver también} \hyperlink{class_q_c_p_item_line_aebf3d687114d584e0459db6759e2c3c3}{set\+Head} \end{DoxySeeAlso} La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize} \item \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}