No Description

class_q_c_p_margin_group.tex 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. \hypertarget{class_q_c_p_margin_group}{}\section{Referencia de la Clase Q\+C\+P\+Margin\+Group}
  2. \label{class_q_c_p_margin_group}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}}
  3. A margin group allows synchronization of margin sides if working with multiple layout elements.
  4. Diagrama de herencias de Q\+C\+P\+Margin\+Group\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=2.000000cm]{class_q_c_p_margin_group}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Métodos públicos}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. \hyperlink{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}{Q\+C\+P\+Margin\+Group} (\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} $\ast$parent\+Plot)
  14. \item
  15. 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
  16. \item
  17. bool \hyperlink{class_q_c_p_margin_group_a28c8e87a0b87c01bd28c693faabddd7b}{is\+Empty} () const
  18. \item
  19. void \hyperlink{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}{clear} ()
  20. \end{DoxyCompactItemize}
  21. \subsection*{Métodos protegidos}
  22. \begin{DoxyCompactItemize}
  23. \item
  24. \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}
  25. \item
  26. \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}
  27. \item
  28. \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}
  29. \end{DoxyCompactItemize}
  30. \subsection*{Atributos protegidos}
  31. \begin{DoxyCompactItemize}
  32. \item
  33. \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}
  34. \item
  35. \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}
  36. \end{DoxyCompactItemize}
  37. \subsection*{Amigas}
  38. \begin{DoxyCompactItemize}
  39. \item
  40. \hypertarget{class_q_c_p_margin_group_a0790750c7e7f14fdbd960d172655b42b}{}class {\bfseries Q\+C\+P\+Layout\+Element}\label{class_q_c_p_margin_group_a0790750c7e7f14fdbd960d172655b42b}
  41. \end{DoxyCompactItemize}
  42. \subsection{Descripción detallada}
  43. A margin group allows synchronization of margin sides if working with multiple layout elements.
  44. \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.
  45. ~\newline
  46. ~\newline
  47. 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.
  48. 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}
  49. First create a margin group\+:
  50. \begin{DoxyCode}
  51. \hyperlink{class_q_c_p_margin_group}{QCPMarginGroup} *group = \textcolor{keyword}{new} \hyperlink{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}{QCPMarginGroup}(customPlot);
  52. \end{DoxyCode}
  53. Then set this group on the layout element sides\+:
  54. \begin{DoxyCode}
  55. customPlot->axisRect(0)->setMarginGroup(\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a9500c8bfcc9e80b9dff0a8e00e867f07}{QCP::msLeft}|\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a93c719593bb2b94ed244d52c86d83b65}{QCP::msRight}, group);
  56. customPlot->axisRect(1)->setMarginGroup(\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a9500c8bfcc9e80b9dff0a8e00e867f07}{QCP::msLeft}|\hyperlink{namespace_q_c_p_a7e487e3e2ccb62ab7771065bab7cae54a93c719593bb2b94ed244d52c86d83b65}{QCP::msRight}, group);
  57. \end{DoxyCode}
  58. 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.
  59. \subsection{Documentación del constructor y destructor}
  60. \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}}
  61. \index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}}
  62. \subsubsection[{Q\+C\+P\+Margin\+Group}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Margin\+Group\+::\+Q\+C\+P\+Margin\+Group (
  63. \begin{DoxyParamCaption}
  64. \item[{{\bf Q\+Custom\+Plot} $\ast$}]{parent\+Plot}
  65. \end{DoxyParamCaption}
  66. )}\label{class_q_c_p_margin_group_ac481c20678ec5b305d6df330715f4b7b}
  67. Creates a new \hyperlink{class_q_c_p_margin_group}{Q\+C\+P\+Margin\+Group} instance in {\itshape parent\+Plot}.
  68. \subsection{Documentación de las funciones miembro}
  69. \hypertarget{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}{}\index{Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}!clear@{clear}}
  70. \index{clear@{clear}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}}
  71. \subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Margin\+Group\+::clear (
  72. \begin{DoxyParamCaption}
  73. {}
  74. \end{DoxyParamCaption}
  75. )}\label{class_q_c_p_margin_group_a144b67f216e4e86c3a3a309e850285fe}
  76. 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}}
  77. \index{elements@{elements}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}}
  78. \subsubsection[{elements}]{\setlength{\rightskip}{0pt plus 5cm}Q\+List$<$ {\bf Q\+C\+P\+Layout\+Element} $\ast$ $>$ Q\+C\+P\+Margin\+Group\+::elements (
  79. \begin{DoxyParamCaption}
  80. \item[{{\bf Q\+C\+P\+::\+Margin\+Side}}]{side}
  81. \end{DoxyParamCaption}
  82. ) const\hspace{0.3cm}{\ttfamily [inline]}}\label{class_q_c_p_margin_group_a2f39e319c9ece34e0392c2ca350f1069}
  83. 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}}
  84. \index{is\+Empty@{is\+Empty}!Q\+C\+P\+Margin\+Group@{Q\+C\+P\+Margin\+Group}}
  85. \subsubsection[{is\+Empty}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Margin\+Group\+::is\+Empty (
  86. \begin{DoxyParamCaption}
  87. {}
  88. \end{DoxyParamCaption}
  89. ) const}\label{class_q_c_p_margin_group_a28c8e87a0b87c01bd28c693faabddd7b}
  90. Returns whether this margin group is empty. If this function returns true, no layout elements use this margin group to synchronize margin sides.
  91. La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize}
  92. \item
  93. \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item
  94. \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}