1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="author" content="Emanuel Eichhammer" />
<meta name="copyright" content="(C) 2011-2022 Emanuel Eichhammer" />
<title>QCPSelectionDecorator Class Reference</title>
<link href="qcp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink" href="index.html">Main Page</a> ·
<a class="headerLink" href="classoverview.html">Class Overview</a> ·
<a class="headerLink" href="hierarchy.html">Hierarchy</a> ·
<a class="headerLink" href="annotated.html">All Classes</a> ·
<a class="headerLink" href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Functions</a> |
<a href="#pro-methods">Protected Functions</a> </div>
<div class="headertitle">
<div class="title">QCPSelectionDecorator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Controls how a plottable's data selection is drawn.
<a href="classQCPSelectionDecorator.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for QCPSelectionDecorator:</div>
<div class="dyncontent">
<div class="center"><img src="classQCPSelectionDecorator__inherit__graph.png" border="0" usemap="#QCPSelectionDecorator_inherit__map" alt="Inheritance graph"/></div>
<map name="QCPSelectionDecorator_inherit__map" id="QCPSelectionDecorator_inherit__map">
<area shape="rect" id="node2" href="classQCPSelectionDecoratorBracket.html" title="A selection decorator which draws brackets around each selected data segment. " alt="" coords="5,77,203,101"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Functions</h2></td></tr>
<tr class="memitem:aa145480d9a062cd176fe30900bb7bca8"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#aa145480d9a062cd176fe30900bb7bca8">QCPSelectionDecorator</a> ()</td></tr>
<tr class="separator:aa145480d9a062cd176fe30900bb7bca8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9307a60c9759223367909aed2d05ad91"><td class="memItemLeft" align="right" valign="top"><a id="a9307a60c9759223367909aed2d05ad91"></a>
QPen </td><td class="memItemRight" valign="bottom"><b>pen</b> () const</td></tr>
<tr class="separator:a9307a60c9759223367909aed2d05ad91"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a783b643aa52120a25308fc501b9998b1"><td class="memItemLeft" align="right" valign="top"><a id="a783b643aa52120a25308fc501b9998b1"></a>
QBrush </td><td class="memItemRight" valign="bottom"><b>brush</b> () const</td></tr>
<tr class="separator:a783b643aa52120a25308fc501b9998b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa6558f6f270a188bb633386aba0d1ae4"><td class="memItemLeft" align="right" valign="top"><a id="aa6558f6f270a188bb633386aba0d1ae4"></a>
<a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> </td><td class="memItemRight" valign="bottom"><b>scatterStyle</b> () const</td></tr>
<tr class="separator:aa6558f6f270a188bb633386aba0d1ae4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab2019bf31dde39f1ec028e3810dfc08b"><td class="memItemLeft" align="right" valign="top"><a id="ab2019bf31dde39f1ec028e3810dfc08b"></a>
QCPScatterStyle::ScatterProperties </td><td class="memItemRight" valign="bottom"><b>usedScatterProperties</b> () const</td></tr>
<tr class="separator:ab2019bf31dde39f1ec028e3810dfc08b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2c8192e1e294aa3a4a7f32a859e3d76"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#ac2c8192e1e294aa3a4a7f32a859e3d76">setPen</a> (const QPen &pen)</td></tr>
<tr class="separator:ac2c8192e1e294aa3a4a7f32a859e3d76"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa74b626be518ea17055f918d423c8c2d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#aa74b626be518ea17055f918d423c8c2d">setBrush</a> (const QBrush &brush)</td></tr>
<tr class="separator:aa74b626be518ea17055f918d423c8c2d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab403a613289714ff4fd4a0c0371ab116"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#ab403a613289714ff4fd4a0c0371ab116">setScatterStyle</a> (const <a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=<a class="el" href="classQCPScatterStyle.html#a8974f6a20f8f6eea7781f0e6af9deb46aa04d012e7c03e455db2b68fdd55c2a04">QCPScatterStyle::spPen</a>)</td></tr>
<tr class="separator:ab403a613289714ff4fd4a0c0371ab116"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a808c1607cd4e83869c04986e332455c0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a808c1607cd4e83869c04986e332455c0">setUsedScatterProperties</a> (const QCPScatterStyle::ScatterProperties &properties)</td></tr>
<tr class="separator:a808c1607cd4e83869c04986e332455c0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a75098893f7d08660ea449206810679d7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a75098893f7d08660ea449206810679d7">applyPen</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter) const</td></tr>
<tr class="separator:a75098893f7d08660ea449206810679d7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a225544527d51b49546b70d0e6d655a34"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a225544527d51b49546b70d0e6d655a34">applyBrush</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter) const</td></tr>
<tr class="separator:a225544527d51b49546b70d0e6d655a34"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1277b373248896bc70e8cc1de96da9fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a1277b373248896bc70e8cc1de96da9fa">getFinalScatterStyle</a> (const <a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> &unselectedStyle) const</td></tr>
<tr class="separator:a1277b373248896bc70e8cc1de96da9fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a467a8d5cfcab27e862a17c797ac27b8a"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a467a8d5cfcab27e862a17c797ac27b8a">copyFrom</a> (const <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> *other)</td></tr>
<tr class="separator:a467a8d5cfcab27e862a17c797ac27b8a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f8eb49e277063845391e803ae23054a"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#a4f8eb49e277063845391e803ae23054a">drawDecoration</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter, <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> selection)</td></tr>
<tr class="separator:a4f8eb49e277063845391e803ae23054a"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Functions</h2></td></tr>
<tr class="memitem:af66cb39e308da0285ae5d533e1e85027"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPSelectionDecorator.html#af66cb39e308da0285ae5d533e1e85027">registerWithPlottable</a> (<a class="el" href="classQCPAbstractPlottable.html">QCPAbstractPlottable</a> *plottable)</td></tr>
<tr class="separator:af66cb39e308da0285ae5d533e1e85027"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Controls how a plottable's data selection is drawn. </p>
<p>Each <a class="el" href="classQCPAbstractPlottable.html">QCPAbstractPlottable</a> instance has one <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> (accessible via <a class="el" href="classQCPAbstractPlottable.html#a7861518e47ca0c6a0c386032c2db075e">QCPAbstractPlottable::selectionDecorator</a>) and uses it when drawing selected segments of its data.</p>
<p>The selection decorator controls both pen (<a class="el" href="classQCPSelectionDecorator.html#ac2c8192e1e294aa3a4a7f32a859e3d76">setPen</a>) and brush (<a class="el" href="classQCPSelectionDecorator.html#aa74b626be518ea17055f918d423c8c2d">setBrush</a>), as well as the scatter style (<a class="el" href="classQCPSelectionDecorator.html#ab403a613289714ff4fd4a0c0371ab116">setScatterStyle</a>) if the plottable draws scatters. Since a <a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> is itself composed of different properties such as color shape and size, the decorator allows specifying exactly which of those properties shall be used for the selected data point, via <a class="el" href="classQCPSelectionDecorator.html#a808c1607cd4e83869c04986e332455c0">setUsedScatterProperties</a>.</p>
<p>A <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> subclass instance can be passed to a plottable via <a class="el" href="classQCPAbstractPlottable.html#a20e266ad646f8c4a7e4631040510e5d9">QCPAbstractPlottable::setSelectionDecorator</a>, allowing greater customizability of the appearance of selected segments.</p>
<p>Use <a class="el" href="classQCPSelectionDecorator.html#a467a8d5cfcab27e862a17c797ac27b8a">copyFrom</a> to easily transfer the settings of one decorator to another one. This is especially useful since plottables take ownership of the passed selection decorator, and thus the same decorator instance can not be passed to multiple plottables.</p>
<p>Selection decorators can also themselves perform drawing operations by reimplementing <a class="el" href="classQCPSelectionDecorator.html#a4f8eb49e277063845391e803ae23054a">drawDecoration</a>, which is called by the plottable's draw method. The base class <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> does not make use of this however. For example, <a class="el" href="classQCPSelectionDecoratorBracket.html">QCPSelectionDecoratorBracket</a> draws brackets around selected data segments. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="aa145480d9a062cd176fe30900bb7bca8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa145480d9a062cd176fe30900bb7bca8">§ </a></span>QCPSelectionDecorator()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QCPSelectionDecorator::QCPSelectionDecorator </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classQCPSelectionDecorator.html" title="Controls how a plottable's data selection is drawn. ">QCPSelectionDecorator</a> instance with default values </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac2c8192e1e294aa3a4a7f32a859e3d76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2c8192e1e294aa3a4a7f32a859e3d76">§ </a></span>setPen()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::setPen </td>
<td>(</td>
<td class="paramtype">const QPen & </td>
<td class="paramname"><em>pen</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the pen that will be used by the parent plottable to draw selected data segments. </p>
</div>
</div>
<a id="aa74b626be518ea17055f918d423c8c2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa74b626be518ea17055f918d423c8c2d">§ </a></span>setBrush()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::setBrush </td>
<td>(</td>
<td class="paramtype">const QBrush & </td>
<td class="paramname"><em>brush</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the brush that will be used by the parent plottable to draw selected data segments. </p>
</div>
</div>
<a id="ab403a613289714ff4fd4a0c0371ab116"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab403a613289714ff4fd4a0c0371ab116">§ </a></span>setScatterStyle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::setScatterStyle </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> & </td>
<td class="paramname"><em>scatterStyle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">QCPScatterStyle::ScatterProperties </td>
<td class="paramname"><em>usedProperties</em> = <code><a class="el" href="classQCPScatterStyle.html#a8974f6a20f8f6eea7781f0e6af9deb46aa04d012e7c03e455db2b68fdd55c2a04">QCPScatterStyle::spPen</a></code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the scatter style that will be used by the parent plottable to draw scatters in selected data segments.</p>
<p><em>usedProperties</em> specifies which parts of the passed <em>scatterStyle</em> will be used by the plottable. The used properties can also be changed via <a class="el" href="classQCPSelectionDecorator.html#a808c1607cd4e83869c04986e332455c0">setUsedScatterProperties</a>. </p>
</div>
</div>
<a id="a808c1607cd4e83869c04986e332455c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a808c1607cd4e83869c04986e332455c0">§ </a></span>setUsedScatterProperties()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::setUsedScatterProperties </td>
<td>(</td>
<td class="paramtype">const QCPScatterStyle::ScatterProperties & </td>
<td class="paramname"><em>properties</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Use this method to define which properties of the scatter style (set via <a class="el" href="classQCPSelectionDecorator.html#ab403a613289714ff4fd4a0c0371ab116">setScatterStyle</a>) will be used for selected data segments. All properties of the scatter style that are not specified in <em>properties</em> will remain as specified in the plottable's original scatter style.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPScatterStyle.html#a8974f6a20f8f6eea7781f0e6af9deb46">QCPScatterStyle::ScatterProperty</a> </dd></dl>
</div>
</div>
<a id="a75098893f7d08660ea449206810679d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75098893f7d08660ea449206810679d7">§ </a></span>applyPen()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::applyPen </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
<td class="paramname"><em>painter</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the pen of <em>painter</em> to the pen of this selection decorator.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPSelectionDecorator.html#a225544527d51b49546b70d0e6d655a34">applyBrush</a>, <a class="el" href="classQCPSelectionDecorator.html#a1277b373248896bc70e8cc1de96da9fa">getFinalScatterStyle</a> </dd></dl>
</div>
</div>
<a id="a225544527d51b49546b70d0e6d655a34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a225544527d51b49546b70d0e6d655a34">§ </a></span>applyBrush()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::applyBrush </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
<td class="paramname"><em>painter</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the brush of <em>painter</em> to the brush of this selection decorator.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPSelectionDecorator.html#a75098893f7d08660ea449206810679d7">applyPen</a>, <a class="el" href="classQCPSelectionDecorator.html#a1277b373248896bc70e8cc1de96da9fa">getFinalScatterStyle</a> </dd></dl>
</div>
</div>
<a id="a1277b373248896bc70e8cc1de96da9fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1277b373248896bc70e8cc1de96da9fa">§ </a></span>getFinalScatterStyle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> QCPSelectionDecorator::getFinalScatterStyle </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPScatterStyle.html">QCPScatterStyle</a> & </td>
<td class="paramname"><em>unselectedStyle</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the scatter style that the parent plottable shall use for selected scatter points. The plottable's original (unselected) scatter style must be passed as <em>unselectedStyle</em>. Depending on the setting of <a class="el" href="classQCPSelectionDecorator.html#a808c1607cd4e83869c04986e332455c0">setUsedScatterProperties</a>, the returned scatter style is a mixture of this selecion decorator's scatter style (<a class="el" href="classQCPSelectionDecorator.html#ab403a613289714ff4fd4a0c0371ab116">setScatterStyle</a>), and <em>unselectedStyle</em>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPSelectionDecorator.html#a75098893f7d08660ea449206810679d7">applyPen</a>, <a class="el" href="classQCPSelectionDecorator.html#a225544527d51b49546b70d0e6d655a34">applyBrush</a>, <a class="el" href="classQCPSelectionDecorator.html#ab403a613289714ff4fd4a0c0371ab116">setScatterStyle</a> </dd></dl>
</div>
</div>
<a id="a467a8d5cfcab27e862a17c797ac27b8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a467a8d5cfcab27e862a17c797ac27b8a">§ </a></span>copyFrom()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::copyFrom </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> * </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Copies all properties (e.g. color, fill, scatter style) of the <em>other</em> selection decorator to this selection decorator. </p>
</div>
</div>
<a id="a4f8eb49e277063845391e803ae23054a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f8eb49e277063845391e803ae23054a">§ </a></span>drawDecoration()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPSelectionDecorator::drawDecoration </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
<td class="paramname"><em>painter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> </td>
<td class="paramname"><em>selection</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method is called by all plottables' draw methods to allow custom selection decorations to be drawn. Use the passed <em>painter</em> to perform the drawing operations. <em>selection</em> carries the data selection for which the decoration shall be drawn.</p>
<p>The default base class implementation of <a class="el" href="classQCPSelectionDecorator.html">QCPSelectionDecorator</a> has no special decoration, so this method does nothing. </p>
<p>Reimplemented in <a class="el" href="classQCPSelectionDecoratorBracket.html#a1ceb893063ea3d7197a24098018f4bfb">QCPSelectionDecoratorBracket</a>.</p>
</div>
</div>
<a id="af66cb39e308da0285ae5d533e1e85027"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af66cb39e308da0285ae5d533e1e85027">§ </a></span>registerWithPlottable()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool QCPSelectionDecorator::registerWithPlottable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPAbstractPlottable.html">QCPAbstractPlottable</a> * </td>
<td class="paramname"><em>plottable</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method is called as soon as a selection decorator is associated with a plottable, by a call to <a class="el" href="classQCPAbstractPlottable.html#a20e266ad646f8c4a7e4631040510e5d9">QCPAbstractPlottable::setSelectionDecorator</a>. This way the selection decorator can obtain a pointer to the plottable that uses it (e.g. to access data points via the <a class="el" href="classQCPAbstractPlottable.html#a81fd9fd5c4f429c074785e2eb238a8e7">QCPAbstractPlottable::interface1D</a> interface).</p>
<p>If the selection decorator was already added to a different plottable before, this method aborts the registration and returns false. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/plottable.h</li>
<li>src/plottable.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>
|