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 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697
|
<!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) 2013-2015 Emanuel Eichhammer" />
<title>QCPLayerable Class Reference</title>
<link href="qt.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.6 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Functions</a> |
<a href="#signals">Signals</a> |
<a href="#pro-methods">Protected Functions</a> </div>
<div class="headertitle">
<div class="title">QCPLayerable Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for all drawable objects.
<a href="classQCPLayerable.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for QCPLayerable:</div>
<div class="dyncontent">
<div class="center"><img src="classQCPLayerable__inherit__graph.png" border="0" usemap="#QCPLayerable_inherit__map" alt="Inheritance graph"/></div>
<map name="QCPLayerable_inherit__map" id="QCPLayerable_inherit__map">
<area shape="rect" id="node2" href="classQCPAbstractItem.html" title="The abstract base class for all items in a plot. " alt="" coords="167,221,284,245"/><area shape="rect" id="node12" href="classQCPAbstractPlottable.html" title="The abstract base class for all data representing objects in a plot. " alt="" coords="155,557,296,581"/><area shape="rect" id="node19" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. " alt="" coords="191,605,259,629"/><area shape="rect" id="node20" href="classQCPGrid.html" title="Responsible for drawing the grid of a QCPAxis. " alt="" coords="190,653,261,677"/><area shape="rect" id="node21" href="classQCPLayoutElement.html" title="The abstract base class for all objects that form the layout system. " alt="" coords="161,797,290,821"/><area shape="rect" id="node3" href="classQCPItemBracket.html" title="A bracket for referencing/highlighting certain parts in the plot. " alt="" coords="367,5,481,29"/><area shape="rect" id="node4" href="classQCPItemCurve.html" title="A curved line from one point to another. " alt="" coords="372,53,476,77"/><area shape="rect" id="node5" href="classQCPItemEllipse.html" title="An ellipse. " alt="" coords="370,101,478,125"/><area shape="rect" id="node6" href="classQCPItemLine.html" title="A line from one point to another. " alt="" coords="377,149,471,173"/><area shape="rect" id="node7" href="classQCPItemPixmap.html" title="An arbitrary pixmap. " alt="" coords="368,197,480,221"/><area shape="rect" id="node8" href="classQCPItemRect.html" title="A rectangle. " alt="" coords="377,245,471,269"/><area shape="rect" id="node9" href="classQCPItemStraightLine.html" title="A straight line that spans infinitely in both directions. " alt="" coords="355,293,493,317"/><area shape="rect" id="node10" href="classQCPItemText.html" title="A text label. " alt="" coords="377,341,471,365"/><area shape="rect" id="node11" href="classQCPItemTracer.html" title="Item that sticks to QCPGraph data points. " alt="" coords="371,389,477,413"/><area shape="rect" id="node13" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. " alt="" coords="387,437,461,461"/><area shape="rect" id="node14" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. " alt="" coords="375,485,473,509"/><area shape="rect" id="node15" href="classQCPCurve.html" title="A plottable representing a parametric curve in a plot. " alt="" coords="385,533,463,557"/><area shape="rect" id="node16" href="classQCPFinancial.html" title="A plottable representing a financial stock chart. " alt="" coords="377,581,471,605"/><area shape="rect" id="node17" href="classQCPGraph.html" title="A plottable representing a graph in a plot. " alt="" coords="383,629,465,653"/><area shape="rect" id="node18" href="classQCPStatisticalBox.html" title="A plottable representing a single statistical box in a plot. " alt="" coords="363,677,485,701"/><area shape="rect" id="node22" href="classQCPAbstractLegendItem.html" title="The abstract base class for all entries in a QCPLegend. " alt="" coords="345,725,503,749"/><area shape="rect" id="node24" href="classQCPAxisRect.html" title="Holds multiple axes and arranges them in a rectangular shape. " alt="" coords="378,773,470,797"/><area shape="rect" id="node25" href="classQCPColorScale.html" title="A color scale for use with color coding data such as QCPColorMap. " alt="" coords="371,821,477,845"/><area shape="rect" id="node26" href="classQCPLayout.html" title="The abstract base class for layouts. " alt="" coords="383,869,465,893"/><area shape="rect" id="node30" href="classQCPPlotTitle.html" title="A layout element displaying a plot title text. " alt="" coords="379,917,469,941"/><area shape="rect" id="node23" href="classQCPPlottableLegendItem.html" title="A legend item representing a plottable with an icon and the plottable name. " alt="" coords="553,725,714,749"/><area shape="rect" id="node27" href="classQCPLayoutGrid.html" title="A layout that arranges child elements in a grid. " alt="" coords="580,845,687,869"/><area shape="rect" id="node29" href="classQCPLayoutInset.html" title="A layout that places child elements aligned to the border or arbitrarily positioned. " alt="" coords="578,893,689,917"/><area shape="rect" id="node28" href="classQCPLegend.html" title="Manages a legend inside a QCustomPlot. " alt="" coords="763,845,850,869"/></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:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a74c0fa237f29bf0e49565013fc5d1ec0">QCPLayerable</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *plot, QString targetLayer=QString(), <a class="el" href="classQCPLayerable.html">QCPLayerable</a> *<a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a>=0)</td></tr>
<tr class="separator:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10a3cc92e0fa63e4a929e61d34e275a7"></a>
bool </td><td class="memItemRight" valign="bottom"><b>visible</b> () const </td></tr>
<tr class="separator:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab7e0e94461566093d36ffc0f5312b109"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7e0e94461566093d36ffc0f5312b109"></a>
<a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td><td class="memItemRight" valign="bottom"><b>parentPlot</b> () const </td></tr>
<tr class="separator:ab7e0e94461566093d36ffc0f5312b109"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a98d79f5b716d45eac4347befe546d0ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a> () const </td></tr>
<tr class="separator:a98d79f5b716d45eac4347befe546d0ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aea67e8c19145e70d68c286a36f6b8300"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea67e8c19145e70d68c286a36f6b8300"></a>
<a class="el" href="classQCPLayer.html">QCPLayer</a> * </td><td class="memItemRight" valign="bottom"><b>layer</b> () const </td></tr>
<tr class="separator:aea67e8c19145e70d68c286a36f6b8300"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef5cb4aa899ed9dc9384fd614560291e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef5cb4aa899ed9dc9384fd614560291e"></a>
bool </td><td class="memItemRight" valign="bottom"><b>antialiased</b> () const </td></tr>
<tr class="separator:aef5cb4aa899ed9dc9384fd614560291e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a> (bool on)</td></tr>
<tr class="separator:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memItemLeft" align="right" valign="top">Q_SLOT bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *layer)</td></tr>
<tr class="separator:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab25a0e7b897993b44447caee0f142083"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab25a0e7b897993b44447caee0f142083">setLayer</a> (const QString &layerName)</td></tr>
<tr class="separator:ab25a0e7b897993b44447caee0f142083"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4fd43e89be4a553ead41652565ff0581"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">setAntialiased</a> (bool enabled)</td></tr>
<tr class="separator:a4fd43e89be4a553ead41652565ff0581"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4001c4d0dfec55598efa4d531f2179a9"><td class="memItemLeft" align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a> (const QPointF &pos, bool onlySelectable, QVariant *details=0) const </td></tr>
<tr class="separator:a4001c4d0dfec55598efa4d531f2179a9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30809f7455e9794bca7b6c737622fa63"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> () const </td></tr>
<tr class="separator:a30809f7455e9794bca7b6c737622fa63"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:abbf8657cedea73ac1c3499b521c90eba"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#abbf8657cedea73ac1c3499b521c90eba">layerChanged</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *newLayer)</td></tr>
<tr class="separator:abbf8657cedea73ac1c3499b521c90eba"><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:ab20b7dbd8e0249ed61adb9622c427382"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab20b7dbd8e0249ed61adb9622c427382">parentPlotInitialized</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
<tr class="separator:ab20b7dbd8e0249ed61adb9622c427382"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aa4035e586b7f317a06ba7e74e242a5ea">selectionCategory</a> () const </td></tr>
<tr class="separator:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a07a8f746640c3704b09910df297afcba"><td class="memItemLeft" align="right" valign="top">virtual QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">clipRect</a> () const </td></tr>
<tr class="separator:a07a8f746640c3704b09910df297afcba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#afdf83ddc6a265cbf4c89fe99d3d93473">applyDefaultAntialiasingHint</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter) const =0</td></tr>
<tr class="separator:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter)=0</td></tr>
<tr class="separator:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)</td></tr>
<tr class="separator:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae546370644a5551c76af739afc008bee"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a> (bool *selectionStateChanged)</td></tr>
<tr class="separator:ae546370644a5551c76af739afc008bee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
<tr class="separator:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa23c893671f1f6744ac235cf2204cf3a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aa23c893671f1f6744ac235cf2204cf3a">setParentLayerable</a> (<a class="el" href="classQCPLayerable.html">QCPLayerable</a> *<a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a>)</td></tr>
<tr class="separator:aa23c893671f1f6744ac235cf2204cf3a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#af94484cfb7cbbddb7de522e9be71d9a4">moveToLayer</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *layer, bool prepend)</td></tr>
<tr class="separator:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62bd552d1a45aa9accb24b310542279e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a62bd552d1a45aa9accb24b310542279e">applyAntialiasingHint</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter, bool localAntialiased, <a class="el" href="namespaceQCP.html#ae55dbe315d41fe80f29ba88100843a0c">QCP::AntialiasedElement</a> overrideElement) const </td></tr>
<tr class="separator:a62bd552d1a45aa9accb24b310542279e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all drawable objects. </p>
<p>This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc.</p>
<p>Every layerable is on a layer (<a class="el" href="classQCPLayer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a>) which allows controlling the rendering order by stacking the layers accordingly.</p>
<p>For details about the layering mechanism, see the <a class="el" href="classQCPLayer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> documentation. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a74c0fa237f29bf0e49565013fc5d1ec0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QCPLayerable::QCPLayerable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
<td class="paramname"><em>plot</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>targetLayer</em> = <code>QString()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td>
<td class="paramname"><em>parentLayerable</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> instance.</p>
<p>Since <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> is an abstract base class, it can't be instantiated directly. Use one of the derived classes.</p>
<p>If <em>plot</em> is provided, it automatically places itself on the layer named <em>targetLayer</em>. If <em>targetLayer</em> is an empty string, it places itself on the current layer of the plot (see <a class="el" href="classQCustomPlot.html#a73a6dc47c653bb6f8f030abca5a11852">QCustomPlot::setCurrentLayer</a>).</p>
<p>It is possible to provide 0 as <em>plot</em>. In that case, you should assign a parent plot at a later time with <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>.</p>
<p>The layerable's parent layerable is set to <em>parentLayerable</em>, if provided. Direct layerable parents are mainly used to control visibility in a hierarchy of layerables. This means a layerable is only drawn, if all its ancestor layerables are also visible. Note that <em>parentLayerable</em> does not become the QObject-parent (for memory management) of this layerable, <em>plot</em> does. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a98d79f5b716d45eac4347befe546d0ec"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * QCPLayerable::parentLayerable </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the parent layerable of this layerable. The parent layerable is used to provide visibility hierarchies in conjunction with the method <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a>. This way, layerables only get drawn if their parent layerables are visible, too.</p>
<p>Note that a parent layerable is not necessarily also the QObject parent for memory management. Further, a layerable doesn't always have a parent layerable, so this function may return 0.</p>
<p>A parent layerable is set implicitly with when placed inside layout elements and doesn't need to be set manually by the user. </p>
</div>
</div>
<a class="anchor" id="a3bed99ddc396b48ce3ebfdc0418744f8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::setVisible </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>on</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the visibility of this layerable object. If an object is not visible, it will not be drawn on the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> surface, and user interaction with it (e.g. click and selection) is not possible. </p>
</div>
</div>
<a class="anchor" id="ab0d0da6d2de45a118886d2c8e16d5a54"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QCPLayerable::setLayer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
<td class="paramname"><em>layer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the <em>layer</em> of this layerable object. The object will be placed on top of the other objects already on <em>layer</em>.</p>
<p>Returns true on success, i.e. if <em>layer</em> is a valid layer. </p>
</div>
</div>
<a class="anchor" id="ab25a0e7b897993b44447caee0f142083"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QCPLayerable::setLayer </td>
<td>(</td>
<td class="paramtype">const QString & </td>
<td class="paramname"><em>layerName</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded function. Sets the layer of this layerable object by name</p>
<p>Returns true on success, i.e. if <em>layerName</em> is a valid layer name. </p>
</div>
</div>
<a class="anchor" id="a4fd43e89be4a553ead41652565ff0581"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::setAntialiased </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enabled</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets whether this object will be drawn antialiased or not.</p>
<p>Note that antialiasing settings may be overridden by <a class="el" href="classQCustomPlot.html#af6f91e5eab1be85f67c556e98c3745e8">QCustomPlot::setAntialiasedElements</a> and <a class="el" href="classQCustomPlot.html#ae10d685b5eabea2999fb8775ca173c24">QCustomPlot::setNotAntialiasedElements</a>. </p>
</div>
</div>
<a class="anchor" id="a4001c4d0dfec55598efa4d531f2179a9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double QCPLayerable::selectTest </td>
<td>(</td>
<td class="paramtype">const QPointF & </td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>onlySelectable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">QVariant * </td>
<td class="paramname"><em>details</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</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 function is used to decide whether a click hits a layerable object or not.</p>
<p><em>pos</em> is a point in pixel coordinates on the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if <em>onlySelectable</em> is true and the object is not selectable, -1.0 is returned, too.</p>
<p>If the object is represented not by single lines but by an area like a <a class="el" href="classQCPItemText.html">QCPItemText</a> or the bars of a <a class="el" href="classQCPBars.html">QCPBars</a> plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).</p>
<p>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*selectionTolerance).</p>
<p>The actual setting of the selection state is not done by this function. This is handled by the parent <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.</p>
<p><em>details</em> is an optional output parameter. Every layerable subclass may place any information in <em>details</em>. This information will be passed to <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> when the parent <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> will carry the <em>details</em>. This is useful for multi-part objects (like <a class="el" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>). This way, a possibly complex calculation to decide which part was clicked is only done once in <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>. The result (i.e. the actually clicked part) can then be placed in <em>details</em>. So in the subsequent <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, the decision which part was selected doesn't have to be done a second time for a single selection operation.</p>
<p>You may pass 0 as <em>details</em> to indicate that you are not interested in those selection details.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, <a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a>, <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classQCPAxis.html#a2877a6230920c118be65c6113089f467">QCPAxis</a>, <a class="el" href="classQCPLayoutInset.html#ab5a2f2b88c05e369fd7da9583d17aa3a">QCPLayoutInset</a>, <a class="el" href="classQCPLegend.html#aa3892801051bc7b985e003576df844db">QCPLegend</a>, <a class="el" href="classQCPBars.html#a0d37a9feb1d0baf73ce6e809db214445">QCPBars</a>, <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">QCPAbstractItem</a>, <a class="el" href="classQCPGraph.html#abc9ff375aabcf2d21cca33d6baf85772">QCPGraph</a>, <a class="el" href="classQCPColorMap.html#a4088dc7bcbe9bba605c84a912ba660ff">QCPColorMap</a>, <a class="el" href="classQCPLayoutElement.html#a9fcf5d0ea19f2c23b2b528bce2c6f095">QCPLayoutElement</a>, <a class="el" href="classQCPFinancial.html#adf6cff00a55f775487d375fe4df5e95b">QCPFinancial</a>, <a class="el" href="classQCPCurve.html#a5af9949e725704811bbc81ecd5970b8e">QCPCurve</a>, <a class="el" href="classQCPStatisticalBox.html#a7d3ac843dc48a085740fdfc4319a89cc">QCPStatisticalBox</a>, <a class="el" href="classQCPItemTracer.html#ae71f3728421c83c188c117279ca050fd">QCPItemTracer</a>, <a class="el" href="classQCPItemText.html#a285b95bb6634c2e4f7768abb7a8bc69c">QCPItemText</a>, <a class="el" href="classQCPAbstractPlottable.html#a38efe9641d972992a3d44204bc80ec1d">QCPAbstractPlottable</a>, <a class="el" href="classQCPAbstractLegendItem.html#ad0480d5cad34627a294a2921caa4a62f">QCPAbstractLegendItem</a>, <a class="el" href="classQCPPlotTitle.html#a5b7ae716be9134a48f4e378feb0e6699">QCPPlotTitle</a>, <a class="el" href="classQCPItemBracket.html#aa6933caff1d42c54bcebc769ef88c798">QCPItemBracket</a>, <a class="el" href="classQCPItemPixmap.html#a9f8436aa141fa0fb504191c882c2f4d9">QCPItemPixmap</a>, <a class="el" href="classQCPItemCurve.html#a741375c11667b5f9c95b2683f93ee514">QCPItemCurve</a>, <a class="el" href="classQCPItemLine.html#a7541e5d9378ca121d07b0df3b24f7178">QCPItemLine</a>, <a class="el" href="classQCPItemEllipse.html#acd7e5f9528630b2ab5987e2a5782eb7c">QCPItemEllipse</a>, <a class="el" href="classQCPItemRect.html#af13b0797079b40b73d1c7286b76f18ac">QCPItemRect</a>, and <a class="el" href="classQCPItemStraightLine.html#a64cc3796f58ce856012732603edb2f1c">QCPItemStraightLine</a>.</p>
</div>
</div>
<a class="anchor" id="a30809f7455e9794bca7b6c737622fa63"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QCPLayerable::realVisibility </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns whether this layerable is visible, taking the visibility of the layerable parent and the visibility of the layer this layerable is on into account. This is the method that is consulted to decide whether a layerable shall be drawn or not.</p>
<p>If this layerable has a direct layerable parent (usually set via hierarchies implemented in subclasses, like in the case of <a class="el" href="classQCPLayoutElement.html" title="The abstract base class for all objects that form the layout system. ">QCPLayoutElement</a>), this function returns true only if this layerable has its visibility set to true and the parent layerable's <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> returns true.</p>
<p>If this layerable doesn't have a direct layerable parent, returns the state of this layerable's visibility. </p>
</div>
</div>
<a class="anchor" id="abbf8657cedea73ac1c3499b521c90eba"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::layerChanged </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
<td class="paramname"><em>newLayer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This signal is emitted when the layer of this layerable changes, i.e. this layerable is moved to a different layer.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ab20b7dbd8e0249ed61adb9622c427382"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::parentPlotInitialized </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
<td class="paramname"><em>parentPlot</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 function is called by <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>, to allow subclasses to react on the setting of a parent plot. This is the case when 0 was passed as parent plot in the constructor, and the parent plot is set at a later time.</p>
<p>For example, QCPLayoutElement/QCPLayout hierarchies may be created independently of any <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> at first. When they are then added to a layout inside the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>, the top level element of the hierarchy gets its parent plot initialized with <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>. To propagate the parent plot to all the children of the hierarchy, the top level element then uses this function to pass the parent plot on to its child elements.</p>
<p>The default implementation does nothing.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classQCPLegend.html#a4d552c63d82742d77fb7f177bae7b1ba">QCPLegend</a>, and <a class="el" href="classQCPLayoutElement.html#a1478899e80e8244b411e96ec3b2e5ce2">QCPLayoutElement</a>.</p>
</div>
</div>
<a class="anchor" id="aa4035e586b7f317a06ba7e74e242a5ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> QCPLayerable::selectionCategory </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Returns the selection category this layerable shall belong to. The selection category is used in conjunction with <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> to control which objects are selectable and which aren't.</p>
<p>Subclasses that don't fit any of the normal <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> values can use <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037af67a50bc26147a13b551b3a625374949">QCP::iSelectOther</a>. This is what the default implementation returns.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classQCPAxis.html#aca53b2f365dfc1257cba9e62395aa68f">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a7a9795a28c9c2514b4ae50f0a63d407c">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a777b5d384936396ad9c3ceb3d3453f1c">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a5eef607bcc2aee8bfe2380a8710f6c64">QCPAbstractPlottable</a>, and <a class="el" href="classQCPAbstractLegendItem.html#a53a80054ab329beaca072fb08c08944b">QCPAbstractLegendItem</a>.</p>
</div>
</div>
<a class="anchor" id="a07a8f746640c3704b09910df297afcba"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QRect QCPLayerable::clipRect </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>. Specific subclasses may reimplement this function to provide different clipping rects.</p>
<p>The returned clipping rect is set on the painter before the draw function of the respective object is called. </p>
<p>Reimplemented in <a class="el" href="classQCPAbstractItem.html#a538e25ff8856534582f5b2b400a46405">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#ac01960b0827913922f5364d559c124ed">QCPAbstractPlottable</a>, and <a class="el" href="classQCPAbstractLegendItem.html#abcb540c331b49ef7ee0ea1abbd0dcac3">QCPAbstractLegendItem</a>.</p>
</div>
</div>
<a class="anchor" id="afdf83ddc6a265cbf4c89fe99d3d93473"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::applyDefaultAntialiasingHint </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>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This function applies the default antialiasing setting to the specified <em>painter</em>, using the function <a class="el" href="classQCPLayerable.html#a62bd552d1a45aa9accb24b310542279e">applyAntialiasingHint</a>. It is the antialiasing state the painter is put in, when <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.</p>
<p><b>First example:</b> <a class="el" href="classQCPGraph.html" title="A plottable representing a graph in a plot. ">QCPGraph</a> has multiple entities that have an antialiasing setting: The graph line, fills, scatters and error bars. Those can be configured via <a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">QCPGraph::setAntialiased</a>, <a class="el" href="classQCPAbstractPlottable.html#a089d6b5577120239b55c39ed27c39536">QCPGraph::setAntialiasedFill</a>, <a class="el" href="classQCPAbstractPlottable.html#a2f03f067ede2ed4da6f7d0e4777a3f02">QCPGraph::setAntialiasedScatters</a> etc. Consequently, there isn't only the <a class="el" href="classQCPAbstractPlottable.html#a76e9d6cc7972dc1528f526d163766aca">QCPGraph::applyDefaultAntialiasingHint</a> function (which corresponds to the graph line's antialiasing), but specialized ones like <a class="el" href="classQCPAbstractPlottable.html#ac08a480155895e674dbfe5a5670e0ff3">QCPGraph::applyFillAntialiasingHint</a> and <a class="el" href="classQCPAbstractPlottable.html#a753272ee225a62827e90c3e1e78de4b1">QCPGraph::applyScattersAntialiasingHint</a>. So before drawing one of those entities, <a class="el" href="classQCPGraph.html#a659218cc62c2a7786213d9dd429c1c8d">QCPGraph::draw</a> calls the respective specialized applyAntialiasingHint function.</p>
<p><b>Second example:</b> <a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a> consists only of a line so there is only one antialiasing setting which can be controlled with <a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">QCPItemLine::setAntialiased</a>. (This function is inherited by all layerables. The specialized functions, as seen on <a class="el" href="classQCPGraph.html" title="A plottable representing a graph in a plot. ">QCPGraph</a>, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal <a class="el" href="classQCPAbstractItem.html#a0839031abdd71067e2256a4d53c7a011">QCPItemLine::applyDefaultAntialiasingHint</a>. The <a class="el" href="classQCPItemLine.html#a1fc045dd33919f8006df0692aeb0e84a">QCPItemLine::draw</a> function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> function is called, and that's the state it wants to draw the line with. </p>
<p>Implemented in <a class="el" href="classQCPAxis.html#a13bde39eb1e0b7c14a02935689be8aba">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a26307f532c3458b379663b7d517a5f47">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a0839031abdd71067e2256a4d53c7a011">QCPAbstractItem</a>, <a class="el" href="classQCPLayoutElement.html#ad6d2b4bb0291c2441b2e1ca3d5296df5">QCPLayoutElement</a>, <a class="el" href="classQCPAxisRect.html#a9a6dd0763701cbc7d01f899bcbb3f9ca">QCPAxisRect</a>, <a class="el" href="classQCPColorScale.html#a23d530c340c15d2fce6583e7120ee8bd">QCPColorScale</a>, <a class="el" href="classQCPAbstractPlottable.html#a76e9d6cc7972dc1528f526d163766aca">QCPAbstractPlottable</a>, <a class="el" href="classQCPAbstractLegendItem.html#a71c3baeda42ba78d2cccd97e74110a5e">QCPAbstractLegendItem</a>, <a class="el" href="classQCPPlotTitle.html#a0e2a491864bf8d8e8b159ef38e9d85bd">QCPPlotTitle</a>, and <a class="el" href="classQCPGrid.html#a9916f5e38b4d6cae446537aeb47c7272">QCPGrid</a>.</p>
</div>
</div>
<a class="anchor" id="aecf2f7087482d4b6a78cb2770e5ed12d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::draw </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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This function draws the layerable with the specified <em>painter</em>. It is only called by <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>, if the layerable is visible (<a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a>).</p>
<p>Before this function is called, the painter's antialiasing state is set via <a class="el" href="classQCPLayerable.html#afdf83ddc6a265cbf4c89fe99d3d93473">applyDefaultAntialiasingHint</a>, see the documentation there. Further, the clipping rectangle was set to <a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">clipRect</a>. </p>
<p>Implemented in <a class="el" href="classQCPAxis.html#a258b1e783eda5cd14ec5552c696a424e">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a4462151bf875ca85fa3815457c683fdc">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">QCPAbstractItem</a>, <a class="el" href="classQCPBars.html#a42b894e34dac799f90ff3700706b31df">QCPBars</a>, <a class="el" href="classQCPGraph.html#a659218cc62c2a7786213d9dd429c1c8d">QCPGraph</a>, <a class="el" href="classQCPColorMap.html#a3b0f45a3177be9522d5e9b8cd8ae122d">QCPColorMap</a>, <a class="el" href="classQCPLayoutElement.html#a547bcc1e6e2be5645ca781efe0834653">QCPLayoutElement</a>, <a class="el" href="classQCPFinancial.html#ad71a59a1b42616594831e04e52c92120">QCPFinancial</a>, <a class="el" href="classQCPAxisRect.html#afb1bbbbda8345cd2710d92ee48440b53">QCPAxisRect</a>, <a class="el" href="classQCPAbstractPlottable.html#acbab5e30dcd04fd302b4a5902ac2c482">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlottableLegendItem.html#a68a781c3de4f9959fdf82075052d43aa">QCPPlottableLegendItem</a>, <a class="el" href="classQCPItemText.html#a8793adb271ab79b4cf391dc55e9987f1">QCPItemText</a>, <a class="el" href="classQCPCurve.html#a2361302d2fc6ec669849bd3bca00c4b2">QCPCurve</a>, <a class="el" href="classQCPItemTracer.html#aaaf49b48382c730ec9be0e74c2538315">QCPItemTracer</a>, <a class="el" href="classQCPStatisticalBox.html#a753b62761217dd6b92f8a29e286a1317">QCPStatisticalBox</a>, <a class="el" href="classQCPAbstractLegendItem.html#a97dedc084c672359710f16b31d046d1d">QCPAbstractLegendItem</a>, <a class="el" href="classQCPPlotTitle.html#ae4f1f8d24489628dabb7256363b097d2">QCPPlotTitle</a>, <a class="el" href="classQCPItemPixmap.html#a879e8076c2db01a38b34cfa73ec95d2f">QCPItemPixmap</a>, <a class="el" href="classQCPGrid.html#ad009c23f96078616aa4f66a750974b23">QCPGrid</a>, <a class="el" href="classQCPItemEllipse.html#afe97ec827adb05f000fe007783faae3c">QCPItemEllipse</a>, <a class="el" href="classQCPItemBracket.html#a8343cf0559c64886add7aa7f4b22f1a6">QCPItemBracket</a>, <a class="el" href="classQCPItemRect.html#a18cd583638b876cdd50f1a155ec182aa">QCPItemRect</a>, <a class="el" href="classQCPItemCurve.html#a56cb5b72cd02db2eda598274a39839a9">QCPItemCurve</a>, <a class="el" href="classQCPItemLine.html#a1fc045dd33919f8006df0692aeb0e84a">QCPItemLine</a>, and <a class="el" href="classQCPItemStraightLine.html#a2daa1e1253216c26565d56a2d5530170">QCPItemStraightLine</a>.</p>
</div>
</div>
<a class="anchor" id="a7498c2d0d081cf7cad0fb3bb93aa0e91"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::selectEvent </td>
<td>(</td>
<td class="paramtype">QMouseEvent * </td>
<td class="paramname"><em>event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>additive</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const QVariant & </td>
<td class="paramname"><em>details</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool * </td>
<td class="paramname"><em>selectionStateChanged</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">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.</p>
<p><em>event</em> is the mouse event that caused the selection. <em>additive</em> indicates, whether the user was holding the multi-select-modifier while performing the selection (see <a class="el" href="classQCustomPlot.html#a8fc96e3b5138a06759a2a90c166df516">QCustomPlot::setMultiSelectModifier</a>). if <em>additive</em> is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).</p>
<p>Every selectEvent is preceded by a call to <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>). The <em>details</em> data you output from <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a> is fed back via <em>details</em> here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually <em>details</em> is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like <a class="el" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.</p>
<p><em>selectionStateChanged</em> is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if <em>additive</em> is true, <em>selectionStateChanged</em> must also be set to true, because the selection toggles. If <em>additive</em> is false, <em>selectionStateChanged</em> is only set to true, if the layerable was previously unselected and now is switched to the selected state.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, <a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classQCPAxis.html#aa8a5fe80e2898ec08ada26b5fbee9eca">QCPAxis</a>, <a class="el" href="classQCPLegend.html#af93bf87dc5c383a9d2ada80b35f3a1a5">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a16aaad02456aa23a759efd1ac90c79bf">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlotTitle.html#a22672ef2abe442b1e73b7ee04cff9bdd">QCPPlotTitle</a>, and <a class="el" href="classQCPAbstractLegendItem.html#abcfe9e335d99c7fac74e03d26723c1b7">QCPAbstractLegendItem</a>.</p>
</div>
</div>
<a class="anchor" id="ae546370644a5551c76af739afc008bee"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::deselectEvent </td>
<td>(</td>
<td class="paramtype">bool * </td>
<td class="paramname"><em>selectionStateChanged</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 event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to <a class="el" href="classQCustomPlot.html#a9d4808ab925b003054085246c92a257c">QCustomPlot::deselectAll</a>. Subclasses should react to it by unsetting their selection appropriately.</p>
<p>just as in <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, the output parameter <em>selectionStateChanged</em> (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classQCPAxis.html#a53512242cde6ec21943a3ba10dbf78c3">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a5208ead4331c9b0440f768f059777c58">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a91f090d6763cfedb0749219c63788ae9">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a6fa0d0f95560ea8b01ee13f296dab2b1">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlotTitle.html#ac6dfce05bebdb9bd0bfacd5ff02f3325">QCPPlotTitle</a>, and <a class="el" href="classQCPAbstractLegendItem.html#ae64e667e7c5b85cd92c9b91928faef28">QCPAbstractLegendItem</a>.</p>
</div>
</div>
<a class="anchor" id="a8cbe5a0c9a5674249982f5ca5f8e02bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::initializeParentPlot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
<td class="paramname"><em>parentPlot</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the parent plot of this layerable. Use this function once to set the parent plot if you have passed 0 in the constructor. It can not be used to move a layerable from one <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> to another one.</p>
<p>Note that, unlike when passing a non-null parent plot in the constructor, this function does not make <em>parentPlot</em> the QObject-parent of this layerable. If you want this, call QObject::setParent(<em>parentPlot</em>) in addition to this function.</p>
<p>Further, you will probably want to set a layer (<a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a>) after calling this function, to make the layerable appear on the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>.</p>
<p>The parent plot change will be propagated to subclasses via a call to <a class="el" href="classQCPLayerable.html#ab20b7dbd8e0249ed61adb9622c427382">parentPlotInitialized</a> so they can react accordingly (e.g. also initialize the parent plot of child layerables, like <a class="el" href="classQCPLayout.html" title="The abstract base class for layouts. ">QCPLayout</a> does). </p>
</div>
</div>
<a class="anchor" id="aa23c893671f1f6744ac235cf2204cf3a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::setParentLayerable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td>
<td class="paramname"><em>parentLayerable</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the parent layerable of this layerable to <em>parentLayerable</em>. Note that <em>parentLayerable</em> does not become the QObject-parent (for memory management) of this layerable.</p>
<p>The parent layerable has influence on the return value of the <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> method. Only layerables with a fully visible parent tree will return true for <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a>, and thus be drawn.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> </dd></dl>
</div>
</div>
<a class="anchor" id="af94484cfb7cbbddb7de522e9be71d9a4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool QCPLayerable::moveToLayer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
<td class="paramname"><em>layer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>prepend</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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Moves this layerable object to <em>layer</em>. If <em>prepend</em> is true, this object will be prepended to the new layer's list, i.e. it will be drawn below the objects already on the layer. If it is false, the object will be appended.</p>
<p>Returns true on success, i.e. if <em>layer</em> is a valid layer. </p>
</div>
</div>
<a class="anchor" id="a62bd552d1a45aa9accb24b310542279e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void QCPLayerable::applyAntialiasingHint </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">bool </td>
<td class="paramname"><em>localAntialiased</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceQCP.html#ae55dbe315d41fe80f29ba88100843a0c">QCP::AntialiasedElement</a> </td>
<td class="paramname"><em>overrideElement</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the QCPainter::setAntialiasing state on the provided <em>painter</em>, depending on the <em>localAntialiased</em> value as well as the overrides <a class="el" href="classQCustomPlot.html#af6f91e5eab1be85f67c556e98c3745e8">QCustomPlot::setAntialiasedElements</a> and <a class="el" href="classQCustomPlot.html#ae10d685b5eabea2999fb8775ca173c24">QCustomPlot::setNotAntialiasedElements</a>. Which override enum this function takes into account is controlled via <em>overrideElement</em>. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/layer.h</li>
<li>src/layer.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>
|