File: classQCPAbstractItem.html

package info (click to toggle)
qcustomplot 1.3.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,112 kB
  • ctags: 2,361
  • sloc: cpp: 17,354; sh: 1,555; makefile: 2
file content (895 lines) | stat: -rw-r--r-- 79,470 bytes parent folder | download
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
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
<!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>QCPAbstractItem 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> &middot;
<a class="headerLink"  href="classoverview.html">Class Overview</a> &middot;
<a class="headerLink"  href="hierarchy.html">Hierarchy</a> &middot;
<a class="headerLink"  href="annotated.html">All Classes</a> &middot;
<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> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pro-methods">Protected Functions</a>  </div>
  <div class="headertitle">
<div class="title">QCPAbstractItem Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>The abstract base class for all items in a plot.  
 <a href="classQCPAbstractItem.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for QCPAbstractItem:</div>
<div class="dyncontent">
<div class="center"><img src="classQCPAbstractItem__inherit__graph.png" border="0" usemap="#QCPAbstractItem_inherit__map" alt="Inheritance graph"/></div>
<map name="QCPAbstractItem_inherit__map" id="QCPAbstractItem_inherit__map">
<area shape="rect" id="node3" href="classQCPItemBracket.html" title="A bracket for referencing/highlighting certain parts in the plot. " alt="" coords="332,5,447,29"/><area shape="rect" id="node4" href="classQCPItemCurve.html" title="A curved line from one point to another. " alt="" coords="337,53,441,77"/><area shape="rect" id="node5" href="classQCPItemEllipse.html" title="An ellipse. " alt="" coords="335,101,443,125"/><area shape="rect" id="node6" href="classQCPItemLine.html" title="A line from one point to another. " alt="" coords="342,149,437,173"/><area shape="rect" id="node7" href="classQCPItemPixmap.html" title="An arbitrary pixmap. " alt="" coords="333,197,445,221"/><area shape="rect" id="node8" href="classQCPItemRect.html" title="A rectangle. " alt="" coords="342,245,437,269"/><area shape="rect" id="node9" href="classQCPItemStraightLine.html" title="A straight line that spans infinitely in both directions. " alt="" coords="320,293,459,317"/><area shape="rect" id="node10" href="classQCPItemText.html" title="A text label. " alt="" coords="343,341,436,365"/><area shape="rect" id="node11" href="classQCPItemTracer.html" title="Item that sticks to QCPGraph data points. " alt="" coords="336,389,443,413"/><area shape="rect" id="node2" href="classQCPLayerable.html" title="Base class for all drawable objects. " alt="" coords="5,197,107,221"/></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:a9922507d8b4503a1fe1ed0b1030e23b6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a9922507d8b4503a1fe1ed0b1030e23b6">QCPAbstractItem</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
<tr class="separator:a9922507d8b4503a1fe1ed0b1030e23b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b0ea171823033bcb8aee81f4a034871"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b0ea171823033bcb8aee81f4a034871"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>clipToAxisRect</b> () const </td></tr>
<tr class="separator:a5b0ea171823033bcb8aee81f4a034871"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37f86618740b5047eae23eedb2de061a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37f86618740b5047eae23eedb2de061a"></a>
<a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>clipAxisRect</b> () const </td></tr>
<tr class="separator:a37f86618740b5047eae23eedb2de061a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9189e752025533e1595eaade0009a3bc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9189e752025533e1595eaade0009a3bc"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>selectable</b> () const </td></tr>
<tr class="separator:a9189e752025533e1595eaade0009a3bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a225865808640d8d9a7dd19f09a2e93f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a225865808640d8d9a7dd19f09a2e93f2"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>selected</b> () const </td></tr>
<tr class="separator:a225865808640d8d9a7dd19f09a2e93f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39e05b9d4176b9accafc746d16ca6a06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a> (bool clip)</td></tr>
<tr class="separator:a39e05b9d4176b9accafc746d16ca6a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7dc75fcbcd10206fe0b75d757ea7a347"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a> (<a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *rect)</td></tr>
<tr class="separator:a7dc75fcbcd10206fe0b75d757ea7a347"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a8e32a55bc478b849756a78c2d87fd2"><td class="memItemLeft" align="right" valign="top">Q_SLOT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a8a8e32a55bc478b849756a78c2d87fd2">setSelectable</a> (bool selectable)</td></tr>
<tr class="separator:a8a8e32a55bc478b849756a78c2d87fd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a203de94ad586cc44d16c9565f49d3378"><td class="memItemLeft" align="right" valign="top">Q_SLOT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a203de94ad586cc44d16c9565f49d3378">setSelected</a> (bool selected)</td></tr>
<tr class="separator:a203de94ad586cc44d16c9565f49d3378"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96d522d10ffc0413b9a366c6f7f0476b"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> (const QPointF &amp;pos, bool onlySelectable, QVariant *details=0) const =0</td></tr>
<tr class="separator:a96d522d10ffc0413b9a366c6f7f0476b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf6a680cc29a6bce8345c3b6af3a91a1"><td class="memItemLeft" align="right" valign="top">QList&lt; <a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#adf6a680cc29a6bce8345c3b6af3a91a1">positions</a> () const </td></tr>
<tr class="separator:adf6a680cc29a6bce8345c3b6af3a91a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8454b9941960b840608a5a1e00b1977d"><td class="memItemLeft" align="right" valign="top">QList&lt; <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a8454b9941960b840608a5a1e00b1977d">anchors</a> () const </td></tr>
<tr class="separator:a8454b9941960b840608a5a1e00b1977d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af71345bd150f87fa1d2442837b87bb59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#af71345bd150f87fa1d2442837b87bb59">position</a> (const QString &amp;name) const </td></tr>
<tr class="separator:af71345bd150f87fa1d2442837b87bb59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed974cba7cc02608c71dad4638e008d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#abed974cba7cc02608c71dad4638e008d">anchor</a> (const QString &amp;name) const </td></tr>
<tr class="separator:abed974cba7cc02608c71dad4638e008d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbce9e5ba5252541d19db0c40303357a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#acbce9e5ba5252541d19db0c40303357a">hasAnchor</a> (const QString &amp;name) const </td></tr>
<tr class="separator:acbce9e5ba5252541d19db0c40303357a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classQCPLayerable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classQCPLayerable')"><img src="closed.png" alt="-"/>&#160;Public Functions inherited from <a class="el" href="classQCPLayerable.html">QCPLayerable</a></td></tr>
<tr class="memitem:a74c0fa237f29bf0e49565013fc5d1ec0 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">&#160;</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 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10a3cc92e0fa63e4a929e61d34e275a7 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10a3cc92e0fa63e4a929e61d34e275a7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>visible</b> () const </td></tr>
<tr class="separator:a10a3cc92e0fa63e4a929e61d34e275a7 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7e0e94461566093d36ffc0f5312b109 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7e0e94461566093d36ffc0f5312b109"></a>
<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>parentPlot</b> () const </td></tr>
<tr class="separator:ab7e0e94461566093d36ffc0f5312b109 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98d79f5b716d45eac4347befe546d0ec inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a> () const </td></tr>
<tr class="separator:a98d79f5b716d45eac4347befe546d0ec inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea67e8c19145e70d68c286a36f6b8300 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea67e8c19145e70d68c286a36f6b8300"></a>
<a class="el" href="classQCPLayer.html">QCPLayer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>layer</b> () const </td></tr>
<tr class="separator:aea67e8c19145e70d68c286a36f6b8300 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef5cb4aa899ed9dc9384fd614560291e inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef5cb4aa899ed9dc9384fd614560291e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>antialiased</b> () const </td></tr>
<tr class="separator:aef5cb4aa899ed9dc9384fd614560291e inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bed99ddc396b48ce3ebfdc0418744f8 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a> (bool on)</td></tr>
<tr class="separator:a3bed99ddc396b48ce3ebfdc0418744f8 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0d0da6d2de45a118886d2c8e16d5a54 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">Q_SLOT bool&#160;</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 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25a0e7b897993b44447caee0f142083 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab25a0e7b897993b44447caee0f142083">setLayer</a> (const QString &amp;layerName)</td></tr>
<tr class="separator:ab25a0e7b897993b44447caee0f142083 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fd43e89be4a553ead41652565ff0581 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">setAntialiased</a> (bool enabled)</td></tr>
<tr class="separator:a4fd43e89be4a553ead41652565ff0581 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30809f7455e9794bca7b6c737622fa63 inherit pub_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> () const </td></tr>
<tr class="separator:a30809f7455e9794bca7b6c737622fa63 inherit pub_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</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:aa5cffb034fc65dbb91c77e02c1c14251"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#aa5cffb034fc65dbb91c77e02c1c14251">selectionChanged</a> (bool selected)</td></tr>
<tr class="separator:aa5cffb034fc65dbb91c77e02c1c14251"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b266c11aac61cb511901f3911dac2a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b266c11aac61cb511901f3911dac2a3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>selectableChanged</b> (bool selectable)</td></tr>
<tr class="separator:a5b266c11aac61cb511901f3911dac2a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header signals_classQCPLayerable"><td colspan="2" onclick="javascript:toggleInherit('signals_classQCPLayerable')"><img src="closed.png" alt="-"/>&#160;Signals inherited from <a class="el" href="classQCPLayerable.html">QCPLayerable</a></td></tr>
<tr class="memitem:abbf8657cedea73ac1c3499b521c90eba inherit signals_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</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 inherit signals_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</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:a777b5d384936396ad9c3ceb3d3453f1c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a777b5d384936396ad9c3ceb3d3453f1c">selectionCategory</a> () const </td></tr>
<tr class="separator:a777b5d384936396ad9c3ceb3d3453f1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a538e25ff8856534582f5b2b400a46405"><td class="memItemLeft" align="right" valign="top">virtual QRect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a538e25ff8856534582f5b2b400a46405">clipRect</a> () const </td></tr>
<tr class="separator:a538e25ff8856534582f5b2b400a46405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0839031abdd71067e2256a4d53c7a011"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a0839031abdd71067e2256a4d53c7a011">applyDefaultAntialiasingHint</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter) const </td></tr>
<tr class="separator:a0839031abdd71067e2256a4d53c7a011"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0dc056f650c3ca73414e6b4f01674ef"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">draw</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter)=0</td></tr>
<tr class="separator:ad0dc056f650c3ca73414e6b4f01674ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf92af7b9893712959a6c073d334d88d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">selectEvent</a> (QMouseEvent *event, bool additive, const QVariant &amp;details, bool *selectionStateChanged)</td></tr>
<tr class="separator:aaf92af7b9893712959a6c073d334d88d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91f090d6763cfedb0749219c63788ae9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a91f090d6763cfedb0749219c63788ae9">deselectEvent</a> (bool *selectionStateChanged)</td></tr>
<tr class="separator:a91f090d6763cfedb0749219c63788ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94bde62b8a2fc133666dcbb8035deeed"><td class="memItemLeft" align="right" valign="top">virtual QPointF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a94bde62b8a2fc133666dcbb8035deeed">anchorPixelPoint</a> (int anchorId) const </td></tr>
<tr class="separator:a94bde62b8a2fc133666dcbb8035deeed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdca343717d625b8abb3c3e38c0ed39d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#acdca343717d625b8abb3c3e38c0ed39d">distSqrToLine</a> (const QPointF &amp;start, const QPointF &amp;end, const QPointF &amp;point) const </td></tr>
<tr class="separator:acdca343717d625b8abb3c3e38c0ed39d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c0e14c4e92df91174cb7183fb363069"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a4c0e14c4e92df91174cb7183fb363069">rectSelectTest</a> (const QRectF &amp;rect, const QPointF &amp;pos, bool filledRect) const </td></tr>
<tr class="separator:a4c0e14c4e92df91174cb7183fb363069"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75036d39c4d4e2e1a7dd145fff915d32"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">createPosition</a> (const QString &amp;name)</td></tr>
<tr class="separator:a75036d39c4d4e2e1a7dd145fff915d32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3fc92527802078ca395138748b629a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAbstractItem.html#af3fc92527802078ca395138748b629a7">createAnchor</a> (const QString &amp;name, int anchorId)</td></tr>
<tr class="separator:af3fc92527802078ca395138748b629a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classQCPLayerable"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classQCPLayerable')"><img src="closed.png" alt="-"/>&#160;Protected Functions inherited from <a class="el" href="classQCPLayerable.html">QCPLayerable</a></td></tr>
<tr class="memitem:ab20b7dbd8e0249ed61adb9622c427382 inherit pro_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</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 inherit pro_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cbe5a0c9a5674249982f5ca5f8e02bc inherit pro_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</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 inherit pro_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23c893671f1f6744ac235cf2204cf3a inherit pro_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</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 inherit pro_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af94484cfb7cbbddb7de522e9be71d9a4 inherit pro_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">bool&#160;</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 inherit pro_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62bd552d1a45aa9accb24b310542279e inherit pro_methods_classQCPLayerable"><td class="memItemLeft" align="right" valign="top">void&#160;</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 inherit pro_methods_classQCPLayerable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The abstract base class for all items in a plot. </p>
<p>In <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>, items are supplemental graphical elements that are neither plottables (<a class="el" href="classQCPAbstractPlottable.html" title="The abstract base class for all data representing objects in a plot. ">QCPAbstractPlottable</a>) nor axes (<a class="el" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>). While plottables are always tied to two axes and thus plot coordinates, items can also be placed in absolute coordinates independent of any axes. Each specific item has at least one <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> member which controls the positioning. Some items are defined by more than one coordinate and thus have two or more <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> members (For example, <a class="el" href="classQCPItemRect.html" title="A rectangle. ">QCPItemRect</a> has <em>topLeft</em> and <em>bottomRight</em>).</p>
<p>This abstract base class defines a very basic interface like visibility and clipping. Since this class is abstract, it can't be instantiated. Use one of the subclasses or create a subclass yourself to create new items.</p>
<p>The built-in items are: </p>
<table class="doxtable">
<tr>
<td><a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a></td><td>A line defined by a start and an end point. May have different ending styles on each side (e.g. arrows). </td></tr>
<tr>
<td><a class="el" href="classQCPItemStraightLine.html" title="A straight line that spans infinitely in both directions. ">QCPItemStraightLine</a></td><td>A straight line defined by a start and a direction point. Unlike <a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a>, the straight line is infinitely long and has no endings. </td></tr>
<tr>
<td><a class="el" href="classQCPItemCurve.html" title="A curved line from one point to another. ">QCPItemCurve</a></td><td>A curve defined by start, end and two intermediate control points. May have different ending styles on each side (e.g. arrows). </td></tr>
<tr>
<td><a class="el" href="classQCPItemRect.html" title="A rectangle. ">QCPItemRect</a></td><td>A rectangle </td></tr>
<tr>
<td><a class="el" href="classQCPItemEllipse.html" title="An ellipse. ">QCPItemEllipse</a></td><td>An ellipse </td></tr>
<tr>
<td><a class="el" href="classQCPItemPixmap.html" title="An arbitrary pixmap. ">QCPItemPixmap</a></td><td>An arbitrary pixmap </td></tr>
<tr>
<td><a class="el" href="classQCPItemText.html" title="A text label. ">QCPItemText</a></td><td>A text label </td></tr>
<tr>
<td><a class="el" href="classQCPItemBracket.html" title="A bracket for referencing/highlighting certain parts in the plot. ">QCPItemBracket</a></td><td>A bracket which may be used to reference/highlight certain parts in the plot. </td></tr>
<tr>
<td><a class="el" href="classQCPItemTracer.html" title="Item that sticks to QCPGraph data points. ">QCPItemTracer</a></td><td>An item that can be attached to a <a class="el" href="classQCPGraph.html" title="A plottable representing a graph in a plot. ">QCPGraph</a> and sticks to its data points, given a key coordinate. </td></tr>
</table>
<h1><a class="anchor" id="items-clipping"></a>
Clipping</h1>
<p>Items are by default clipped to the main axis rect (they are only visible inside the axis rect). To make an item visible outside that axis rect, disable clipping via <a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect(false)</a>.</p>
<p>On the other hand if you want the item to be clipped to a different axis rect, specify it via <a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a>. This clipAxisRect property of an item is only used for clipping behaviour, and in principle is independent of the coordinate axes the item might be tied to via its position members (<a class="el" href="classQCPItemPosition.html#a2185f45c75ac8cb9be89daeaaad50e37">QCPItemPosition::setAxes</a>). However, it is common that the axis rect for clipping also contains the axes used for the item positions.</p>
<h1><a class="anchor" id="items-using"></a>
Using items</h1>
<p>First you instantiate the item you want to use and add it to the plot: </p>
<div class="fragment"><div class="line">  <a class="code" href="classQCPItemLine.html">QCPItemLine</a> *line = <span class="keyword">new</span> <a class="code" href="classQCPItemLine.html">QCPItemLine</a>(customPlot);</div>
<div class="line">  customPlot-&gt;addItem(line);</div>
</div><!-- fragment --><p>by default, the positions of the item are bound to the x- and y-Axis of the plot. So we can just set the plot coordinates where the line should start/end: </p>
<div class="fragment"><div class="line">  line-&gt;start-&gt;<a class="code" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>(-0.1, 0.8);</div>
<div class="line">  line-&gt;end-&gt;<a class="code" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>(1.1, 0.2);</div>
</div><!-- fragment --><p>If we don't want the line to be positioned in plot coordinates but a different coordinate system, e.g. absolute pixel positions 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, we need to change the position type like this: </p>
<div class="fragment"><div class="line">  line-&gt;start-&gt;<a class="code" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>(<a class="code" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">QCPItemPosition::ptAbsolute</a>);</div>
<div class="line">  line-&gt;end-&gt;<a class="code" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>(<a class="code" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">QCPItemPosition::ptAbsolute</a>);</div>
</div><!-- fragment --><p>Then we can set the coordinates, this time in pixels: </p>
<div class="fragment"><div class="line">  line-&gt;start-&gt;<a class="code" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>(100, 200);</div>
<div class="line">  line-&gt;end-&gt;<a class="code" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>(450, 320);</div>
</div><!-- fragment --><p>and make the line visible on the entire <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>, by disabling clipping to the axis rect: </p>
<div class="fragment"><div class="line">  line-&gt;<a class="code" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a>(<span class="keyword">false</span>);</div>
</div><!-- fragment --><p> For more advanced plots, it is even possible to set different types and parent anchors per X/Y coordinate of an item position, using for example <a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">QCPItemPosition::setTypeX</a> or <a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">QCPItemPosition::setParentAnchorX</a>. For details, see the documentation of <a class="el" href="classQCPItemPosition.html">QCPItemPosition</a>.</p>
<h1><a class="anchor" id="items-subclassing"></a>
Creating own items</h1>
<p>To create an own item, you implement a subclass of <a class="el" href="classQCPAbstractItem.html" title="The abstract base class for all items in a plot. ">QCPAbstractItem</a>. These are the pure virtual functions, you must implement: </p>
<ul>
<li><a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> </li>
<li><a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">draw</a></li>
</ul>
<p>See the documentation of those functions for what they need to do.</p>
<h2><a class="anchor" id="items-positioning"></a>
Allowing the item to be positioned</h2>
<p>As mentioned, item positions are represented by <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> members. Let's assume the new item shall have only one point as its position (as opposed to two like a rect or multiple like a polygon). You then add a public member of type <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> like so:</p>
<div class="fragment"><div class="line"><a class="code" href="classQCPItemPosition.html">QCPItemPosition</a> * <span class="keyword">const</span> myPosition;</div>
</div><!-- fragment --><p>the const makes sure the pointer itself can't be modified from the user of your new item (the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> instance it points to, can be modified, of course). The initialization of this pointer is made easy with the <a class="el" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">createPosition</a> function. Just assign the return value of this function to each <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> in the constructor of your item. <a class="el" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">createPosition</a> takes a string which is the name of the position, typically this is identical to the variable name. For example, the constructor of QCPItemExample could look like this:</p>
<div class="fragment"><div class="line">QCPItemExample::QCPItemExample(<a class="code" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot) :</div>
<div class="line">  <a class="code" href="classQCPAbstractItem.html">QCPAbstractItem</a>(parentPlot),</div>
<div class="line">  myPosition(<a class="code" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">createPosition</a>(<span class="stringliteral">&quot;myPosition&quot;</span>))</div>
<div class="line">{</div>
<div class="line">  <span class="comment">// other constructor code</span></div>
<div class="line">}</div>
</div><!-- fragment --><h2><a class="anchor" id="items-drawing"></a>
The draw function</h2>
<p>To give your item a visual representation, reimplement the <a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">draw</a> function and use the passed <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> to draw the item. You can retrieve the item position in pixel coordinates from the position member(s) via <a class="el" href="classQCPItemPosition.html#ae490f9c76ee2ba33752c495d3b6e8fb5">QCPItemPosition::pixelPoint</a>.</p>
<p>To optimize performance you should calculate a bounding rect first (don't forget to take the pen width into account), check whether it intersects the <a class="el" href="classQCPAbstractItem.html#a538e25ff8856534582f5b2b400a46405">clipRect</a>, and only draw the item at all if this is the case.</p>
<h2><a class="anchor" id="items-selection"></a>
The selectTest function</h2>
<p>Your implementation of the <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> function may use the helpers <a class="el" href="classQCPAbstractItem.html#acdca343717d625b8abb3c3e38c0ed39d">distSqrToLine</a> and <a class="el" href="classQCPAbstractItem.html#a4c0e14c4e92df91174cb7183fb363069">rectSelectTest</a>. With these, the implementation of the selection test becomes significantly simpler for most items. See the documentation of <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> for what the function parameters mean and what the function should return.</p>
<h2><a class="anchor" id="anchors"></a>
Providing anchors</h2>
<p>Providing anchors (<a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>) starts off like adding a position. First you create a public member, e.g.</p>
<div class="fragment"><div class="line"><a class="code" href="classQCPItemAnchor.html">QCPItemAnchor</a> * <span class="keyword">const</span> bottom;</div>
</div><!-- fragment --><p>and create it in the constructor with the <a class="el" href="classQCPAbstractItem.html#af3fc92527802078ca395138748b629a7">createAnchor</a> function, assigning it a name and an anchor id (an integer enumerating all anchors on the item, you may create an own enum for this). Since anchors can be placed anywhere, relative to the item's position(s), your item needs to provide the position of every anchor with the reimplementation of the <a class="el" href="classQCPAbstractItem.html#a94bde62b8a2fc133666dcbb8035deeed">anchorPixelPoint</a>(int anchorId) function.</p>
<p>In essence the <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a> is merely an intermediary that itself asks your item for the pixel position when anything attached to the anchor needs to know the coordinates. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9922507d8b4503a1fe1ed0b1030e23b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPAbstractItem::QCPAbstractItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td>
          <td class="paramname"><em>parentPlot</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Base class constructor which initializes base class members. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a39e05b9d4176b9accafc746d16ca6a06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::setClipToAxisRect </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>clip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets whether the item shall be clipped to an axis rect or whether it shall be visible on the entire <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 axis rect can be set with <a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7dc75fcbcd10206fe0b75d757ea7a347"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::setClipAxisRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the clip axis rect. It defines the rect that will be used to clip the item when <a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a> is set to true.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8a8e32a55bc478b849756a78c2d87fd2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::setSelectable </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>selectable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets whether the user can (de-)select this item by clicking 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. (When <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> contains QCustomPlot::iSelectItems.)</p>
<p>However, even when <em>selectable</em> was set to false, it is possible to set the selection manually, by calling <a class="el" href="classQCPAbstractItem.html#a203de94ad586cc44d16c9565f49d3378">setSelected</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a>, <a class="el" href="classQCPAbstractItem.html#a203de94ad586cc44d16c9565f49d3378">setSelected</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a203de94ad586cc44d16c9565f49d3378"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::setSelected </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>selected</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets whether this item is selected or not. When selected, it might use a different visual appearance (e.g. pen and brush), this depends on the specific item though.</p>
<p>The entire selection mechanism for items is handled automatically when <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> contains QCustomPlot::iSelectItems. You only need to call this function when you wish to change the selection state manually.</p>
<p>This function can change the selection state even when <a class="el" href="classQCPAbstractItem.html#a8a8e32a55bc478b849756a78c2d87fd2">setSelectable</a> was set to false.</p>
<p>emits the <a class="el" href="classQCPAbstractItem.html#aa5cffb034fc65dbb91c77e02c1c14251">selectionChanged</a> signal when <em>selected</em> is different from the previous selection state.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a8a8e32a55bc478b849756a78c2d87fd2">setSelectable</a>, <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a96d522d10ffc0413b9a366c6f7f0476b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double QCPAbstractItem::selectTest </td>
          <td>(</td>
          <td class="paramtype">const QPointF &amp;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>onlySelectable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QVariant *&#160;</td>
          <td class="paramname"><em>details</em> = <code>0</code>&#160;</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">pure 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="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">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="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">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="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">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="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">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="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">selectEvent</a>, <a class="el" href="classQCPAbstractItem.html#a91f090d6763cfedb0749219c63788ae9">deselectEvent</a>, <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">QCPLayerable</a>.</p>

<p>Implemented in <a class="el" href="classQCPItemTracer.html#ae71f3728421c83c188c117279ca050fd">QCPItemTracer</a>, <a class="el" href="classQCPItemText.html#a285b95bb6634c2e4f7768abb7a8bc69c">QCPItemText</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="adf6a680cc29a6bce8345c3b6af3a91a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; <a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> * &gt; QCPAbstractItem::positions </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 all positions of the item in a list.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a8454b9941960b840608a5a1e00b1977d">anchors</a>, <a class="el" href="classQCPAbstractItem.html#af71345bd150f87fa1d2442837b87bb59">position</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8454b9941960b840608a5a1e00b1977d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> * &gt; QCPAbstractItem::anchors </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 all anchors of the item in a list. Note that since a position (<a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a>) is always also an anchor, the list will also contain the positions of this item.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#adf6a680cc29a6bce8345c3b6af3a91a1">positions</a>, <a class="el" href="classQCPAbstractItem.html#abed974cba7cc02608c71dad4638e008d">anchor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af71345bd150f87fa1d2442837b87bb59"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> * QCPAbstractItem::position </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> with the specified <em>name</em>. If this item doesn't have a position by that name, returns 0.</p>
<p>This function provides an alternative way to access item positions. Normally, you access positions direcly by their member pointers (which typically have the same variable name as <em>name</em>).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#adf6a680cc29a6bce8345c3b6af3a91a1">positions</a>, <a class="el" href="classQCPAbstractItem.html#abed974cba7cc02608c71dad4638e008d">anchor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="abed974cba7cc02608c71dad4638e008d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> * QCPAbstractItem::anchor </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a> with the specified <em>name</em>. If this item doesn't have an anchor by that name, returns 0.</p>
<p>This function provides an alternative way to access item anchors. Normally, you access anchors direcly by their member pointers (which typically have the same variable name as <em>name</em>).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a8454b9941960b840608a5a1e00b1977d">anchors</a>, <a class="el" href="classQCPAbstractItem.html#af71345bd150f87fa1d2442837b87bb59">position</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acbce9e5ba5252541d19db0c40303357a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPAbstractItem::hasAnchor </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns whether this item has an anchor with the specified <em>name</em>.</p>
<p>Note that you can check for positions with this function, too. This is because every position is also an anchor (<a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> inherits from <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#abed974cba7cc02608c71dad4638e008d">anchor</a>, <a class="el" href="classQCPAbstractItem.html#af71345bd150f87fa1d2442837b87bb59">position</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa5cffb034fc65dbb91c77e02c1c14251"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::selectionChanged </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>selected</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 selection state of this item has changed, either by user interaction or by a direct call to <a class="el" href="classQCPAbstractItem.html#a203de94ad586cc44d16c9565f49d3378">setSelected</a>. </p>

</div>
</div>
<a class="anchor" id="a777b5d384936396ad9c3ceb3d3453f1c"></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> QCPAbstractItem::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 from <a class="el" href="classQCPLayerable.html#aa4035e586b7f317a06ba7e74e242a5ea">QCPLayerable</a>.</p>

</div>
</div>
<a class="anchor" id="a538e25ff8856534582f5b2b400a46405"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QRect QCPAbstractItem::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 rect the visual representation of this item is clipped to. This depends on the current setting of <a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a> as well as the axis rect set with <a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a>.</p>
<p>If the item is not clipped to an axis rect, the <a class="el" href="classQCustomPlot.html#a953ecdbc28018e7e84cb6213ad3d88c2">QCustomPlot::viewport</a> rect is returned.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">draw</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">QCPLayerable</a>.</p>

</div>
</div>
<a class="anchor" id="a0839031abdd71067e2256a4d53c7a011"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::applyDefaultAntialiasingHint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> *&#160;</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">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A convenience function to easily set the QPainter::Antialiased hint on the provided <em>painter</em> before drawing item lines.</p>
<p>This is the antialiasing state the painter passed to the <a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">draw</a> method is in by default.</p>
<p>This function takes into account the local setting of the antialiasing flag as well as the overrides set with <a class="el" href="classQCustomPlot.html#af6f91e5eab1be85f67c556e98c3745e8">QCustomPlot::setAntialiasedElements</a> and <a class="el" href="classQCustomPlot.html#ae10d685b5eabea2999fb8775ca173c24">QCustomPlot::setNotAntialiasedElements</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">setAntialiased</a> </dd></dl>

<p>Implements <a class="el" href="classQCPLayerable.html#afdf83ddc6a265cbf4c89fe99d3d93473">QCPLayerable</a>.</p>

</div>
</div>
<a class="anchor" id="ad0dc056f650c3ca73414e6b4f01674ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::draw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> *&#160;</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>Draws this item with the provided <em>painter</em>.</p>
<p>The cliprect of the provided painter is set to the rect returned by <a class="el" href="classQCPAbstractItem.html#a538e25ff8856534582f5b2b400a46405">clipRect</a> before this function is called. The clipRect depends on the clipping settings defined by <a class="el" href="classQCPAbstractItem.html#a39e05b9d4176b9accafc746d16ca6a06">setClipToAxisRect</a> and <a class="el" href="classQCPAbstractItem.html#a7dc75fcbcd10206fe0b75d757ea7a347">setClipAxisRect</a>. </p>

<p>Implements <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">QCPLayerable</a>.</p>

<p>Implemented in <a class="el" href="classQCPItemText.html#a8793adb271ab79b4cf391dc55e9987f1">QCPItemText</a>, <a class="el" href="classQCPItemTracer.html#aaaf49b48382c730ec9be0e74c2538315">QCPItemTracer</a>, <a class="el" href="classQCPItemPixmap.html#a879e8076c2db01a38b34cfa73ec95d2f">QCPItemPixmap</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="aaf92af7b9893712959a6c073d334d88d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::selectEvent </td>
          <td>(</td>
          <td class="paramtype">QMouseEvent *&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>additive</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>details</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>selectionStateChanged</em>&#160;</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="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">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="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">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="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a>, <a class="el" href="classQCPAbstractItem.html#a91f090d6763cfedb0749219c63788ae9">deselectEvent</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">QCPLayerable</a>.</p>

</div>
</div>
<a class="anchor" id="a91f090d6763cfedb0749219c63788ae9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAbstractItem::deselectEvent </td>
          <td>(</td>
          <td class="paramtype">bool *&#160;</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="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">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="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a>, <a class="el" href="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">selectEvent</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">QCPLayerable</a>.</p>

</div>
</div>
<a class="anchor" id="a94bde62b8a2fc133666dcbb8035deeed"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QPointF QCPAbstractItem::anchorPixelPoint </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>anchorId</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">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the pixel position of the anchor with Id <em>anchorId</em>. This function must be reimplemented in item subclasses if they want to provide anchors (<a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>).</p>
<p>For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#af3fc92527802078ca395138748b629a7">createAnchor</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classQCPItemText.html#ad248f988534a9d07bc7c220a2457142a">QCPItemText</a>, <a class="el" href="classQCPItemPixmap.html#a88abce3c1027f371cddcf6dad35ffbb1">QCPItemPixmap</a>, <a class="el" href="classQCPItemEllipse.html#ad3c607304dba081e2f778b6a81b903bb">QCPItemEllipse</a>, <a class="el" href="classQCPItemBracket.html#ac76827e3acba5faee81f149af4047a39">QCPItemBracket</a>, and <a class="el" href="classQCPItemRect.html#ae0973f8281fb52361b0c99ee899be07e">QCPItemRect</a>.</p>

</div>
</div>
<a class="anchor" id="acdca343717d625b8abb3c3e38c0ed39d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double QCPAbstractItem::distSqrToLine </td>
          <td>(</td>
          <td class="paramtype">const QPointF &amp;&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QPointF &amp;&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QPointF &amp;&#160;</td>
          <td class="paramname"><em>point</em>&#160;</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>Finds the shortest squared distance of <em>point</em> to the line segment defined by <em>start</em> and <em>end</em>.</p>
<p>This function may be used to help with the implementation of the <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> function for specific items.</p>
<dl class="section note"><dt>Note</dt><dd>This function is identical to <a class="el" href="classQCPAbstractPlottable.html#a5ea1cab44ca912dcdc96ed81ec5bed5d">QCPAbstractPlottable::distSqrToLine</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a4c0e14c4e92df91174cb7183fb363069">rectSelectTest</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4c0e14c4e92df91174cb7183fb363069"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double QCPAbstractItem::rectSelectTest </td>
          <td>(</td>
          <td class="paramtype">const QRectF &amp;&#160;</td>
          <td class="paramname"><em>rect</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QPointF &amp;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>filledRect</em>&#160;</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>A convenience function which returns the selectTest value for a specified <em>rect</em> and a specified click position <em>pos</em>. <em>filledRect</em> defines whether a click inside the rect should also be considered a hit or whether only the rect border is sensitive to hits.</p>
<p>This function may be used to help with the implementation of the <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> function for specific items.</p>
<p>For example, if your item consists of four rects, call this function four times, once for each rect, in your <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">selectTest</a> reimplementation. Finally, return the minimum of all four returned values.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#acdca343717d625b8abb3c3e38c0ed39d">distSqrToLine</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a75036d39c4d4e2e1a7dd145fff915d32"></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="classQCPItemPosition.html">QCPItemPosition</a> * QCPAbstractItem::createPosition </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</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>Creates a <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a>, registers it with this item and returns a pointer to it. The specified <em>name</em> must be a unique string that is usually identical to the variable name of the position member (This is needed to provide the name-based <a class="el" href="classQCPAbstractItem.html#af71345bd150f87fa1d2442837b87bb59">position</a> access to positions).</p>
<p>Don't delete positions created by this function manually, as the item will take care of it.</p>
<p>Use this function in the constructor (initialization list) of the specific item subclass to create each position member. Don't create QCPItemPositions with <b>new</b> yourself, because they won't be registered with the item properly.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#af3fc92527802078ca395138748b629a7">createAnchor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af3fc92527802078ca395138748b629a7"></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="classQCPItemAnchor.html">QCPItemAnchor</a> * QCPAbstractItem::createAnchor </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>anchorId</em>&#160;</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>Creates a <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>, registers it with this item and returns a pointer to it. The specified <em>name</em> must be a unique string that is usually identical to the variable name of the anchor member (This is needed to provide the name based <a class="el" href="classQCPAbstractItem.html#abed974cba7cc02608c71dad4638e008d">anchor</a> access to anchors).</p>
<p>The <em>anchorId</em> must be a number identifying the created anchor. It is recommended to create an enum (e.g. "AnchorIndex") for this on each item that uses anchors. This id is used by the anchor to identify itself when it calls <a class="el" href="classQCPAbstractItem.html#a94bde62b8a2fc133666dcbb8035deeed">QCPAbstractItem::anchorPixelPoint</a>. That function then returns the correct pixel coordinates for the passed anchor id.</p>
<p>Don't delete anchors created by this function manually, as the item will take care of it.</p>
<p>Use this function in the constructor (initialization list) of the specific item subclass to create each anchor member. Don't create QCPItemAnchors with <b>new</b> yourself, because then they won't be registered with the item properly.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">createPosition</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/item.h</li>
<li>src/item.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>