\hypertarget{class_q_c_p_margin_group}{}\section{Referencia de la Clase Q\+C\+P\+Margin\+Group} \label{class_q_c_p_margin_group}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} A margin group allows synchronization of margin sides if working with multiple layout elements. Diagrama de herencias de Q\+C\+P\+Margin\+Group\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{class_q_c_p_margin_group} \end{center} \end{figure} \subsection*{Métodos públicos} \begin{DoxyCompactItemize} \item \hyperlink{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}{Q\+C\+P\+Margin\+Group} (\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$parent\+Plot) \item Q\+List$<$ \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} $\ast$ $>$ \hyperlink{class_q_c_p_margin_group_a2f39e319c9ece34e0392c2ca350f1069}{elements} (\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54}{Q\+C\+P\+::\+Margin\+Side} side) const \item bool \hyperlink{class_q_c_p_margin_group_a28c8e87a0b87c01bd28c693faabddd7b}{is\+Empty} () const \item void \hyperlink{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}{clear} () \end{DoxyCompactItemize} \subsection*{Métodos protegidos} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_margin_group_aeaeba9068dba2ef8be41449f0f2582f7}{}int {\bfseries common\+Margin} (\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54}{Q\+C\+P\+::\+Margin\+Side} side) const \label{class_q_c_p_margin_group_aeaeba9068dba2ef8be41449f0f2582f7} \item \hypertarget{class_q_c_p_margin_group_acb9c3a35acec655c2895b7eb95ee0524}{}void {\bfseries add\+Child} (\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54}{Q\+C\+P\+::\+Margin\+Side} side, \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} $\ast$element)\label{class_q_c_p_margin_group_acb9c3a35acec655c2895b7eb95ee0524} \item \hypertarget{class_q_c_p_margin_group_a20ab3286062957d99b58db683fe725b0}{}void {\bfseries remove\+Child} (\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54}{Q\+C\+P\+::\+Margin\+Side} side, \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} $\ast$element)\label{class_q_c_p_margin_group_a20ab3286062957d99b58db683fe725b0} \end{DoxyCompactItemize} \subsection*{Atributos protegidos} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_margin_group_a23cfa29e3cc0f33a59141b77d8c04edf}{}\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$ {\bfseries m\+Parent\+Plot}\label{class_q_c_p_margin_group_a23cfa29e3cc0f33a59141b77d8c04edf} \item \hypertarget{class_q_c_p_margin_group_a954bc89ff8958b9bb6a4a0d08ed5fc0f}{}Q\+Hash$<$ \hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54}{Q\+C\+P\+::\+Margin\+Side}, Q\+List$<$ \hyperlink{class_q_c_p_layout_element}{Q\+C\+P\+Layout\+Element} $\ast$ $>$ $>$ {\bfseries m\+Children}\label{class_q_c_p_margin_group_a954bc89ff8958b9bb6a4a0d08ed5fc0f} \end{DoxyCompactItemize} \subsection*{Amigas} \begin{DoxyCompactItemize} \item \hypertarget{class_q_c_p_margin_group_a0790750c7e7f14fdbd960d172655b42b}{}class {\bfseries Q\+C\+P\+Layout\+Element}\label{class_q_c_p_margin_group_a0790750c7e7f14fdbd960d172655b42b} \end{DoxyCompactItemize} \subsection{Descripción detallada} A margin group allows synchronization of margin sides if working with multiple layout elements. \hyperlink{class_q_c_p_margin_group}{Q\+C\+P\+Margin\+Group} allows you to tie a margin side of two or more layout elements together, such that they will all have the same size, based on the largest required margin in the group. ~\newline ~\newline In certain situations it is desirable that margins at specific sides are synchronized across layout elements. For example, if one \hyperlink{class_q_c_p_axis_rect}{Q\+C\+P\+Axis\+Rect} is below another one in a grid layout, it will provide a cleaner look to the user if the left and right margins of the two axis rects are of the same size. The left axis of the top axis rect will then be at the same horizontal position as the left axis of the lower axis rect, making them appear aligned. The same applies for the right axes. This is what \hyperlink{class_q_c_p_margin_group}{Q\+C\+P\+Margin\+Group} makes possible. To add/remove a specific side of a layout element to/from a margin group, use the \hyperlink{class_q_c_p_layout_element_a516e56f76b6bc100e8e71d329866847d}{Q\+C\+P\+Layout\+Element\+::set\+Margin\+Group} method. To completely break apart the margin group, either call \hyperlink{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}{clear}, or just delete the margin group.\hypertarget{class_q_c_p_margin_group_QCPMarginGroup-example}{}\subsection{Example}\label{class_q_c_p_margin_group_QCPMarginGroup-example} First create a margin group\+: \begin{DoxyCode} \hyperlink{class_q_c_p_margin_group}{QCPMarginGroup} *group = \textcolor{keyword}{new} \hyperlink{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}{QCPMarginGroup}(customPlot); \end{DoxyCode} Then set this group on the layout element sides\+: \begin{DoxyCode} customPlot->axisRect(0)->setMarginGroup(\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a9500c8bfcc9e80b9dff0a8e00e867f07}{QCP::msLeft}|\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a93c719593bb2b94ed244d52c86d83b65}{QCP::msRight}, group); customPlot->axisRect(1)->setMarginGroup(\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a9500c8bfcc9e80b9dff0a8e00e867f07}{QCP::msLeft}|\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a93c719593bb2b94ed244d52c86d83b65}{QCP::msRight}, group); \end{DoxyCode} Here, we\textquotesingle{}ve used the first two axis rects of the plot and synchronized their left margins with each other and their right margins with each other. \subsection{Documentación del constructor y destructor} \hypertarget{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}{}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} \index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} \subsubsection[{Q\+C\+P\+Margin\+Group}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Margin\+Group\+::\+Q\+C\+P\+Margin\+Group ( \begin{DoxyParamCaption} \item[{{\bf Q\+Custom\+Plot} $\ast$}]{parent\+Plot} \end{DoxyParamCaption} )}\label{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b} Creates a new \hyperlink{class_q_c_p_margin_group}{Q\+C\+P\+Margin\+Group} instance in {\itshape parent\+Plot}. \subsection{Documentación de las funciones miembro} \hypertarget{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}{}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!clear@{clear}} \index{clear@{clear}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} \subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Margin\+Group\+::clear ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}\label{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe} Clears this margin group. The synchronization of the margin sides that use this margin group is lifted and they will use their individual margin sizes again. \hypertarget{class_q_c_p_margin_group_a2f39e319c9ece34e0392c2ca350f1069}{}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!elements@{elements}} \index{elements@{elements}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} \subsubsection[{elements}]{\setlength{\rightskip}{0pt plus 5cm}Q\+List$<$ {\bf Q\+C\+P\+Layout\+Element} $\ast$ $>$ Q\+C\+P\+Margin\+Group\+::elements ( \begin{DoxyParamCaption} \item[{{\bf Q\+C\+P\+::\+Margin\+Side}}]{side} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}}\label{class_q_c_p_margin_group_a2f39e319c9ece34e0392c2ca350f1069} Returns a list of all layout elements that have their margin {\itshape side} associated with this margin group. \hypertarget{class_q_c_p_margin_group_a28c8e87a0b87c01bd28c693faabddd7b}{}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!is\+Empty@{is\+Empty}} \index{is\+Empty@{is\+Empty}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}} \subsubsection[{is\+Empty}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Margin\+Group\+::is\+Empty ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} ) const}\label{class_q_c_p_margin_group_a28c8e87a0b87c01bd28c693faabddd7b} Returns whether this margin group is empty. If this function returns true, no layout elements use this margin group to synchronize margin sides. 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}