Keine Beschreibung

class_q_c_p_bars.tex 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. \hypertarget{class_q_c_p_bars}{}\section{Q\+C\+P\+Bars Class Reference}
  2. \label{class_q_c_p_bars}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  3. A plottable representing a bar chart in a plot.
  4. Inheritance diagram for Q\+C\+P\+Bars\+:\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=4.000000cm]{class_q_c_p_bars}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Public Member Functions}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. \hyperlink{class_q_c_p_bars_a64006999ad9dff308f40df41cef176ad}{Q\+C\+P\+Bars} (\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis} $\ast$key\+Axis, \hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis} $\ast$value\+Axis)
  14. \item
  15. \hypertarget{class_q_c_p_bars_a42798c38abd5f5db22bd45d77f429625}{}double {\bfseries width} () const \label{class_q_c_p_bars_a42798c38abd5f5db22bd45d77f429625}
  16. \item
  17. \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$ \hyperlink{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}{bar\+Below} () const
  18. \item
  19. \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$ \hyperlink{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}{bar\+Above} () const
  20. \item
  21. \hypertarget{class_q_c_p_bars_ac05c21de37f677545d06fd852ef8a743}{}\hyperlink{qcustomplot_8h_aa846c77472cae93def9f1609d0c57191}{Q\+C\+P\+Bar\+Data\+Map} $\ast$ {\bfseries data} () const \label{class_q_c_p_bars_ac05c21de37f677545d06fd852ef8a743}
  22. \item
  23. void \hyperlink{class_q_c_p_bars_afec6116579d44d5b706e0fa5e5332507}{set\+Width} (double width)
  24. \item
  25. void \hyperlink{class_q_c_p_bars_aa3435aab19e0a49e4e7b41bd36a8d96b}{set\+Data} (\hyperlink{qcustomplot_8h_aa846c77472cae93def9f1609d0c57191}{Q\+C\+P\+Bar\+Data\+Map} $\ast$data, bool copy=false)
  26. \item
  27. void \hyperlink{class_q_c_p_bars_a3efded5df4a82ecb201f7c28099fa2e5}{set\+Data} (const Q\+Vector$<$ double $>$ \&key, const Q\+Vector$<$ double $>$ \&value)
  28. \item
  29. void \hyperlink{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{move\+Below} (\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$bars)
  30. \item
  31. void \hyperlink{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}{move\+Above} (\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$bars)
  32. \item
  33. void \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data} (const \hyperlink{qcustomplot_8h_aa846c77472cae93def9f1609d0c57191}{Q\+C\+P\+Bar\+Data\+Map} \&data\+Map)
  34. \item
  35. void \hyperlink{class_q_c_p_bars_a142158b1addefd53259002dd3ab22c3a}{add\+Data} (const \hyperlink{class_q_c_p_bar_data}{Q\+C\+P\+Bar\+Data} \&data)
  36. \item
  37. void \hyperlink{class_q_c_p_bars_a684dd105403a5497fda42f2094fecbb7}{add\+Data} (double key, double value)
  38. \item
  39. void \hyperlink{class_q_c_p_bars_a3679a0a9decab0fa03f8f4c6e3344d52}{add\+Data} (const Q\+Vector$<$ double $>$ \&keys, const Q\+Vector$<$ double $>$ \&values)
  40. \item
  41. void \hyperlink{class_q_c_p_bars_a9d12779a3fad4820aad2c428f368298d}{remove\+Data\+Before} (double key)
  42. \item
  43. void \hyperlink{class_q_c_p_bars_a99de6e7abbbf03fb41fa604c7f08aa8b}{remove\+Data\+After} (double key)
  44. \item
  45. void \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data} (double from\+Key, double to\+Key)
  46. \item
  47. void \hyperlink{class_q_c_p_bars_a837cc9848ad3edd40a6130b508493f93}{remove\+Data} (double key)
  48. \item
  49. virtual void \hyperlink{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{clear\+Data} ()
  50. \item
  51. virtual double \hyperlink{class_q_c_p_bars_a0d37a9feb1d0baf73ce6e809db214445}{select\+Test} (const Q\+Point\+F \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
  52. \end{DoxyCompactItemize}
  53. \subsection*{Protected Member Functions}
  54. \begin{DoxyCompactItemize}
  55. \item
  56. \hypertarget{class_q_c_p_bars_a42b894e34dac799f90ff3700706b31df}{}virtual void {\bfseries draw} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter)\label{class_q_c_p_bars_a42b894e34dac799f90ff3700706b31df}
  57. \item
  58. \hypertarget{class_q_c_p_bars_ad4fb35d2ab7d2aa460a6612aff3e7a15}{}virtual void {\bfseries draw\+Legend\+Icon} (\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter} $\ast$painter, const Q\+Rect\+F \&rect) const \label{class_q_c_p_bars_ad4fb35d2ab7d2aa460a6612aff3e7a15}
  59. \item
  60. \hypertarget{class_q_c_p_bars_adbf608df1ba1d28c0bc7a929b18d997b}{}virtual \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} {\bfseries get\+Key\+Range} (bool \&valid\+Range, \hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain} in\+Sign\+Domain=\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}) const \label{class_q_c_p_bars_adbf608df1ba1d28c0bc7a929b18d997b}
  61. \item
  62. \hypertarget{class_q_c_p_bars_acbcbf97f591d3b8a130b2fdf0a8af74b}{}virtual \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} {\bfseries get\+Value\+Range} (bool \&valid\+Range, \hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain} in\+Sign\+Domain=\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}) const \label{class_q_c_p_bars_acbcbf97f591d3b8a130b2fdf0a8af74b}
  63. \item
  64. \hypertarget{class_q_c_p_bars_a1d118a76662cfd691a78c6f573e3f78c}{}Q\+Polygon\+F {\bfseries get\+Bar\+Polygon} (double key, double value) const \label{class_q_c_p_bars_a1d118a76662cfd691a78c6f573e3f78c}
  65. \item
  66. \hypertarget{class_q_c_p_bars_ab60a3c4b8e7c59f0f14e25590d96fa4e}{}double {\bfseries get\+Base\+Value} (double key, bool positive) const \label{class_q_c_p_bars_ab60a3c4b8e7c59f0f14e25590d96fa4e}
  67. \end{DoxyCompactItemize}
  68. \subsection*{Static Protected Member Functions}
  69. \begin{DoxyCompactItemize}
  70. \item
  71. \hypertarget{class_q_c_p_bars_a6ea37802cd22f97235cab614b14b9f19}{}static void {\bfseries connect\+Bars} (\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$lower, \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $\ast$upper)\label{class_q_c_p_bars_a6ea37802cd22f97235cab614b14b9f19}
  72. \end{DoxyCompactItemize}
  73. \subsection*{Protected Attributes}
  74. \begin{DoxyCompactItemize}
  75. \item
  76. \hypertarget{class_q_c_p_bars_aef28d29d51ef84b608ecd22c55d531ff}{}\hyperlink{qcustomplot_8h_aa846c77472cae93def9f1609d0c57191}{Q\+C\+P\+Bar\+Data\+Map} $\ast$ {\bfseries m\+Data}\label{class_q_c_p_bars_aef28d29d51ef84b608ecd22c55d531ff}
  77. \item
  78. \hypertarget{class_q_c_p_bars_a7c4e0f2246f8133f48a9c3f24cf5b920}{}double {\bfseries m\+Width}\label{class_q_c_p_bars_a7c4e0f2246f8133f48a9c3f24cf5b920}
  79. \item
  80. \hypertarget{class_q_c_p_bars_ad51db970eed7e286f2753b0216fc56de}{}Q\+Pointer$<$ \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $>$ {\bfseries m\+Bar\+Below}\label{class_q_c_p_bars_ad51db970eed7e286f2753b0216fc56de}
  81. \item
  82. \hypertarget{class_q_c_p_bars_a0c1c46076c41a478dbb373cfd35929aa}{}Q\+Pointer$<$ \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} $>$ {\bfseries m\+Bar\+Above}\label{class_q_c_p_bars_a0c1c46076c41a478dbb373cfd35929aa}
  83. \end{DoxyCompactItemize}
  84. \subsection*{Friends}
  85. \begin{DoxyCompactItemize}
  86. \item
  87. \hypertarget{class_q_c_p_bars_a1cdf9df76adcfae45261690aa0ca2198}{}class {\bfseries Q\+Custom\+Plot}\label{class_q_c_p_bars_a1cdf9df76adcfae45261690aa0ca2198}
  88. \item
  89. \hypertarget{class_q_c_p_bars_a8429035e7adfbd7f05805a6530ad5e3b}{}class {\bfseries Q\+C\+P\+Legend}\label{class_q_c_p_bars_a8429035e7adfbd7f05805a6530ad5e3b}
  90. \end{DoxyCompactItemize}
  91. \subsection*{Additional Inherited Members}
  92. \subsection{Detailed Description}
  93. A plottable representing a bar chart in a plot.
  94. To plot data, assign it with the \hyperlink{class_q_c_p_bars_aa3435aab19e0a49e4e7b41bd36a8d96b}{set\+Data} or \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data} functions.\hypertarget{class_q_c_p_statistical_box_appearance}{}\subsection{Changing the appearance}\label{class_q_c_p_statistical_box_appearance}
  95. The appearance of the bars is determined by the pen and the brush (\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}, \hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}).
  96. Bar charts are stackable. This means, Two \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} plottables can be placed on top of each other (see \hyperlink{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}{Q\+C\+P\+Bars\+::move\+Above}). Then, when two bars are at the same key position, they will appear stacked.\hypertarget{class_q_c_p_statistical_box_usage}{}\subsection{Usage}\label{class_q_c_p_statistical_box_usage}
  97. Like all data representing objects in \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}, the \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} is a plottable (\hyperlink{class_q_c_p_abstract_plottable}{Q\+C\+P\+Abstract\+Plottable}). So the plottable-\/interface of \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} applies (\hyperlink{class_q_custom_plot_a32de81ff53e263e785b83b52ecd99d6f}{Q\+Custom\+Plot\+::plottable}, \hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}, \hyperlink{class_q_custom_plot_af3dafd56884208474f311d6226513ab2}{Q\+Custom\+Plot\+::remove\+Plottable}, etc.)
  98. Usually, you first create an instance\+:
  99. \begin{DoxyCode}
  100. \hyperlink{class_q_c_p_bars}{QCPBars} *newBars = \textcolor{keyword}{new} \hyperlink{class_q_c_p_bars_a64006999ad9dff308f40df41cef176ad}{QCPBars}(customPlot->xAxis, customPlot->yAxis);
  101. \end{DoxyCode}
  102. add it to the custom\+Plot with \hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}\+:
  103. \begin{DoxyCode}
  104. customPlot->addPlottable(newBars);
  105. \end{DoxyCode}
  106. and then modify the properties of the newly created plottable, e.\+g.\+:
  107. \begin{DoxyCode}
  108. newBars->\hyperlink{class_q_c_p_abstract_plottable_ab79c7ba76bc7fa89a4b3580e12149f1f}{setName}(\textcolor{stringliteral}{"Country population"});
  109. newBars->\hyperlink{class_q_c_p_bars_aa3435aab19e0a49e4e7b41bd36a8d96b}{setData}(xData, yData);
  110. \end{DoxyCode}
  111. \subsection{Constructor \& Destructor Documentation}
  112. \hypertarget{class_q_c_p_bars_a64006999ad9dff308f40df41cef176ad}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  113. \index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  114. \subsubsection[{Q\+C\+P\+Bars}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Bars\+::\+Q\+C\+P\+Bars (
  115. \begin{DoxyParamCaption}
  116. \item[{{\bf Q\+C\+P\+Axis} $\ast$}]{key\+Axis, }
  117. \item[{{\bf Q\+C\+P\+Axis} $\ast$}]{value\+Axis}
  118. \end{DoxyParamCaption}
  119. )\hspace{0.3cm}{\ttfamily [explicit]}}\label{class_q_c_p_bars_a64006999ad9dff308f40df41cef176ad}
  120. Constructs a bar chart which uses {\itshape key\+Axis} as its key axis (\char`\"{}x\char`\"{}) and {\itshape value\+Axis} as its value axis (\char`\"{}y\char`\"{}). {\itshape key\+Axis} and {\itshape value\+Axis} must reside in the same \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (q\+Debug), the construction is not aborted, though.
  121. The constructed \hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars} can be added to the plot with \hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}, \hyperlink{class_q_custom_plot}{Q\+Custom\+Plot} then takes ownership of the bar chart.
  122. \subsection{Member Function Documentation}
  123. \hypertarget{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!add\+Data@{add\+Data}}
  124. \index{add\+Data@{add\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  125. \subsubsection[{add\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::add\+Data (
  126. \begin{DoxyParamCaption}
  127. \item[{const {\bf Q\+C\+P\+Bar\+Data\+Map} \&}]{data\+Map}
  128. \end{DoxyParamCaption}
  129. )}\label{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}
  130. Adds the provided data points in {\itshape data\+Map} to the current data. \begin{DoxySeeAlso}{See also}
  131. \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data}
  132. \end{DoxySeeAlso}
  133. \hypertarget{class_q_c_p_bars_a142158b1addefd53259002dd3ab22c3a}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!add\+Data@{add\+Data}}
  134. \index{add\+Data@{add\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  135. \subsubsection[{add\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::add\+Data (
  136. \begin{DoxyParamCaption}
  137. \item[{const {\bf Q\+C\+P\+Bar\+Data} \&}]{data}
  138. \end{DoxyParamCaption}
  139. )}\label{class_q_c_p_bars_a142158b1addefd53259002dd3ab22c3a}
  140. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Adds the provided single data point in {\itshape data} to the current data. \begin{DoxySeeAlso}{See also}
  141. \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data}
  142. \end{DoxySeeAlso}
  143. \hypertarget{class_q_c_p_bars_a684dd105403a5497fda42f2094fecbb7}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!add\+Data@{add\+Data}}
  144. \index{add\+Data@{add\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  145. \subsubsection[{add\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::add\+Data (
  146. \begin{DoxyParamCaption}
  147. \item[{double}]{key, }
  148. \item[{double}]{value}
  149. \end{DoxyParamCaption}
  150. )}\label{class_q_c_p_bars_a684dd105403a5497fda42f2094fecbb7}
  151. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Adds the provided single data point as {\itshape key} and {\itshape value} tuple to the current data \begin{DoxySeeAlso}{See also}
  152. \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data}
  153. \end{DoxySeeAlso}
  154. \hypertarget{class_q_c_p_bars_a3679a0a9decab0fa03f8f4c6e3344d52}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!add\+Data@{add\+Data}}
  155. \index{add\+Data@{add\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  156. \subsubsection[{add\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::add\+Data (
  157. \begin{DoxyParamCaption}
  158. \item[{const Q\+Vector$<$ double $>$ \&}]{keys, }
  159. \item[{const Q\+Vector$<$ double $>$ \&}]{values}
  160. \end{DoxyParamCaption}
  161. )}\label{class_q_c_p_bars_a3679a0a9decab0fa03f8f4c6e3344d52}
  162. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Adds the provided data points as {\itshape key} and {\itshape value} tuples to the current data. \begin{DoxySeeAlso}{See also}
  163. \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data}
  164. \end{DoxySeeAlso}
  165. \hypertarget{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!bar\+Above@{bar\+Above}}
  166. \index{bar\+Above@{bar\+Above}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  167. \subsubsection[{bar\+Above}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Bars} $\ast$ Q\+C\+P\+Bars\+::bar\+Above (
  168. \begin{DoxyParamCaption}
  169. {}
  170. \end{DoxyParamCaption}
  171. ) const\hspace{0.3cm}{\ttfamily [inline]}}\label{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}
  172. Returns the bars plottable that is directly above this bars plottable. If there is no such plottable, returns 0.
  173. \begin{DoxySeeAlso}{See also}
  174. \hyperlink{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}{bar\+Below}, \hyperlink{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{move\+Below}, \hyperlink{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}{move\+Above}
  175. \end{DoxySeeAlso}
  176. \hypertarget{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!bar\+Below@{bar\+Below}}
  177. \index{bar\+Below@{bar\+Below}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  178. \subsubsection[{bar\+Below}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Bars} $\ast$ Q\+C\+P\+Bars\+::bar\+Below (
  179. \begin{DoxyParamCaption}
  180. {}
  181. \end{DoxyParamCaption}
  182. ) const\hspace{0.3cm}{\ttfamily [inline]}}\label{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}
  183. Returns the bars plottable that is directly below this bars plottable. If there is no such plottable, returns 0.
  184. \begin{DoxySeeAlso}{See also}
  185. \hyperlink{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}{bar\+Above}, \hyperlink{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{move\+Below}, \hyperlink{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}{move\+Above}
  186. \end{DoxySeeAlso}
  187. \hypertarget{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!clear\+Data@{clear\+Data}}
  188. \index{clear\+Data@{clear\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  189. \subsubsection[{clear\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::clear\+Data (
  190. \begin{DoxyParamCaption}
  191. {}
  192. \end{DoxyParamCaption}
  193. )\hspace{0.3cm}{\ttfamily [virtual]}}\label{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}
  194. Removes all data points. \begin{DoxySeeAlso}{See also}
  195. \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data}, \hyperlink{class_q_c_p_bars_a99de6e7abbbf03fb41fa604c7f08aa8b}{remove\+Data\+After}, \hyperlink{class_q_c_p_bars_a9d12779a3fad4820aad2c428f368298d}{remove\+Data\+Before}
  196. \end{DoxySeeAlso}
  197. Implements \hyperlink{class_q_c_p_abstract_plottable_a86e5b8fd4b6ff4f4084e7ea4c573fc53}{Q\+C\+P\+Abstract\+Plottable}.
  198. \hypertarget{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!move\+Above@{move\+Above}}
  199. \index{move\+Above@{move\+Above}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  200. \subsubsection[{move\+Above}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::move\+Above (
  201. \begin{DoxyParamCaption}
  202. \item[{{\bf Q\+C\+P\+Bars} $\ast$}]{bars}
  203. \end{DoxyParamCaption}
  204. )}\label{class_q_c_p_bars_ac22e00a6a41509538c21b04f0a57318c}
  205. Moves this bars plottable above {\itshape bars}. In other words, the bars of this plottable will appear above the bars of {\itshape bars}. The move target {\itshape bars} must use the same key and value axis as this plottable.
  206. Inserting into and removing from existing bar stacking is handled gracefully. If {\itshape bars} already has a bars object below itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation.
  207. To remove this bars plottable from any stacking, set {\itshape bars} to 0.
  208. \begin{DoxySeeAlso}{See also}
  209. \hyperlink{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{move\+Below}, \hyperlink{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}{bar\+Below}, \hyperlink{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}{bar\+Above}
  210. \end{DoxySeeAlso}
  211. \hypertarget{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!move\+Below@{move\+Below}}
  212. \index{move\+Below@{move\+Below}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  213. \subsubsection[{move\+Below}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::move\+Below (
  214. \begin{DoxyParamCaption}
  215. \item[{{\bf Q\+C\+P\+Bars} $\ast$}]{bars}
  216. \end{DoxyParamCaption}
  217. )}\label{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}
  218. Moves this bars plottable below {\itshape bars}. In other words, the bars of this plottable will appear below the bars of {\itshape bars}. The move target {\itshape bars} must use the same key and value axis as this plottable.
  219. Inserting into and removing from existing bar stacking is handled gracefully. If {\itshape bars} already has a bars object below itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation.
  220. To remove this bars plottable from any stacking, set {\itshape bars} to 0.
  221. \begin{DoxySeeAlso}{See also}
  222. \hyperlink{class_q_c_p_bars_a69fc371346980f19177c3d1ecdad78ee}{move\+Below}, \hyperlink{class_q_c_p_bars_a9ca48a6577586825d85bdc1fbf410803}{bar\+Above}, \hyperlink{class_q_c_p_bars_a2c46a686cbad95f180ca3c2e88263961}{bar\+Below}
  223. \end{DoxySeeAlso}
  224. \hypertarget{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!remove\+Data@{remove\+Data}}
  225. \index{remove\+Data@{remove\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  226. \subsubsection[{remove\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::remove\+Data (
  227. \begin{DoxyParamCaption}
  228. \item[{double}]{from\+Key, }
  229. \item[{double}]{to\+Key}
  230. \end{DoxyParamCaption}
  231. )}\label{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}
  232. Removes all data points with key between {\itshape from\+Key} and {\itshape to\+Key}. if {\itshape from\+Key} is greater or equal to {\itshape to\+Key}, the function does nothing. To remove a single data point with known key, use \hyperlink{class_q_c_p_bars_a837cc9848ad3edd40a6130b508493f93}{remove\+Data(double key)}.
  233. \begin{DoxySeeAlso}{See also}
  234. \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data}, \hyperlink{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{clear\+Data}
  235. \end{DoxySeeAlso}
  236. \hypertarget{class_q_c_p_bars_a837cc9848ad3edd40a6130b508493f93}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!remove\+Data@{remove\+Data}}
  237. \index{remove\+Data@{remove\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  238. \subsubsection[{remove\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::remove\+Data (
  239. \begin{DoxyParamCaption}
  240. \item[{double}]{key}
  241. \end{DoxyParamCaption}
  242. )}\label{class_q_c_p_bars_a837cc9848ad3edd40a6130b508493f93}
  243. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  244. Removes a single data point at {\itshape key}. If the position is not known with absolute precision, consider using \hyperlink{class_q_c_p_bars_a1fe9bcb57d670defea1bb65cadf43765}{remove\+Data(double from\+Key, double to\+Key)} with a small fuzziness interval around the suspected position, depeding on the precision with which the key is known.
  245. \begin{DoxySeeAlso}{See also}
  246. \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data}, \hyperlink{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{clear\+Data}
  247. \end{DoxySeeAlso}
  248. \hypertarget{class_q_c_p_bars_a99de6e7abbbf03fb41fa604c7f08aa8b}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!remove\+Data\+After@{remove\+Data\+After}}
  249. \index{remove\+Data\+After@{remove\+Data\+After}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  250. \subsubsection[{remove\+Data\+After}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::remove\+Data\+After (
  251. \begin{DoxyParamCaption}
  252. \item[{double}]{key}
  253. \end{DoxyParamCaption}
  254. )}\label{class_q_c_p_bars_a99de6e7abbbf03fb41fa604c7f08aa8b}
  255. Removes all data points with key greater than {\itshape key}. \begin{DoxySeeAlso}{See also}
  256. \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data}, \hyperlink{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{clear\+Data}
  257. \end{DoxySeeAlso}
  258. \hypertarget{class_q_c_p_bars_a9d12779a3fad4820aad2c428f368298d}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!remove\+Data\+Before@{remove\+Data\+Before}}
  259. \index{remove\+Data\+Before@{remove\+Data\+Before}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  260. \subsubsection[{remove\+Data\+Before}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::remove\+Data\+Before (
  261. \begin{DoxyParamCaption}
  262. \item[{double}]{key}
  263. \end{DoxyParamCaption}
  264. )}\label{class_q_c_p_bars_a9d12779a3fad4820aad2c428f368298d}
  265. Removes all data points with key smaller than {\itshape key}. \begin{DoxySeeAlso}{See also}
  266. \hyperlink{class_q_c_p_bars_a1f29cf08615040993209147fa68de3f2}{add\+Data}, \hyperlink{class_q_c_p_bars_a11dbbd707132f07f862dff13c5789c2b}{clear\+Data}
  267. \end{DoxySeeAlso}
  268. \hypertarget{class_q_c_p_bars_a0d37a9feb1d0baf73ce6e809db214445}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!select\+Test@{select\+Test}}
  269. \index{select\+Test@{select\+Test}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  270. \subsubsection[{select\+Test}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Bars\+::select\+Test (
  271. \begin{DoxyParamCaption}
  272. \item[{const Q\+Point\+F \&}]{pos, }
  273. \item[{bool}]{only\+Selectable, }
  274. \item[{Q\+Variant $\ast$}]{details = {\ttfamily 0}}
  275. \end{DoxyParamCaption}
  276. ) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{class_q_c_p_bars_a0d37a9feb1d0baf73ce6e809db214445}
  277. This function is used to decide whether a click hits a layerable object or not.
  278. {\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.
  279. 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.
  280. 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).
  281. 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.
  282. {\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_bars_a0d37a9feb1d0baf73ce6e809db214445}{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.
  283. You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details.
  284. \begin{DoxySeeAlso}{See also}
  285. select\+Event, deselect\+Event, \hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions}
  286. \end{DoxySeeAlso}
  287. Implements \hyperlink{class_q_c_p_abstract_plottable_a38efe9641d972992a3d44204bc80ec1d}{Q\+C\+P\+Abstract\+Plottable}.
  288. \hypertarget{class_q_c_p_bars_aa3435aab19e0a49e4e7b41bd36a8d96b}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!set\+Data@{set\+Data}}
  289. \index{set\+Data@{set\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  290. \subsubsection[{set\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::set\+Data (
  291. \begin{DoxyParamCaption}
  292. \item[{{\bf Q\+C\+P\+Bar\+Data\+Map} $\ast$}]{data, }
  293. \item[{bool}]{copy = {\ttfamily false}}
  294. \end{DoxyParamCaption}
  295. )}\label{class_q_c_p_bars_aa3435aab19e0a49e4e7b41bd36a8d96b}
  296. Replaces the current data with the provided {\itshape data}.
  297. If {\itshape copy} is set to true, data points in {\itshape data} will only be copied. if false, the plottable takes ownership of the passed data and replaces the internal data pointer with it. This is significantly faster than copying for large datasets. \hypertarget{class_q_c_p_bars_a3efded5df4a82ecb201f7c28099fa2e5}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!set\+Data@{set\+Data}}
  298. \index{set\+Data@{set\+Data}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  299. \subsubsection[{set\+Data}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::set\+Data (
  300. \begin{DoxyParamCaption}
  301. \item[{const Q\+Vector$<$ double $>$ \&}]{key, }
  302. \item[{const Q\+Vector$<$ double $>$ \&}]{value}
  303. \end{DoxyParamCaption}
  304. )}\label{class_q_c_p_bars_a3efded5df4a82ecb201f7c28099fa2e5}
  305. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  306. Replaces the current data with the provided points in {\itshape key} and {\itshape value} tuples. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. \hypertarget{class_q_c_p_bars_afec6116579d44d5b706e0fa5e5332507}{}\index{Q\+C\+P\+Bars@{Q\+C\+P\+Bars}!set\+Width@{set\+Width}}
  307. \index{set\+Width@{set\+Width}!Q\+C\+P\+Bars@{Q\+C\+P\+Bars}}
  308. \subsubsection[{set\+Width}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Bars\+::set\+Width (
  309. \begin{DoxyParamCaption}
  310. \item[{double}]{width}
  311. \end{DoxyParamCaption}
  312. )}\label{class_q_c_p_bars_afec6116579d44d5b706e0fa5e5332507}
  313. Sets the width of the bars in plot (key) coordinates.
  314. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  315. \item
  316. \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item
  317. \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}