You are on page 1of 871

KD Chart 2 Reference Manual

[rev.2.0]

Generated by Doxygen 1.3.6

Fri Sep 29 03:56:26 2006

Contents

1 KD Chart 2 Namespace Index 1
1.1 KD Chart 2 Namespace List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 KD Chart 2 Hierarchical Index 3
2.1 KD Chart 2 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 KD Chart 2 Class Index 5
3.1 KD Chart 2 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 KD Chart 2 File Index 7
4.1 KD Chart 2 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 KD Chart 2 Namespace Documentation 11
5.1 BackgroundAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 BarAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.3 DataValueAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4 FrameAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 GridAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.6 KDChart Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.7 LineAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.8 MarkerAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.9 PaintContext Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.10 Palette Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.11 RelativePosition Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.12 TextAttributes Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.13 Ui Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6 KD Chart 2 Class Documentation 29
6.1 KDChart::AbstractArea Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 KDChart::AbstractAreaBase Class Reference . . . . . . . . . . . . . . . . . . . . . . . . 38

ii CONTENTS

6.3 KDChart::AbstractAreaWidget Class Reference . . . . . . . . . . . . . . . . . . . . . . . 43
6.4 KDChart::AbstractAxis Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.5 KDChart::AbstractCartesianDiagram Class Reference . . . . . . . . . . . . . . . . . . . . 63
6.6 KDChart::AbstractCoordinatePlane Class Reference . . . . . . . . . . . . . . . . . . . . 93
6.7 KDChart::AbstractDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.8 KDChart::AbstractLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . . . . . 141
6.9 KDChart::AbstractPieDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . 144
6.10 KDChart::AbstractPolarDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . 176
6.11 KDChart::AbstractProxyModel Class Reference . . . . . . . . . . . . . . . . . . . . . . . 204
6.12 KDChart::AbstractThreeDAttributes Class Reference . . . . . . . . . . . . . . . . . . . . 206
6.13 KDChart::AttributesModel Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 209
6.14 KDChart::BackgroundAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . 219
6.15 KDChart::BarAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
6.16 KDChart::BarDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
6.17 KDChart::CartesianAxis Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 265
6.18 KDChart::CartesianCoordinatePlane Class Reference . . . . . . . . . . . . . . . . . . . . 294
6.19 KDChart::Chart Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
6.20 KDChart::DataDimension Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 342
6.21 KDChart::DatasetProxyModel Class Reference . . . . . . . . . . . . . . . . . . . . . . . 345
6.22 KDChart::DatasetSelectorWidget Class Reference . . . . . . . . . . . . . . . . . . . . . . 352
6.23 KDChart::DataValueAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . 355
6.24 KDChart::DiagramObserver Class Reference . . . . . . . . . . . . . . . . . . . . . . . . 361
6.25 KDChart::FrameAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 364
6.26 KDChart::GridAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 366
6.27 KDChart::HeaderFooter Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
6.28 KDChart::HorizontalLineLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . 385
6.29 KDChartEnums Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
6.30 KDTextDocument Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
6.31 KDChart::Legend Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
6.32 KDChart::LineAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 428
6.33 KDChart::LineDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
6.34 KDChart::MarkerAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 473
6.35 KDChart::MarkerLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . . . . . . 476
6.36 KDChart::Measure Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
6.37 KDChart::PaintContext Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
6.38 KDChart::Palette Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

CONTENTS iii

6.39 KDChart::PieAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
6.40 KDChart::PieDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
6.41 KDChart::PolarCoordinatePlane Class Reference . . . . . . . . . . . . . . . . . . . . . . 530
6.42 KDChart::PolarDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 557
6.43 KDChart::Position Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
6.44 QAbstractItemView Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
6.45 QAbstractProxyModel Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
6.46 QFrame Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
6.47 QLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
6.48 QObject Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
6.49 QSortFilterProxyModel Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
6.50 QTextDocument Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
6.51 QWidget Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
6.52 KDChart::RelativePosition Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 606
6.53 KDChart::RingDiagram Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
6.54 KDChart::TextArea Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
6.55 KDChart::TextAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 656
6.56 KDChart::TextLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 661
6.57 KDChart::ThreeDBarAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . 670
6.58 KDChart::ThreeDLineAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . 675
6.59 KDChart::ThreeDPieAttributes Class Reference . . . . . . . . . . . . . . . . . . . . . . . 680
6.60 KDChart::VerticalLineLayoutItem Class Reference . . . . . . . . . . . . . . . . . . . . . 684
6.61 KDChart::Widget Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
6.62 KDChart::ZoomParameters Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 704

7 KD Chart 2 File Documentation 707
7.1 KDChartAbstractArea.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 707
7.2 KDChartAbstractArea.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
7.3 KDChartAbstractAreaBase.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . 709
7.4 KDChartAbstractAreaBase.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 713
7.5 KDChartAbstractAreaWidget.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 714
7.6 KDChartAbstractAreaWidget.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 715
7.7 KDChartAbstractAxis.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 716
7.8 KDChartAbstractAxis.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
7.9 KDChartAbstractCartesianDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . 718
7.10 KDChartAbstractCartesianDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . 719
7.11 KDChartAbstractCoordinatePlane.cpp File Reference . . . . . . . . . . . . . . . . . . . . 720

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

iv CONTENTS

7.12 KDChartAbstractCoordinatePlane.h File Reference . . . . . . . . . . . . . . . . . . . . . 721
7.13 KDChartAbstractDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 722
7.14 KDChartAbstractDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 723
7.15 KDChartAbstractPieDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 724
7.16 KDChartAbstractPieDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 725
7.17 KDChartAbstractPolarDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 726
7.18 KDChartAbstractPolarDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . 727
7.19 KDChartAbstractProxyModel.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 728
7.20 KDChartAbstractProxyModel.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 729
7.21 KDChartAbstractThreeDAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . 730
7.22 KDChartAbstractThreeDAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . 731
7.23 KDChartAttributesModel.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 732
7.24 KDChartAttributesModel.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 733
7.25 KDChartBackgroundAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 734
7.26 KDChartBackgroundAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 735
7.27 KDChartBarAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 736
7.28 KDChartBarAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
7.29 KDChartBarDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
7.30 KDChartBarDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
7.31 KDChartCartesianAxis.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 740
7.32 KDChartCartesianAxis.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
7.33 KDChartCartesianCoordinatePlane.cpp File Reference . . . . . . . . . . . . . . . . . . . 742
7.34 KDChartCartesianCoordinatePlane.h File Reference . . . . . . . . . . . . . . . . . . . . 743
7.35 KDChartChart.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
7.36 KDChartChart.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
7.37 KDChartDatasetProxyModel.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 747
7.38 KDChartDatasetProxyModel.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 748
7.39 KDChartDatasetSelector.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 749
7.40 KDChartDatasetSelector.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 750
7.41 KDChartDataValueAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 751
7.42 KDChartDataValueAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 753
7.43 KDChartDiagramObserver.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 754
7.44 KDChartDiagramObserver.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 755
7.45 KDChartEnums.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756
7.46 KDChartFrameAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 757
7.47 KDChartFrameAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 758

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

CONTENTS v

7.48 KDChartGlobal.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
7.49 KDChartGridAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 764
7.50 KDChartGridAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
7.51 KDChartHeaderFooter.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 766
7.52 KDChartHeaderFooter.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
7.53 KDChartLayoutItems.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 768
7.54 KDChartLayoutItems.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
7.55 KDChartLegend.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
7.56 KDChartLegend.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
7.57 KDChartLineAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 772
7.58 KDChartLineAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
7.59 KDChartLineDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 774
7.60 KDChartLineDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
7.61 KDChartMarkerAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 776
7.62 KDChartMarkerAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 777
7.63 KDChartMeasure.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
7.64 KDChartMeasure.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779
7.65 KDChartPaintContext.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 780
7.66 KDChartPaintContext.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
7.67 KDChartPalette.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
7.68 KDChartPalette.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
7.69 KDChartPieAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 785
7.70 KDChartPieAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
7.71 KDChartPieDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
7.72 KDChartPieDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
7.73 KDChartPolarCoordinatePlane.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 790
7.74 KDChartPolarCoordinatePlane.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 791
7.75 KDChartPolarDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 792
7.76 KDChartPolarDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 793
7.77 KDChartPosition.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
7.78 KDChartPosition.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
7.79 KDChartRelativePosition.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 798
7.80 KDChartRelativePosition.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 799
7.81 KDChartRingDiagram.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 800
7.82 KDChartRingDiagram.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
7.83 KDChartTextArea.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

vi CONTENTS

7.84 KDChartTextArea.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
7.85 KDChartTextAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 804
7.86 KDChartTextAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
7.87 KDChartThreeDBarAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 806
7.88 KDChartThreeDBarAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 807
7.89 KDChartThreeDLineAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 808
7.90 KDChartThreeDLineAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 809
7.91 KDChartThreeDPieAttributes.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 810
7.92 KDChartThreeDPieAttributes.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 811
7.93 KDChartWidget.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
7.94 KDChartWidget.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
7.95 KDChartZoomParameters.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 815
7.96 KDTextDocument.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
7.97 KDTextDocument.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Chapter 1

KD Chart 2 Namespace Index

1.1 KD Chart 2 Namespace List
Here is a list of all namespaces with brief descriptions:
BackgroundAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DataValueAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
FrameAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
KDChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
PaintContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
RelativePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
TextAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2 KD Chart 2 Namespace Index

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Chapter 2

KD Chart 2 Hierarchical Index

2.1 KD Chart 2 Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
KDChart::AbstractAreaBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
KDChart::AbstractArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
KDChart::AbstractAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
KDChart::CartesianAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
KDChart::AbstractCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
KDChart::CartesianCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . 294
KDChart::PolarCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
KDChart::AbstractAreaWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
KDChart::Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
KDChart::HeaderFooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
KDChart::AbstractThreeDAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
KDChart::ThreeDBarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
KDChart::ThreeDLineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
KDChart::ThreeDPieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
KDChart::BackgroundAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
BackgroundAttributes::Private
KDChart::BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
BarAttributes::Private
KDChart::DataDimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
KDChart::DataValueAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
DataValueAttributes::Private
KDChart::FrameAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
FrameAttributes::Private
KDChart::GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
GridAttributes::Private
KDChart::KDPrivateModelIndex
KDChart::LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
LineAttributes::Private
KDChart::MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
MarkerAttributes::Private
KDChart::Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

4 KD Chart 2 Hierarchical Index

KDChart::PaintContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
PaintContext::Private
Palette::Private
KDChart::PieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
KDChart::Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
QAbstractItemView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
KDChart::AbstractDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
KDChart::AbstractCartesianDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
KDChart::BarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
KDChart::LineDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
KDChart::AbstractPolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
KDChart::AbstractPieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
KDChart::PieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
KDChart::RingDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
KDChart::PolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
QAbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
KDChart::AbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
KDChart::AttributesModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
KDChart::PrivateAttributesModel
QFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
KDChart::DatasetSelectorWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
QLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
KDChart::AbstractLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
KDChart::AbstractArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
KDChart::HorizontalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
KDChart::MarkerLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
KDChart::TextLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
KDChart::VerticalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
QObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
KDChart::AbstractArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
KDChart::DiagramObserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
KDChart::Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
KDChartEnums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
QSortFilterProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
KDChart::DatasetProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
QTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
KDTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
QWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
KDChart::AbstractAreaWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
KDChart::Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
KDChart::Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
KDChart::RelativePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
RelativePosition::Private
KDChart::TextAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
TextAttributes::Private
Widget
KDChart::ZoomParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Chapter 3

KD Chart 2 Class Index

3.1 KD Chart 2 Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
KDChart::AbstractArea (An area in the chart with a background, a frame, etc ) . . . . . . . . . . 29
KDChart::AbstractAreaBase (Base class for AbstractArea and AbstractAreaWidget: An area in
the chart with a background, a frame, etc ) . . . . . . . . . . . . . . . . . . . . . . . . 38
KDChart::AbstractAreaWidget (An area in the chart with a background, a frame, etc ) . . . . . . 43
KDChart::AbstractAxis (The base class for axes ) . . . . . . . . . . . . . . . . . . . . . . . . . 50
KDChart::AbstractCartesianDiagram (Base class for diagrams based on a cartesian coordianate
system ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
KDChart::AbstractCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
KDChart::AbstractDiagram (AbstractDiagram defines the interface for diagram classes ) . . . . 114
KDChart::AbstractLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
KDChart::AbstractPieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
KDChart::AbstractPolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
KDChart::AbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
KDChart::AbstractThreeDAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
KDChart::AttributesModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
KDChart::BackgroundAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
KDChart::BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
KDChart::BarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
KDChart::CartesianAxis (The class for cartesian axes ) . . . . . . . . . . . . . . . . . . . . . . 265
KDChart::CartesianCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
KDChart::Chart (A chart with one or more diagrams ) . . . . . . . . . . . . . . . . . . . . . . . 326
KDChart::DataDimension (Helper class for one dimension of data, e.g. for the rows in a data
model, or for the labels of an axis, or for the vertical lines in a grid ) . . . . . . . . . . 342
KDChart::DatasetProxyModel (DatasetProxyModel takes a KDChart dataset configuration and
translates it into a filtering proxy model ) . . . . . . . . . . . . . . . . . . . . . . . . . 345
KDChart::DatasetSelectorWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
KDChart::DataValueAttributes (Diagram attributes dealing with data value labels ) . . . . . . . 355
KDChart::DiagramObserver (A DiagramObserver watches the associated diagram for changes
and deletion and emits corresponsing signals ) . . . . . . . . . . . . . . . . . . . . . . 361
KDChart::FrameAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
KDChart::GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
KDChart::HeaderFooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
KDChart::HorizontalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385

6 KD Chart 2 Class Index

KDChartEnums (Project global class providing some enums needed both by KDChartParams
and by KDChartCustomBox ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
KDTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
KDChart::Legend (Legend defines the interface for the legend drawing class ) . . . . . . . . . . 402
KDChart::LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
KDChart::LineDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
KDChart::MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
KDChart::MarkerLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
KDChart::Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
KDChart::PaintContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
KDChart::Palette (A Palette is a set of brushes (or colors) to be used for painting data sets ) . . . 488
KDChart::PieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
KDChart::PieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
KDChart::PolarCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
KDChart::PolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
KDChart::Position (Defines a position, using compass terminology ) . . . . . . . . . . . . . . . 590
QAbstractItemView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
QAbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
QFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
QLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
QObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
QSortFilterProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
QTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
QWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
KDChart::RelativePosition (Defines relative position information: reference area, position in this
area, horizontal / vertical padding, and rotating ) . . . . . . . . . . . . . . . . . . . . . 606
KDChart::RingDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
KDChart::TextArea (A text area in the chart with a background, a frame, etc ) . . . . . . . . . . 642
KDChart::TextAttributes (A set of text attributes ) . . . . . . . . . . . . . . . . . . . . . . . . . 656
KDChart::TextLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
KDChart::ThreeDBarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
KDChart::ThreeDLineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
KDChart::ThreeDPieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
KDChart::VerticalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
KDChart::Widget (The KD Chart widget for usage without Model/View ) . . . . . . . . . . . . 689
KDChart::ZoomParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Chapter 4

KD Chart 2 File Index

4.1 KD Chart 2 File List
Here is a list of all files with brief descriptions:
KDChartAbstractArea.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
KDChartAbstractArea.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
KDChartAbstractAreaBase.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
KDChartAbstractAreaBase.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
KDChartAbstractAreaWidget.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
KDChartAbstractAreaWidget.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
KDChartAbstractAxis.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
KDChartAbstractAxis.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
KDChartAbstractCartesianDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
KDChartAbstractCartesianDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
KDChartAbstractCoordinatePlane.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
KDChartAbstractCoordinatePlane.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
KDChartAbstractDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
KDChartAbstractDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
KDChartAbstractPieDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
KDChartAbstractPieDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
KDChartAbstractPolarDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
KDChartAbstractPolarDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
KDChartAbstractProxyModel.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
KDChartAbstractProxyModel.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
KDChartAbstractThreeDAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
KDChartAbstractThreeDAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
KDChartAttributesModel.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
KDChartAttributesModel.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
KDChartBackgroundAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
KDChartBackgroundAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
KDChartBarAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
KDChartBarAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
KDChartBarDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
KDChartBarDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
KDChartCartesianAxis.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
KDChartCartesianAxis.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
KDChartCartesianCoordinatePlane.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

8 KD Chart 2 File Index

KDChartCartesianCoordinatePlane.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
KDChartChart.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
KDChartChart.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
KDChartDatasetProxyModel.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747
KDChartDatasetProxyModel.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
KDChartDatasetSelector.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
KDChartDatasetSelector.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
KDChartDataValueAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
KDChartDataValueAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753
KDChartDiagramObserver.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
KDChartDiagramObserver.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755
KDChartEnums.h (Definition of global enums ) . . . . . . . . . . . . . . . . . . . . . . . . . . 756
KDChartFrameAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
KDChartFrameAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
KDChartGlobal.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
KDChartGridAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
KDChartGridAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
KDChartHeaderFooter.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
KDChartHeaderFooter.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
KDChartLayoutItems.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
KDChartLayoutItems.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
KDChartLegend.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
KDChartLegend.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
KDChartLineAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
KDChartLineAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
KDChartLineDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774
KDChartLineDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
KDChartMarkerAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776
KDChartMarkerAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
KDChartMeasure.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
KDChartMeasure.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779
KDChartPaintContext.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780
KDChartPaintContext.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
KDChartPalette.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
KDChartPalette.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
KDChartPieAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
KDChartPieAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
KDChartPieDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
KDChartPieDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
KDChartPolarCoordinatePlane.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
KDChartPolarCoordinatePlane.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
KDChartPolarDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792
KDChartPolarDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793
KDChartPosition.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
KDChartPosition.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
KDChartRelativePosition.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
KDChartRelativePosition.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
KDChartRingDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
KDChartRingDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
KDChartTextArea.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
KDChartTextArea.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
KDChartTextAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804
KDChartTextAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
KDChartThreeDBarAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

4.1 KD Chart 2 File List 9

KDChartThreeDBarAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
KDChartThreeDLineAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808
KDChartThreeDLineAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
KDChartThreeDPieAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
KDChartThreeDPieAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
KDChartWidget.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
KDChartWidget.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
KDChartZoomParameters.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
KDTextDocument.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
KDTextDocument.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

10 KD Chart 2 File Index Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

1 BackgroundAttributes Namespace Reference .Chapter 5 KD Chart 2 Namespace Documentation 5.

2 BarAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .12 KD Chart 2 Namespace Documentation 5.

3 DataValueAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5.3 DataValueAttributes Namespace Reference 13 5.

4 FrameAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .14 KD Chart 2 Namespace Documentation 5.

5.5 GridAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5 GridAttributes Namespace Reference 15 5.

• class AbstractAxis The base class for axes. • class DatasetProxyModel DatasetProxyModel takes a KDChart dataset configuration and translates it into a filtering proxy model. or for the vertical lines in a grid. • class DatasetSelectorWidget • class DataValueAttributes Diagram attributes dealing with data value labels. etc. or for the labels of an axis. • class DataDimension Helper class for one dimension of data.6 KDChart Namespace Reference Classes • class AbstractArea An area in the chart with a background. • class AbstractAreaBase Base class for AbstractArea and AbstractAreaWidget: An area in the chart with a background. • class CartesianCoordinatePlane • class Chart A chart with one or more diagrams. • class AbstractLayoutItem • class AbstractPieDiagram • class AbstractPolarDiagram • class AbstractProxyModel • class AbstractThreeDAttributes • class AttributesModel • class BackgroundAttributes • class BarAttributes • class BarDiagram • class CartesianAxis The class for cartesian axes. for the rows in a data model. a frame. a frame. • class AbstractCoordinatePlane • class AbstractDiagram AbstractDiagram defines the interface for diagram classes. etc.16 KD Chart 2 Namespace Documentation 5. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . etc. • class AbstractCartesianDiagram Base class for diagrams based on a cartesian coordianate system. e. • class AbstractAreaWidget An area in the chart with a background. a frame.g.

• class FrameAttributes • class GridAttributes • class HeaderFooter • class HorizontalLineLayoutItem • class Legend Legend defines the interface for the legend drawing class. • class RingDiagram • class TextArea A text area in the chart with a background. • class LineAttributes • class LineDiagram • class MarkerAttributes • class MarkerLayoutItem • class Measure • class PaintContext • class Palette A Palette is a set of brushes (or colors) to be used for painting data sets.6 KDChart Namespace Reference 17 • class DiagramObserver A DiagramObserver watches the associated diagram for changes and deletion and emits corresponsing signals. • class TextAttributes A set of text attributes. • class TextLayoutItem • class ThreeDBarAttributes • class ThreeDLineAttributes • class ThreeDPieAttributes • class VerticalLineLayoutItem • class Widget The KD Chart widget for usage without Model/View. • class ZoomParameters Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5. horizontal / vertical padding. position in this area. etc. using compass terminology. and rotating. • class RelativePosition Defines relative position information: reference area. • class PieAttributes • class PieDiagram • class PolarCoordinatePlane • class PolarDiagram • class Position Defines a position. a frame.

Referenced by KDChart::AbstractCoordinatePlane::diagrams().3 typedef QList<const AbstractDiagram∗> KDChart::ConstAbstractDiagramList Definition at line 521 of file KDChartAbstractDiagram. ThreeDPieAttributesRole } 5.6. KDChart::PolarCoordinatePlane::paint().h.6.h.1 typedef QList<AbstractDiagram∗> KDChart::AbstractDiagramList Definition at line 520 of file KDChartAbstractDiagram.1.1 Typedef Documentation 5. 5.6. PieAttributesRole. ThreeDAttributesRole.1. LineAttributesRole.1. ThreeDLineAttributesRole. BarAttributesRole. Referenced by KDChart::AbstractCartesianDiagram::axes().6.2 typedef QList<CartesianAxis∗> KDChart::CartesianAxisList Definition at line 128 of file KDChartCartesianAxis.h. 5. DatasetBrushRole. ThreeDBarAttributesRole. DataValueLabelAttributesRole.18 KD Chart 2 Namespace Documentation Typedefs • typedef QList< AbstractDiagram ∗ > AbstractDiagramList • typedef QList< CartesianAxis ∗ > CartesianAxisList • typedef QList< const AbstractDiagram ∗ > ConstAbstractDiagramList • typedef QList< AbstractCoordinatePlane ∗ > CoordinatePlaneList • typedef QList< DataDimension > DataDimensionsList • typedef QVector< int > DatasetDescriptionVector • typedef QList< AbstractDiagram ∗ > DiagramList • typedef QList< HeaderFooter ∗ > HeaderFooterList • typedef QList< Legend ∗ > LegendList Enumerations • enum DisplayRoles { DatasetPenRole = 0x0A79EF95. and KDChart::CartesianCoordinatePlane::paint(). Referenced by KDChart::AbstractCoordinatePlane::diagrams(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

4 typedef QList<AbstractCoordinatePlane∗> KDChart::CoordinatePlaneList Definition at line 41 of file KDChartChart. KDChart::Cartesian- CoordinatePlane::getDataDimensionsList().h.1.6. and KDChart::DatasetProxyModel::setDatasetRow- DescriptionVector(). 5.1. 5. 5.7 typedef QList<AbstractDiagram∗> KDChart::DiagramList Definition at line 42 of file KDChartLegend.6.6.6. KDChart::Dataset- ProxyModel::setDatasetDescriptionVectors(). Referenced by KDChart::DatasetProxyModel::setDatasetColumnDescriptionVector(). 5.6.h. Referenced by KDChart::Chart::legends().2. Referenced by KDChart::PolarCoordinatePlane::getDataDimensionsList(). 5.h. KDChart::AbstractCoordinatePlane::gridDimensionsList(). and KDChart::CartesianAxis::paintCtx().2 Enumeration Type Documentation 5.5 typedef QList<DataDimension> KDChart::DataDimensionsList Definition at line 42 of file KDChartAbstractCoordinatePlane.5.6.9 typedef QList<Legend∗> KDChart::LegendList Definition at line 43 of file KDChartChart. KDChart::CartesianCoordinatePlane::layoutDiagrams().1.1.h.1.1.6.h.h. Referenced by KDChart::Chart::coordinatePlanes().6 KDChart Namespace Reference 19 5. 5.8 typedef QList<HeaderFooter∗> KDChart::HeaderFooterList Definition at line 42 of file KDChartChart. Referenced by KDChart::Legend::diagrams(). Referenced by KDChart::Chart::headerFooters().6 typedef QVector<int> KDChart::DatasetDescriptionVector Definition at line 38 of file KDChartDatasetProxyModel.1 enum KDChart::DisplayRoles Enumeration values: DatasetPenRole DatasetBrushRole DataValueLabelAttributesRole ThreeDAttributesRole LineAttributesRole ThreeDLineAttributesRole Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6.

250 ThreeDLineAttributesRole. 244 { 245 DatasetPenRole = 0x0A79EF95. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 252 ThreeDBarAttributesRole. 253 PieAttributesRole. 247 DataValueLabelAttributesRole. 254 ThreeDPieAttributesRole 255 }. 248 ThreeDAttributesRole. 251 BarAttributesRole.20 KD Chart 2 Namespace Documentation BarAttributesRole ThreeDBarAttributesRole PieAttributesRole ThreeDPieAttributesRole Definition at line 244 of file KDChartGlobal. 249 LineAttributesRole. 246 DatasetBrushRole.h.

7 LineAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5.7 LineAttributes Namespace Reference 21 5.

8 MarkerAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .22 KD Chart 2 Namespace Documentation 5.

5.9 PaintContext Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9 PaintContext Namespace Reference 23 5.

24 KD Chart 2 Namespace Documentation 5.10 Palette Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

11 RelativePosition Namespace Reference 25 5.5.11 RelativePosition Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

12 TextAttributes Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .26 KD Chart 2 Namespace Documentation 5.

13 Ui Namespace Reference 27 5.5.13 Ui Namespace Reference Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

28 KD Chart 2 Namespace Documentation Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

Chapter 6 KD Chart 2 Class Documentation 6.h. AbstractArea is the base class for all non-widget chart elements that have a set of background attributes and frame attributes. • virtual void paintFrame (QPainter &painter. QObject.1 Detailed Description An area in the chart with a background. const QRect &rect) . etc. Public Member Functions • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • FrameAttributes frameAttributes () const • virtual void paint (QPainter ∗)=0 • void paintAll (QPainter &painter) Call paintAll. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter.h> Inheritance diagram for KDChart::AbstractArea:Collaboration diagram for KDChart::AbstractArea: 6. const QRect &rectangle) • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size. Note: This class inherits from AbstractAreaBase. Definition at line 54 of file KDChartAbstractArea.1 KDChart::AbstractArea Class Reference #include <KDChartAbstractArea. • virtual void paintBackground (QPainter &painter. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. a frame. AbstractLayoutItem.1. such as coordinate planes or axes. The reason for this tripple inheritance is that neither AbstractAreaBase nor AbstractLayoutItem are QObject.

• void removeFromParentLayout () • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. KDChart::AbstractAreaBase() 55 .2.cpp.2 Constructor & Destructor Documentation 6.1 AbstractArea::∼AbstractArea () [virtual] Definition at line 60 of file KDChartAbstractArea.30 KD Chart 2 Class Documentation Draws the background and frame. 61 { 62 // this bloc left empty intentionally 63 } 6.1. to trigger that widget’s update.2.2 AbstractArea::AbstractArea () [protected] Definition at line 52 of file KDChartAbstractArea.cpp. whenever the size of the item’s contents has changed. • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout.1.1. then calls paint(). • virtual ∼AbstractArea () Protected Member Functions • AbstractArea () • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () Protected Attributes • Q_SIGNALS __pad0__: void positionChanged( AbstractArea ∗ ) • QWidget ∗ mParent • QLayout ∗ mParentLayout 6. KDChart::AbstractLayoutItem() 56 { 57 // this bloc left empty intentionally 58 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 53 : QObject() 54 .

3.cpp.1 KDChart::AbstractArea Class Reference 31 6. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase. 106 { 107 return geometry().3 Member Function Documentation 6. References d.cpp. Definition at line 105 of file KDChartAbstractArea.3. References d.1. 98 { 99 return d->backgroundAttributes. KDChart::CartesianAxis::paint().6.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase. KDChart::PolarCoordinate- Plane::layoutDiagrams().1.cpp.1.3. 88 { 89 return d->frameAttributes. paintAll().1. 100 } 6. 76 { 77 Q_UNUSED( position ).1. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry. 90 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2 QRect AbstractArea::areaGeometry () const [protected. virtual] Implements KDChart::AbstractAreaBase. Referenced by KDChart::Legend::clone().cpp.4 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase.3. Referenced by KDChart::CartesianCoordinatePlane::drawingArea(). and KDChart::Cartesian- Axis::paintCtx(). 108 } 6.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 99 paint( &painter ). KDChart::AbstractLayout- Item::paint().7 void AbstractArea::paintAll (QPainter & painter) Call paintAll.padding(). Referenced by KDChart::Legend::paint(). KDChart::MarkerLayoutItem.top() + inner. and KDChart::AbstractLayoutItem::paintCtx().1. 186 } 6.isVisible() 182 ? qMax( d->frameAttributes.top() ). KDChart::CartesianCoordinatePlane. and KDChart::PolarCoordinatePlane. inherited] Definition at line 175 of file KDChartAbstractAreaBase. KDChart::AbstractAreaBase::innerRect(). to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ). 0 ) : 0.6 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual. -padding. KDChart::AbstractAreaWidget::paintAll(). 92 QRect inner( innerRect() ). padding. KDChart::AbstractAreaBase::paintBackground(). 95 oldGeometry. and paintAll().1. 84 { 85 // Paint the background and frame 86 paintBackground( painter.5 QRect AbstractAreaBase::innerRect () const [protected.cpp. References areaGeometry().moveTo( 94 oldGeometry.32 KD Chart 2 Class Documentation 6. and d. and paintIntoRect().left() + inner. KDChart::VerticalLineLayout- Item. References KDChart::AbstractAreaBase::areaGeometry(). Definition at line 83 of file KDChartAbstractArea. geometry() ). 97 if( needAdjustGeometry ) 98 setGeometry( inner ). 88 89 // temporarily adjust the widget size.left(). areaGeometry().size() ) 185 . -padding ).3. 183 return 184 QRect( QPoint(0. 176 { 177 Q_ASSERT_X ( d != 0. Referenced by KDChart::Chart::paint().0). 93 inner.adjusted( padding. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. inherited] Implemented in KDChart::CartesianAxis. 87 paintFrame( painter. 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ).3. 96 const bool needAdjustGeometry = oldGeometry != inner.1. paintAll(). and KDChart::AbstractAreaBase::paint- Frame(). 6. "AbstractAreaBase::innerRect()". geometry() ). KDChart::HorizontalLineLayoutItem.3. 179 180 const int padding 181 = d->frameAttributes. KDChart::TextLayout- Item. 178 "Private class was not initialized!" ).cpp. Referenced by KDChart::TextArea::paintAll().

style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).pixmap().pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.brush() ).y() . 151 painter. zH ). 104 { 105 Q_ASSERT_X ( d != 0.height()/ 2 ). 130 } else { 131 QMatrix m. 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes.height()/ 2 ).pixmap(). KDChart::AbstractAreaWidget::paintAll().center().x() . attributes.setBrush( attributes. 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.center().deviceMatrix().pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect. References attributes. 132 double zW = (double)rect. and paintAll(). 138 z = qMin( zW. 145 default: 146 .scale( zW.center(). 118 painter.height() / (double)attributes.center().pixmap(). inherited] Definition at line 103 of file KDChartAbstractAreaBase. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes.pixmap(). 140 } 141 break.scale( z.setY( rect.isNull() && 123 attributes.topLeft().pixmap().pixmapMode() ) 126 { 127 ol.width() / (double)attributes. 106 "Private class was not initialized!" ).attributes.6.drawRect( rect ).isVisible() ) return.setY( rect. 115 painter.brush(). 139 m.width() / 2 ).1 KDChart::AbstractArea Class Reference 33 102 //qDebug() << "AbstractAreaWidget::paintAll() done.3. "AbstractAreaBase::paintBackground()".height().setX( rect. z ). 149 ol. 152 } 153 } 154 #undef attributes 155 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .pm.y() .topLeft() ) ). 150 ol. 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.1.setX( rect. 117 painter.x() . 133 double zH = (double)rect. 134 switch( attributes.map( rect.pixmap() ).pm.attributes. // Cannot happen.setBrushOrigin( newTopLeft ). 103 } 6. and d. 119 painter. pm ). const QRect & rectangle) [virtual. 144 break.drawPixmap( ol. 128 ol. previously checked 147 } 148 QPixmap pm = attributes.width() / 2 ). zH ). 116 const QPointF newTopLeft( painter.". 129 painter.width().pixmap().8 void AbstractAreaBase::paintBackground (QPainter & painter.transformed( m ). 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.setPen( Qt::NoPen ).drawPixmap( ol. Referenced by KDChart::TextArea::paintAll().cpp.

169 painter. rect. 166 167 const QPen oldPen( painter. References attributes. 78 painter.drawRect( rect ). "AbstractAreaBase::paintFrame()". and paintAll(). Definition at line 64 of file KDChartLayoutItems. 161 "Private class was not initialized!" ).left().cpp.34 KD Chart 2 Class Documentation 6.pen() ).top() ).left().top() ).isVisible() ) return.setPen( attributes. In most cases there is no need to overwrite this method in a derived class.10 void AbstractAreaBase::paintFrame (QPainter & painter. 168 painter. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 72 { 73 const QRect oldGeometry( geometry() ).translate( -rect. 74 if( oldGeometry != rect ) 75 setGeometry( rect ). inherited] Definition at line 158 of file KDChartAbstractAreaBase.9 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual. 77 paintAll( painter ).pen() ).1. 76 painter. Definition at line 71 of file KDChartAbstractArea. -rect. Reimplemented in KDChart::CartesianAxis.3. 162 163 #define attributes d->frameAttributes 164 165 if( !attributes. 170 painter.11 void AbstractArea::paintIntoRect (QPainter & painter. but you would overwrite Abstract- LayoutItem::paint() instead. Referenced by KDChart::TextArea::paintAll(). KDChart::AbstractAreaWidget::paintAll().3. const QRect & rectangle) [virtual.translate( rect. and d.cpp. then calls paint(). 68 } 6. 65 { 66 if( context ) 67 paint( context->painter() ).1.1. 171 #undef attributes 172 } 6.setPen( oldPen ). inherited] Default impl: Paint the complete item using its layouted position and size. 159 { 160 Q_ASSERT_X ( d != 0.3. and KDChart::PaintContext::painter().cpp. const QRect & rect) [virtual] Draws the background and frame. References paintAll(). References KDChart::AbstractLayoutItem::paint().

1. 83 { 84 d->frameAttributes = a.14 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase. 93 { 94 d->backgroundAttributes = a. Referenced by KDChart::Chart::takeCoordinatePlane().1.15 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase.1 KDChart::AbstractArea Class Reference 35 79 if( oldGeometry != rect ) 80 setGeometry( oldGeometry ).cpp.h. Definition at line 110 of file KDChartAbstractArea. 73 } 74 } 6.3. 81 } 6.cpp. References d.3.12 void AbstractArea::positionHasChanged () [protected. virtual] Reimplemented from KDChart::AbstractAreaBase.cpp.3. 71 else 72 mParentLayout->removeItem( this ). 95 } 6. References d. 85 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::Legend::clone().6. 113 } 6.1.13 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems.3. 111 { 112 emit positionChanged( this ).1. 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ).

76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called").1. inherited] Report changed size hint: ask the parent widget to recalculate the layout.4.cpp. Definition at line 73 of file KDChartLayoutItems.3. Definition at line 86 of file KDChartAbstractArea.3. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .18 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual. 65 } 6. Definition at line 56 of file KDChartLayoutItems.3. 74 { 75 // This is exactly like what QWidget::updateGeometry does. and KDChart::AbstractCartesianDiagram::takeAxis().36 KD Chart 2 Class Documentation 6. 82 } 83 } 6. that has a non-fixed size. 63 { 64 mParentLayout = lay. Referenced by KDChart::Legend::buildLegend(). Referenced by KDChart::TextLayoutItem::sizeHint().1. Thus. inherited] Inform the item about its widget: This enables the item. 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate().16 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems.1.h.cpp.1 Q_SIGNALS KDChart::AbstractArea::__pad0__ [protected] Reimplemented in KDChart::AbstractCoordinatePlane.4 Member Data Documentation 6.1.h. whenever the size of the item’s contents has changed.1. 80 else 81 QApplication::postEvent( mParent. 59 } 6. you need to call setParentWidget on every item.17 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual. to trigger that widget’s update. References KDChart::AbstractLayoutItem::mParent. new QEvent( QEvent::LayoutRequest ) ). 57 { 58 mParent = widget.

The documentation for this class was generated from the following files: • KDChartAbstractArea. 6.h.1 KDChart::AbstractArea Class Reference 37 6.6.4.h.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected. inherited] Definition at line 77 of file KDChartLayoutItems.4.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1.h • KDChartAbstractArea. Referenced by KDChart::AbstractLayoutItem::setParentWidget().3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected.1. inherited] Definition at line 76 of file KDChartLayoutItems.

1 Detailed Description Base class for AbstractArea and AbstractAreaWidget: An area in the chart with a background. such as legends or axes. This classis not a QObject.h. const QRect &rectangle) • virtual void paintFrame (QPainter &painter. etc.cpp.2.2 KDChart::AbstractAreaBase Class Reference #include <KDChartAbstractAreaBase.38 KD Chart 2 Class Documentation 6. so it is easier to inherit from it.2.2. Public Member Functions • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • FrameAttributes frameAttributes () const • virtual void paintBackground (QPainter &painter.2. but derive your classes from AbstractArea or AbstractAreaWidget. Note: Normally you should not use AbstractAreaBase directly.1 AbstractAreaBase::AbstractAreaBase () [protected] Definition at line 57 of file KDChartAbstractAreaBase. if your are inheriting from a QObject too like AbstractAreaWidget does it. AbstractAreaBase is the base class for all chart elements that have a set of background attributes and frame attributes.2 Constructor & Destructor Documentation 6. See also: AbstractArea. const QRect &rectangle) • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) Protected Member Functions • AbstractAreaBase () • virtual QRect areaGeometry () const=0 • QRect innerRect () const • virtual void positionHasChanged () • virtual ∼AbstractAreaBase () 6.h> Inheritance diagram for KDChart::AbstractAreaBase: 6. 57 : 58 _d( new Private() ) 59 { 60 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . a frame. AbstractAreaWidget Definition at line 68 of file KDChartAbstractAreaBase.

3. Referenced by innerRect().cpp. 76 { 77 Q_UNUSED( position ).3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const Definition at line 97 of file KDChartAbstractAreaBase. 100 } 6. 6. Referenced by KDChart::Legend::clone().2 virtual QRect KDChart::AbstractAreaBase::areaGeometry () const [protected.3 Member Function Documentation 6.4 FrameAttributes AbstractAreaBase::frameAttributes () const Definition at line 87 of file KDChartAbstractAreaBase.3.2 AbstractAreaBase::∼AbstractAreaBase () [protected. 98 { 99 return d->backgroundAttributes. 63 { 64 delete _d. pure virtual] Implemented in KDChart::AbstractArea. 88 { 89 return d->frameAttributes. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry.2. _d = 0.3.cpp. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.cpp. References d.cpp.3.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) Definition at line 75 of file KDChartAbstractAreaBase. KDChart::AbstractAreaWidget.2.6.2 KDChart::AbstractAreaBase Class Reference 39 6.2.2. virtual] Definition at line 62 of file KDChartAbstractAreaBase. References d.2.2. 65 } 6.2. and KDChart::TextArea. 90 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

Referenced by KDChart::TextArea::paintAll().drawRect( rect ).pixmap(). 106 "Private class was not initialized!" ).x() . 115 painter.attributes. "AbstractAreaBase::innerRect()". 178 "Private class was not initialized!" ). 117 painter. 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes. KDChart::AbstractAreaWidget::paintAll().2.height() / (double)attributes. References attributes.3.setY( rect.setBrushOrigin( newTopLeft ).drawPixmap( ol. 128 ol.center().height().setPen( Qt::NoPen ).pixmap().2.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect. and KDChart::AbstractArea::paintAll(). 129 painter.pixmap().40 KD Chart 2 Class Documentation 6.isVisible() 182 ? qMax( d->frameAttributes.brush().y() .center().padding().topLeft().height()/ 2 ). 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes.6 void AbstractAreaBase::paintBackground (QPainter & painter. 119 painter.isVisible() ) return.topLeft() ) ).style() ) { 114 KDChart::PainterSaver painterSaver( &painter ). Referenced by KDChart::TextArea::paintAll().size() ) 185 . KDChart::AbstractAreaWidget::paintAll(). 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.deviceMatrix().adjusted( padding.width() / 2 ).setBrush( attributes. 116 const QPointF newTopLeft( painter. 0 ) : 0. References areaGeometry().pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 104 { 105 Q_ASSERT_X ( d != 0. -padding. 176 { 177 Q_ASSERT_X ( d != 0. and d.width() / (double)attributes.0).cpp. areaGeometry().isNull() && 123 attributes.brush() ). const QRect & rectangle) [virtual] Definition at line 103 of file KDChartAbstractAreaBase.attributes. attributes. 183 return 184 QRect( QPoint(0. 186 } 6. -padding ).pixmapMode() ) 126 { 127 ol. 130 } else { 131 QMatrix m.5 QRect AbstractAreaBase::innerRect () const [protected] Definition at line 175 of file KDChartAbstractAreaBase. 134 switch( attributes. 179 180 const int padding 181 = d->frameAttributes.3.cpp.pixmap() ).map( rect. 132 double zW = (double)rect.pixmap().setX( rect.pixmap(). 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes. 118 painter. and d. and KDChart::AbstractArea::paintAll().width(). padding. "AbstractAreaBase::paintBackground()". 133 double zH = (double)rect.

y() .3.drawRect( rect ).scale( z. 152 } 153 } 154 #undef attributes 155 } 6.width() / 2 ).cpp.2.cpp. 149 ol. 162 163 #define attributes d->frameAttributes 164 165 if( !attributes. virtual] Reimplemented in KDChart::AbstractArea. pm ).8 void AbstractAreaBase::positionHasChanged () [protected. // Cannot happen. z ). KDChart::AbstractAreaWidget. const QRect & rectangle) [virtual] Definition at line 158 of file KDChartAbstractAreaBase. 161 "Private class was not initialized!" ).setPen( attributes. 166 167 const QPen oldPen( painter. 144 break.setX( rect.9 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) Definition at line 92 of file KDChartAbstractAreaBase. 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.setPen( oldPen ). References attributes. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . zH ). 138 z = qMin( zW.center().6.isVisible() ) return. 139 m.transformed( m ). 168 painter.2 KDChart::AbstractAreaBase Class Reference 41 136 { 137 double z. 169 painter.setY( rect. zH ). and d. KDChart::AbstractAreaWidget::paintAll().pm. 145 default: 146 . 159 { 160 Q_ASSERT_X ( d != 0.center().drawPixmap( ol.height()/ 2 ).2. and KDChart::AbstractArea::paintAll().3. Referenced by KDChart::TextArea::paintAll(). "AbstractAreaBase::paintFrame()". previously checked 147 } 148 QPixmap pm = attributes. and KDChart::TextArea. 140 } 141 break.pen() ). Definition at line 188 of file KDChartAbstractAreaBase.7 void AbstractAreaBase::paintFrame (QPainter & painter.pm. 150 ol.2. 189 { 190 // this bloc left empty intentionally 191 } 6.pixmap(). 151 painter.x() .pen() ). 170 painter.3.scale( zW.cpp. 171 #undef attributes 172 } 6.

cpp. 85 } The documentation for this class was generated from the following files: • KDChartAbstractAreaBase. References d.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h • KDChartAbstractAreaBase. 93 { 94 d->backgroundAttributes = a. Referenced by KDChart::Legend::clone().2.3.42 KD Chart 2 Class Documentation References d. 83 { 84 d->frameAttributes = a. 95 } 6.10 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) Definition at line 82 of file KDChartAbstractAreaBase.

const QRect &rectangle) • virtual void paintEvent (QPaintEvent ∗event) Draws the background and frame. a frame. then calls paint(). • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) Public Attributes • Q_SIGNALS __pad0__: void positionChanged( AbstractAreaWidget ∗ ) Protected Member Functions • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () • virtual ∼AbstractAreaWidget () Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. etc.h> Inheritance diagram for KDChart::AbstractAreaWidget:Collaboration diagram for KDChart::Abstract- AreaWidget: 6. Definition at line 51 of file KDChartAbstractAreaWidget. const QRect &rect) Draws the background and frame. AbstractAreaWidget is the base for all widget classes that have a set of background attributes and frame attributes. then calls paint(). • void paintAll (QPainter &painter) Call paintAll.h. if you want the background and the frame to be drawn before the normal paint() is invoked automatically.3 KDChart::AbstractAreaWidget Class Reference #include <KDChartAbstractAreaWidget. Public Member Functions • AbstractAreaWidget (QWidget ∗parent=0) • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • virtual void forceRebuild () • FrameAttributes frameAttributes () const • virtual void paint (QPainter ∗painter)=0 Overwrite this to paint the inner contents of your widget. such as KDChart::Chart and KDChart::Legend. • virtual void paintFrame (QPainter &painter.6.3 KDChart::AbstractAreaWidget Class Reference 43 6. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter.1 Detailed Description An area in the chart with a background. • virtual void paintBackground (QPainter &painter.

3. 47 : QWidget( parent ) 48 .cpp.3 Member Function Documentation 6.cpp. virtual] Definition at line 53 of file KDChartAbstractAreaWidget. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry. 100 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 51 } 6.2 AbstractAreaWidget::∼AbstractAreaWidget () [protected. 76 { 77 Q_UNUSED( position ). Definition at line 116 of file KDChartAbstractAreaWidget.2 Constructor & Destructor Documentation 6.3.3.cpp. 117 { 118 return geometry(). virtual] Implements KDChart::AbstractAreaBase. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.44 KD Chart 2 Class Documentation 6.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase. 54 { 55 // this bloc left empty intentionally 56 } 6.2.2.3.cpp.3.3.1 AbstractAreaWidget::AbstractAreaWidget (QWidget ∗ parent = 0) [explicit] Definition at line 46 of file KDChartAbstractAreaWidget.3. Referenced by KDChart::Legend::buildLegend(). KDChart::Legend::paint().3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase.3.2 QRect AbstractAreaWidget::areaGeometry () const [protected. 119 } 6. and paintAll(). References d. 98 { 99 return d->backgroundAttributes.cpp. AbstractAreaBase( new Private() ) 49 { 50 init().3.3.

Referenced by KDChart::TextArea::paintAll(). 0 ) : 0. -padding ). 90 } 6.cpp. paintAll(). "AbstractAreaBase::innerRect()".3. 178 "Private class was not initialized!" ). You should call rect() (or width().3.3.cpp.6. paintIntoRect Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase. padding. 176 { 177 Q_ASSERT_X ( d != 0.isVisible() 182 ? qMax( d->frameAttributes. References d. so you can use all of rect() for your custom drawing! See also: paint.) to find the drawable area’s size: While the paint() method is being executed the frame of the widget is outside of its rect().3. inherited] Definition at line 175 of file KDChartAbstractAreaBase. 186 } 6. and d. 88 { 89 return d->frameAttributes. -padding. please let your widget draw itself at the top/left corner of the painter.3.4 void AbstractAreaWidget::forceRebuild () [virtual] Reimplemented in KDChart::Legend.0). 179 180 const int padding 181 = d->frameAttributes.cpp. Referenced by KDChart::Legend::clone().6 QRect AbstractAreaBase::innerRect () const [protected.3 KDChart::AbstractAreaWidget Class Reference 45 6. areaGeometry().size() ) 185 . 85 { 86 //bloc left empty intentionally 87 } 6. 183 return 184 QRect( QPoint(0. Note: When overriding this method.3. Definition at line 84 of file KDChartAbstractAreaWidget.7 virtual void KDChart::AbstractAreaWidget::paint (QPainter ∗ painter) [pure virtual] Overwrite this to paint the inner contents of your widget.3. resp.padding().adjusted( padding.3. height(). and KDChart::AbstractArea::paintAll(). References KDChart::AbstractAreaBase::areaGeometry().

92 // Paint the background and frame 93 paintBackground( painter. 111 } 112 paint( &painter ).cpp.9 void AbstractAreaBase::paintBackground (QPainter & painter. and d.style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).". References areaGeometry(). paintAll(). 114 } 6. Referenced by KDChart::TextArea::paintAll().width()-1.3. 103 if( contentsRect() != inner ){ 104 //qDebug() << "old contentsRect():" << contentsRect() << " new innerRect:" << inner.left(). 110 //forceRebuild(). "AbstractAreaBase::paintBackground()". 90 { 91 //qDebug() << "AbstractAreaWidget::paintAll() called".0. paint().height()-inner. 94 paintFrame( painter.-1) ).adjusted(0.cpp. Referenced by paintEvent(). inherited] Definition at line 103 of file KDChartAbstractAreaBase. 113 //qDebug() << "AbstractAreaWidget::paintAll() done.3. 97 // to be sure all content gets calculated 98 // to fit into the inner rectangle 99 const QRect oldGeometry( areaGeometry() ). 101 //qDebug() << "areaGeometry():" << oldGeometry 102 // << " contentsRect():" << contentsRect() << " inner:" << inner. Referenced by paintAll(). 106 "Private class was not initialized!" ).3. 109 oldGeometry. 95 96 // adjust the widget’s content margins. rect() ). 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes. 6. KDChart::AbstractArea- Base::paintBackground(). 108 oldGeometry.top().brush(). and paintIntoRect().-1. const QRect & rectangle) [virtual. KDChart::AbstractAreaBase::innerRect().isVisible() ) return. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes. 107 inner.46 KD Chart 2 Class Documentation Implemented in KDChart::Legend.height()-1 ). 100 const QRect inner( innerRect() ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . if you want the background and the frame to be drawn before the normal paint() is invoked automatically.8 void AbstractAreaWidget::paintAll (QPainter & painter) Call paintAll. and KDChart::AbstractArea::paintAll(). References attributes.3.width() -inner. 104 { 105 Q_ASSERT_X ( d != 0. rect(). 105 setContentsMargins( 106 inner. and KDChart::AbstractAreaBase::paintFrame(). Definition at line 89 of file KDChartAbstractAreaWidget.

149 ol. 152 } 153 } 154 #undef attributes 155 } 6. 118 painter.topLeft().map( rect. 145 default: 146 .pixmap().deviceMatrix(). zH ).pixmapMode() ) 126 { 127 ol.pixmap().height()/ 2 ).scale( z.cpp. References paintAll().pixmap(). 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.pixmap(). 150 ol.pm. 130 } else { 131 QMatrix m.height()/ 2 ).setBrushOrigin( newTopLeft ).topLeft() ) ).3.y() .setY( rect. 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.width() / 2 ). attributes. 68 QPainter painter( this ).x() .setX( rect. 70 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .center().brush() ).setY( rect. See also: paint Definition at line 65 of file KDChartAbstractAreaWidget. 119 painter.y() .pixmap(). 134 switch( attributes.pixmap() ). z ).drawPixmap( ol.drawRect( rect ).isNull() && 123 attributes.height(). // Cannot happen.pm.width() / 2 ).scale( zW.setX( rect.drawPixmap( ol. pm ). but you would overwrite paint() instead.3 KDChart::AbstractAreaWidget Class Reference 47 115 painter.10 void AbstractAreaWidget::paintEvent (QPaintEvent ∗ event) [virtual] Draws the background and frame. then calls paint(). In most cases there is no need to overwrite this method in a derived class.width(). 116 const QPointF newTopLeft( painter. 133 double zH = (double)rect. previously checked 147 } 148 QPixmap pm = attributes. 66 { 67 Q_UNUSED( event ). 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes. 117 painter. 140 } 141 break.height() / (double)attributes.x() .center(). zH ).attributes. 151 painter.attributes.6. 144 break.setPen( Qt::NoPen ).3. 138 z = qMin( zW.transformed( m ).pixmap().pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.setBrush( attributes. 128 ol. 139 m. 129 painter.center().center().width() / (double)attributes. 132 double zW = (double)rect. 69 paintAll( painter ).

const QRect & rectangle) [virtual. but you would overwrite paint() instead.isVisible() ) return.pen() ).setPen( oldPen ).13 void AbstractAreaWidget::positionHasChanged () [protected.top() ). Definition at line 72 of file KDChartAbstractAreaWidget.cpp. 170 painter. 78 paintAll( painter ). Referenced by KDChart::TextArea::paintAll(). References paintAll(). 168 painter.48 KD Chart 2 Class Documentation 6. and d. 73 { 74 const QRect oldGeometry( geometry() ). then calls paint(). References attributes.11 void AbstractAreaBase::paintFrame (QPainter & painter.cpp. 169 painter. In most cases there is no need to overwrite this method in a derived class.translate( rect.12 void AbstractAreaWidget::paintIntoRect (QPainter & painter.cpp. Referenced by KDChart::Chart::paint(). 77 painter. inherited] Definition at line 158 of file KDChartAbstractAreaBase. 82 } 6. paintAll(). 124 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . -rect.translate( -rect.left(). Definition at line 121 of file KDChartAbstractAreaWidget. 161 "Private class was not initialized!" ).pen() ). virtual] Reimplemented from KDChart::AbstractAreaBase.3. 166 167 const QPen oldPen( painter.3. and KDChart::AbstractArea::paintAll(). 79 painter.3. 171 #undef attributes 172 } 6. 75 if( oldGeometry != rect ) 76 setGeometry( rect ).drawRect( rect ). const QRect & rect) [virtual] Draws the background and frame. 122 { 123 emit positionChanged( this ).top() ).setPen( attributes.3. rect. 159 { 160 Q_ASSERT_X ( d != 0.left(). 80 if( oldGeometry != rect ) 81 setGeometry( oldGeometry ).3. "AbstractAreaBase::paintFrame()".3. 162 163 #define attributes d->frameAttributes 164 165 if( !attributes.

4.cpp.cpp.3.h.3. 83 { 84 d->frameAttributes = a. References d. 93 { 94 d->backgroundAttributes = a.3.3 KDChart::AbstractAreaWidget Class Reference 49 6.3.6.15 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase. 95 } 6.14 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase. The documentation for this class was generated from the following files: • KDChartAbstractAreaWidget. References d. Definition at line 108 of file KDChartAbstractAreaWidget.3.h • KDChartAbstractAreaWidget.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::Legend::clone().1 Q_SIGNALS KDChart::AbstractAreaWidget::__pad0__ Reimplemented in KDChart::Legend. 85 } 6.4 Member Data Documentation 6.3.

then calls paint().h> Inheritance diagram for KDChart::AbstractAxis:Collaboration diagram for KDChart::AbstractAxis: 6. const QRect &rect) Draws the background and frame. • bool observedBy (AbstractDiagram ∗diagram) const • virtual void paint (QPainter ∗)=0 • void paintAll (QPainter &painter) Call paintAll. that are used as axis labels. axes need to be assigned to a diagram. returns the coordinate plane.4. AbstractCartesianDiagram Definition at line 63 of file KDChartAbstractAxis.4 KDChart::AbstractAxis Class Reference #include <KDChartAbstractAxis. • const AbstractCoordinatePlane ∗ coordinatePlane () const Convenience function. See also: PolarAxis. Public Member Functions • AbstractAxis (AbstractDiagram ∗diagram=0) • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • virtual void connectSignals () Wireing the signal/slot connections.1 Detailed Description The base class for axes. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter.50 KD Chart 2 Class Documentation 6. in which this axis is used. see AbstractCartesianDiagram::addAxis and AbstractCartesianDiagram::takeAxis. For being useful.h. as set via setLabels. • virtual void paintFrame (QPainter &painter. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • virtual void paintBackground (QPainter &painter. • void createObserver (AbstractDiagram ∗diagram) • void deleteObserver (AbstractDiagram ∗diagram) • const AbstractDiagram ∗ diagram () const • FrameAttributes frameAttributes () const • virtual QRect geometry () const=0 • QStringList labels () const Returns a list of strings. const QRect &rectangle) • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size.

• TextAttributes textAttributes () const Returns the text attributes to be used for axis labels.6. to be used as axis labels. • QStringList shortLabels () const Returns a list of strings. • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout. • virtual ∼AbstractAxis () Public Attributes • public Q_SLOTS: void update() • protected Q_SLOTS: virtual void delayedInit() Protected Member Functions • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () Protected Attributes • Q_SIGNALS __pad0__: void positionChanged( AbstractArea ∗ ) • QWidget ∗ mParent • QLayout ∗ mParentLayout Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .4 KDChart::AbstractAxis Class Reference 51 • void removeFromParentLayout () • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) • virtual void setGeometry (const QRect &rect)=0 • void setLabels (const QStringList &list) Use this to specify your own set of strings. whenever the size of the item’s contents has changed. to trigger that widget’s update. as set via setShortLabels. to be used as axis labels. • void setTextAttributes (const TextAttributes &a) Use this to specify the text attributes to be used for axis labels. • void setShortLabels (const QStringList &list) Use this to specify your own set of strings. that are used as axis labels. • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. in case the normal labels are too long.

3. this ) ) 116 { 117 init(). 115 : AbstractArea( new Private( diagram.4. Definition at line 105 of file KDChartAbstractArea.cpp. and KDChart::CartesianAxis::paintCtx(). Referenced by KDChart::CartesianCoordinatePlane::drawingArea().4. SLOT(delayedInit())).4. 118 QTimer::singleShot(0. 122 { 123 d->mDiagram = 0. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry. KDChart::CartesianAxis::paint().4.2 AbstractAxis::∼AbstractAxis () [virtual] Definition at line 121 of file KDChartAbstractAxis. this. 108 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] Implements KDChart::AbstractAreaBase. virtual.4. 106 { 107 return geometry().2 QRect AbstractArea::areaGeometry () const [protected. KDChart::AbstractArea::paintAll(). References d.4. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.2 Constructor & Destructor Documentation 6.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase.52 KD Chart 2 Class Documentation 6.cpp.cpp.clear().1 AbstractAxis::AbstractAxis (AbstractDiagram ∗ diagram = 0) [explicit] Definition at line 114 of file KDChartAbstractAxis. KDChart::PolarCoordinate- Plane::layoutDiagrams(). 125 } 6.2. 119 } 6.3.cpp.3 Member Function Documentation 6.2. 124 d->secondaryDiagrams. 76 { 77 Q_UNUSED( position ).

cpp. See also: AbstractCartesianDiagram::addAxis() Definition at line 192 of file KDChartAbstractAxis. SLOT( update() ) ).4 KDChart::AbstractAxis Class Reference 53 6. in which this axis is used. 98 { 99 return d->backgroundAttributes.5 const AbstractCoordinatePlane ∗ AbstractAxis::coordinatePlane () const Convenience function. either by passing a diagram∗ to the c’tor. If overwriting this method in derived classes.3. 196 this. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. Referenced by createObserver(). resp.6 void AbstractAxis::createObserver (AbstractDiagram ∗ diagram) Definition at line 158 of file KDChartAbstractAxis. SIGNAL( diagramDataChanged( AbstractDiagram *) ). References d. the return value is Zero. This method gets called automatically. when you assign the axis to a diagram. Definition at line 293 of file KDChartAbstractAxis.4 void AbstractAxis::connectSignals () [virtual] Wireing the signal/slot connections.cpp.3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase. References d. 197 } 198 } 6. References d. 298 } 6. If the axis is not used in a coordinate plane.6.4.4. so your axis gets connected to the diagram’s built-in signals.4. 100 } 6.4.3. each time.cpp. returns the coordinate plane. 297 return 0. make sure to call this base method AbstractAxis::connect- Signals().3. 193 { 194 if( d->observer ){ 195 connect( d->observer.3. or by calling the diagram’s setAxis method. 294 { 295 if( d->diagram() ) 296 return d->diagram()->coordinatePlane().

cpp.54 KD Chart 2 Class Documentation References connectSignals(). 301 { 302 return d->diagram(). 177 } 6.8 const AbstractDiagram ∗ KDChart::AbstractAxis::diagram () const Definition at line 300 of file KDChartAbstractAxis. this ).cpp. and d. this ) ) 161 connectSignals().3.9 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase. 90 } 6. References d. References d.4. 162 } 6.3.4. 303 } 6. Referenced by KDChart::Legend::clone(). 175 { 176 d->unsetDiagram( diagram. References d.7 void AbstractAxis::deleteObserver (AbstractDiagram ∗ diagram) Definition at line 174 of file KDChartAbstractAxis. Referenced by KDChart::AbstractCartesianDiagram::takeAxis(). 88 { 89 return d->frameAttributes. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 159 { 160 if( d->setDiagram( diagram. Referenced by KDChart::AbstractCartesianDiagram::addAxis().cpp.10 virtual QRect KDChart::AbstractAxis::geometry () const [pure virtual] Implemented in KDChart::CartesianAxis.3.4.4.3. and KDChart::AbstractCartesian- Diagram::∼AbstractCartesianDiagram().

4.6. and KDChart::AbstractArea::paintAll(). and d. 186 } 6. inherited] Implemented in KDChart::CartesianAxis.3.cpp. Referenced by KDChart::Legend::paint().4. -padding ). 306 { 307 return d->hasDiagram( diagram ). Referenced by KDChart::TextArea::paintAll(). KDChart::HorizontalLineLayoutItem. padding. that are used as axis labels. KDChart::TextLayout- Item.12 QStringList AbstractAxis::labels () const Returns a list of strings. KDChart::AbstractAreaWidget::paintAll(). and KDChart::Abstract- LayoutItem::paintCtx().4. 255 { 256 return d->hardLabels. inherited] Definition at line 175 of file KDChartAbstractAreaBase. 257 } 6. KDChart::AbstractArea::paintAll(). See also: setLabels Definition at line 254 of file KDChartAbstractAxis. -padding.3. 179 180 const int padding 181 = d->frameAttributes. 0 ) : 0.padding().11 QRect AbstractAreaBase::innerRect () const [protected.isVisible() 182 ? qMax( d->frameAttributes.13 bool KDChart::AbstractAxis::observedBy (AbstractDiagram ∗ diagram) const Definition at line 305 of file KDChartAbstractAxis. References d. 176 { 177 Q_ASSERT_X ( d != 0.3. and KDChart::PolarCoordinatePlane. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::VerticalLineLayout- Item. 178 "Private class was not initialized!" ). 183 return 184 QRect( QPoint(0.3. 308 } 6.4 KDChart::AbstractAxis Class Reference 55 6.4. References d. as set via setLabels.cpp. "AbstractAreaBase::innerRect()".0).14 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual. References KDChart::AbstractAreaBase::areaGeometry(). Referenced by KDChart::CartesianAxis::maximumSize(). and KDChart::CartesianAxis::paintCtx().adjusted( padding. areaGeometry(). KDChart::CartesianCoordinatePlane.cpp. KDChart::MarkerLayoutItem.size() ) 185 .

84 { 85 // Paint the background and frame 86 paintBackground( painter. 116 const QPointF newTopLeft( painter.4.moveTo( 94 oldGeometry. Definition at line 83 of file KDChartAbstractArea. Referenced by KDChart::Chart::paint().setBrush( attributes. KDChart::AbstractAreaWidget::paintAll().map( rect.4.3. const QRect & rectangle) [virtual.3. 97 if( needAdjustGeometry ) 98 setGeometry( inner ). and KDChart::AbstractArea::paintAll(). 119 painter.left() + inner. 92 QRect inner( innerRect() ).brush().setBrushOrigin( newTopLeft ). geometry() ).16 void AbstractAreaBase::paintBackground (QPainter & painter.56 KD Chart 2 Class Documentation 6.cpp. if you want the background and the frame to be drawn before the normal paint() is invoked automatically.left(). 96 const bool needAdjustGeometry = oldGeometry != inner.top() + inner.deviceMatrix(). 87 paintFrame( painter. to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ). KDChart::AbstractAreaBase::paintBackground(). 102 //qDebug() << "AbstractAreaWidget::paintAll() done. 120 } 121 /* next draw the backPixmap over the brush */ Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 95 oldGeometry.setPen( Qt::NoPen ).cpp. 117 painter. 118 painter. 115 painter. 99 paint( &painter ). 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes. KDChart::AbstractAreaBase::innerRect().15 void AbstractArea::paintAll (QPainter & painter) [inherited] Call paintAll.top() ). 106 "Private class was not initialized!" ). 88 89 // temporarily adjust the widget size. 93 inner. and d. inherited] Definition at line 103 of file KDChartAbstractAreaBase. "AbstractAreaBase::paintBackground()".topLeft() ) ). and KDChart::AbstractArea::paintIntoRect().". References KDChart::AbstractArea::areaGeometry(). 103 } 6. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes. 104 { 105 Q_ASSERT_X ( d != 0. KDChart::AbstractLayoutItem::paint().style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).drawRect( rect ).brush() ). 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ).isVisible() ) return. and KDChart::AbstractAreaBase::paintFrame(). geometry() ). References attributes. Referenced by KDChart::TextArea::paintAll().

18 void AbstractAreaBase::paintFrame (QPainter & painter. 140 } 141 break. attributes. const QRect & rectangle) [virtual. // Cannot happen.height()/ 2 ). 132 double zW = (double)rect. 150 ol.3. 145 default: 146 .height()/ 2 ). 144 break. KDChart::AbstractAreaWidget::paintAll().scale( z. 68 } 6.y() . References attributes.scale( zW.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.setX( rect. inherited] Default impl: Paint the complete item using its layouted position and size.pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.topLeft(). 65 { 66 if( context ) 67 paint( context->painter() ).pixmap().pixmap().attributes. 129 painter. 130 } else { 131 QMatrix m.x() . 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.pixmap().height() / (double)attributes.pixmap(). References KDChart::AbstractLayoutItem::paint().cpp. inherited] Definition at line 158 of file KDChartAbstractAreaBase.setY( rect. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 149 ol.center(). 138 z = qMin( zW.setY( rect.transformed( m ).pm. and d.pm. 133 double zH = (double)rect.height().width() / 2 ). 134 switch( attributes. zH ).pixmapMode() ) 126 { 127 ol.3. zH ). 152 } 153 } 154 #undef attributes 155 } 6. z ).4 KDChart::AbstractAxis Class Reference 57 122 if( !attributes.y() .17 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual.cpp. previously checked 147 } 148 QPixmap pm = attributes.center().pixmap().attributes.4.drawPixmap( ol. pm ).x() .6. 139 m.drawPixmap( ol.center(). 128 ol. Referenced by KDChart::TextArea::paintAll().width() / (double)attributes. 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.center(). Definition at line 64 of file KDChartLayoutItems. and KDChart::AbstractArea::paintAll().width().setX( rect.width() / 2 ).pixmap() ). Reimplemented in KDChart::CartesianAxis. and KDChart::PaintContext::painter().isNull() && 123 attributes. 151 painter.4.pixmap().

3.setPen( oldPen ).top() ). -rect.h. 169 painter. 76 painter.3. 161 "Private class was not initialized!" ).translate( rect.left().4.cpp. 168 painter. 111 { 112 emit positionChanged( this ).3. 67 { 68 if( mParentLayout ){ 69 if( widget() ) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 79 if( oldGeometry != rect ) 80 setGeometry( oldGeometry ).translate( -rect. 113 } 6.cpp. 170 painter. Definition at line 71 of file KDChartAbstractArea. inherited] Draws the background and frame. Referenced by KDChart::Chart::takeCoordinatePlane(). In most cases there is no need to overwrite this method in a derived class. const QRect & rect) [virtual. 171 #undef attributes 172 } 6. "AbstractAreaBase::paintFrame()".pen() ).isVisible() ) return. then calls paint(). 72 { 73 const QRect oldGeometry( geometry() ). 162 163 #define attributes d->frameAttributes 164 165 if( !attributes.4.19 void AbstractArea::paintIntoRect (QPainter & painter. but you would overwrite Abstract- LayoutItem::paint() instead. 78 painter. 74 if( oldGeometry != rect ) 75 setGeometry( rect ).58 KD Chart 2 Class Documentation 159 { 160 Q_ASSERT_X ( d != 0. 77 paintAll( painter ).setPen( attributes.left().21 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems. inherited] Reimplemented from KDChart::AbstractAreaBase. rect. References KDChart::AbstractArea::paintAll(). 166 167 const QPen oldPen( painter.drawRect( rect ). 81 } 6.4.top() ).20 void AbstractArea::positionHasChanged () [protected.pen() ). Definition at line 110 of file KDChartAbstractArea. virtual.

instead of calculating them. Referenced by KDChart::Legend::clone(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3.25 void AbstractAxis::setLabels (const QStringList & list) Use this to specify your own set of strings. 93 { 94 d->backgroundAttributes = a. Labels specified via setLabels take precedence: If a non-empty list is passed.cpp. 83 { 84 d->frameAttributes = a. 85 } 6. setShortLabels Definition at line 244 of file KDChartAbstractAxis. 6. KD Chart will use these strings as axis labels. which would be repeatedly used then.4 KDChart::AbstractAxis Class Reference 59 70 mParentLayout->removeWidget( widget() ). References d.3.4.4. to be used as axis labels.6. References d.3. until all labels are drawn. See also: labels.23 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase.4. If you a smaller number of strings than the number od labels drawn at this axis. 73 } 74 } 6. 95 } 6.cpp. 71 else 72 mParentLayout->removeItem( this ).3. References d.4. By passing an empty QStringList you can reset the default behaviour.22 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase.cpp. KD Chart will iterate over the list. repeating the strings. As an example you could specify the seven days of the week as abscissa labels.24 virtual void KDChart::AbstractAxis::setGeometry (const QRect & rect) [pure virtual] Implemented in KDChart::CartesianAxis.

28 void AbstractAxis::setShortLabels (const QStringList & list) Use this to specify your own set of strings. and KDChart::AbstractCartesianDiagram::takeAxis().60 KD Chart 2 Class Documentation 245 { 246 d->hardLabels = list. inherited] Inform the item about its widget: This enables the item. References d. Referenced by KDChart::Legend::buildLegend().26 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems.h. setLabels Definition at line 270 of file KDChartAbstractAxis.27 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual. References KDChart::AbstractLayoutItem::mParent. Thus. 271 { 272 d->hardShortLabels = list. that has a non-fixed size.3. if you did not pass a non-empty string list via set- Labels too! By passing an empty QStringList you can reset the default behaviour. in case the normal labels are too long. See also: shortLabels. 59 } 6.3. to trigger that widget’s update. 273 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . to be used as axis labels. 65 } 6. 57 { 58 mParent = widget.cpp.4. 63 { 64 mParentLayout = lay.cpp.4.4. whenever the size of the item’s contents has changed. Note: Setting done via setShortLabels will be ignored. you need to call setParentWidget on every item. Definition at line 56 of file KDChartLayoutItems.3. 247 } 6.

82 } 83 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .30 QStringList AbstractAxis::shortLabels () const Returns a list of strings.4 KDChart::AbstractAxis Class Reference 61 6.29 void AbstractAxis::setTextAttributes (const TextAttributes & a) Use this to specify the text attributes to be used for axis labels.6.3. Thus the labels of all of your axes in all of your diagrams within that Chart will be drawn in same font size. References d. if you did not pass a non-empty string list via set- Labels too! See also: setShortLabels Definition at line 283 of file KDChartAbstractAxis. 80 else 81 QApplication::postEvent( mParent. by default. so normally. setLabels Definition at line 212 of file KDChartAbstractAxis. the reference area will be set at painting time. 215 } 6. It will be the then-valid coordinate plane’s parent widget. Referenced by KDChart::TextLayoutItem::sizeHint().4.31 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual.3. Referenced by KDChart::CartesianAxis::paintCtx(). 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate(). Note: Setting done via setShortLabels will be ignored. it will be the KDChart::Chart. 76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called"). Definition at line 73 of file KDChartLayoutItems. inherited] Report changed size hint: ask the parent widget to recalculate the layout. as set via setShortLabels.4.cpp. 284 { 285 return d->hardShortLabels. By default. new QEvent( QEvent::LayoutRequest ) ). that are used as axis labels.cpp. 286 } 6. 213 { 214 d->textAttributes = a.4. References d. See also: textAttributes.3.cpp. 74 { 75 // This is exactly like what QWidget::updateGeometry does.

3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected. References d. Definition at line 86 of file KDChartAbstractArea. 6.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected.4. 225 } 6.4.h. The documentation for this class was generated from the following files: • KDChartAbstractAxis.4. KDChart::CartesianAxis::paintCtx().4.3. inherited] Definition at line 76 of file KDChartLayoutItems.4. 6.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. Referenced by KDChart::AbstractLayoutItem::setParentWidget().4.4. inherited] Reimplemented in KDChart::AbstractCoordinatePlane.h.62 KD Chart 2 Class Documentation 6.4 Member Data Documentation 6.1 Q_SIGNALS KDChart::AbstractArea::__pad0__ [protected.32 TextAttributes AbstractAxis::textAttributes () const Returns the text attributes to be used for axis labels.4.4. 6.4.4 public KDChart::AbstractAxis::Q_SLOTS Definition at line 108 of file KDChartAbstractAxis. 223 { 224 return d->textAttributes. Referenced by KDChart::CartesianAxis::maximumSize().5 protected KDChart::AbstractAxis::Q_SLOTS Definition at line 105 of file KDChartAbstractAxis. 6. and KDChart::CartesianAxis::titleTextAttributes().h • KDChartAbstractAxis.4. See also: setTextAttributes Definition at line 222 of file KDChartAbstractAxis.h.4. inherited] Definition at line 77 of file KDChartLayoutItems.h.h.

CartesianCoordinatePlane ∗plane=0) • virtual void addAxis (CartesianAxis ∗axis) Add the axis to the diagram. • virtual KDChart::CartesianAxisList axes () const • QBrush brush (const QModelIndex &index) const Retrieve the brush to be used. • QBrush brush () const Retrieve the brush to be used for painting datapoints globally. • int datasetDimension () const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • bool allowOverlappingDataValueTexts () const • bool antiAliasing () const • virtual AttributesModel ∗ attributesModel () const Returns the AttributesModel.6. for painting the datapoint at the given index in the model. Public Member Functions • AbstractCartesianDiagram (QWidget ∗parent=0.h.5 KDChart::AbstractCartesianDiagram Class Reference 63 6.h> Inheritance diagram for KDChart::AbstractCartesianDiagram:Collaboration diagram for KDChart::AbstractCartesianDiagram: 6. Definition at line 45 of file KDChartAbstractCartesianDiagram. that is used by this diagram. • AbstractCoordinatePlane ∗ coordinatePlane () const The coordinate plane associated with the diagram. • virtual void dataChanged (const QModelIndex &topLeft. QPointF > dataBoundaries () const Return the bottom left and top right data point. • const QPair< QPointF. etc. The AbstractCartesianDiagram interface adds those elements that are specific to diagrams based on a carte- sian coordinate system to the basic AbstractDiagram interface.5 KDChart::AbstractCartesianDiagram Class Reference #include <KDChartAbstractCartesianDiagram.1 Detailed Description Base class for diagrams based on a cartesian coordianate system.5. for use in legends. • QBrush brush (int dataset) const Retrieve the brush to be used for the given dataset. const QModelIndex &bottomRight) [reimplemented] • QList< QBrush > datasetBrushes () const The set of dataset brushes currently used. that the diagram will display (unless the grid adjusts these values).

etc.64 KD Chart 2 Class Documentation The dataset dimension of a diagram determines. • DataValueAttributes dataValueAttributes (const QModelIndex &index) const Retrieve the DataValueAttributes for the given index. for use in legends. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . const QPointF &point. for painting the datapoint at the given index in the model. • DataValueAttributes dataValueAttributes (int column) const Retrieve the DataValueAttributes for the given dataset. how many value dimensions it expects each datapoint to have. const QPen &. const QSizeF &size) • QPen pen (const QModelIndex &index) const Retrieve the pen to be used. • QPen pen (int dataset) const Retrieve the pen to be used for the given dataset. etc. for use in legends. for use in Abscissa axes. for use in legends. • virtual void layoutPlanes () • virtual QModelIndex moveCursor (CursorAction cursorAction. • QStringList datasetLabels () const The set of dataset labels currently displayed. const MarkerAttributes &markerAttributes. • virtual void doItemsLayout () [reimplemented] • virtual int horizontalOffset () const [reimplemented] • virtual QModelIndex indexAt (const QPoint &point) const [reimplemented] • virtual bool isIndexHidden (const QModelIndex &index) const [reimplemented] • QStringList itemRowLabels () const The set of item row labels currently displayed. const QBrush &brush. Qt::KeyboardModifiers modifiers) [reimplemented] • virtual const int numberOfAbscissaSegments () const=0 • virtual const int numberOfOrdinateSegments () const=0 • virtual void paintMarker (QPainter ∗painter. • QList< QPen > datasetPens () const The set of dataset pens currently used. etc. etc. • QList< MarkerAttributes > datasetMarkers () const The set of dataset markers currently used. • DataValueAttributes dataValueAttributes () const Retrieve the DataValueAttributes speficied globally.

for painting the datapoint at the given index.6. • virtual void setAttributesModel (AttributesModel ∗model) Associate an AttributesModel with this diagram. const QBrush &brush) Set the brush to be used.5 KDChart::AbstractCartesianDiagram Class Reference 65 • QPen pen () const Retrieve the pen to be used for painting datapoints globally. • virtual void setModel (QAbstractItemModel ∗model) Associate a model with the diagram. const DataValueAttributes &a) Set the DataValueAttributes for the given dataset. const QBrush &brush) Set the brush to be used. for painting the given dataset. • void setDataValueAttributes (const QModelIndex &index. for painting all datasets in the model. • void setBrush (const QBrush &brush) Set the brush to be used. • void setPen (const QPen &pen) Set the pen to be used. • virtual void setCoordinatePlane (AbstractCoordinatePlane ∗plane) Set the coordinate plane associated with the diagram. • void setAntiAliasing (bool enabled) Set whether anti-aliasing is to be used while rendering this diagram. • void setDataValueAttributes (const DataValueAttributes &a) Set the DataValueAttributes for all datapoints in the model. for painting all datasets in the model. • virtual void scrollTo (const QModelIndex &index. const DataValueAttributes &a) Set the DataValueAttributes for the given index. • void setBrush (int dataset. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . ScrollHint hint=EnsureVisible) [reimplemented] • void setAllowOverlappingDataValueTexts (bool allow) Set whether data value labels are allowed to overlap. • bool percentMode () const • virtual AbstractCartesianDiagram ∗ referenceDiagram () const • virtual QPointF referenceDiagramOffset () const • virtual void resize (const QSizeF &area)=0 Called by the widget’s sizeEvent. • void setDatasetDimension (int dimension) Sets the dataset dimension of the diagram. • void setBrush (const QModelIndex &index. • void setDataValueAttributes (int dataset.

• void update () const • void useDefaultColors () Set the palette to be used. const QPen &pen) Set the pen to be used. for painting the datapoint at the given index. QItemSelectionModel::SelectionFlags command) [reimplemented] • virtual void takeAxis (CartesianAxis ∗axis) Removes the axis from the diagram. where the diagram starts referencing data for display. for painting datasets to the subdued palette. when either the model or the AttributesModel is replaced. for painting the given dataset. • virtual void paint (PaintContext ∗paintContext)=0 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • virtual int verticalOffset () const [reimplemented] • virtual QRect visualRect (const QModelIndex &index) const [reimplemented] • virtual QRegion visualRegionForSelection (const QItemSelection &selection) const [reimplemented] • virtual ∼AbstractCartesianDiagram () Protected Member Functions • QModelIndex attributesModelRootIndex () const • virtual const QPair< QPointF. • void useRainbowColors () Set the palette to be used. • void setPercentMode (bool percent) • virtual void setReferenceDiagram (AbstractCartesianDiagram ∗diagram. • void useSubduedColors () Set the palette to be used. • void setPen (const QModelIndex &index. for painting datasets to the rainbow palette. const QPointF &offset=QPointF()) • virtual void setRootIndex (const QModelIndex &idx) Set the root index in the model. • virtual void setSelection (const QRect &rect.66 KD Chart 2 Class Documentation • void setPen (int dataset. for painting datasets to the default palette. without deleting it. const QPen &pen) Set the pen to be used. QPointF > calculateDataBoundaries () const=0 • virtual bool checkInvariants (bool justReturnTheStatus=false) const • QModelIndex columnToIndex (int column) const • void modelsChanged () This signal is emitted.

5.3 Member Function Documentation 6.2 Constructor & Destructor Documentation 6. 54 : AbstractDiagram ( new Private(). const QPointF &pos) • virtual void paintMarkers (QPainter ∗painter) • void propertiesChanged () Emitted upon change of a property of the Diagram. dou- ble value) • virtual void paintDataValueTexts (QPainter ∗painter) • void paintMarker (QPainter ∗painter.cpp. 64 } 6.2. • void paintDataValueText (QPainter ∗painter. const QModelIndex &index. and KDChart::AbstractAxis::deleteObserver(). that are passed in as part of the paint context.3.2 KDChart::AbstractCartesianDiagram::∼AbstractCartesianDiagram () [virtual] Definition at line 58 of file KDChartAbstractCartesianDiagram.2.5. 59 { 60 Q_FOREACH( CartesianAxis* axis.clear(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 62 } 63 d->axesList. const QPointF &pos.cpp.1 AbstractCartesianDiagram::AbstractCartesianDiagram (QWidget ∗ parent = 0.5 KDChart::AbstractCartesianDiagram Class Reference 67 Draw the diagram contents to the rectangle and painter.5.5. parent. • void setAttributesModelRootIndex (const QModelIndex &) • void setDataBoundariesDirty () const • virtual double threeDItemDepth (int column) const=0 • virtual double threeDItemDepth (const QModelIndex &index) const=0 • double valueForCell (int row. d->axesList ) { 61 axis->deleteObserver( this ). CartesianCoordinatePlane ∗ plane = 0) [explicit] Definition at line 53 of file KDChartAbstractCartesianDiagram. int column) const Helper method. References d.6. Protected Attributes • Q_SIGNALS __pad0__: void layoutChanged( AbstractDiagram∗ ) 6. const QModelIndex &index.1 void AbstractCartesianDiagram::addAxis (CartesianAxis ∗ axis) [virtual] Add the axis to the diagram. retrieving the data value (DisplayRole) for a given row and column. plane ) 55 { 56 } 6.5.

By default each diagram owns its own AttributesModel. Definition at line 291 of file KDChartAbstractDiagram. 306 { 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5. To gain back ownership (e.5. Referenced by KDChart::LineDiagram::paint(). References KDChart::AbstractAxis::createObserver().2 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited] Returns: Whether data value labels are allowed to overlap. See also: takeAxis Definition at line 66 of file KDChartAbstractCartesianDiagram.4 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual.cpp.cpp. that is used by this diagram.append( axis ). for assigning the axis to another diagram) use the takeAxis method. and layoutPlanes().3. References d. which should never be deleted. References d.3. 67 { 68 if ( !d->axesList.5.3. Only if a user- supplied AttributesModel has been set does the pointer returned here not belong to the diagram. Definition at line 302 of file KDChartAbstractDiagram. Returns: The AttributesModel associated with the diagram. 71 layoutPlanes(). inherited] Returns the AttributesModel.contains( axis ) ) { 69 d->axesList. 72 } 73 } 6.3 bool AbstractDiagram::antiAliasing () const [inherited] Returns: Whether anti-aliasing is to be used for rendering this diagram. before calling addAxis on the other diagram.g.68 KD Chart 2 Class Documentation The diagram takes ownership of the axis and will delete it. 70 axis->createObserver( this ). d. 295 { 6.cpp.

KDChart::BarDiagram::numberOfOrdinateSegments().5.5. References d.3.cpp. References d. Returns: The brush to use for painting. Parameters: index The index of the datapoint in the model. KDChart::LineDiagram::numberOfOrdinateSegments(). 88 } 6. Definition at line 632 of file KDChartAbstractDiagram. and KDChart::Bar- Diagram::setBarAttributes().cpp. Definition at line 204 of file KDChartAbstractDiagram. Referenced by KDChart::RingDiagram::paint(). KDChart::Bar- Diagram::numberOfAbscissaSegments().6 KDChart::CartesianAxisList AbstractCartesianDiagram::axes () const [virtual] Definition at line 85 of file KDChartAbstractCartesianDiagram.5.5 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected. KDChart::BarDiagram::calculate- DataBoundaries(). for painting the datapoint at the given index in the model. KDChart::LineDiagram::paint(). inherited] returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram. 183 } 6. 638 : QRect AbstractDiagram::visualRect(const QModelIndex &) const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 210 { 6. and KDChart::AbstractDiagram::valueForCell().7 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited] Retrieve the brush to be used.cpp.cpp. KDChart::Bar- Diagram::paint().3.5 KDChart::AbstractCartesianDiagram Class Reference 69 See also: setAttributesModel Definition at line 180 of file KDChartAbstractDiagram. KDChart::LineDiagram::numberOfAbscissaSegments(). Referenced by KDChart::LineDiagram::calculateDataBoundaries(). References KDChart::CartesianAxisList. 86 { 87 return d->axesList.6. KDChart::PolarDiagram::paint().3. and d. 181 { 182 return d->attributesModel.

3. This will fall back automatically to the default settings.5. if there are no specific settings. Referenced by KDChart::PieDiagram::paint().cpp.5. QPointF> KDChart::Abstract- Diagram::calculateDataBoundaries () const [protected. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.3. KDChart::Polar- Diagram.5. Definition at line 618 of file KDChartAbstractDiagram. if there are no dataset specific settings.11 bool AbstractDiagram::checkInvariants (bool justReturnTheStatus = false) const [protected. inherited] Definition at line 746 of file KDChartAbstractDiagram. KDChart::PolarDiagram::paint(). 623 { 6. KDChart::BarDiagram::calculateDataBoundaries(). 631 { 6. KDChart::PolarDiagram::calculate- DataBoundaries(). KDChart::PieDiagram::paint(). References KDChart::AbstractDiagram::coordinatePlane(). KDChart::RingDiagram::paint(). and KDChart::RingDiagram. KDChart::LineDiagram. and KDChart::AbstractDiagram::paintMarker(). pure virtual.3. KDChart::LineDiagram::calculate- DataBoundaries(). KDChart::LineDiagram::paint().9 QBrush AbstractDiagram::brush () const [inherited] Retrieve the brush to be used for painting datapoints globally. 6. This will fall back automatically to what was set at model level. inherited] Implemented in KDChart::BarDiagram. virtual.3. and KDChart::AbstractDiagram::paintMarker().10 virtual const QPair<QPointF. Referenced by KDChart::RingDiagram::calculateDataBoundaries(). Definition at line 624 of file KDChartAbstractDiagram.cpp.70 KD Chart 2 Class Documentation 6.5. KDChart::PieDiagram::calculateDataBoundaries(). Returns: The brush to use for painting. Parameters: dataset The dataset to retrieve the brush for. Returns: The brush to use for painting.8 QBrush AbstractDiagram::brush (int dataset) const [inherited] Retrieve the brush to be used for the given dataset. KDChart::PieDiagram. Referenced by KDChart::AbstractDiagram::dataBoundaries(). KDChart::BarDiagram::paint().

3.5. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] Definition at line 211 of file KDChartAbstractDiagram. By default this is a Cartesian- CoordinatePlane. 754 } 755 756 int AbstractDiagram::datasetDimension( ) const 6. 217 { 6. they can call setDataBoundariesDirty() Returned value is in diagram coordinates.5 KDChart::AbstractCartesianDiagram Class Reference 71 746 { 747 Q_ASSERT_X ( model()." ).3. KDChart::AbstractDiagram::check- Invariants().6.5. to specify their own way of calculating the data boundaries. Referenced by KDChart::BarDiagram::calculateDataBoundaries().5. 128 } 6. References d. This method returns a chached result of calculations done by calculateDataBoundaries.12 QModelIndex AbstractDiagram::columnToIndex (int column) const [protected. layoutPlanes(). "AbstractDiagram::checkInvariants()".cpp. Classes derived from AbstractDiagram must implement the calculateDataBoundaries function.14 const QPair< QPointF. for the diagram.cpp. This determines how coordinates in value space are mapped into pixel space.3. KDChart::AbstractPolarDiagram::polarCoordinatePlane(). QPointF > AbstractDiagram::dataBoundaries () const [inherited] Return the bottom left and top right data point. 749 750 Q_ASSERT_X ( coordinatePlane()." ). KDChart::BarDiagram::paint(). Definition at line 125 of file KDChartAbstractDiagram. that the diagram will display (unless the grid adjusts these values). "AbstractDiagram::checkInvariants()". KDChart::LineDiagram::paint(). 752 } 753 return model() && coordinatePlane(). 751 "There is no usable coordinate plane set. 748 "There is no usable model set. and set- CoordinatePlane(). for the diagram. KDChart::PolarDiagram::paint(). 126 { 127 return d->plane. Returns: The coordinate plane associated with the diagram. If derived classes want to force recalculation of the data boundaries.13 AbstractCoordinatePlane ∗ AbstractDiagram::coordinatePlane () const [inherited] The coordinate plane associated with the diagram.

72 KD Chart 2 Class Documentation Definition at line 130 of file KDChartAbstractDiagram. Returns: The current set of dataset brushes. that is used for a single cell.3. 135 } 136 return d->databoundaries. and KDChart::Legend::setBrushesFromDiagram(). 715 } 716 717 return ret. Referenced by KDChart::Legend::buildLegend(). and KDChart::BarDiagram::paint(). 236 } 237 238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index. KDChart::Polar- CoordinatePlane::layoutDiagrams(). etc. for use in legends..15 void AbstractDiagram::dataChanged (const QModelIndex & topLeft. take precedence over the dataset values. so you might need to check these too. inherited] [reimplemented] Definition at line 232 of file KDChartAbstractDiagram. 235 scheduleDelayedItemsLayout(). 6. 137 } 6. and d.3. References d. 718 } 719 720 QList<QPen> AbstractDiagram::datasetPens() const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 712 { 713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i. if set.5. in order to find the brush. KDChart::LineDiagram::paint(). DatasetB 714 ret << brush. References KDChart::AbstractDiagram::calculateDataBoundaries(). Note: Cell-level override brushes.cpp. Definition at line 710 of file KDChartAbstractDiagram.. 234 d->databoundariesDirty = true.5. 232 { 233 // We are still too dumb to do intelligent updates.cpp. const QModelIndex & bottomRight) [virtual. Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(). 131 { 132 if( d->databoundariesDirty ){ 133 d->databoundaries = calculateDataBoundaries (). KDChart::Legend::datasetCount(). 134 d->databoundariesDirty = false.cpp. Qt::Vertical.16 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited] The set of dataset brushes currently used.

KDChart::Line- Diagram::paint(). Definition at line 758 of file KDChartAbstractDiagram.3.. If the dimensionality is 1. i += datasetDimension() ){ 702 //qDebug() << "label: " << attributesModel()->headerData( i. 762 { 6. the diagram will use the first.19 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited] The set of dataset markers currently used.5 KDChart::AbstractCartesianDiagram Class Reference 73 6. Definition at line 698 of file KDChartAbstractDiagram. 699 : " << attributesModel()->columnCount(attributesModel 700 const int columnCount = attributesModel()->columnCount(attributesModelRootIndex()). 706 } 707 708 QList<QBrush> AbstractDiagram::datasetBrushes() const 6. if set. 701 for( int i = datasetDimension()-1.cpp.3. 2.5. and KDChart::LineDiagram::setType(). i < columnCount. for use in legends.5. and the second. For each dimension it will expect one column of values in the model. KDChart::LineDiagram::get- CellValues(). Returns: The set of dataset labels currently displayed.17 int AbstractDiagram::datasetDimension () const [inherited] The dataset dimension of a diagram determines. 704 } 705 return ret. for use in legends. References d. (and the fourth. If the dimension is 2.6. (and the third. automatic values will be used for the abscissa. etc. etc. 3. n). in order to find the marker. and KDChart::Legend::datasetCount(). Referenced by KDChart::LineDiagram::calculateDataBoundaries().toString(). For example a diagram with the default dimension of 1. etc) column as Y values. Note: Cell-level override markers. Referenced by KDChart::Legend::buildLegend().18 QStringList AbstractDiagram::datasetLabels () const [inherited] The set of dataset labels currently displayed. so you might need to check these too. sixth..cpp. Qt::Horizontal. will have one column per datapoint (the y values) and will use automatic values for the x axis (1. KDChart::CartesianCoordinatePlane::getDataDimensionsList(). how many value dimensions it expects each datapoint to have. . etc) columns as X values. Qt::Horizontal. fifth. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Returns: The dataset dimension of the diagram. take precedence over the dataset values. Qt::DisplayRole ). Qt::DisplayRole ) 703 ret << attributesModel()->headerData( i.3. that is shown for a single cell.5.

cpp. etc.20 QList< QPen > AbstractDiagram::datasetPens () const [inherited] The set of dataset pens currently used.5. Qt::Vertical. take precedence over the dataset values. Returns: The current set of dataset pens. 727 } 728 return ret. 739 ret << ma. for use in legends. 740 } 741 return ret. Referenced by KDChart::Legend::buildLegend(). This will fall back automatically to what was set at dataset or model level.21 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex & index) const [inherited] Retrieve the DataValueAttributes for the given index. 742 } 743 744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const 6.5.3. Referenced by KDChart::Legend::buildLegend(). if there are no datapoint specific settings. DatasetPenRole 726 ret << pen. 724 { 725 QPen pen = qVariantValue<QPen>( attributesModel()->headerData( i.3. 729 } 730 731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const 6. DataVa 738 const MarkerAttributes &ma = a. 735 { 736 DataValueAttributes a = 737 qVariantValue<DataValueAttributes>( attributesModel()->headerData( i.cpp.markerAttributes(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Returns: The DataValueAttributes for the given index.74 KD Chart 2 Class Documentation Returns: The current set of dataset brushes. if set. Definition at line 733 of file KDChartAbstractDiagram. that is used for a single cell. Parameters: index The datapoint to retrieve the attributes for. Qt::Vertical. Note: Cell-level override pens. Definition at line 722 of file KDChartAbstractDiagram. in order to find the pens. so you might need to check these too.

cpp. This will fall back automatically to the default settings. if there are no dataset specific settings.cpp.22 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const [inherited] Retrieve the DataValueAttributes for the given dataset. References d. 271 { 6. and KDChart::AbstractDiagram::update().3. Definition at line 265 of file KDChartAbstractDiagram. Returns: The global DataValueAttributes.5. Returns: The DataValueAttributes for the given dataset.24 void AbstractDiagram::doItemsLayout () [virtual. 264 { 6.5.3.23 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited] Retrieve the DataValueAttributes speficied globally.6.5 KDChart::AbstractCartesianDiagram Class Reference 75 Definition at line 272 of file KDChartAbstractDiagram. 225 update(). 278 { 6.3. Referenced by KDChart::AbstractDiagram::paintDataValueText(). inherited] [reimplemented] Definition at line 223 of file KDChartAbstractDiagram. Parameters: dataset The dataset to retrieve the attributes for. This will fall back automatically to what was set at model level. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. Definition at line 260 of file KDChartAbstractDiagram. 226 } 227 QAbstractItemView::doItemsLayout(). and KDChart::AbstractDiagram::paint- Marker(). 228 } 229 230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft. if there are no specific settings. 223 { 224 d->plane->layoutDiagrams().cpp.5.

Qt::DisplayRole ). Returns: The set of item row labels currently displayed. References KDChart::AbstractDiagram::coordinatePlane().26 QModelIndex AbstractDiagram::indexAt (const QPoint & point) const [virtual.cpp.27 bool AbstractDiagram::isIndexHidden (const QModelIndex & index) const [virtual. Definition at line 686 of file KDChartAbstractDiagram. Qt::Vertical.cpp.5.cpp.25 int AbstractDiagram::horizontalOffset () const [virtual. 657 { return 0.28 QStringList AbstractDiagram::itemRowLabels () const [inherited] The set of item row labels currently displayed.toString(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] [reimplemented] Definition at line 655 of file KDChartAbstractDiagram.cpp. and takeAxis().76 KD Chart 2 Class Documentation 6. Qt::Vertical. inherited] [reimplemented] Definition at line 649 of file KDChartAbstractDiagram. 651 { return QModelIndex(). 687 : " << attributesModel()->rowCount(attributesModelRoo 688 const int rowCount = attributesModel()->rowCount(attributesModelRootIndex()). inherited] [reimplemented] Definition at line 661 of file KDChartAbstractDiagram.5.3. and KDChart::AbstractCoordinate- Plane::layoutPlanes(). 663 {} 6.3.3. } 6. } 6.t 691 ret << attributesModel()->headerData( i. 692 } 693 return ret.5. 694 } 695 696 QStringList AbstractDiagram::datasetLabels() const 6. etc. for use in Abscissa axes.5. Qt::DisplayRole ).3. Referenced by addAxis(). i < rowCount. ++i ){ 690 //qDebug() << "label: " << attributesModel()->headerData( i.cpp.3.29 void KDChart::AbstractCartesianDiagram::layoutPlanes () [virtual] Definition at line 90 of file KDChartAbstractCartesianDiagram.5. 689 for( int i = 0.

5. Qt::KeyboardModifiers modifiers) [virtual. KDChart::Polar- Diagram. and KDChart::RingDiagram. Referenced by KDChart::AbstractDiagram::setAttributesModel(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 654 { return 0.31 QModelIndex AbstractDiagram::moveCursor (CursorAction cursorAction.3.cpp. and KDChart::LineDiagram.5. inherited] [reimplemented] Definition at line 652 of file KDChartAbstractDiagram. inherited] This signal is emitted. and KDChart::LineDiagram. 6. double value) [protected.cpp.35 void AbstractDiagram::paintDataValueText (QPainter ∗ painter.34 virtual void KDChart::AbstractDiagram::paint (PaintContext ∗ paintContext) [protected.5 KDChart::AbstractCartesianDiagram Class Reference 77 91 { 92 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()". inherited] Definition at line 318 of file KDChartAbstractDiagram. that are passed in as part of the paint context.6. 97 } 98 } 6.3. Implemented in KDChart::BarDiagram. 6.3.32 virtual const int KDChart::AbstractCartesianDiagram::numberOfAbscissaSegments () const [pure virtual] Implemented in KDChart::BarDiagram. KDChart::LineDiagram. const QModelIndex & index. KDChart::PieDiagram. 94 if( plane ){ 95 plane->layoutPlanes().3.5. const QPointF & pos.5. pure virtual.3.5. 6.5. Parameters: paintContext All information needed for painting. 93 AbstractCoordinatePlane* plane = coordinatePlane(). } 6. when either the model or the AttributesModel is replaced. 96 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK".30 void KDChart::AbstractDiagram::modelsChanged () [protected.3. 6. inherited] Draw the diagram contents to the rectangle and painter. and KDChart::AbstractDiagram::set- Model().33 virtual const int KDChart::AbstractCartesianDiagram::numberOfOrdinateSegments () const [pure virtual] Implemented in KDChart::BarDiagram.

350 painter->rotate( ta. Referenced by KDChart::RingDiagram::paint().3. 348 painter->setFont( ta. 324 325 // handle decimal digits 326 int decimalDigits = a. KDChart::TextAttributes::rotation(). KDChart::AbstractDiagram::dataValue- Attributes(). KDChart::DataValueAttributes::prefix().36 void AbstractDiagram::paintDataValueTexts (QPainter ∗ painter) [protected. 336 // handle prefix and suffix 337 if ( !a. KDChart::PolarDiagram::paint().append( a. j< rowCount. etc 345 const TextAttributes &ta = a.suffix(). KDChart::Text- Attributes::pen(). ++j ) { 387 const QModelIndex index = model()->index( j. 342 343 PainterSaver painterSaver( painter ). 334 } else 335 roundedValue = a.pen() ). 329 if ( a.prefix().isNull() ) 341 roundedValue. 385 { 386 for ( int j=0. pos. value ) ).isVisible() ) return. 327 int decimalPos = QString::number( value ). roundedValue ).’ ) ). 328 QString roundedValue. 320 { 321 // paint one data series 322 DataValueAttributes a = dataValueAttributes(index). decimalDigits ). 332 else 333 roundedValue = QString::number( value ).prepend( a.cpp.dataLabel().78 KD Chart 2 Class Documentation References KDChart::DataValueAttributes::dataLabel(). 6. inherited] Definition at line 382 of file KDChartAbstractDiagram.isNull() ) 338 roundedValue.5. KDChart::DataValueAttributes::suffix(). i. 344 // FIXME draw the non-text bits.font() ).indexOf( QLatin1Char( ’.rotation() ). and KDChart::BarDiagram::paint(). 388 double value = model()->data( index ). KDChart::TextAttributes::font(). virtual. 352 } 353 } 354 355 QString AbstractDiagram::roundValues( double value. KDChart::DataValueAttributes::isVisible().suffix() ). 0). 391 } 392 } 393 } 394 395 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::DataValueAttributes::decimalDigits(). KDChart::TextAttributes::isVisible().toDouble().dataLabel().decimalDigits(). value ). 390 paintDataValueText( painter. 351 painter->drawText( QPointF(0. 323 if ( !a. 346 if ( ta.isVisible() ) { 347 painter->setPen( ta. 349 painter->translate( pos ). background. 339 340 if ( !a.prefix() ). index. rootIndex() ). and KDChart::DataValueAttributes::textAttributes(). 389 const QPointF pos = coordinatePlane()->translate( QPointF( j.textAttributes(). KDChart::Line- Diagram::paint().isNull() ) { 330 if ( decimalPos > 0 && value != 0 ) 331 roundedValue = roundValues ( value. decimalPos.

width()/2. KDChart::MarkerAttributes::markerSize(). 410 QPen indexPen( ma. 438 maSize. indexPen.width() ). 413 414 paintMarker( painter. KDChart::DataValueAttributes::markerAttributes(). 429 painter->translate( pos ). KDChart::AbstractDiagram::dataValueAttributes(). 434 break.5 KDChart::AbstractCartesianDiagram Class Reference 79 6.pen() ). KDChart::AbstractDiagram::paintMarker().height().isVisible() ) return. 415 } 416 417 6. and KDChart::AbstractDiagram::paintMarker().isVisible() ) return. 435 case MarkerAttributes::MarkerSquare: 436 { 437 QRectF rect( 0 . References KDChart::AbstractDiagram::brush().height(). 433 maSize.3.cpp.height()/2.markerColor() ). inherited] Definition at line 398 of file KDChartAbstractDiagram. ma. const QModelIndex & index. maSize ).markerColor(). 430 switch ( markerAttributes. const QBrush & brush. 0 . const QPointF & point.height()/2. 403 if ( !a.maSize. 402 DataValueAttributes a = dataValueAttributes(index). 427 painter->setPen( pen ). KDChart::MarkerLayoutItem::paint(). 424 { 425 PainterSaver painterSaver( painter ).maSize. 406 407 PainterSaver painterSaver( painter ). KDChart::MarkerAttributes::markerColor().5. pos. indexBrush. KDChart::MarkerAttributes::isVisible(). maSize.cpp. KDChart::AbstractDiagram::checkInvariants().37 void AbstractDiagram::paintMarker (QPainter ∗ painter. References KDChart::MarkerAttributes::markerStyle(). const QPen &. 0 . const QSizeF & size) [virtual.maSize.6.maSize.width()) ). const QPointF & pos) [protected. and KDChart::MarkerAttributes::pen(). 409 QBrush indexBrush( brush( index ) ). inherited] Definition at line 420 of file KDChartAbstractDiagram.width()/2.5.setColor( ma.3.markerAttributes(). 404 const MarkerAttributes &ma = a. 440 painter->fillRect( rect. maSize. const MarkerAttributes & markerAttributes.isValid() ) 412 indexBrush. 399 { 400 401 if ( !checkInvariants() ) return. 411 if ( ma. 439 painter->drawRect( rect ). 441 break. 408 QSizeF maSize( ma.38 void AbstractDiagram::paintMarker (QPainter ∗ painter. 405 if ( !ma. 428 painter->setRenderHint ( QPainter::Antialiasing ). Referenced by KDChart::LineDiagram::paint().markerStyle() ) { 431 case MarkerAttributes::MarkerCircle: 432 painter->drawEllipse( QRectF( 0 . 426 painter->setBrush( brush ). 442 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .markerSize() ). painter->brush() ). KDChart::DataValueAttributes::isVisible().

501 topRight = QPointF( maSize. pSize. 503 centerTopLeft = QPointF( -maSize. 466 break. 476 painter->drawEllipse( centerRect ). 463 pSize. 504 505 crossPoints << leftTop << leftBottom << centerBottomLeft 506 << bottomLeft << bottomRight << centerBottomRight 507 << rightBottom << rightTop << centerTopRight 508 << topRight << topLeft << centerTopLeft.height()/2 ). maSize. -maSize.width()/4. 485 } 486 case MarkerAttributes::MarkerCross: 487 { 488 QVector <QPointF > crossPoints.height()/2 ). 478 } 479 case MarkerAttributes::MarkerRing: 480 { 481 painter->setBrush( Qt::NoBrush ).height()/4 ). 0 ). maSize. 496 bottomRight = QPointF( maSize. 498 rightBottom = QPointF( maSize.height().height()/4 ).height(). 482 painter->drawEllipse( QRectF( 0 . 499 rightTop = QPointF( maSize. 454 } 455 //Pending Michel: do we need that? Ask: What is the idea about 456 // Marker1Pixel and Marker4Pixels.height()/2.height()/2 ).width()/4. -maSize.width()/4.width()/4. maSize. 471 QPen pen4Pixel.width()) ).height()/4 ). leftBottom.width()/2. centerBottomLeft. 490 centerBottomRight. maSize. 477 break. 449 bottom = QPointF( 0. 495 bottomLeft = QPointF( -maSize. pSize.height()/2 ). topLeft. -maSize.width()/2.4).height()/2. 447 top = QPointF( 0. bottom. 462 QRectF centerRect( -pSize. maSize.width()/2. maSize.maSize. 489 QPointF leftTop. -maSize.width() ).width()/2. 446 QPointF top. 467 } 468 case MarkerAttributes::Marker4Pixels: 469 { 470 QSizeF pSize(8. topRight. 509 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .height()/4 ). right.rightBottom.width()/4. 493 leftBottom = QPointF( -maSize.width()/2.width()/2. 497 centerBottomRight = QPointF( maSize. 492 leftTop = QPointF( -maSize. maSize.height()/2. -pSize. 474 pSize. 0 ). 450 right = QPointF( maSize. -pSize. centerTopRight. bottomRight. left.maSize. 453 break.height()/2 ). rightTop. 460 QPen pen1Pixel.height()/4 ). 457 case MarkerAttributes::Marker1Pixel: 458 { 459 QSizeF pSize(4. 451 diamondPoints << top << left << bottom << right.width()/2. -maSize.width()/2.height(). 0 . bottomLeft. 465 painter->drawEllipse( centerRect ).width()/2. 452 painter->drawPolygon( diamondPoints ). 483 maSize. -maSize.maSize. 0 .width()/4.maSize. 8). maSize. 475 painter->setPen( pen4Pixel ). 491 centerTopLeft. 472 pen4Pixel.80 KD Chart 2 Class Documentation 443 case MarkerAttributes::MarkerDiamond: 444 { 445 QVector <QPointF > diamondPoints. 494 centerBottomLeft = QPointF( -maSize.setColor( painter->background().height()/2 ).setColor( painter->background(). 473 QRectF centerRect( -pSize.color() ). 500 centerTopRight = QPointF( maSize.width() ). 461 pen1Pixel.width()/4.width()/4.height()/4 ). 448 left = QPointF( 0 . 502 topLeft = QPointF( -maSize. 484 break.color() ).height()/4 ).height()/4 ). 464 painter->setPen( pen1Pixel ).

bottom ).height()/2 ). j< rowCount.5. 0 ). 526 "Type item does not match a defined Marker Type. pos ). 511 break. Definition at line 586 of file KDChartAbstractDiagram. -maSize. 535 { 536 for ( int j=0.5 KDChart::AbstractCartesianDiagram Class Reference 81 510 painter->drawPolygon( crossPoints ). 538 double value = model()->data( index ). 0 ).height()/2 ). Parameters: index The index of the datapoint in the model.3.5. 522 break." ). i. 523 } 524 default: 525 Q_ASSERT_X ( false.40 QPen AbstractDiagram::pen (const QModelIndex & index) const [inherited] Retrieve the pen to be used. 527 } 528 } 529 530 void AbstractDiagram::paintMarkers( QPainter* painter ) 6.width()/2.3.cpp. for painting the datapoint at the given index in the model. "paintMarkers()". bottom. top.width()/2. 541 } 542 } 543 } 544 545 6. 520 painter->drawLine( left. maSize.39 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected. 512 } 513 case MarkerAttributes::MarkerFastCross: 514 { 515 QPointF left. 521 painter->drawLine( top. 519 bottom= QPointF( 0. ++j ) { 537 const QModelIndex index = model()->index( j.cpp.6. index.toDouble(). 516 left = QPointF( -maSize. 518 top = QPointF( 0. 539 const QPointF pos = coordinatePlane()->translate( QPointF( j. 593 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . virtual. 517 right = QPointF( maSize. inherited] Definition at line 532 of file KDChartAbstractDiagram. rootIndex() ). Returns: The pen to use for painting. value ) ). right ). right. 540 paintMarker( painter.

KDChart::LineDiagram::setThreeDLineAttributes(). Definition at line 578 of file KDChartAbstractDiagram.cpp. if there are no dataset specific settings.3.82 KD Chart 2 Class Documentation 6.cpp. 320 { 6. Referenced by KDChart::PieDiagram::paint(). This will fall back automatically to the default settings.3.44 void KDChart::AbstractDiagram::propertiesChanged () [protected. Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().43 bool AbstractDiagram::percentMode () const [inherited] Definition at line 313 of file KDChartAbstractDiagram. 577 { 6. Parameters: dataset The dataset to retrieve the pen for.cpp. and KDChart::LineDiagram::setType().42 QPen AbstractDiagram::pen () const [inherited] Retrieve the pen to be used for painting datapoints globally. KDChart::LineDiagram::setLine- Attributes(). Returns: The pen to use for painting.5.3. if there are no specific settings. Referenced by KDChart::AbstractDiagram::setDataValueAttributes().3. This will fall back automatically to what was set at model level.41 QPen AbstractDiagram::pen (int dataset) const [inherited] Retrieve the pen to be used for the given dataset. inherited] Emitted upon change of a property of the Diagram. Returns: The pen to use for painting. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 585 { 6.5.5.5. Definition at line 572 of file KDChartAbstractDiagram. References d.

Adjust all internal structures.3.cpp.6.47 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [pure virtual. KDChart::Polar- Diagram. and KDChart::RingDiagram.cpp.cpp. 131 } 6.5 KDChart::AbstractCartesianDiagram Class Reference 83 6.5.5.49 void AbstractDiagram::setAllowOverlappingDataValueTexts (bool allow) [inherited] Set whether data value labels are allowed to overlap.46 QPointF AbstractCartesianDiagram::referenceDiagramOffset () const [virtual] Definition at line 128 of file KDChartAbstractCartesianDiagram. 6.45 AbstractCartesianDiagram ∗ AbstractCartesianDiagram::referenceDiagram () const [virtual] Definition at line 123 of file KDChartAbstractCartesianDiagram. References d. inherited] [reimplemented] Definition at line 646 of file KDChartAbstractDiagram. KDChart::LineDiagram. } 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. 129 { 130 return d->referenceDiagramOffset.3.5. dependending on the size of the widget.3. inherited] Called by the widget’s sizeEvent. Parameters: allow True means that overlapping labels are allowed. Parameters: area Implemented in KDChart::BarDiagram. ScrollHint hint = EnsureVisible) [virtual.3. 124 { 125 return d->referenceDiagram. 648 { return QModelIndex(). KDChart::PieDiagram.5. that are calculated. 126 } 6.5.48 void AbstractDiagram::scrollTo (const QModelIndex & index. References d.

Correct: AttributesModel *am = new AttributesModel( model.51 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual. This should thus only be used with AttributesModels that have been explicitely created by the user. 301 { 6. References d.50 void AbstractDiagram::setAntiAliasing (bool enabled) [inherited] Set whether anti-aliasing is to be used while rendering this diagram.5. See also: AttributesModel Definition at line 160 of file KDChartAbstractDiagram. Parameters: model The AttributesModel to use for this diagram.3.3. inherited] Associate an AttributesModel with this diagram. 166 return.").cpp. and KDChart::AbstractDiagram::modelsChanged(). References d. 290 { 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References d. Definition at line 296 of file KDChartAbstractDiagram. diagram2->setAttributesModel( am ).cpp. and are owned by her. 161 { 162 if( amodel->sourceModel() != model() ) { 163 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 164 "Trying to set an attributesmodel which works on a different " 165 "model than the diagram. Setting an AttributesModel that is internal to another diagram is an error. Parameters: enabled True means that AA is enabled. Wrong: diagram1->setAttributesModel( diagram2->attributesModel() ).84 KD Chart 2 Class Documentation Definition at line 285 of file KDChartAbstractDiagram.cpp.5. Note that the diagram does _not_ take ownership of the AttributesModel. 0 ). diagram1->setAttributesModel( am ).

Parameters: brush The brush to use.cpp. 608 { 6.52 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex & idx) [protected. Definition at line 602 of file KDChartAbstractDiagram. for painting the given dataset. 172 } 173 d->setAttributesModel(amodel).5 KDChart::AbstractCartesianDiagram Class Reference 85 167 } 168 if( qobject_cast<PrivateAttributesModel*>(amodel) ) { 169 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 170 "Trying to set an attributesmodel that is private to another diagram. inherited] Definition at line 195 of file KDChartAbstractDiagram. 617 { 6.3.6. 175 d->databoundariesDirty = true.55 void AbstractDiagram::setBrush (const QModelIndex & index.54 void AbstractDiagram::setBrush (int dataset. 174 scheduleDelayedItemsLayout(). Definition at line 594 of file KDChartAbstractDiagram. Parameters: index The datapoint’s index in the model.cpp. for painting the datapoint at the given index. for painting all datasets in the model. const QBrush & brush) [inherited] Set the brush to be used.3.3. 601 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.3. 176 emit modelsChanged(). References d.53 void AbstractDiagram::setBrush (const QBrush & brush) [inherited] Set the brush to be used. 6."). brush The brush to use.5. const QBrush & brush) [inherited] Set the brush to be used. 171 return.cpp. Parameters: dataset The dataset’s column in the model.5. Definition at line 609 of file KDChartAbstractDiagram.5. 177 } 6. pen The brush to use.5.

56 void KDChart::AbstractCartesianDiagram::setCoordinatePlane (AbstractCoordinatePlane ∗ plane) [virtual] Set the coordinate plane associated with the diagram. Reimplemented from KDChart::AbstractDiagram. 140 { 141 d->databoundariesDirty = true.3.cpp. Parameters: dimension Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 103 AbstractDiagram::setCoordinatePlane(plane). 111 else 112 Q_FOREACH( CartesianAxis* axis. References d.5. Definition at line 100 of file KDChartAbstractCartesianDiagram. 104 105 // show the axes. 142 } 6.3.cpp. KDChart::LineDiagram::setThree- DLineAttributes().5. References KDChart::AbstractDiagram::coordinatePlane(). d->axesList ) 110 axis->show(). inherited] Definition at line 139 of file KDChartAbstractDiagram. and KDChart::BarDiagram::setType(). d->axesList ) 113 axis->hide(). The chart takes ownership. 114 */ 115 } 6.86 KD Chart 2 Class Documentation 6.58 void AbstractDiagram::setDatasetDimension (int dimension) [inherited] Sets the dataset dimension of the diagram. Returns: The coordinate plane associated with the diagram. after all have been adjusted 106 // (because they might be dependend on each other) 107 /* 108 if( plane ) 109 Q_FOREACH( CartesianAxis* axis. 101 { 102 if( coordinatePlane() ) disconnect( coordinatePlane() ). Referenced by KDChart::BarDiagram::setThreeDBarAttributes().57 void AbstractDiagram::setDataBoundariesDirty () const [protected.5. and KDChart::AbstractDiagram::set- CoordinatePlane(). KDChart::LineDiagram::setType().3. See also: datasetDimension. This determines how coordinates in value space are mapped into pixel space.

Definition at line 279 of file KDChartAbstractDiagram. Parameters: a The attributes to set. and KDChart::AbstractDiagram::properties- Changed(). References d.cpp.6. Definition at line 251 of file KDChartAbstractDiagram. Definition at line 240 of file KDChartAbstractDiagram. Parameters: index The datapoint to set the attributes for.5. 259 { 6. KDChart::DataValueLabelAttributesRole. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given index.60 void AbstractDiagram::setDataValueAttributes (int dataset.61 void AbstractDiagram::setDataValueAttributes (const QModelIndex & index. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given dataset.3. References d. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5. 770 { 6. 284 { 6.cpp. Parameters: dataset The dataset to set the attributes for.cpp. a The attributes to set.cpp.5.59 void AbstractDiagram::setDataValueAttributes (const DataValueAttributes & a) [inherited] Set the DataValueAttributes for all datapoints in the model. a The attributes to set.5 KDChart::AbstractCartesianDiagram Class Reference 87 Definition at line 763 of file KDChartAbstractDiagram.3.3. References d. References d.

Definition at line 144 of file KDChartAbstractDiagram. pen The pen to use. for painting all datasets in the model. 152 emit modelsChanged().3. 149 d->setAttributesModel(amodel). Definition at line 556 of file KDChartAbstractDiagram.5. 145 { 146 QAbstractItemView::setModel( newModel ). for painting the given dataset.5. 153 } 6.62 void AbstractDiagram::setModel (QAbstractItemModel ∗ model) [virtual. 243 qVariantFromValue( a ).64 void AbstractDiagram::setPen (int dataset.3. 244 DataValueLabelAttributesRole ).5. Definition at line 563 of file KDChartAbstractDiagram. 246 } 247 248 6.3. Parameters: pen The pen to use. 150 scheduleDelayedItemsLayout(). 147 AttributesModel* amodel = new PrivateAttributesModel( newModel. Parameters: dataset The dataset’s row in the model. const QPen & pen) [inherited] Set the pen to be used. 245 emit propertiesChanged().cpp. 571 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References d. and KDChart::AbstractDiagram::modelsChanged(). KDChart::AttributesModel::initFrom(). 562 { 6.63 void AbstractDiagram::setPen (const QPen & pen) [inherited] Set the pen to be used. 148 amodel->initFrom( d->attributesModel ). 151 d->databoundariesDirty = true.88 KD Chart 2 Class Documentation 240 { 241 d->attributesModel->setData( 242 d->attributesModel->mapFromSource( index ).cpp.cpp. this ). inherited] Associate a model with the diagram.

555 { 6. where the diagram starts referencing data for display.cpp.66 void AbstractDiagram::setPercentMode (bool percent) [inherited] Definition at line 307 of file KDChartAbstractDiagram. 312 { 6. Definition at line 548 of file KDChartAbstractDiagram. 666 { return QRegion().65 void AbstractDiagram::setPen (const QModelIndex & index. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .69 void AbstractDiagram::setSelection (const QRect & rect. 118 { 119 d->referenceDiagram = diagram. References d.5.67 void AbstractCartesianDiagram::setReferenceDiagram (AbstractCartesianDiagram ∗ diagram.5.3.cpp. QItemSelection- Model::SelectionFlags command) [virtual.3. inherited] [reimplemented] Definition at line 664 of file KDChartAbstractDiagram. Referenced by KDChart::LineDiagram::setType().cpp. pen The pen to use. and KDChart::BarDiagram::setType(). const QPointF & offset = QPointF()) [virtual] Definition at line 117 of file KDChartAbstractCartesianDiagram. References d. 121 } 6.cpp. [reimplemented] Definition at line 188 of file KDChartAbstractDiagram.68 void AbstractDiagram::setRootIndex (const QModelIndex & idx) [virtual.3. for painting the datapoint at the given index.3.5. 120 d->referenceDiagramOffset = offset.cpp. const QPen & pen) [inherited] Set the pen to be used. References d. 6.5.5.5 KDChart::AbstractCartesianDiagram Class Reference 89 6.3.6. inherited] Set the root index in the model. Parameters: index The datapoint’s index in the model.

pure virtual] Implemented in KDChart::BarDiagram. Referenced by KDChart::AbstractDiagram::doItemsLayout(). 78 if( idx != -1 ) 79 d->axesList.5. References d.3. The diagram no longer owns the axis.takeAt( idx ).72 virtual double KDChart::AbstractCartesianDiagram::threeDItemDepth (const QModelIndex & index) const [protected.5. KDChart::AbstractAxis::deleteObserver().5.74 void KDChart::AbstractDiagram::useDefaultColors () [inherited] Set the palette to be used. pure virtual] Implemented in KDChart::BarDiagram. 6.70 void AbstractCartesianDiagram::takeAxis (CartesianAxis ∗ axis) [virtual] Removes the axis from the diagram. for painting datasets to the default palette. See also: addAxis Definition at line 75 of file KDChartAbstractCartesianDiagram. and KDChart::LineDiagram. 80 axis->deleteObserver( this ). 6.cpp. References d. and KDChart::AbstractLayout- Item::setParentWidget(). 83 } 6. so it is the caller’s responsibility to delete the axis.3.5. 675 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5. 76 { 77 const int idx = d->axesList. Referenced by KDChart::CartesianAxis::∼CartesianAxis().cpp.3. References d.indexOf( axis ).3.73 void AbstractDiagram::update () const [inherited] Definition at line 777 of file KDChartAbstractDiagram. without deleting it. See also: KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method Definition at line 671 of file KDChartAbstractDiagram. 6. layoutPlanes().3.cpp. 81 axis->setParentWidget( 0 ). and KDChart::LineDiagram.71 virtual double KDChart::AbstractCartesianDiagram::threeDItemDepth (int column) const [protected. 82 layoutPlanes().90 KD Chart 2 Class Documentation 6.

76 void KDChart::AbstractDiagram::useSubduedColors () [inherited] Set the palette to be used. See also: KDChart::Palette.3.3. for painting datasets to the subdued palette.78 int AbstractDiagram::verticalOffset () const [virtual.cpp. for painting datasets to the rainbow palette.5 KDChart::AbstractCartesianDiagram Class Reference 91 6.5. Parameters: row The row to query.75 void KDChart::AbstractDiagram::useRainbowColors () [inherited] Set the palette to be used. retrieving the data value (DisplayRole) for a given row and column. 685 { 6. Definition at line 771 of file KDChartAbstractDiagram.cpp. References d.6. References d. column The column to query. References KDChart::AbstractDiagram::attributesModelRootIndex().cpp.5.3. Definition at line 681 of file KDChartAbstractDiagram. Definition at line 676 of file KDChartAbstractDiagram. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] [reimplemented] Definition at line 658 of file KDChartAbstractDiagram. 680 { 6. and d. 660 { return true.3.5. int column) const [protected.5.cpp. See also: KDChart::Palette. Returns: The value of the display role at the given row and column as a double. 776 { 6.77 double AbstractDiagram::valueForCell (int row. inherited] Helper method. Referenced by KDChart::LineDiagram::paint().

5.3.79 QRect AbstractDiagram::visualRect (const QModelIndex & index) const [virtual.cpp.80 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection & selection) const [virtual. 645 {} 6.4.5. inherited] Definition at line 506 of file KDChartAbstractDiagram.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .5.h. The documentation for this class was generated from the following files: • KDChartAbstractCartesianDiagram.5. inherited] [reimplemented] Definition at line 641 of file KDChartAbstractDiagram.4 Member Data Documentation 6.3. inherited] [reimplemented] Definition at line 667 of file KDChartAbstractDiagram.h • KDChartAbstractCartesianDiagram. 6.cpp.92 KD Chart 2 Class Documentation 6.1 Q_SIGNALS KDChart::AbstractDiagram::__pad0__ [protected.

• virtual bool isEmpty () const pure virtual in QLayoutItem • virtual void layoutDiagrams ()=0 Distribute the available space among the diagrams and axes. • void layoutPlanes () Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().6 KDChart::AbstractCoordinatePlane Class Reference 93 6.6 KDChart::AbstractCoordinatePlane Class Reference #include <KDChartAbstractCoordinatePlane. Logarithmic } Public Member Functions • virtual void addDiagram (AbstractDiagram ∗diagram) Adds a diagram to this coordinate plane. • virtual QSize maximumSize () const pure virtual in QLayoutItem • virtual QSize minimumSize () const pure virtual in QLayoutItem Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h> Inheritance diagram for KDChart::AbstractCoordinatePlane:Collaboration diagram for KDChart::AbstractCoordinatePlane: Public Types • enum AxesCalcMode { Linear.6. • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • AbstractDiagram ∗ diagram () • ConstAbstractDiagramList diagrams () const • AbstractDiagramList diagrams () • virtual Qt::Orientations expandingDirections () const pure virtual in QLayoutItem • FrameAttributes frameAttributes () const • virtual QRect geometry () const pure virtual in QLayoutItem • GridAttributes globalGridAttributes () const • DataDimensionsList gridDimensionsList () Returns the dimensions used for drawing the grid lines.

const QRect &rectangle) • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. • AbstractCoordinatePlane ∗ referenceCoordinatePlane () const There are two ways. • virtual void paintFrame (QPainter &painter. • void setParent (Chart ∗parent) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • const Chart ∗ parent () const • Chart ∗ parent () • void propertiesChanged () Emitted upon change of a property of the Coordinate Plane or any of its components. • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) • virtual void setGeometry (const QRect &r) pure virtual in QLayoutItem • void setGlobalGridAttributes (const GridAttributes &) Set the grid attributes to be used by this coordinate plane. in which planes can be caused to interact. • void needRelayout () Emitted when plane needs to trigger the Chart’s layouting.94 KD Chart 2 Class Documentation • virtual QSize minimumSizeHint () const [reimplemented] • void needLayoutPlanes () Emitted when plane needs to trigger the Chart’s layouting of the coord. in where they are put layouting wise: The first is the reference plane. or appends the diagram. • virtual void paint (QPainter ∗)=0 • void paintAll (QPainter &painter) Call paintAll. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter. • void needUpdate () Emitted when plane needs to update its drawings. it there is none yet. • void removeFromParentLayout () • virtual void replaceDiagram (AbstractDiagram ∗diagram. then calls paint(). • virtual void paintBackground (QPainter &painter. AbstractDiagram ∗oldDiagram=0) Replaces the old diagram. • void relayout () Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout(). const QRect &rect) Draws the background and frame.

• virtual QPointF zoomCenter () const • virtual double zoomFactorX () const • virtual double zoomFactorY () const • virtual ∼AbstractCoordinatePlane () Public Attributes • Q_SIGNALS __pad0__: void destroyedCoordinatePlane( AbstractCoordinatePlane∗ ) • public Q_SLOTS: void update() Protected Member Functions • AbstractCoordinatePlane (Chart ∗parent=0) • virtual QRect areaGeometry () const • virtual DataDimensionsList getDataDimensionsList () const=0 • QRect innerRect () const • virtual void positionHasChanged () Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6 KDChart::AbstractCoordinatePlane Class Reference 95 Called internally by KDChart::Chart. without deleting it.6. • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. that is applied to all coordinate transformations. • virtual QSize sizeHint () const pure virtual in QLayoutItem • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout. whenever the size of the item’s contents has changed. • virtual void setZoomFactorY (double) Sets the zoom factor in vertical direction. to trigger that widget’s update. • virtual QSizePolicy sizePolicy () const [reimplemented] • virtual void takeDiagram (AbstractDiagram ∗diagram) Removes the diagram from the plane. • virtual const QPointF translate (const QPointF &diagramPoint) const=0 Translate the given point in value space coordinates to a position in pixel space. that is applied to all coordinate transformations. • virtual void setZoomCenter (QPointF) Set the point (in value coordinates) to be used as the center point in zoom operations. • void setReferenceCoordinatePlane (AbstractCoordinatePlane ∗plane) Set another coordinate plane to be used as the reference plane for this one. • virtual void setZoomFactorX (double) Sets the zoom factor in horizontal direction.

55 { Linear.3 Member Function Documentation 6.6.1 void AbstractCoordinatePlane::addDiagram (AbstractDiagram ∗ diagram) [virtual] Adds a diagram to this coordinate plane. 52 : AbstractArea ( new Private() ) 53 { 54 d->parent = parent.6. References d. Logarithmic }.96 KD Chart 2 Class Documentation Protected Attributes • QWidget ∗ mParent • QLayout ∗ mParentLayout 6. Parameters: diagram The diagram to add. takeDiagram Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.cpp. 61 } 6.6.2. 59 { 60 emit destroyedCoordinatePlane( this ). protected] Definition at line 51 of file KDChartAbstractCoordinatePlane.1 Member Enumeration Documentation 6.2 AbstractCoordinatePlane::∼AbstractCoordinatePlane () [virtual] Definition at line 58 of file KDChartAbstractCoordinatePlane. 55 d->init().3. See also: replaceDiagram.6.6. 6.6.1 AbstractCoordinatePlane::AbstractCoordinatePlane (Chart ∗ parent = 0) [explicit.2 Constructor & Destructor Documentation 6.1.6. 56 } 6.h.1 enum KDChart::AbstractCoordinatePlane::AxesCalcMode Enumeration values: Linear Logarithmic Definition at line 55 of file KDChartAbstractCoordinatePlane.cpp.

and KDChart::CartesianAxis::paintCtx(). layoutDiagrams(). Definition at line 68 of file KDChartAbstractCoordinatePlane. 108 } 6. KDChart::PolarCoordinate- Plane::layoutDiagrams().6. inherited] Implements KDChart::AbstractAreaBase. and KDChart::PolarCoordinatePlane. Definition at line 105 of file KDChartAbstractArea.6. 72 73 d->diagrams. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry.append( diagram ).3 QRect AbstractArea::areaGeometry () const [protected. 75 diagram->setCoordinatePlane( this ). // there might be new axes.6. 74 diagram->setParent( d->parent ).6 KDChart::AbstractCoordinatePlane Class Reference 97 Reimplemented in KDChart::CartesianCoordinatePlane.cpp. References d.4 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6. KDChart::AbstractArea::paintAll(). 76 layoutDiagrams(). Referenced by KDChart::PolarCoordinatePlane::addDiagram(). and KDChart::AbstractDiagram::setCoordinatePlane(). 106 { 107 return geometry(). 98 { 99 return d->backgroundAttributes. 100 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::CartesianCoordinate- Plane::addDiagram(). 77 layoutPlanes().cpp.6.3. 79 } 6.3. References d. etc 78 update().3.cpp.2 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase. layoutPlanes(). virtual. and replaceDiagram().cpp. 69 { 70 // diagrams are invisible and paint through their paint() method 71 diagram->hide(). Referenced by KDChart::CartesianCoordinatePlane::drawingArea(). KDChart::CartesianAxis::paint(). 76 { 77 Q_UNUSED( position ).

120 } 121 } 6.end(). std::back_inserter( list ) ).cpp. Definition at line 113 of file KDChartAbstractCoordinatePlane. 118 } else { 119 return d->diagrams. d->diagrams.isEmpty() ) 116 { 117 return 0.6 ConstAbstractDiagramList AbstractCoordinatePlane::diagrams () const Returns: The list of diagrams associated with this coordinate plane. 136 #endif 137 return list. Definition at line 128 of file KDChartAbstractCoordinatePlane. 129 { 130 ConstAbstractDiagramList list. and d. Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(). Definition at line 123 of file KDChartAbstractCoordinatePlane.5 AbstractDiagram ∗ AbstractCoordinatePlane::diagram () Returns: The first diagram associated with this coordinate plane. and d. Referenced by KDChart::Widget::diagram().3. d->diagrams ) 135 list.3. 124 { 125 return d->diagrams.7 AbstractDiagramList AbstractCoordinatePlane::diagrams () Returns: The list of diagrams associated with this coordinate plane. References KDChart::AbstractDiagramList.begin(). 138 } 6.push_back( a ). KDChart::PolarCoordinatePlane::layout- Diagrams().cpp.cpp.first(). References KDChart::ConstAbstractDiagramList. KDChart::PolarCoordinate- Plane::paint().6. KDChart::CartesianCoordinatePlane::layoutDiagrams().6. and KDChart::CartesianCoordinatePlane::paint().3.98 KD Chart 2 Class Documentation 6. 126 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 131 #ifndef QT_NO_STL 132 qCopy( d->diagrams. KDChart::CartesianCoordinatePlane::getDataDimensionsList(). References d.6. 114 { 115 if ( d->diagrams. 133 #else 134 Q_FOREACH( AbstractDiagram * a.

References d. 201 { 202 return Qt::Vertical | Qt::Horizontal. 90 } 6. Referenced by KDChart::Legend::clone().6.3.6.3.8 Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections () const [virtual] pure virtual in QLayoutItem Definition at line 200 of file KDChartAbstractCoordinatePlane.cpp.3. 88 { 89 return d->frameAttributes. and KDChart::PolarCoordinatePlane.3.3.10 QRect KDChart::AbstractCoordinatePlane::geometry () const [virtual] pure virtual in QLayoutItem Definition at line 237 of file KDChartAbstractCoordinatePlane.cpp. See also: setGlobalGridAttributes CartesianCoordinatePlane::gridAttributes Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase.6.11 virtual DataDimensionsList KDChart::AbstractCoordinatePlane::getDataDimensions- List () const [protected.cpp. 240 } 6. 6.6.6.6 KDChart::AbstractCoordinatePlane Class Reference 99 6.6. pure virtual] Implemented in KDChart::CartesianCoordinatePlane. 203 } 6.12 GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes () const Returns: The grid attributes used by this coordinate plane. 238 { 239 return d->geometry. References d. Referenced by KDChart::PolarCoordinatePlane::paint().

and KDChart::CartesianAxis::paintCtx(). Note: Returned list will contain different numbers of DataDimension. References KDChart::AbstractAreaBase::areaGeometry(). thus the grid start/end might have changed if the data was changed. since grid calculation is based upon the data range. 163 { 164 return d->grid->updateData( this ). depending on the kind of coordinate plane used. Referenced by KDChart::TextArea::paintAll(). inherited] Definition at line 175 of file KDChartAbstractAreaBase.cpp.3.6. 176 { 177 Q_ASSERT_X ( d != 0.cpp.6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .100 KD Chart 2 Class Documentation Definition at line 157 of file KDChartAbstractCoordinatePlane.make sure to call again this function after every data modification that has changed the data range. so . and KDChart::AbstractArea::paintAll().). and KDChart::DataDimensionsList.cpp. 165 } 6.14 QRect AbstractAreaBase::innerRect () const [protected. For CartesianCoordinatePlane two DataDimension are returned: the first representing grid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (or Ordinate axes. Returned data is the result of (cached) grid calculations.3. See also: DataDimension Definition at line 162 of file KDChartAbstractCoordinatePlane. References d. and d. resp. "AbstractAreaBase::innerRect()". KDChart::Cartesian- Axis::maximumSize().if you need that information for your own tasks .13 KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensions- List () Returns the dimensions used for drawing the grid lines. 158 { 159 return d->gridAttributes. Referenced by KDChart::PolarCoordinatePlane::gridAttributes(). KDChart::AbstractAreaWidget::paintAll(). Returns: The dimensions used for drawing the grid lines. References d. 160 } 6. Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams(). and KDChart::CartesianCoordinate- Plane::gridAttributes().

257 emit needLayoutPlanes().size() ) 185 . 186 } 6.6.16 virtual void KDChart::AbstractCoordinatePlane::layoutDiagrams () [pure virtual] Distribute the available space among the diagrams and axes.18 QSize KDChart::AbstractCoordinatePlane::maximumSize () const [virtual] pure virtual in QLayoutItem Definition at line 205 of file KDChartAbstractCoordinatePlane.3.10) stepWidth 1 198 } 6. replaceDiagram(). References d. areaGeometry().6. -padding.padding().3. 255 { 256 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called"). References needLayoutPlanes(). and replaceDiagram(). 194 { 195 return false.10.6 KDChart::AbstractCoordinatePlane Class Reference 101 178 "Private class was not initialized!" ). KDChart::AbstractCartesian- Diagram::layoutPlanes().6. 1. 6. Implemented in KDChart::CartesianCoordinatePlane. and takeDiagram().3. // never empty! 196 // coordinate planes with no associated diagrams 197 // are showing a default grid of ()1..isVisible() 182 ? qMax( d->frameAttributes. Referenced by sizeHint(). KDChart::CartesianAxis::layoutPlanes(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . padding. 0 ) : 0.0).adjusted( padding.cpp.3. 179 180 const int padding 181 = d->frameAttributes. 183 return 184 QRect( QPoint(0.. and KDChart::PolarCoordinatePlane. Definition at line 254 of file KDChartAbstractCoordinatePlane.6.15 bool KDChart::AbstractCoordinatePlane::isEmpty () const [virtual] pure virtual in QLayoutItem Definition at line 193 of file KDChartAbstractCoordinatePlane. 258 } 6. Referenced by addDiagram().cpp.6.cpp. Referenced by addDiagram(). -padding ).17 void KDChart::AbstractCoordinatePlane::layoutPlanes () Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 213 } 6.6.23 void KDChart::AbstractCoordinatePlane::needUpdate () Emitted when plane needs to update its drawings. 1000).3. 6.3. Referenced by layoutPlanes().6. KDChart::MarkerLayoutItem. Referenced by relayout().6.cpp.20 QSize KDChart::AbstractCoordinatePlane::minimumSizeHint () const [virtual] [reimplemented] Definition at line 140 of file KDChartAbstractCoordinatePlane.3.22 void KDChart::AbstractCoordinatePlane::needRelayout () Emitted when plane needs to trigger the Chart’s layouting. 6. KDChart::HorizontalLineLayoutItem.102 KD Chart 2 Class Documentation 206 { 207 if( d->parent ) 208 return d->parent->size(). 143 } 6. so returning a default size here 211 // will not affect its real drawing size. planes. KDChart::TextLayout- Item. 141 { 142 return QSize( 200.3.6.24 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual.3.plane *will* 210 // have a parent widget.6.21 void KDChart::AbstractCoordinatePlane::needLayoutPlanes () Emitted when plane needs to trigger the Chart’s layouting of the coord. inherited] Implemented in KDChart::CartesianAxis. 6.6. 200 ). 209 // Note: At external layut calculation time the coord. 60).3. KDChart::VerticalLineLayout- Item. KDChart::CartesianCoordinatePlane. 216 { 217 return QSize(60.19 QSize KDChart::AbstractCoordinatePlane::minimumSize () const [virtual] pure virtual in QLayoutItem Definition at line 215 of file KDChartAbstractCoordinatePlane. and KDChart::PolarCoordinatePlane. // this default can be overwritten by derived classes 218 } 6. 212 return QSize(1000.cpp.

87 paintFrame( painter. KDChart::AbstractArea::paintAll(). 92 QRect inner( innerRect() ).deviceMatrix(). geometry() ). if you want the background and the frame to be drawn before the normal paint() is invoked automatically. 88 89 // temporarily adjust the widget size.left() + inner. and d. 84 { 85 // Paint the background and frame 86 paintBackground( painter. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 96 const bool needAdjustGeometry = oldGeometry != inner. Referenced by KDChart::TextArea::paintAll(). 6.25 void AbstractArea::paintAll (QPainter & painter) [inherited] Call paintAll. 106 "Private class was not initialized!" ). and KDChart::AbstractAreaBase::paintFrame(). 104 { 105 Q_ASSERT_X ( d != 0. 95 oldGeometry. References KDChart::AbstractArea::areaGeometry().topLeft() ) ).cpp.top() ). "AbstractAreaBase::paintBackground()". 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ). and KDChart::Abstract- LayoutItem::paintCtx().6. KDChart::AbstractLayoutItem::paint(). and KDChart::AbstractArea::paintIntoRect(). 103 } 6.style() ) { 114 KDChart::PainterSaver painterSaver( &painter ). 93 inner.6. 115 painter. KDChart::AbstractAreaWidget::paintAll().3. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes. to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ). const QRect & rectangle) [virtual.moveTo( 94 oldGeometry. 97 if( needAdjustGeometry ) 98 setGeometry( inner ). 99 paint( &painter ). KDChart::AbstractAreaBase::innerRect(). inherited] Definition at line 103 of file KDChartAbstractAreaBase. 117 painter. 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes.cpp. Definition at line 83 of file KDChartAbstractArea.left().6. References attributes.brush().top() + inner. and KDChart::AbstractArea::paintAll().map( rect. 116 const QPointF newTopLeft( painter.6 KDChart::AbstractCoordinatePlane Class Reference 103 Referenced by KDChart::Legend::paint().26 void AbstractAreaBase::paintBackground (QPainter & painter.3.setBrushOrigin( newTopLeft ). KDChart::AbstractAreaBase::paintBackground().". geometry() ).setPen( Qt::NoPen ). 102 //qDebug() << "AbstractAreaWidget::paintAll() done.isVisible() ) return. Referenced by KDChart::Chart::paint().

isNull() && 123 attributes.x() . 139 m.y() . inherited] Default impl: Paint the complete item using its layouted position and size.pixmap().pixmap() ). zH ).drawRect( rect ).pixmap(). 134 switch( attributes.width().pm.cpp. 151 painter.width() / (double)attributes.width() / 2 ).drawPixmap( ol.attributes. and d. pm ). const QRect & rectangle) [virtual. Reimplemented in KDChart::CartesianAxis.drawPixmap( ol. 149 ol. 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes. 65 { 66 if( context ) 67 paint( context->painter() ).pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.6.scale( z.center().y() .height()/ 2 ).104 KD Chart 2 Class Documentation 118 painter. 130 } else { 131 QMatrix m.setX( rect. 150 ol. and KDChart::PaintContext::painter().transformed( m ). Definition at line 64 of file KDChartLayoutItems.setY( rect. 129 painter.pixmap().width() / 2 ).pixmap().pm.pixmap().setY( rect.27 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual.brush() ).6. inherited] Definition at line 158 of file KDChartAbstractAreaBase. zH ). References KDChart::AbstractLayoutItem::paint(). z ).height()/ 2 ). 138 z = qMin( zW.setBrush( attributes.center(). 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.center().height().pixmap().scale( zW. previously checked 147 } 148 QPixmap pm = attributes. // Cannot happen. References attributes. 140 } 141 break. 133 double zH = (double)rect.center(). 132 double zW = (double)rect. 144 break. attributes. 128 ol. 145 default: 146 . 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.topLeft().x() .3. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 68 } 6.cpp.pixmapMode() ) 126 { 127 ol.28 void AbstractAreaBase::paintFrame (QPainter & painter.3. 152 } 153 } 154 #undef attributes 155 } 6. 119 painter.attributes.height() / (double)attributes.setX( rect.

6. but you would overwrite Abstract- LayoutItem::paint() instead. and KDChart::AbstractArea::paintAll(). 166 167 const QPen oldPen( painter. 170 painter.setPen( attributes.left(). 185 } 6. 77 paintAll( painter ). References d.top() ).6 KDChart::AbstractCoordinatePlane Class Reference 105 Referenced by KDChart::TextArea::paintAll(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. "AbstractAreaBase::paintFrame()". References KDChart::AbstractArea::paintAll().cpp. 168 painter.translate( rect. 74 if( oldGeometry != rect ) 75 setGeometry( rect ). 81 } 6. 162 163 #define attributes d->frameAttributes 164 165 if( !attributes. 183 { 184 return d->parent.top() ). rect.translate( -rect. -rect.31 KDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () Definition at line 187 of file KDChartAbstractCoordinatePlane.6. 72 { 73 const QRect oldGeometry( geometry() ).setPen( oldPen ). Referenced by KDChart::CartesianAxis::maximumSize(). 78 painter.3. then calls paint(). KDChart::AbstractAreaWidget::paintAll(). 159 { 160 Q_ASSERT_X ( d != 0.6.left().drawRect( rect ). const QRect & rect) [virtual. Definition at line 71 of file KDChartAbstractArea.30 const KDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () const Definition at line 182 of file KDChartAbstractCoordinatePlane.29 void AbstractArea::paintIntoRect (QPainter & painter. In most cases there is no need to overwrite this method in a derived class. inherited] Draws the background and frame.pen() ). and KDChart::CartesianAxis::paintCtx(). 171 #undef attributes 172 } 6. 79 if( oldGeometry != rect ) 80 setGeometry( oldGeometry ). 169 painter.pen() ). References d. 76 painter. 161 "Private class was not initialized!" ).isVisible() ) return.3.6.3.cpp.

cpp. If such a reference plane is set. on a plane. Referenced by KDChart::CartesianCoordinatePlane::addDiagram(). for example Plane1 and Plane2 share an axis at position Left. it is used to decided. Definition at line 110 of file KDChartAbstractArea.3.106 KD Chart 2 Class Documentation 188 { 189 return d->parent. inherited] Reimplemented from KDChart::AbstractAreaBase. In that case they will be layed out in relation to each other as suggested by the position of the axis. Definition at line 172 of file KDChartAbstractCoordinatePlane. KDChart::CartesianCoordinatePlane::setIsometricScaling(). whether the planes should be painted on top of each other or layed out vertically or horizontally next to each other. KDChart::CartesianCoordinatePlane::setZoomFactorX(). and KDChart::CartesianCoordinate- Plane::setZoomFactorY().cpp.3. 173 { 174 return d->referenceCoordinatePlane. KDChart::CartesianCoordinatePlane::setZoom- Center().6. that will result in the layout: Axis Plane1 Plane 2.32 void AbstractArea::positionHasChanged () [protected. The reference plane concept allows two planes to share the same space even if neither has any axis. KDChart::Cartesian- CoordinatePlane::setAxesCalcModes(). and in case there are shared axis. KDChart::CartesianCoordinatePlane::setAxesCalcModeX(). KDChart::CartesianCoordinatePlane::setVerticalRange(). it will use the same cell in the layout as that one. If.33 void KDChart::AbstractCoordinatePlane::propertiesChanged () Emitted upon change of a property of the Coordinate Plane or any of its components.6. If Plane1 also happens to be Plane2’s reference plane. KDChart::CartesianCoordinatePlane::setGridAttributes(). In addition to this. 6. 111 { 112 emit positionChanged( this ). planes can share an axis. virtual.6. both planes are drawn over each other. in which planes can be caused to interact. in where they are put layouting wise: The first is the reference plane. KDChart::PolarCoordinatePlane::set- GridAttributes(). KDChart::CartesianCoordinatePlane::setAxesCalcModeY(). vertically. References d.34 AbstractCoordinatePlane ∗ KDChart::AbstractCoordinatePlane::referenceCoordinate- Plane () const There are two ways. 113 } 6.3. 190 } 6. Returns: The reference coordinate plane associated with this one. 175 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::Cartesian- CoordinatePlane::setHorizontalRange().

and takeDiagram().cpp. Note: If you want to re-use the old diagram. 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ).6.6 KDChart::AbstractCoordinatePlane Class Reference 107 6.6.6. there was no diagram yet.3. it there is none yet. takeDiagram Definition at line 82 of file KDChartAbstractCoordinatePlane.3. layoutDiagrams(). or appends the diagram. instead of using replace- Diagram.cpp. 249 { 250 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called"). or the method will do nothing. References addDiagram().35 void KDChart::AbstractCoordinatePlane::relayout () Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout(). the very first diagram will be replaced. 252 } 6. Referenced by KDChart::Chart::takeCoordinatePlane().37 void AbstractCoordinatePlane::replaceDiagram (AbstractDiagram ∗ diagram. This diagram will be deleted automat- ically. In case. AbstractDiagram ∗ oldDiagram = 0) [virtual] Replaces the old diagram. call takeDiagram and addDiagram. 73 } 74 } 6. layoutPlanes(). References needRelayout().h. If the parameter is omitted.36 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems. Definition at line 248 of file KDChartAbstractCoordinatePlane.3. oldDiagram The diagram to be removed by the new diagram. See also: addDiagram. This parameter must not be zero. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 83 { 84 if( diagram && oldDiagram_ != diagram ){ 85 AbstractDiagram* oldDiagram = oldDiagram_.6. 251 emit needRelayout(). d. 71 else 72 mParentLayout->removeItem( this ). Parameters: diagram The diagram to be used instead of the old diagram. the new diagram will just be added.

References d. 96 } 97 } 6. 85 } 6.3.3.cpp.cpp.3. 234 } 235 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .count() ){ 87 if( ! oldDiagram ) 88 oldDiagram = d->diagrams. 92 addDiagram( diagram ). 89 takeDiagram( oldDiagram ). References d. 83 { 84 d->frameAttributes = a. Referenced by KDChart::Legend::clone(). unless you know exactly what you are doing. 228 { 229 // qDebug() << "KDChart::AbstractCoordinatePlane::setGeometry(" << r << ") called". Geometry management is done by KD Chart’s internal layouting measures. 232 // Note: We do *not* call update() here 233 // because it would invoke KDChart::update() recursively.6. 90 } 91 delete oldDiagram. 94 layoutPlanes(). // there might be new axes. 93 { 94 d->backgroundAttributes = a.39 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase.108 KD Chart 2 Class Documentation 86 if( d->diagrams. etc 95 update().first().38 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase. Definition at line 227 of file KDChartAbstractCoordinatePlane.6.6. 93 layoutDiagrams().40 void KDChart::AbstractCoordinatePlane::setGeometry (const QRect & r) [virtual] pure virtual in QLayoutItem Note: Do not call this function directly.cpp. 95 } 6. 230 if( d->geometry != r ){ 231 d->geometry = r. References d.

6. See also: globalGridAttributes CartesianCoordinatePlane::setGridAttributes Definition at line 151 of file KDChartAbstractCoordinatePlane. 63 { 64 mParentLayout = lay.42 void KDChart::AbstractCoordinatePlane::setParent (Chart ∗ parent) Called internally by KDChart::Chart. and KDChart::Chart::takeCoordinatePlane(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. Definition at line 177 of file KDChartAbstractCoordinatePlane. 178 { 179 d->parent = parent.44 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual.3. Thus. 152 { 153 d->gridAttributes = a.3. ga. To disable grid painting.41 void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes (const GridAttributes &) Set the grid attributes to be used by this coordinate plane. 155 } 6. inherited] Inform the item about its widget: This enables the item. plane->setGlobalGridAttributes( ga ).43 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems. to trigger that widget’s update.h. References d. Referenced by KDChart::Chart::addCoordinatePlane().6. References d. whenever the size of the item’s contents has changed. 65 } 6. that has a non-fixed size.6.3.6.6. you need to call setParentWidget on every item.cpp. 180 } 6.cpp. for example. 154 update(). your code should like this: GridAttributes ga = plane->globalGridAttributes().setGlobalGridVisible( false ).6 KDChart::AbstractCoordinatePlane Class Reference 109 6.

Reimplemented in KDChart::CartesianCoordinatePlane.cpp. Definition at line 172 of file KDChartAbstractCoordinatePlane. 59 } 6.6.45 void KDChart::AbstractCoordinatePlane::setReferenceCoordinatePlane (AbstractCoordinatePlane ∗ plane) Set another coordinate plane to be used as the reference plane for this one.3. Reimplemented in KDChart::CartesianCoordinatePlane. Definition at line 153 of file KDChartAbstractCoordinatePlane.110 KD Chart 2 Class Documentation Definition at line 56 of file KDChartLayoutItems.3.47 virtual void KDChart::AbstractCoordinatePlane::setZoomFactorX (double) [virtual] Sets the zoom factor in horizontal direction. Referenced by KDChart::Legend::buildLegend(). 170 } 6. and KDChart::PolarCoordinatePlane. and KDChart::AbstractCartesianDiagram::takeAxis(). References d. that is applied to all coordinate transformations. and KDChart::PolarCoordinatePlane.6.h. 168 { 169 d->referenceCoordinatePlane = plane.3. Parameters: plane The coordinate plane to be used the reference plane for this one.cpp. 155 {} Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h. 172 : * \code 6. See also: referenceCoordinatePlane Definition at line 167 of file KDChartAbstractCoordinatePlane. References KDChart::AbstractLayoutItem::mParent. 57 { 58 mParent = widget. Parameters: center The point to use.46 virtual void KDChart::AbstractCoordinatePlane::setZoomCenter (QPointF) [virtual] Set the point (in value coordinates) to be used as the center point in zoom operations.6.

147 { 148 return QSizePolicy( QSizePolicy::MinimumExpanding. 149 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . } 6.49 QSize KDChart::AbstractCoordinatePlane::sizeHint () const [virtual] pure virtual in QLayoutItem Definition at line 220 of file KDChartAbstractCoordinatePlane.cpp. Referenced by KDChart::TextLayoutItem::sizeHint(). 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate().6 KDChart::AbstractCoordinatePlane Class Reference 111 6.3.3. 225 } 6.48 virtual void KDChart::AbstractCoordinatePlane::setZoomFactorY (double) [virtual] Sets the zoom factor in vertical direction.6. 82 } 83 } 6.0). Reimplemented in KDChart::CartesianCoordinatePlane. Definition at line 73 of file KDChartLayoutItems. that is applied to all coordinate transformations.6.6. and KDChart::PolarCoordinatePlane.3. Definition at line 159 of file KDChartAbstractCoordinatePlane. 221 { 222 // we return our maxiumu (which is the full size of the Chart) 223 // even if we know the plane will be smaller 224 return maximumSize().6.0. 161 { return QPointF(0. 80 else 81 QApplication::postEvent( mParent. inherited] Report changed size hint: ask the parent widget to recalculate the layout. 76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called").3.6.51 QSizePolicy KDChart::AbstractCoordinatePlane::sizePolicy () const [virtual] [reimplemented] Definition at line 146 of file KDChartAbstractCoordinatePlane. 74 { 75 // This is exactly like what QWidget::updateGeometry does. QSizePolicy::MinimumExpanding ).50 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual. References maximumSize(). new QEvent( QEvent::LayoutRequest ) ). 0.cpp.cpp.h.

112 KD Chart 2 Class Documentation

6.6.3.52 void AbstractCoordinatePlane::takeDiagram (AbstractDiagram ∗ diagram)
[virtual]

Removes the diagram from the plane, without deleting it.
The plane no longer owns the diagram, so it is the caller’s responsibility to delete the diagram.

See also:
addDiagram, replaceDiagram

Definition at line 100 of file KDChartAbstractCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractDiagram::setCoordinatePlane().
Referenced by replaceDiagram().

101 {
102 const int idx = d->diagrams.indexOf( diagram );
103 if( idx != -1 ){
104 d->diagrams.removeAt( idx );
105 diagram->setParent( 0 );
106 diagram->setCoordinatePlane( 0 );
107 layoutDiagrams();
108 update();
109 }
110 }

6.6.3.53 virtual const QPointF KDChart::AbstractCoordinatePlane::translate (const QPointF &
diagramPoint) const [pure virtual]

Translate the given point in value space coordinates to a position in pixel space.

Parameters:
diagramPoint The point in value coordinates.

Returns:
The translated point.

Implemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.
Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::PolarDiagram::paint(),
KDChart::LineDiagram::paint(), and KDChart::BarDiagram::paint().

6.6.3.54 virtual QPointF KDChart::AbstractCoordinatePlane::zoomCenter () const [virtual]

Returns:
The center point (in value coordinates) of the coordinate plane, that is used for zoom operations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.
Definition at line 165 of file KDChartAbstractCoordinatePlane.h.

168 {}

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.6 KDChart::AbstractCoordinatePlane Class Reference 113

6.6.3.55 virtual double KDChart::AbstractCoordinatePlane::zoomFactorX () const [virtual]

Returns:
The zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.
Definition at line 141 of file KDChartAbstractCoordinatePlane.h.

143 { return 1.0; }

6.6.3.56 virtual double KDChart::AbstractCoordinatePlane::zoomFactorY () const [virtual]

Returns:
The zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.
Definition at line 147 of file KDChartAbstractCoordinatePlane.h.

149 {}

6.6.4 Member Data Documentation

6.6.4.1 Q_SIGNALS KDChart::AbstractCoordinatePlane::__pad0__

Reimplemented from KDChart::AbstractArea.
Definition at line 284 of file KDChartAbstractCoordinatePlane.h.

6.6.4.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.
Referenced by KDChart::AbstractLayoutItem::setParentWidget().

6.6.4.3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,
inherited]

Definition at line 77 of file KDChartLayoutItems.h.

6.6.4.4 public KDChart::AbstractCoordinatePlane::Q_SLOTS

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.
Definition at line 272 of file KDChartAbstractCoordinatePlane.h.
The documentation for this class was generated from the following files:

• KDChartAbstractCoordinatePlane.h
• KDChartAbstractCoordinatePlane.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

114 KD Chart 2 Class Documentation

6.7 KDChart::AbstractDiagram Class Reference
#include <KDChartAbstractDiagram.h>
Inheritance diagram for KDChart::AbstractDiagram:Collaboration diagram for KDChart::Abstract-
Diagram:

6.7.1 Detailed Description

AbstractDiagram defines the interface for diagram classes.
AbstractDiagram is the base class for diagram classes ("chart types").
It defines the interface, that needs to be implemented for the diagram, to function within the KDChart
framework. It extends Interview’s QAbstractItemView.
Definition at line 53 of file KDChartAbstractDiagram.h.

Public Member Functions
• bool allowOverlappingDataValueTexts () const
• bool antiAliasing () const
• virtual AttributesModel ∗ attributesModel () const
Returns the AttributesModel, that is used by this diagram.

• QBrush brush (const QModelIndex &index) const
Retrieve the brush to be used, for painting the datapoint at the given index in the model.

• QBrush brush (int dataset) const
Retrieve the brush to be used for the given dataset.

• QBrush brush () const
Retrieve the brush to be used for painting datapoints globally.

• AbstractCoordinatePlane ∗ coordinatePlane () const
The coordinate plane associated with the diagram.

• const QPair< QPointF, QPointF > dataBoundaries () const
Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts these
values).

• virtual void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
[reimplemented]

• QList< QBrush > datasetBrushes () const
The set of dataset brushes currently used, for use in legends, etc.

• int datasetDimension () const
The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint to
have.

• QStringList datasetLabels () const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 115

The set of dataset labels currently displayed, for use in legends, etc.

• QList< MarkerAttributes > datasetMarkers () const
The set of dataset markers currently used, for use in legends, etc.

• QList< QPen > datasetPens () const
The set of dataset pens currently used, for use in legends, etc.

• DataValueAttributes dataValueAttributes (const QModelIndex &index) const
Retrieve the DataValueAttributes for the given index.

• DataValueAttributes dataValueAttributes (int column) const
Retrieve the DataValueAttributes for the given dataset.

• DataValueAttributes dataValueAttributes () const
Retrieve the DataValueAttributes speficied globally.

• virtual void doItemsLayout ()
[reimplemented]

• virtual int horizontalOffset () const
[reimplemented]

• virtual QModelIndex indexAt (const QPoint &point) const
[reimplemented]

• virtual bool isIndexHidden (const QModelIndex &index) const
[reimplemented]

• QStringList itemRowLabels () const
The set of item row labels currently displayed, for use in Abscissa axes, etc.

• virtual QModelIndex moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
[reimplemented]

• virtual void paintMarker (QPainter ∗painter, const MarkerAttributes &markerAttributes, const
QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)
• QPen pen (const QModelIndex &index) const
Retrieve the pen to be used, for painting the datapoint at the given index in the model.

• QPen pen (int dataset) const
Retrieve the pen to be used for the given dataset.

• QPen pen () const
Retrieve the pen to be used for painting datapoints globally.

• bool percentMode () const
• virtual void resize (const QSizeF &area)=0
Called by the widget’s sizeEvent.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

116 KD Chart 2 Class Documentation

• virtual void scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible)
[reimplemented]

• void setAllowOverlappingDataValueTexts (bool allow)
Set whether data value labels are allowed to overlap.

• void setAntiAliasing (bool enabled)
Set whether anti-aliasing is to be used while rendering this diagram.

• virtual void setAttributesModel (AttributesModel ∗model)
Associate an AttributesModel with this diagram.

• void setBrush (const QBrush &brush)
Set the brush to be used, for painting all datasets in the model.

• void setBrush (int dataset, const QBrush &brush)
Set the brush to be used, for painting the given dataset.

• void setBrush (const QModelIndex &index, const QBrush &brush)
Set the brush to be used, for painting the datapoint at the given index.

• virtual void setCoordinatePlane (AbstractCoordinatePlane ∗plane)
Set the coordinate plane associated with the diagram.

• void setDatasetDimension (int dimension)
Sets the dataset dimension of the diagram.

• void setDataValueAttributes (const DataValueAttributes &a)
Set the DataValueAttributes for all datapoints in the model.

• void setDataValueAttributes (int dataset, const DataValueAttributes &a)
Set the DataValueAttributes for the given dataset.

• void setDataValueAttributes (const QModelIndex &index, const DataValueAttributes &a)
Set the DataValueAttributes for the given index.

• virtual void setModel (QAbstractItemModel ∗model)
Associate a model with the diagram.

• void setPen (const QPen &pen)
Set the pen to be used, for painting all datasets in the model.

• void setPen (int dataset, const QPen &pen)
Set the pen to be used, for painting the given dataset.

• void setPen (const QModelIndex &index, const QPen &pen)
Set the pen to be used, for painting the datapoint at the given index.

• void setPercentMode (bool percent)
• virtual void setRootIndex (const QModelIndex &idx)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 117

Set the root index in the model, where the diagram starts referencing data for display.

• virtual void setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags command)
[reimplemented]

• void update () const
• void useDefaultColors ()
Set the palette to be used, for painting datasets to the default palette.

• void useRainbowColors ()
Set the palette to be used, for painting datasets to the rainbow palette.

• void useSubduedColors ()
Set the palette to be used, for painting datasets to the subdued palette.

• virtual int verticalOffset () const
[reimplemented]

• virtual QRect visualRect (const QModelIndex &index) const
[reimplemented]

• virtual QRegion visualRegionForSelection (const QItemSelection &selection) const
[reimplemented]

• virtual ∼AbstractDiagram ()

Protected Member Functions
• AbstractDiagram (QWidget ∗parent=0, AbstractCoordinatePlane ∗plane=0)
• AbstractDiagram (Private ∗p, QWidget ∗parent, AbstractCoordinatePlane ∗plane)
• QModelIndex attributesModelRootIndex () const
• virtual const QPair< QPointF, QPointF > calculateDataBoundaries () const=0
• virtual bool checkInvariants (bool justReturnTheStatus=false) const
• QModelIndex columnToIndex (int column) const
• void modelsChanged ()
This signal is emitted, when either the model or the AttributesModel is replaced.

• virtual void paint (PaintContext ∗paintContext)=0
Draw the diagram contents to the rectangle and painter, that are passed in as part of the paint context.

• void paintDataValueText (QPainter ∗painter, const QModelIndex &index, const QPointF &pos, dou-
ble value)
• virtual void paintDataValueTexts (QPainter ∗painter)
• void paintMarker (QPainter ∗painter, const QModelIndex &index, const QPointF &pos)
• virtual void paintMarkers (QPainter ∗painter)
• void propertiesChanged ()
Emitted upon change of a property of the Diagram.

• void setAttributesModelRootIndex (const QModelIndex &)
• void setDataBoundariesDirty () const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

118 KD Chart 2 Class Documentation

• double valueForCell (int row, int column) const
Helper method, retrieving the data value (DisplayRole) for a given row and column.

Protected Attributes
• Q_SIGNALS __pad0__: void layoutChanged( AbstractDiagram∗ )

6.7.2 Constructor & Destructor Documentation

6.7.2.1 KDChart::AbstractDiagram::AbstractDiagram (Private ∗ p, QWidget ∗ parent,
AbstractCoordinatePlane ∗ plane) [explicit, protected]

6.7.2.2 AbstractDiagram::AbstractDiagram (QWidget ∗ parent = 0, AbstractCoordinatePlane ∗
plane = 0) [explicit, protected]

Definition at line 109 of file KDChartAbstractDiagram.cpp.

110 : QAbstractItemView ( parent ), _d( new Private() )
111 {
112 _d->init( plane );
113 }

6.7.2.3 AbstractDiagram::∼AbstractDiagram () [virtual]

Definition at line 115 of file KDChartAbstractDiagram.cpp.

116 {
117 delete _d;
118 }

6.7.3 Member Function Documentation

6.7.3.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const

Returns:
Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.
References d.

295 {

6.7.3.2 bool AbstractDiagram::antiAliasing () const

Returns:
Whether anti-aliasing is to be used for rendering this diagram.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 119

Definition at line 302 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::LineDiagram::paint().

306 {

6.7.3.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual]

Returns the AttributesModel, that is used by this diagram.
By default each diagram owns its own AttributesModel, which should never be deleted. Only if a user-
supplied AttributesModel has been set does the pointer returned here not belong to the diagram.

Returns:
The AttributesModel associated with the diagram.

See also:
setAttributesModel

Definition at line 180 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), and KDChart::Bar-
Diagram::setBarAttributes().

181 {
182 return d->attributesModel;
183 }

6.7.3.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected]

returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram.
Definition at line 204 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::LineDiagram::calculateDataBoundaries(), KDChart::BarDiagram::calculate-
DataBoundaries(), KDChart::LineDiagram::numberOfAbscissaSegments(), KDChart::Bar-
Diagram::numberOfAbscissaSegments(), KDChart::LineDiagram::numberOfOrdinateSegments(),
KDChart::BarDiagram::numberOfOrdinateSegments(), KDChart::LineDiagram::paint(), KDChart::Bar-
Diagram::paint(), and valueForCell().

210 {

6.7.3.5 QBrush AbstractDiagram::brush (const QModelIndex & index) const

Retrieve the brush to be used, for painting the datapoint at the given index in the model.

Parameters:
index The index of the datapoint in the model.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

120 KD Chart 2 Class Documentation

Returns:
The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

638 :
QRect AbstractDiagram::visualRect(const QModelIndex &) const

6.7.3.6 QBrush AbstractDiagram::brush (int dataset) const

Retrieve the brush to be used for the given dataset.
This will fall back automatically to what was set at model level, if there are no dataset specific settings.

Parameters:
dataset The dataset to retrieve the brush for.

Returns:
The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.7.3.7 QBrush AbstractDiagram::brush () const

Retrieve the brush to be used for painting datapoints globally.
This will fall back automatically to the default settings, if there are no specific settings.

Returns:
The brush to use for painting.

Definition at line 618 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::PieDiagram::paint(), and paintMarker().

623 {

6.7.3.8 virtual const QPair<QPointF, QPointF> KDChart::AbstractDiagram::calculateData-
Boundaries () const [protected, pure virtual]

Implemented in KDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-
Diagram, and KDChart::RingDiagram.
Referenced by dataBoundaries().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 121

6.7.3.9 bool AbstractDiagram::checkInvariants (bool justReturnTheStatus = false) const
[protected, virtual]

Definition at line 746 of file KDChartAbstractDiagram.cpp.
References coordinatePlane().
Referenced by KDChart::RingDiagram::calculateDataBoundaries(), KDChart::PolarDiagram::calculate-
DataBoundaries(), KDChart::PieDiagram::calculateDataBoundaries(), KDChart::LineDiagram::calculate-
DataBoundaries(), KDChart::BarDiagram::calculateDataBoundaries(), KDChart::RingDiagram::paint(),
KDChart::PolarDiagram::paint(), KDChart::PieDiagram::paint(), KDChart::LineDiagram::paint(),
KDChart::BarDiagram::paint(), and paintMarker().

746 {
747 Q_ASSERT_X ( model(), "AbstractDiagram::checkInvariants()",
748 "There is no usable model set, for the diagram." );
749
750 Q_ASSERT_X ( coordinatePlane(), "AbstractDiagram::checkInvariants()",
751 "There is no usable coordinate plane set, for the diagram." );
752 }
753 return model() && coordinatePlane();
754 }
755
756 int AbstractDiagram::datasetDimension( ) const

6.7.3.10 QModelIndex AbstractDiagram::columnToIndex (int column) const [protected]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.7.3.11 AbstractCoordinatePlane ∗ AbstractDiagram::coordinatePlane () const

The coordinate plane associated with the diagram.
This determines how coordinates in value space are mapped into pixel space. By default this is a Cartesian-
CoordinatePlane.

Returns:
The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::BarDiagram::calculateDataBoundaries(), checkInvariants(), KDChart::Abstract-
CartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(), KDChart::LineDiagram::paint(),
KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polarCoordinatePlane(), and
KDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {
127 return d->plane;
128 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

122 KD Chart 2 Class Documentation

6.7.3.12 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts these
values).
This method returns a chached result of calculations done by calculateDataBoundaries. Classes derived
from AbstractDiagram must implement the calculateDataBoundaries function, to specify their own way of
calculating the data boundaries. If derived classes want to force recalculation of the data boundaries, they
can call setDataBoundariesDirty()
Returned value is in diagram coordinates.
Definition at line 130 of file KDChartAbstractDiagram.cpp.
References calculateDataBoundaries(), and d.
Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(), KDChart::Polar-
CoordinatePlane::layoutDiagrams(), KDChart::LineDiagram::paint(), and KDChart::BarDiagram::paint().

131 {
132 if( d->databoundariesDirty ){
133 d->databoundaries = calculateDataBoundaries ();
134 d->databoundariesDirty = false;
135 }
136 return d->databoundaries;
137 }

6.7.3.13 void AbstractDiagram::dataChanged (const QModelIndex & topLeft, const QModelIndex
& bottomRight) [virtual]

[reimplemented]
Definition at line 232 of file KDChartAbstractDiagram.cpp.
References d.

232 {
233 // We are still too dumb to do intelligent updates...
234 d->databoundariesDirty = true;
235 scheduleDelayedItemsLayout();
236 }
237
238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.7.3.14 QList< QBrush > AbstractDiagram::datasetBrushes () const

The set of dataset brushes currently used, for use in legends, etc.

Note:
Cell-level override brushes, if set, take precedence over the dataset values, so you might need to check
these too, in order to find the brush, that is used for a single cell.

Returns:
The current set of dataset brushes.

Definition at line 710 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::datasetCount(), and
KDChart::Legend::setBrushesFromDiagram().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 123

712 {
713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetB
714 ret << brush;
715 }
716
717 return ret;
718 }
719
720 QList<QPen> AbstractDiagram::datasetPens() const

6.7.3.15 int AbstractDiagram::datasetDimension () const

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint to
have.
For each dimension it will expect one column of values in the model. If the dimensionality is 1, automatic
values will be used for the abscissa.
For example a diagram with the default dimension of 1, will have one column per datapoint (the y values)
and will use automatic values for the x axis (1, 2, 3, ... n). If the dimension is 2, the diagram will use the
first, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Y
values.

Returns:
The dataset dimension of the diagram.

Definition at line 758 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::LineDiagram::calculateDataBoundaries(), KDChart::LineDiagram::get-
CellValues(), KDChart::CartesianCoordinatePlane::getDataDimensionsList(), KDChart::Line-
Diagram::paint(), and KDChart::LineDiagram::setType().

762 {

6.7.3.16 QStringList AbstractDiagram::datasetLabels () const

The set of dataset labels currently displayed, for use in legends, etc.

Returns:
The set of dataset labels currently displayed.

Definition at line 698 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::Legend::buildLegend(), and KDChart::Legend::datasetCount().

699 : " << attributesModel()->columnCount(attributesModel
700 const int columnCount = attributesModel()->columnCount(attributesModelRootIndex());
701 for( int i = datasetDimension()-1; i < columnCount; i += datasetDimension() ){
702 //qDebug() << "label: " << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole )
703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();
704 }
705 return ret;
706 }
707
708 QList<QBrush> AbstractDiagram::datasetBrushes() const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

124 KD Chart 2 Class Documentation

6.7.3.17 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const

The set of dataset markers currently used, for use in legends, etc.

Note:
Cell-level override markers, if set, take precedence over the dataset values, so you might need to check
these too, in order to find the marker, that is shown for a single cell.

Returns:
The current set of dataset brushes.

Definition at line 733 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::Legend::buildLegend().

735 {
736 DataValueAttributes a =
737 qVariantValue<DataValueAttributes>( attributesModel()->headerData( i, Qt::Vertical, DataVa
738 const MarkerAttributes &ma = a.markerAttributes();
739 ret << ma;
740 }
741 return ret;
742 }
743
744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.7.3.18 QList< QPen > AbstractDiagram::datasetPens () const

The set of dataset pens currently used, for use in legends, etc.

Note:
Cell-level override pens, if set, take precedence over the dataset values, so you might need to check
these too, in order to find the pens, that is used for a single cell.

Returns:
The current set of dataset pens.

Definition at line 722 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::Legend::buildLegend().

724 {
725 QPen pen = qVariantValue<QPen>( attributesModel()->headerData( i, Qt::Vertical, DatasetPenRole
726 ret << pen;
727 }
728 return ret;
729 }
730
731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

6.7.3.19 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &
index) const

Retrieve the DataValueAttributes for the given index.
This will fall back automatically to what was set at dataset or model level, if there are no datapoint specific
settings.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 125

Parameters:
index The datapoint to retrieve the attributes for.

Returns:
The DataValueAttributes for the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.7.3.20 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const

Retrieve the DataValueAttributes for the given dataset.
This will fall back automatically to what was set at model level, if there are no dataset specific settings.

Parameters:
dataset The dataset to retrieve the attributes for.
Returns:
The DataValueAttributes for the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.7.3.21 DataValueAttributes AbstractDiagram::dataValueAttributes () const

Retrieve the DataValueAttributes speficied globally.
This will fall back automatically to the default settings, if there are no specific settings.

Returns:
The global DataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.
Referenced by paintDataValueText(), and paintMarker().

264 {

6.7.3.22 void AbstractDiagram::doItemsLayout () [virtual]

[reimplemented]
Definition at line 223 of file KDChartAbstractDiagram.cpp.
References d, and update().

223 {
224 d->plane->layoutDiagrams();
225 update();
226 }
227 QAbstractItemView::doItemsLayout();
228 }
229
230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft,

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

126 KD Chart 2 Class Documentation

6.7.3.23 int AbstractDiagram::horizontalOffset () const [virtual]

[reimplemented]
Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.7.3.24 QModelIndex AbstractDiagram::indexAt (const QPoint & point) const [virtual]

[reimplemented]
Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.7.3.25 bool AbstractDiagram::isIndexHidden (const QModelIndex & index) const [virtual]

[reimplemented]
Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.7.3.26 QStringList AbstractDiagram::itemRowLabels () const

The set of item row labels currently displayed, for use in Abscissa axes, etc.

Returns:
The set of item row labels currently displayed.

Definition at line 686 of file KDChartAbstractDiagram.cpp.

687 : " << attributesModel()->rowCount(attributesModelRoo
688 const int rowCount = attributesModel()->rowCount(attributesModelRootIndex());
689 for( int i = 0; i < rowCount; ++i ){
690 //qDebug() << "label: " << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).t
691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();
692 }
693 return ret;
694 }
695
696 QStringList AbstractDiagram::datasetLabels() const

6.7.3.27 void KDChart::AbstractDiagram::modelsChanged () [protected]

This signal is emitted, when either the model or the AttributesModel is replaced.
Referenced by setAttributesModel(), and setModel().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 127

6.7.3.28 QModelIndex AbstractDiagram::moveCursor (CursorAction cursorAction,
Qt::KeyboardModifiers modifiers) [virtual]

[reimplemented]
Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.7.3.29 virtual void KDChart::AbstractDiagram::paint (PaintContext ∗ paintContext)
[protected, pure virtual]

Draw the diagram contents to the rectangle and painter, that are passed in as part of the paint context.

Parameters:
paintContext All information needed for painting.

Implemented in KDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-
Diagram, and KDChart::RingDiagram.

6.7.3.30 void AbstractDiagram::paintDataValueText (QPainter ∗ painter, const QModelIndex &
index, const QPointF & pos, double value) [protected]

Definition at line 318 of file KDChartAbstractDiagram.cpp.
References KDChart::DataValueAttributes::dataLabel(), dataValueAttributes(), KDChart::DataValue-
Attributes::decimalDigits(), KDChart::TextAttributes::font(), KDChart::TextAttributes::isVisible(),
KDChart::DataValueAttributes::isVisible(), KDChart::TextAttributes::pen(), KDChart::DataValue-
Attributes::prefix(), KDChart::TextAttributes::rotation(), KDChart::DataValueAttributes::suffix(), and
KDChart::DataValueAttributes::textAttributes().
Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), KDChart::Line-
Diagram::paint(), and KDChart::BarDiagram::paint().

320 {
321 // paint one data series
322 DataValueAttributes a = dataValueAttributes(index);
323 if ( !a.isVisible() ) return;
324
325 // handle decimal digits
326 int decimalDigits = a.decimalDigits();
327 int decimalPos = QString::number( value ).indexOf( QLatin1Char( ’.’ ) );
328 QString roundedValue;
329 if ( a.dataLabel().isNull() ) {
330 if ( decimalPos > 0 && value != 0 )
331 roundedValue = roundValues ( value, decimalPos, decimalDigits );
332 else
333 roundedValue = QString::number( value );
334 } else
335 roundedValue = a.dataLabel();
336 // handle prefix and suffix
337 if ( !a.prefix().isNull() )
338 roundedValue.prepend( a.prefix() );
339
340 if ( !a.suffix().isNull() )
341 roundedValue.append( a.suffix() );
342

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

128 KD Chart 2 Class Documentation

343 PainterSaver painterSaver( painter );
344 // FIXME draw the non-text bits, background, etc
345 const TextAttributes &ta = a.textAttributes();
346 if ( ta.isVisible() ) {
347 painter->setPen( ta.pen() );
348 painter->setFont( ta.font() );
349 painter->translate( pos );
350 painter->rotate( ta.rotation() );
351 painter->drawText( QPointF(0, 0), roundedValue );
352 }
353 }
354
355 QString AbstractDiagram::roundValues( double value,

6.7.3.31 void AbstractDiagram::paintDataValueTexts (QPainter ∗ painter) [protected,
virtual]

Definition at line 382 of file KDChartAbstractDiagram.cpp.

385 {
386 for ( int j=0; j< rowCount; ++j ) {
387 const QModelIndex index = model()->index( j, i, rootIndex() );
388 double value = model()->data( index ).toDouble();
389 const QPointF pos = coordinatePlane()->translate( QPointF( j, value ) );
390 paintDataValueText( painter, index, pos, value );
391 }
392 }
393 }
394
395

6.7.3.32 void AbstractDiagram::paintMarker (QPainter ∗ painter, const QModelIndex & index,
const QPointF & pos) [protected]

Definition at line 398 of file KDChartAbstractDiagram.cpp.
References brush(), checkInvariants(), dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),
KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),
KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(), paintMarker(),
and KDChart::MarkerAttributes::pen().

399 {
400
401 if ( !checkInvariants() ) return;
402 DataValueAttributes a = dataValueAttributes(index);
403 if ( !a.isVisible() ) return;
404 const MarkerAttributes &ma = a.markerAttributes();
405 if ( !ma.isVisible() ) return;
406
407 PainterSaver painterSaver( painter );
408 QSizeF maSize( ma.markerSize() );
409 QBrush indexBrush( brush( index ) );
410 QPen indexPen( ma.pen() );
411 if ( ma.markerColor().isValid() )
412 indexBrush.setColor( ma.markerColor() );
413
414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );
415 }
416
417

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 129

6.7.3.33 void AbstractDiagram::paintMarker (QPainter ∗ painter, const MarkerAttributes &
markerAttributes, const QBrush & brush, const QPen &, const QPointF & point, const
QSizeF & size) [virtual]

Definition at line 420 of file KDChartAbstractDiagram.cpp.
References KDChart::MarkerAttributes::markerStyle().
Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), and paintMarker().

424 {
425 PainterSaver painterSaver( painter );
426 painter->setBrush( brush );
427 painter->setPen( pen );
428 painter->setRenderHint ( QPainter::Antialiasing );
429 painter->translate( pos );
430 switch ( markerAttributes.markerStyle() ) {
431 case MarkerAttributes::MarkerCircle:
432 painter->drawEllipse( QRectF( 0 - maSize.height()/2, 0 - maSize.width()/2,
433 maSize.height(), maSize.width()) );
434 break;
435 case MarkerAttributes::MarkerSquare:
436 {
437 QRectF rect( 0 - maSize.height()/2, 0 - maSize.width()/2,
438 maSize.height(), maSize.width() );
439 painter->drawRect( rect );
440 painter->fillRect( rect, painter->brush() );
441 break;
442 }
443 case MarkerAttributes::MarkerDiamond:
444 {
445 QVector <QPointF > diamondPoints;
446 QPointF top, left, bottom, right;
447 top = QPointF( 0, 0 - maSize.height()/2 );
448 left = QPointF( 0 - maSize.width()/2, 0 );
449 bottom = QPointF( 0, maSize.height()/2 );
450 right = QPointF( maSize.width()/2, 0 );
451 diamondPoints << top << left << bottom << right;
452 painter->drawPolygon( diamondPoints );
453 break;
454 }
455 //Pending Michel: do we need that? Ask: What is the idea about
456 // Marker1Pixel and Marker4Pixels.
457 case MarkerAttributes::Marker1Pixel:
458 {
459 QSizeF pSize(4,4);
460 QPen pen1Pixel;
461 pen1Pixel.setColor( painter->background().color() );
462 QRectF centerRect( -pSize.height()/2, -pSize.width()/2,
463 pSize.height(), pSize.width() );
464 painter->setPen( pen1Pixel );
465 painter->drawEllipse( centerRect );
466 break;
467 }
468 case MarkerAttributes::Marker4Pixels:
469 {
470 QSizeF pSize(8, 8);
471 QPen pen4Pixel;
472 pen4Pixel.setColor( painter->background().color() );
473 QRectF centerRect( -pSize.height()/2, -pSize.width()/2,
474 pSize.height(), pSize.width() );
475 painter->setPen( pen4Pixel );
476 painter->drawEllipse( centerRect );
477 break;
478 }
479 case MarkerAttributes::MarkerRing:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

130 KD Chart 2 Class Documentation

480 {
481 painter->setBrush( Qt::NoBrush );
482 painter->drawEllipse( QRectF( 0 - maSize.height()/2, 0 - maSize.width()/2,
483 maSize.height(), maSize.width()) );
484 break;
485 }
486 case MarkerAttributes::MarkerCross:
487 {
488 QVector <QPointF > crossPoints;
489 QPointF leftTop, leftBottom, centerBottomLeft, bottomLeft, bottomRight,
490 centerBottomRight,rightBottom, rightTop, centerTopRight, topRight, topLeft,
491 centerTopLeft;
492 leftTop = QPointF( -maSize.width()/2, -maSize.height()/4 );
493 leftBottom = QPointF( -maSize.width()/2, maSize.height()/4 );
494 centerBottomLeft = QPointF( -maSize.width()/4, maSize.height()/4 );
495 bottomLeft = QPointF( -maSize.width()/4, maSize.height()/2 );
496 bottomRight = QPointF( maSize.width()/4, maSize.height()/2 );
497 centerBottomRight = QPointF( maSize.width()/4, maSize.height()/4 );
498 rightBottom = QPointF( maSize.width()/2, maSize.height()/4 );
499 rightTop = QPointF( maSize.width()/2, -maSize.height()/4 );
500 centerTopRight = QPointF( maSize.width()/4, -maSize.height()/4 );
501 topRight = QPointF( maSize.width()/4, -maSize.height()/2 );
502 topLeft = QPointF( -maSize.width()/4, -maSize.height()/2 );
503 centerTopLeft = QPointF( -maSize.width()/4, -maSize.height()/4 );
504
505 crossPoints << leftTop << leftBottom << centerBottomLeft
506 << bottomLeft << bottomRight << centerBottomRight
507 << rightBottom << rightTop << centerTopRight
508 << topRight << topLeft << centerTopLeft;
509
510 painter->drawPolygon( crossPoints );
511 break;
512 }
513 case MarkerAttributes::MarkerFastCross:
514 {
515 QPointF left, right, top, bottom;
516 left = QPointF( -maSize.width()/2, 0 );
517 right = QPointF( maSize.width()/2, 0 );
518 top = QPointF( 0, -maSize.height()/2 );
519 bottom= QPointF( 0, maSize.height()/2 );
520 painter->drawLine( left, right );
521 painter->drawLine( top, bottom );
522 break;
523 }
524 default:
525 Q_ASSERT_X ( false, "paintMarkers()",
526 "Type item does not match a defined Marker Type." );
527 }
528 }
529
530 void AbstractDiagram::paintMarkers( QPainter* painter )

6.7.3.34 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected, virtual]

Definition at line 532 of file KDChartAbstractDiagram.cpp.

535 {
536 for ( int j=0; j< rowCount; ++j ) {
537 const QModelIndex index = model()->index( j, i, rootIndex() );
538 double value = model()->data( index ).toDouble();
539 const QPointF pos = coordinatePlane()->translate( QPointF( j, value ) );
540 paintMarker( painter, index, pos );
541 }
542 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 131

543 }
544
545

6.7.3.35 QPen AbstractDiagram::pen (const QModelIndex & index) const

Retrieve the pen to be used, for painting the datapoint at the given index in the model.

Parameters:
index The index of the datapoint in the model.

Returns:
The pen to use for painting.

Definition at line 586 of file KDChartAbstractDiagram.cpp.

593 {

6.7.3.36 QPen AbstractDiagram::pen (int dataset) const

Retrieve the pen to be used for the given dataset.
This will fall back automatically to what was set at model level, if there are no dataset specific settings.

Parameters:
dataset The dataset to retrieve the pen for.

Returns:
The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.7.3.37 QPen AbstractDiagram::pen () const

Retrieve the pen to be used for painting datapoints globally.
This will fall back automatically to the default settings, if there are no specific settings.

Returns:
The pen to use for painting.

Definition at line 572 of file KDChartAbstractDiagram.cpp.
Referenced by KDChart::PieDiagram::paint().

577 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

132 KD Chart 2 Class Documentation

6.7.3.38 bool AbstractDiagram::percentMode () const

Definition at line 313 of file KDChartAbstractDiagram.cpp.
References d.
Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.7.3.39 void KDChart::AbstractDiagram::propertiesChanged () [protected]

Emitted upon change of a property of the Diagram.
Referenced by setDataValueAttributes(), KDChart::LineDiagram::setLineAttributes(), KDChart::Line-
Diagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.7.3.40 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [pure
virtual]

Called by the widget’s sizeEvent.
Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:
area

Implemented in KDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-
Diagram, and KDChart::RingDiagram.

6.7.3.41 void AbstractDiagram::scrollTo (const QModelIndex & index, ScrollHint hint =
EnsureVisible) [virtual]

[reimplemented]
Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.7.3.42 void AbstractDiagram::setAllowOverlappingDataValueTexts (bool allow)

Set whether data value labels are allowed to overlap.

Parameters:
allow True means that overlapping labels are allowed.

Definition at line 285 of file KDChartAbstractDiagram.cpp.
References d.

290 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.7 KDChart::AbstractDiagram Class Reference 133

6.7.3.43 void AbstractDiagram::setAntiAliasing (bool enabled)

Set whether anti-aliasing is to be used while rendering this diagram.

Parameters:
enabled True means that AA is enabled.

Definition at line 296 of file KDChartAbstractDiagram.cpp.
References d.

301 {

6.7.3.44 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual]

Associate an AttributesModel with this diagram.
Note that the diagram does _not_ take ownership of the AttributesModel. This should thus only be used
with AttributesModels that have been explicitely created by the user, and are owned by her. Setting an
AttributesModel that is internal to another diagram is an error.
Correct:

AttributesModel *am = new AttributesModel( model, 0 );
diagram1->setAttributesModel( am );
diagram2->setAttributesModel( am );

Wrong:

diagram1->setAttributesModel( diagram2->attributesModel() );

Parameters:
model The AttributesModel to use for this diagram.

See also:
AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.
References d, and modelsChanged().

161 {
162 if( amodel->sourceModel() != model() ) {
163 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: "
164 "Trying to set an attributesmodel which works on a different "
165 "model than the diagram.");
166 return;
167 }
168 if( qobject_cast<PrivateAttributesModel*>(amodel) ) {
169 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: "
170 "Trying to set an attributesmodel that is private to another diagram.");
171 return;
172 }
173 d->setAttributesModel(amodel);
174 scheduleDelayedItemsLayout();
175 d->databoundariesDirty = true;
176 emit modelsChanged();
177 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

for painting all datasets in the model.cpp. for painting the datapoint at the given index.7. for painting the given dataset.7.cpp. brush The brush to use. Parameters: index The datapoint’s index in the model. Definition at line 594 of file KDChartAbstractDiagram. Definition at line 602 of file KDChartAbstractDiagram.47 void AbstractDiagram::setBrush (int dataset.3. pen The brush to use. Parameters: brush The brush to use.3.48 void AbstractDiagram::setBrush (const QModelIndex & index.46 void AbstractDiagram::setBrush (const QBrush & brush) Set the brush to be used. References d. 601 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. const QBrush & brush) Set the brush to be used.134 KD Chart 2 Class Documentation 6.7.3.3. Parameters: dataset The dataset’s column in the model. 608 { 6.cpp. Definition at line 609 of file KDChartAbstractDiagram. 6. 617 { 6.7. const QBrush & brush) Set the brush to be used.45 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex & idx) [protected] Definition at line 195 of file KDChartAbstractDiagram.

and KDChart::BarDiagram::setType(). See also: datasetDimension.7. References d.cpp. Definition at line 218 of file KDChartAbstractDiagram. Returns: The coordinate plane associated with the diagram. KDChart::LineDiagram::setThree- DLineAttributes(). KDChart::LineDiagram::setType(). Referenced by KDChart::AbstractCoordinatePlane::addDiagram(). Referenced by KDChart::BarDiagram::setThreeDBarAttributes().7. The chart takes ownership. 770 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . This determines how coordinates in value space are mapped into pixel space.3.49 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane ∗ plane) [virtual] Set the coordinate plane associated with the diagram. 142 } 6.7 KDChart::AbstractDiagram Class Reference 135 6. References d.6. Parameters: dimension Definition at line 763 of file KDChartAbstractDiagram.cpp.50 void AbstractDiagram::setDataBoundariesDirty () const [protected] Definition at line 139 of file KDChartAbstractDiagram.3. and KDChart::AbstractCoordinatePlane::takeDiagram().3. Reimplemented in KDChart::AbstractCartesianDiagram.51 void AbstractDiagram::setDatasetDimension (int dimension) Sets the dataset dimension of the diagram. 222 { 6.7.cpp. 140 { 141 d->databoundariesDirty = true. References d. KDChart::AbstractCartesian- Diagram::setCoordinatePlane().

7. const DataValueAttributes & a) Set the DataValueAttributes for the given dataset. References d. 244 DataValueLabelAttributesRole ). 284 { 6.53 void AbstractDiagram::setDataValueAttributes (int dataset. and propertiesChanged(). Parameters: dataset The dataset to set the attributes for.7. a The attributes to set.cpp.3. Definition at line 251 of file KDChartAbstractDiagram.54 void AbstractDiagram::setDataValueAttributes (const QModelIndex & index. References d.7. KDChart::DataValueLabelAttributesRole.cpp. 259 { 6. 246 } 247 248 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. Definition at line 240 of file KDChartAbstractDiagram. a The attributes to set. References d. 243 qVariantFromValue( a ).136 KD Chart 2 Class Documentation 6. Parameters: a The attributes to set.52 void AbstractDiagram::setDataValueAttributes (const DataValueAttributes & a) Set the DataValueAttributes for all datapoints in the model.cpp. 240 { 241 d->attributesModel->setData( 242 d->attributesModel->mapFromSource( index ). Definition at line 279 of file KDChartAbstractDiagram. Parameters: index The datapoint to set the attributes for. const DataValueAttributes & a) Set the DataValueAttributes for the given index. 245 emit propertiesChanged().3.

56 void AbstractDiagram::setPen (const QPen & pen) Set the pen to be used. 148 amodel->initFrom( d->attributesModel ). Definition at line 144 of file KDChartAbstractDiagram.7. 562 { 6.57 void AbstractDiagram::setPen (int dataset. Parameters: pen The pen to use.3.3. 153 } 6.cpp.6.3. Definition at line 556 of file KDChartAbstractDiagram.55 void AbstractDiagram::setModel (QAbstractItemModel ∗ model) [virtual] Associate a model with the diagram. 571 { 6. 149 d->setAttributesModel(amodel).7. 152 emit modelsChanged().cpp. Definition at line 548 of file KDChartAbstractDiagram.cpp. 151 d->databoundariesDirty = true. 147 AttributesModel* amodel = new PrivateAttributesModel( newModel. Parameters: index The datapoint’s index in the model.cpp. for painting the given dataset. 145 { 146 QAbstractItemView::setModel( newModel ). pen The pen to use. KDChart::AttributesModel::initFrom(). Parameters: dataset The dataset’s row in the model. const QPen & pen) Set the pen to be used. for painting the datapoint at the given index.3.7 KDChart::AbstractDiagram Class Reference 137 6. References d. 150 scheduleDelayedItemsLayout(). pen The pen to use. const QPen & pen) Set the pen to be used. Definition at line 563 of file KDChartAbstractDiagram.7. and modelsChanged(). for painting all datasets in the model. 555 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . this ).58 void AbstractDiagram::setPen (const QModelIndex & index.7.

61 void AbstractDiagram::setSelection (const QRect & rect. References d. } 6.7.3.59 void AbstractDiagram::setPercentMode (bool percent) Definition at line 307 of file KDChartAbstractDiagram. and KDChart::BarDiagram::setType(). [reimplemented] Definition at line 188 of file KDChartAbstractDiagram. 666 { return QRegion().7. for painting datasets to the default palette.cpp.62 void AbstractDiagram::update () const Definition at line 777 of file KDChartAbstractDiagram. 6. Referenced by KDChart::LineDiagram::setType(). FIXME: fold into one usePalette (KDChart::Palette&) method Definition at line 671 of file KDChartAbstractDiagram. where the diagram starts referencing data for display.3. References d. 6.3.7.7.138 KD Chart 2 Class Documentation 6.60 void AbstractDiagram::setRootIndex (const QModelIndex & idx) [virtual] Set the root index in the model.7.cpp.3. See also: KDChart::Palette.63 void KDChart::AbstractDiagram::useDefaultColors () Set the palette to be used.cpp. QItemSelection- Model::SelectionFlags command) [virtual] [reimplemented] Definition at line 664 of file KDChartAbstractDiagram. 675 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 312 { 6. References d. References d.3. Referenced by doItemsLayout().cpp.cpp.

References attributesModelRootIndex(). Definition at line 681 of file KDChartAbstractDiagram. retrieving the data value (DisplayRole) for a given row and column. 685 { 6. 776 { 6. 680 { 6.3. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . See also: KDChart::Palette.7. References d.3. Parameters: row The row to query. for painting datasets to the subdued palette.3. 660 { return true.65 void KDChart::AbstractDiagram::useSubduedColors () Set the palette to be used. Definition at line 676 of file KDChartAbstractDiagram. See also: KDChart::Palette.7. int column) const [protected] Helper method. for painting datasets to the rainbow palette.cpp.cpp. Referenced by KDChart::LineDiagram::paint().66 double AbstractDiagram::valueForCell (int row. References d. Returns: The value of the display role at the given row and column as a double. Definition at line 771 of file KDChartAbstractDiagram.67 int AbstractDiagram::verticalOffset () const [virtual] [reimplemented] Definition at line 658 of file KDChartAbstractDiagram.64 void KDChart::AbstractDiagram::useRainbowColors () Set the palette to be used.7 KDChart::AbstractDiagram Class Reference 139 6.cpp.6. and d. column The column to query.cpp.7.7.3.

4. The documentation for this class was generated from the following files: • KDChartAbstractDiagram.h.7.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 645 {} 6.h • KDChartAbstractDiagram.4 Member Data Documentation 6.1 Q_SIGNALS KDChart::AbstractDiagram::__pad0__ [protected] Definition at line 506 of file KDChartAbstractDiagram.68 QRect AbstractDiagram::visualRect (const QModelIndex & index) const [virtual] [reimplemented] Definition at line 641 of file KDChartAbstractDiagram.7. 6.cpp.140 KD Chart 2 Class Documentation 6.7.69 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection & selection) const [virtual] [reimplemented] Definition at line 667 of file KDChartAbstractDiagram.cpp.3.7.3.

8.6. 53 mParent( 0 ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::Legend::paint().8. KDChart::HorizontalLineLayoutItem. • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout. KDChart::CartesianCoordinatePlane. to trigger that widget’s update. KDChart::TextLayout- Item.h> Inheritance diagram for KDChart::AbstractLayoutItem:Collaboration diagram for KDChart::Abstract- LayoutItem: Public Member Functions • AbstractLayoutItem (Qt::Alignment itemAlignment=0) • virtual void paint (QPainter ∗)=0 • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size. and KDChart::PolarCoordinatePlane. 54 mParentLayout( 0 ) {} 6.8 KDChart::AbstractLayoutItem Class Reference 141 6.8 KDChart::AbstractLayoutItem Class Reference #include <KDChartLayoutItems. KDChart::MarkerLayoutItem.1 Constructor & Destructor Documentation 6. 51 : 52 QLayoutItem( itemAlignment ).8. whenever the size of the item’s contents has changed. KDChart::AbstractArea::paintAll(). and paintCtx().8.2.1 KDChart::AbstractLayoutItem::AbstractLayoutItem (Qt::Alignment itemAlignment = 0) Definition at line 51 of file KDChartLayoutItems.1. • void removeFromParentLayout () • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item.1 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual] Implemented in KDChart::CartesianAxis. KDChart::VerticalLineLayout- Item.2 Member Function Documentation 6.h. Protected Attributes • QWidget ∗ mParent • QLayout ∗ mParentLayout 6.

that has a non-fixed size.h.3 void KDChart::AbstractLayoutItem::removeFromParentLayout () Definition at line 66 of file KDChartLayoutItems. 57 { 58 mParent = widget.cpp. Thus. to trigger that widget’s update. whenever the size of the item’s contents has changed. Definition at line 64 of file KDChartLayoutItems. 65 { 66 if( context ) 67 paint( context->painter() ).8. Definition at line 56 of file KDChartLayoutItems.cpp. and KDChart::PaintContext::painter(). 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ).4 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) Definition at line 62 of file KDChartLayoutItems. Referenced by KDChart::Chart::takeCoordinatePlane().142 KD Chart 2 Class Documentation 6. References paint().2. 68 } 6.2.2.2.2 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual] Default impl: Paint the complete item using its layouted position and size. 71 else 72 mParentLayout->removeItem( this ). you need to call setParentWidget on every item. 59 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References mParent.8. 65 } 6. Reimplemented in KDChart::CartesianAxis.8.8. 63 { 64 mParentLayout = lay. 73 } 74 } 6. Referenced by KDChart::Legend::buildLegend(). and KDChart::AbstractCartesianDiagram::takeAxis().h.5 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual] Inform the item about its widget: This enables the item.

cpp. Definition at line 73 of file KDChartLayoutItems. The documentation for this class was generated from the following files: • KDChartLayoutItems.3. 82 } 83 } 6.8.3.h.8 KDChart::AbstractLayoutItem Class Reference 143 6. 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate(). new QEvent( QEvent::LayoutRequest ) ).2 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected] Definition at line 77 of file KDChartLayoutItems.1 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected] Definition at line 76 of file KDChartLayoutItems.3 Member Data Documentation 6. Referenced by setParentWidget().8. 6. Referenced by KDChart::TextLayoutItem::sizeHint().cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .8.6.8. 76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called"). 74 { 75 // This is exactly like what QWidget::updateGeometry does. 80 else 81 QApplication::postEvent( mParent.h.2.h • KDChartLayoutItems.6 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual] Report changed size hint: ask the parent widget to recalculate the layout.

const QModelIndex &bottomRight) [reimplemented] • QList< QBrush > datasetBrushes () const The set of dataset brushes currently used. etc. • QList< MarkerAttributes > datasetMarkers () const The set of dataset markers currently used. for painting the datapoint at the given index in the model. how many value dimensions it expects each datapoint to have. for use in legends. QPointF > dataBoundaries () const Return the bottom left and top right data point. • const QPair< QPointF. • QStringList datasetLabels () const The set of dataset labels currently displayed. for use in legends. • int columnCount () const • AbstractCoordinatePlane ∗ coordinatePlane () const The coordinate plane associated with the diagram.144 KD Chart 2 Class Documentation 6. • QBrush brush () const Retrieve the brush to be used for painting datapoints globally. etc.h> Inheritance diagram for KDChart::AbstractPieDiagram:Collaboration diagram for KDChart::AbstractPie- Diagram: Public Member Functions • AbstractPieDiagram (QWidget ∗parent=0. that is used by this diagram.9 KDChart::AbstractPieDiagram Class Reference #include <KDChartAbstractPieDiagram. • int datasetDimension () const The dataset dimension of a diagram determines. • QList< QPen > datasetPens () const The set of dataset pens currently used. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . PolarCoordinatePlane ∗plane=0) • bool allowOverlappingDataValueTexts () const • bool antiAliasing () const • virtual AttributesModel ∗ attributesModel () const Returns the AttributesModel. etc. • QBrush brush (int dataset) const Retrieve the brush to be used for the given dataset. for use in legends. • QBrush brush (const QModelIndex &index) const Retrieve the brush to be used. • virtual void dataChanged (const QModelIndex &topLeft. etc. that the diagram will display (unless the grid adjusts these values). for use in legends.

for painting the datapoint at the given index in the model. • QPen pen () const Retrieve the pen to be used for painting datapoints globally. etc. const QBrush &brush. • virtual QModelIndex moveCursor (CursorAction cursorAction.6. • DataValueAttributes dataValueAttributes (int column) const Retrieve the DataValueAttributes for the given dataset. for use in Abscissa axes. • QPen pen (int dataset) const Retrieve the pen to be used for the given dataset. const MarkerAttributes &markerAttributes. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9 KDChart::AbstractPieDiagram Class Reference 145 • DataValueAttributes dataValueAttributes (const QModelIndex &index) const Retrieve the DataValueAttributes for the given index. const QSizeF &size) • QPen pen (const QModelIndex &index) const Retrieve the pen to be used. • bool percentMode () const • PieAttributes pieAttributes (const QModelIndex &index) const • PieAttributes pieAttributes (int column) const • PieAttributes pieAttributes () const • const PolarCoordinatePlane ∗ polarCoordinatePlane () const • virtual void resize (const QSizeF &area)=0 Called by the widget’s sizeEvent. • DataValueAttributes dataValueAttributes () const Retrieve the DataValueAttributes speficied globally. const QPen &. Qt::KeyboardModifiers modifiers) [reimplemented] • virtual double numberOfGridRings () const=0 • virtual double numberOfValuesPerDataset () const=0 • virtual void paintMarker (QPainter ∗painter. const QPointF &point. • virtual void doItemsLayout () [reimplemented] • qreal granularity () const • virtual int horizontalOffset () const [reimplemented] • virtual QModelIndex indexAt (const QPoint &point) const [reimplemented] • virtual bool isIndexHidden (const QModelIndex &index) const [reimplemented] • QStringList itemRowLabels () const The set of item row labels currently displayed.

• void setBrush (const QModelIndex &index. • void setBrush (int dataset. • void setBrush (const QBrush &brush) Set the brush to be used. const QBrush &brush) Set the brush to be used. • void setPen (int dataset. for painting the given dataset. const DataValueAttributes &a) Set the DataValueAttributes for the given index. • virtual void setCoordinatePlane (AbstractCoordinatePlane ∗plane) Set the coordinate plane associated with the diagram. for painting all datasets in the model. • void setDataValueAttributes (int dataset. ScrollHint hint=EnsureVisible) [reimplemented] • void setAllowOverlappingDataValueTexts (bool allow) Set whether data value labels are allowed to overlap. • void setDataValueAttributes (const QModelIndex &index. • void setPen (const QPen &pen) Set the pen to be used. for painting all datasets in the model. • virtual void setModel (QAbstractItemModel ∗model) Associate a model with the diagram. • void setAntiAliasing (bool enabled) Set whether anti-aliasing is to be used while rendering this diagram. • virtual void setAttributesModel (AttributesModel ∗model) Associate an AttributesModel with this diagram. • void setDataValueAttributes (const DataValueAttributes &a) Set the DataValueAttributes for all datapoints in the model. const QPen &pen) Set the pen to be used. • void setDatasetDimension (int dimension) Sets the dataset dimension of the diagram. const QPen &pen) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • void setGranularity (qreal value) Set the granularity: the smaller the granularity the more your diagram segments will show facettes instead of rounded segments. • void setPen (const QModelIndex &index. for painting the given dataset. const QBrush &brush) Set the brush to be used. for painting the datapoint at the given index.146 KD Chart 2 Class Documentation • virtual void scrollTo (const QModelIndex &index. const DataValueAttributes &a) Set the DataValueAttributes for the given dataset.

• void useSubduedColors () Set the palette to be used. QItemSelectionModel::SelectionFlags command) [reimplemented] • void setStartPosition (qreal degrees) Set the starting angle for the first dataset. for painting datasets to the default palette.6. • void setPercentMode (bool percent) • void setPieAttributes (int column. for painting datasets to the subdued palette.9 KDChart::AbstractPieDiagram Class Reference 147 Set the pen to be used. const ThreeDPieAttributes &a) • void setThreeDPieAttributes (const ThreeDPieAttributes &a) • qreal startPosition () const • ThreeDPieAttributes threeDPieAttributes (const QModelIndex &index) const • ThreeDPieAttributes threeDPieAttributes (int column) const • ThreeDPieAttributes threeDPieAttributes () const • void update () const • void useDefaultColors () Set the palette to be used. • void useRainbowColors () Set the palette to be used. QPointF > calculateDataBoundaries () const=0 • virtual bool checkInvariants (bool justReturnTheStatus=false) const • QModelIndex columnToIndex (int column) const • void modelsChanged () Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • virtual void setSelection (const QRect &rect. const ThreeDPieAttributes &a) • void setThreeDPieAttributes (int column. • void setThreeDPieAttributes (const QModelIndex &index. const PieAttributes &a) • void setPieAttributes (const PieAttributes &a) • virtual void setRootIndex (const QModelIndex &idx) Set the root index in the model. for painting the datapoint at the given index. for painting datasets to the rainbow palette. where the diagram starts referencing data for display. • virtual double valueTotals () const=0 • virtual int verticalOffset () const [reimplemented] • virtual QRect visualRect (const QModelIndex &index) const [reimplemented] • virtual QRegion visualRegionForSelection (const QItemSelection &selection) const [reimplemented] • virtual ∼AbstractPieDiagram () Protected Member Functions • QModelIndex attributesModelRootIndex () const • virtual const QPair< QPointF.

9. when either the model or the AttributesModel is replaced.1. 51 } 6.9.cpp. int column) const Helper method. Protected Attributes • Q_SIGNALS __pad0__: void layoutChanged( AbstractDiagram∗ ) 6. 47 : 48 AbstractPolarDiagram( new Private().cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • virtual void paint (PaintContext ∗paintContext)=0 Draw the diagram contents to the rectangle and painter. const QModelIndex &index.2 AbstractPieDiagram::∼AbstractPieDiagram () [virtual] Definition at line 53 of file KDChartAbstractPieDiagram.9. const QPointF &pos) • virtual void paintMarkers (QPainter ∗painter) • void propertiesChanged () Emitted upon change of a property of the Diagram. retrieving the data value (DisplayRole) for a given row and column.1 Constructor & Destructor Documentation 6. • void setAttributesModelRootIndex (const QModelIndex &) • void setDataBoundariesDirty () const • double valueForCell (int row.148 KD Chart 2 Class Documentation This signal is emitted. that are passed in as part of the paint context.2 Member Function Documentation 6.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited] Returns: Whether data value labels are allowed to overlap. plane ) 49 { 50 init(). const QModelIndex &index.1.9. parent.1 AbstractPieDiagram::AbstractPieDiagram (QWidget ∗ parent = 0. const QPointF &pos. 54 { 55 } 6. • void paintDataValueText (QPainter ∗painter. PolarCoordinatePlane ∗ plane = 0) [explicit] Definition at line 47 of file KDChartAbstractPieDiagram.2. dou- ble value) • virtual void paintDataValueTexts (QPainter ∗painter) • void paintMarker (QPainter ∗painter.9.

References d. that is used by this diagram.9.2 bool AbstractDiagram::antiAliasing () const [inherited] Returns: Whether anti-aliasing is to be used for rendering this diagram.9.2. and KDChart::Bar- Diagram::setBarAttributes(). inherited] returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram.cpp. which should never be deleted.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected.cpp. Definition at line 204 of file KDChartAbstractDiagram. Definition at line 302 of file KDChartAbstractDiagram. inherited] Returns the AttributesModel. Referenced by KDChart::RingDiagram::paint(). Referenced by KDChart::LineDiagram::paint(). By default each diagram owns its own AttributesModel.2. KDChart::PolarDiagram::paint(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9.cpp. References d.9 KDChart::AbstractPieDiagram Class Reference 149 Definition at line 291 of file KDChartAbstractDiagram. Only if a user- supplied AttributesModel has been set does the pointer returned here not belong to the diagram. 181 { 182 return d->attributesModel. 295 { 6.2. See also: setAttributesModel Definition at line 180 of file KDChartAbstractDiagram. References d.6. Returns: The AttributesModel associated with the diagram. 306 { 6.cpp. 183 } 6. References d.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual.

KDChart::Bar- Diagram::paint(). Parameters: index The index of the datapoint in the model. for painting the datapoint at the given index in the model.9.cpp.7 QBrush AbstractDiagram::brush () const [inherited] Retrieve the brush to be used for painting datapoints globally.6 QBrush AbstractDiagram::brush (int dataset) const [inherited] Retrieve the brush to be used for the given dataset. Definition at line 632 of file KDChartAbstractDiagram. 210 { 6. KDChart::LineDiagram::numberOfOrdinateSegments().2.150 KD Chart 2 Class Documentation Referenced by KDChart::LineDiagram::calculateDataBoundaries(). Returns: The brush to use for painting. Returns: The brush to use for painting. KDChart::LineDiagram::numberOfAbscissaSegments(). KDChart::Bar- Diagram::numberOfAbscissaSegments().cpp.9. Returns: The brush to use for painting. 631 { 6. and KDChart::AbstractDiagram::valueForCell(). KDChart::LineDiagram::paint().5 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited] Retrieve the brush to be used. Referenced by KDChart::PieDiagram::paint(). 638 : QRect AbstractDiagram::visualRect(const QModelIndex &) const 6. Parameters: dataset The dataset to retrieve the brush for. if there are no specific settings.9. KDChart::BarDiagram::calculate- DataBoundaries().cpp. if there are no dataset specific settings.2. KDChart::BarDiagram::numberOfOrdinateSegments(). Definition at line 624 of file KDChartAbstractDiagram. This will fall back automatically to what was set at model level.2. 623 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 618 of file KDChartAbstractDiagram. This will fall back automatically to the default settings. and KDChart::AbstractDiagram::paintMarker().

751 "There is no usable coordinate plane set.10 int AbstractPolarDiagram::columnCount () const [inherited] Definition at line 58 of file KDChartAbstractPolarDiagram. 6. 748 "There is no usable model set.2. virtual. "AbstractDiagram::checkInvariants()". 754 } 755 756 int AbstractDiagram::datasetDimension( ) const 6. KDChart::PieDiagram.cpp.11 QModelIndex AbstractDiagram::columnToIndex (int column) const [protected. and KDChart::AbstractDiagram::paintMarker(). Referenced by KDChart::RingDiagram::calculateDataBoundaries().6.2. KDChart::BarDiagram::calculateDataBoundaries().cpp.2. 217 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] Implemented in KDChart::BarDiagram. 746 { 747 Q_ASSERT_X ( model(). References KDChart::AbstractDiagram::coordinatePlane()." ).9 KDChart::AbstractPieDiagram Class Reference 151 6." ). 749 750 Q_ASSERT_X ( coordinatePlane(). References KDChart::AbstractPolarDiagram::numberOfValuesPerDataset(). KDChart::PieDiagram::paint(). KDChart::RingDiagram::paint(). KDChart::PieDiagram::calculateDataBoundaries().9. for the diagram. "AbstractDiagram::checkInvariants()".8 virtual const QPair<QPointF. inherited] Definition at line 746 of file KDChartAbstractDiagram.9. and KDChart::PieDiagram::valueTotals(). inherited] Definition at line 211 of file KDChartAbstractDiagram. Referenced by KDChart::AbstractDiagram::dataBoundaries().9 bool AbstractDiagram::checkInvariants (bool justReturnTheStatus = false) const [protected. KDChart::BarDiagram::paint(). and KDChart::RingDiagram. KDChart::PolarDiagram::calculate- DataBoundaries(). pure virtual. 752 } 753 return model() && coordinatePlane(). KDChart::LineDiagram::paint(). for the diagram.9. KDChart::PolarDiagram::paint(). 61 } 6.cpp.9. Referenced by KDChart::PieDiagram::calculateDataBoundaries(). 59 { 60 return static_cast<int>( numberOfValuesPerDataset() ). KDChart::Polar- Diagram. KDChart::PieDiagram::paint(). KDChart::LineDiagram. KDChart::LineDiagram::calculate- DataBoundaries(). QPointF> KDChart::Abstract- Diagram::calculateDataBoundaries () const [protected.2.

QPointF > AbstractDiagram::dataBoundaries () const [inherited] Return the bottom left and top right data point. KDChart::BarDiagram::paint().152 KD Chart 2 Class Documentation 6. that the diagram will display (unless the grid adjusts these values). Definition at line 130 of file KDChartAbstractDiagram.cpp.14 void AbstractDiagram::dataChanged (const QModelIndex & topLeft. inherited] [reimplemented] Definition at line 232 of file KDChartAbstractDiagram. References d. By default this is a Cartesian- CoordinatePlane. KDChart::LineDiagram::paint(). If derived classes want to force recalculation of the data boundaries.13 const QPair< QPointF. and d. Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(). const QModelIndex & bottomRight) [virtual. This method returns a chached result of calculations done by calculateDataBoundaries. and KDChart::AbstractCartesianDiagram::setCoordinatePlane(). 128 } 6. to specify their own way of calculating the data boundaries.2.2. 131 { 132 if( d->databoundariesDirty ){ 133 d->databoundaries = calculateDataBoundaries ().9. This determines how coordinates in value space are mapped into pixel space. 137 } 6. KDChart::AbstractDiagram::check- Invariants(). 135 } 136 return d->databoundaries. 126 { 127 return d->plane. Referenced by KDChart::BarDiagram::calculateDataBoundaries(). KDChart::AbstractPolarDiagram::polar- CoordinatePlane(). References KDChart::AbstractDiagram::calculateDataBoundaries().9. KDChart::AbstractCartesianDiagram::layoutPlanes(). KDChart::LineDiagram::paint(). Definition at line 125 of file KDChartAbstractDiagram. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::Polar- CoordinatePlane::layoutDiagrams().cpp. and KDChart::BarDiagram::paint().9.12 AbstractCoordinatePlane ∗ AbstractDiagram::coordinatePlane () const [inherited] The coordinate plane associated with the diagram. 134 d->databoundariesDirty = false. KDChart::PolarDiagram::paint().cpp. Returns: The coordinate plane associated with the diagram. they can call setDataBoundariesDirty() Returned value is in diagram coordinates.2. References d. Classes derived from AbstractDiagram must implement the calculateDataBoundaries function.

Referenced by KDChart::Legend::buildLegend().2. so you might need to check these too.cpp. If the dimension is 2. automatic values will be used for the abscissa. KDChart::Legend::datasetCount(). Definition at line 710 of file KDChartAbstractDiagram. etc) column as Y values.15 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited] The set of dataset brushes currently used. KDChart::CartesianCoordinatePlane::getDataDimensionsList().9 KDChart::AbstractPieDiagram Class Reference 153 232 { 233 // We are still too dumb to do intelligent updates.2. and KDChart::Legend::setBrushesFromDiagram(). (and the fourth. 234 d->databoundariesDirty = true. Note: Cell-level override brushes. etc. that is used for a single cell. fifth. If the dimensionality is 1. KDChart::Line- Diagram::paint(). Returns: The current set of dataset brushes. 3. sixth. how many value dimensions it expects each datapoint to have. For each dimension it will expect one column of values in the model. will have one column per datapoint (the y values) and will use automatic values for the x axis (1.9. etc) columns as X values. KDChart::LineDiagram::get- CellValues(). if set. 2. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . For example a diagram with the default dimension of 1. 712 { 713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i.6. 715 } 716 717 return ret.. 718 } 719 720 QList<QPen> AbstractDiagram::datasetPens() const 6. in order to find the brush. n). Definition at line 758 of file KDChartAbstractDiagram. References d. Returns: The dataset dimension of the diagram. the diagram will use the first. take precedence over the dataset values.16 int AbstractDiagram::datasetDimension () const [inherited] The dataset dimension of a diagram determines. Qt::Vertical. 235 scheduleDelayedItemsLayout(). DatasetB 714 ret << brush... 6.cpp. (and the third. .. for use in legends.9. and KDChart::LineDiagram::setType(). 236 } 237 238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index. Referenced by KDChart::LineDiagram::calculateDataBoundaries(). and the second.

Returns: The set of dataset labels currently displayed. 739 ret << ma. 699 : " << attributesModel()->columnCount(attributesModel 700 const int columnCount = attributesModel()->columnCount(attributesModelRootIndex()). 706 } 707 708 QList<QBrush> AbstractDiagram::datasetBrushes() const 6. Definition at line 698 of file KDChartAbstractDiagram. Qt::DisplayRole ).toString(). 704 } 705 return ret. i += datasetDimension() ){ 702 //qDebug() << "label: " << attributesModel()->headerData( i. 735 { 736 DataValueAttributes a = 737 qVariantValue<DataValueAttributes>( attributesModel()->headerData( i.2. for use in legends. etc. Qt::Horizontal.17 QStringList AbstractDiagram::datasetLabels () const [inherited] The set of dataset labels currently displayed. that is shown for a single cell. Qt::Vertical. and KDChart::Legend::datasetCount(). for use in legends. 701 for( int i = datasetDimension()-1. Note: Cell-level override markers. so you might need to check these too.9. in order to find the marker. 740 } 741 return ret. Referenced by KDChart::Legend::buildLegend(). i < columnCount. etc. Returns: The current set of dataset brushes. Qt::Horizontal. take precedence over the dataset values.2. Qt::DisplayRole ) 703 ret << attributesModel()->headerData( i. Definition at line 733 of file KDChartAbstractDiagram. DataVa 738 const MarkerAttributes &ma = a.markerAttributes().cpp.cpp. if set. Referenced by KDChart::Legend::buildLegend().9.18 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited] The set of dataset markers currently used.154 KD Chart 2 Class Documentation 762 { 6. 742 } 743 744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

in order to find the pens. Returns: The DataValueAttributes for the given dataset. Parameters: dataset The dataset to retrieve the attributes for.21 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const [inherited] Retrieve the DataValueAttributes for the given dataset. etc. This will fall back automatically to what was set at dataset or model level. if there are no dataset specific settings.19 QList< QPen > AbstractDiagram::datasetPens () const [inherited] The set of dataset pens currently used. Note: Cell-level override pens.2. that is used for a single cell. DatasetPenRole 726 ret << pen. for use in legends. if set. This will fall back automatically to what was set at model level.cpp. take precedence over the dataset values. Returns: The DataValueAttributes for the given index. 727 } 728 return ret. Qt::Vertical. Definition at line 722 of file KDChartAbstractDiagram. so you might need to check these too. if there are no datapoint specific settings.cpp. Returns: The current set of dataset pens.9.2.20 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex & index) const [inherited] Retrieve the DataValueAttributes for the given index.6.9 KDChart::AbstractPieDiagram Class Reference 155 6.9. 729 } 730 731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const 6.2.9. Parameters: index The datapoint to retrieve the attributes for. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::Legend::buildLegend(). 278 { 6. Definition at line 272 of file KDChartAbstractDiagram. 724 { 725 QPen pen = qVariantValue<QPen>( attributesModel()->headerData( i.

0) 84 ? 1.24 qreal AbstractPieDiagram::granularity () const Returns: the granularity. 264 { 6. Definition at line 260 of file KDChartAbstractDiagram.05 || d->granularity > 36. Returns: The global DataValueAttributes. and KDChart::AbstractDiagram::update().9.2. 82 { 83 return (d->granularity < 0. if there are no specific settings. 223 { 224 d->plane->layoutDiagrams(). References d.9. References d. Definition at line 81 of file KDChartAbstractPieDiagram. 271 { 6. Referenced by KDChart::AbstractDiagram::paintDataValueText().2. and KDChart::AbstractDiagram::paint- Marker(). Referenced by KDChart::PieDiagram::paint().156 KD Chart 2 Class Documentation Definition at line 265 of file KDChartAbstractDiagram.9. 228 } 229 230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft.2.cpp. 225 update().23 void AbstractDiagram::doItemsLayout () [virtual.cpp. 86 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.0 85 : d->granularity.22 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited] Retrieve the DataValueAttributes speficied globally.cpp. inherited] [reimplemented] Definition at line 223 of file KDChartAbstractDiagram. This will fall back automatically to the default settings. 226 } 227 QAbstractItemView::doItemsLayout(). 6.

i < rowCount.9.cpp. inherited] This signal is emitted. } 6.2. Qt::Vertical. 692 } 693 return ret. ++i ){ 690 //qDebug() << "label: " << attributesModel()->headerData( i. inherited] [reimplemented] Definition at line 661 of file KDChartAbstractDiagram.9. 657 { return 0. etc. } 6. inherited] [reimplemented] Definition at line 649 of file KDChartAbstractDiagram.9 KDChart::AbstractPieDiagram Class Reference 157 6.9.cpp.2.2.9.25 int AbstractDiagram::horizontalOffset () const [virtual. Qt::DisplayRole ). Referenced by KDChart::AbstractDiagram::setAttributesModel().toString(). Qt::Vertical. inherited] [reimplemented] Definition at line 655 of file KDChartAbstractDiagram. Returns: The set of item row labels currently displayed. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.2.27 bool AbstractDiagram::isIndexHidden (const QModelIndex & index) const [virtual.cpp. Definition at line 686 of file KDChartAbstractDiagram. 663 {} 6.t 691 ret << attributesModel()->headerData( i. Qt::DisplayRole ).28 QStringList AbstractDiagram::itemRowLabels () const [inherited] The set of item row labels currently displayed.29 void KDChart::AbstractDiagram::modelsChanged () [protected. for use in Abscissa axes. when either the model or the AttributesModel is replaced. and KDChart::AbstractDiagram::set- Model().26 QModelIndex AbstractDiagram::indexAt (const QPoint & point) const [virtual.6. 651 { return QModelIndex().9. 689 for( int i = 0. 687 : " << attributesModel()->rowCount(attributesModelRoo 688 const int rowCount = attributesModel()->rowCount(attributesModelRootIndex()).cpp. 694 } 695 696 QStringList AbstractDiagram::datasetLabels() const 6.

KDChart::PieDiagram. KDChart::Polar- Diagram.9. KDChart::AbstractDiagram::dataValue- Attributes(). KDChart::DataValueAttributes::decimalDigits().32 virtual double KDChart::AbstractPolarDiagram::numberOfValuesPerDataset () const [pure virtual. and KDChart::RingDiagram. 654 { return 0. Referenced by KDChart::RingDiagram::paint(). 320 { 321 // paint one data series 322 DataValueAttributes a = dataValueAttributes(index). KDChart::TextAttributes::font().31 virtual double KDChart::AbstractPolarDiagram::numberOfGridRings () const [pure virtual.2.2. and KDChart::RingDiagram.34 void AbstractDiagram::paintDataValueText (QPainter ∗ painter. Referenced by KDChart::AbstractPolarDiagram::columnCount(). KDChart::DataValueAttributes::isVisible(). inherited] Draw the diagram contents to the rectangle and painter. References KDChart::DataValueAttributes::dataLabel().isVisible() ) return. 324 325 // handle decimal digits 326 int decimalDigits = a.9. Parameters: paintContext All information needed for painting. } 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9. 6. inherited] Definition at line 318 of file KDChartAbstractDiagram. KDChart::Text- Attributes::pen(). inherited] [reimplemented] Definition at line 652 of file KDChartAbstractDiagram. 6. and KDChart::RingDiagram. KDChart::TextAttributes::isVisible(). double value) [protected.33 virtual void KDChart::AbstractDiagram::paint (PaintContext ∗ paintContext) [protected. const QModelIndex & index.2. 6. KDChart::Line- Diagram::paint(). inherited] Implemented in KDChart::PieDiagram. KDChart::PolarDiagram.9. and KDChart::BarDiagram::paint(). KDChart::PolarDiagram::paint().158 KD Chart 2 Class Documentation 6.9. pure virtual.30 QModelIndex AbstractDiagram::moveCursor (CursorAction cursorAction.cpp. Implemented in KDChart::BarDiagram. KDChart::PolarDiagram. and KDChart::DataValueAttributes::textAttributes().2. inherited] Implemented in KDChart::PieDiagram. KDChart::LineDiagram. that are passed in as part of the paint context. KDChart::TextAttributes::rotation(). Qt::KeyboardModifiers modifiers) [virtual.2. KDChart::DataValueAttributes::prefix().decimalDigits(). 323 if ( !a. KDChart::DataValueAttributes::suffix(). const QPointF & pos.cpp.

isNull() ) { 330 if ( decimalPos > 0 && value != 0 ) 331 roundedValue = roundValues ( value. 348 painter->setFont( ta.suffix() ).’ ) ). const QModelIndex & index.cpp.2. pos. i. 336 // handle prefix and suffix 337 if ( !a. References KDChart::AbstractDiagram::brush(). KDChart::MarkerAttributes::isVisible(). 328 QString roundedValue. rootIndex() ).6. 399 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::DataValueAttributes::isVisible(). etc 345 const TextAttributes &ta = a. 385 { 386 for ( int j=0. KDChart::AbstractDiagram::checkInvariants().9.2. KDChart::MarkerAttributes::markerSize().36 void AbstractDiagram::paintMarker (QPainter ∗ painter.prepend( a. background.pen() ). virtual.append( a. 332 else 333 roundedValue = QString::number( value ). const QPointF & pos) [protected.prefix(). value ) ). 352 } 353 } 354 355 QString AbstractDiagram::roundValues( double value. 0). value ).cpp.dataLabel(). 339 340 if ( !a.9 KDChart::AbstractPieDiagram Class Reference 159 327 int decimalPos = QString::number( value ). 334 } else 335 roundedValue = a. inherited] Definition at line 398 of file KDChartAbstractDiagram. KDChart::AbstractDiagram::dataValueAttributes().toDouble().dataLabel(). 6. j< rowCount. roundedValue ). 390 paintDataValueText( painter. 388 double value = model()->data( index ).indexOf( QLatin1Char( ’. 389 const QPointF pos = coordinatePlane()->translate( QPointF( j.35 void AbstractDiagram::paintDataValueTexts (QPainter ∗ painter) [protected. KDChart::MarkerAttributes::markerColor(). 342 343 PainterSaver painterSaver( painter ). KDChart::AbstractDiagram::paintMarker(). ++j ) { 387 const QModelIndex index = model()->index( j. decimalDigits ). KDChart::DataValueAttributes::markerAttributes().font() ).isNull() ) 338 roundedValue.textAttributes().suffix(). decimalPos. 344 // FIXME draw the non-text bits. 350 painter->rotate( ta. 346 if ( ta. and KDChart::MarkerAttributes::pen(). inherited] Definition at line 382 of file KDChartAbstractDiagram. 391 } 392 } 393 } 394 395 6.isVisible() ) { 347 painter->setPen( ta. 349 painter->translate( pos ).rotation() ).prefix() ). index.9. 351 painter->drawText( QPointF(0.isNull() ) 341 roundedValue. 329 if ( a.

width()) ). 454 } 455 //Pending Michel: do we need that? Ask: What is the idea about 456 // Marker1Pixel and Marker4Pixels.height()/2.maSize. 430 switch ( markerAttributes. 404 const MarkerAttributes &ma = a. 415 } 416 417 6. const QPen &. 448 left = QPointF( 0 . 426 painter->setBrush( brush ).height()/2. indexPen.width()/2. 413 414 paintMarker( painter. 0 ).9. 0 . 0 . 447 top = QPointF( 0. const QBrush & brush. 405 if ( !ma. 410 QPen indexPen( ma. References KDChart::MarkerAttributes::markerStyle(). and KDChart::AbstractDiagram::paintMarker().width()/2. 428 painter->setRenderHint ( QPainter::Antialiasing ). 433 maSize.pen() ). maSize.isVisible() ) return. 438 maSize.2. const QPointF & point.height()/2 ). const MarkerAttributes & markerAttributes. 453 break.width()/2.width() ).maSize.width()/2. 440 painter->fillRect( rect. 441 break.maSize. maSize ).markerColor() ). KDChart::MarkerLayoutItem::paint().height().setColor( ma. 0 ). ma.maSize. const QSizeF & size) [virtual.markerStyle() ) { 431 case MarkerAttributes::MarkerCircle: 432 painter->drawEllipse( QRectF( 0 . 451 diamondPoints << top << left << bottom << right. 434 break.160 KD Chart 2 Class Documentation 400 401 if ( !checkInvariants() ) return.isVisible() ) return. painter->brush() ). pos. 442 } 443 case MarkerAttributes::MarkerDiamond: 444 { 445 QVector <QPointF > diamondPoints. 427 painter->setPen( pen ). 424 { 425 PainterSaver painterSaver( painter ). 409 QBrush indexBrush( brush( index ) ). 435 case MarkerAttributes::MarkerSquare: 436 { 437 QRectF rect( 0 . inherited] Definition at line 420 of file KDChartAbstractDiagram.cpp. left. 0 . bottom. 406 407 PainterSaver painterSaver( painter ).markerColor().37 void AbstractDiagram::paintMarker (QPainter ∗ painter.maSize. Referenced by KDChart::LineDiagram::paint(). 402 DataValueAttributes a = dataValueAttributes(index). 449 bottom = QPointF( 0.markerAttributes(). 457 case MarkerAttributes::Marker1Pixel: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . maSize. 408 QSizeF maSize( ma. 403 if ( !a.height().maSize. 450 right = QPointF( maSize. 439 painter->drawRect( rect ). 429 painter->translate( pos ). 411 if ( ma. maSize. 452 painter->drawPolygon( diamondPoints ).markerSize() ). 446 QPointF top.isValid() ) 412 indexBrush. indexBrush.height()/2 ). right.

484 break. maSize. -maSize. 521 painter->drawLine( top.rightBottom. 518 top = QPointF( 0. 512 } 513 case MarkerAttributes::MarkerFastCross: 514 { 515 QPointF left. 491 centerTopLeft. 502 topLeft = QPointF( -maSize.height()/4 ). 460 QPen pen1Pixel. 497 centerBottomRight = QPointF( maSize.height()/4 ). 504 505 crossPoints << leftTop << leftBottom << centerBottomLeft 506 << bottomLeft << bottomRight << centerBottomRight 507 << rightBottom << rightTop << centerTopRight 508 << topRight << topLeft << centerTopLeft.width()/2.height()/2 ). -maSize. 511 break. maSize. 522 break.6. bottom.height()/2 ). top. bottom ).height()/2. 489 QPointF leftTop. maSize. 495 bottomLeft = QPointF( -maSize. 472 pen4Pixel. 465 painter->drawEllipse( centerRect ).width() ). right. -maSize. pSize. bottomRight.width()/2. 461 pen1Pixel.height()/2 ).width()/4. 496 bottomRight = QPointF( maSize. pSize.width() ). maSize. maSize. topLeft.color() ).width()/4. 485 } 486 case MarkerAttributes::MarkerCross: 487 { 488 QVector <QPointF > crossPoints. 490 centerBottomRight. 463 pSize. 0 ).width()/2.height()/4 ).height()/2.setColor( painter->background(). -pSize.width()/4.width()/2.height()/4 ).height(). bottomLeft. 0 ). 474 pSize.height()/2 ). -maSize.height()/2 ). 517 right = QPointF( maSize. rightTop. 493 leftBottom = QPointF( -maSize. right ).9 KDChart::AbstractPieDiagram Class Reference 161 458 { 459 QSizeF pSize(4. 464 painter->setPen( pen1Pixel ).width()) ). 0 .maSize.4). 466 break. -pSize. 8). 462 QRectF centerRect( -pSize.height(). 483 maSize.width()/4. maSize. 501 topRight = QPointF( maSize. 499 rightTop = QPointF( maSize.width()/2. maSize.width()/4.height().width()/2. 500 centerTopRight = QPointF( maSize. 494 centerBottomLeft = QPointF( -maSize. 471 QPen pen4Pixel. 473 QRectF centerRect( -pSize. 498 rightBottom = QPointF( maSize. maSize. 519 bottom= QPointF( 0.height()/4 ). centerBottomLeft.width()/2.height()/2. 520 painter->drawLine( left.maSize. topRight. 516 left = QPointF( -maSize. 482 painter->drawEllipse( QRectF( 0 .width()/4.color() ).width()/2. 478 } 479 case MarkerAttributes::MarkerRing: 480 { 481 painter->setBrush( Qt::NoBrush ). 492 leftTop = QPointF( -maSize. -maSize.height()/4 ). 467 } 468 case MarkerAttributes::Marker4Pixels: 469 { 470 QSizeF pSize(8. 475 painter->setPen( pen4Pixel ). 476 painter->drawEllipse( centerRect ). -maSize. -maSize.height()/2 ).width()/4. 523 } 524 default: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .setColor( painter->background(). centerTopRight.width()/4.height()/4 ). 503 centerTopLeft = QPointF( -maSize.height()/4 ). leftBottom.width()/2. 477 break. 509 510 painter->drawPolygon( crossPoints ).

"paintMarkers()". Returns: The pen to use for painting. 538 double value = model()->data( index ).38 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected. value ) ).2. 541 } 542 } 543 } 544 545 6.2. i. Parameters: dataset The dataset to retrieve the pen for. inherited] Definition at line 532 of file KDChartAbstractDiagram.9. Definition at line 586 of file KDChartAbstractDiagram. for painting the datapoint at the given index in the model.cpp. Returns: The pen to use for painting. This will fall back automatically to what was set at model level. pos ).162 KD Chart 2 Class Documentation 525 Q_ASSERT_X ( false.toDouble(). rootIndex() ).cpp.39 QPen AbstractDiagram::pen (const QModelIndex & index) const [inherited] Retrieve the pen to be used. index. virtual. 535 { 536 for ( int j=0. 540 paintMarker( painter.9. Parameters: index The index of the datapoint in the model." ). ++j ) { 537 const QModelIndex index = model()->index( j. 527 } 528 } 529 530 void AbstractDiagram::paintMarkers( QPainter* painter ) 6.2. 593 { 6.cpp. 539 const QPointF pos = coordinatePlane()->translate( QPointF( j. Definition at line 578 of file KDChartAbstractDiagram. 526 "Type item does not match a defined Marker Type. if there are no dataset specific settings. 585 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9. j< rowCount.40 QPen AbstractDiagram::pen (int dataset) const [inherited] Retrieve the pen to be used for the given dataset.

and KDChart::PieAttributesRole.6.9.42 bool AbstractDiagram::percentMode () const [inherited] Definition at line 313 of file KDChartAbstractDiagram. and KDChart::PieAttributesRole.cpp. 320 { 6. 115 { 116 return qVariantValue<PieAttributes>( 117 d->attributesModel->data( 118 d->attributesModel->mapFromSource( columnToIndex( column ) ). 120 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .9.2. 119 PieAttributesRole ) ). 123 { 124 return qVariantValue<PieAttributes>( 125 d->attributesModel->data( 126 d->attributesModel->mapFromSource( index ). This will fall back automatically to the default settings. Definition at line 572 of file KDChartAbstractDiagram.2.2. 577 { 6.9 KDChart::AbstractPieDiagram Class Reference 163 6.column().44 PieAttributes AbstractPieDiagram::pieAttributes (int column) const Definition at line 114 of file KDChartAbstractPieDiagram. 127 PieAttributesRole ) ). Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(). if there are no specific settings.cpp. Referenced by KDChart::PieDiagram::paint().2. Returns: The pen to use for painting. References d.cpp.43 PieAttributes AbstractPieDiagram::pieAttributes (const QModelIndex & index) const Definition at line 122 of file KDChartAbstractPieDiagram.9.41 QPen AbstractDiagram::pen () const [inherited] Retrieve the pen to be used for painting datapoints globally. 128 } 6. References d.cpp.9. References d.

106 { 107 return qVariantValue<PieAttributes>( 108 d->attributesModel->data( PieAttributesRole ) ). Referenced by KDChart::AbstractDiagram::setDataValueAttributes(). Referenced by KDChart::PieDiagram::calculateDataBoundaries(). 109 } 6.2. inherited] Called by the widget’s sizeEvent. dependending on the size of the widget. 6.2.2. KDChart::LineDiagram::setLine- Attributes().9.cpp.cpp.9. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .46 const PolarCoordinatePlane ∗ AbstractPolarDiagram::polarCoordinatePlane () const [inherited] Definition at line 53 of file KDChartAbstractPolarDiagram. and KDChart::PieAttributesRole. References d. References KDChart::AbstractDiagram::coordinatePlane(). and KDChart::LineDiagram::setType(). Parameters: area Implemented in KDChart::BarDiagram. Referenced by KDChart::PieDiagram::paint(). KDChart::Polar- Diagram. inherited] [reimplemented] Definition at line 646 of file KDChartAbstractDiagram.49 void AbstractDiagram::scrollTo (const QModelIndex & index. ScrollHint hint = EnsureVisible) [virtual.48 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [pure virtual. that are calculated.47 void KDChart::AbstractDiagram::propertiesChanged () [protected. KDChart::PieDiagram.2. KDChart::LineDiagram::setThreeDLineAttributes().9.45 PieAttributes AbstractPieDiagram::pieAttributes () const Definition at line 105 of file KDChartAbstractPieDiagram. 6. and KDChart::RingDiagram.2. and KDChart::PieDiagram::paint(). 54 { 55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() ).164 KD Chart 2 Class Documentation 6. 648 { return QModelIndex().9. inherited] Emitted upon change of a property of the Diagram. 56 } 6. Adjust all internal structures. KDChart::LineDiagram.cpp.9.

cpp.52 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual.cpp. Setting an AttributesModel that is internal to another diagram is an error. 0 ). See also: AttributesModel Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: allow True means that overlapping labels are allowed. Note that the diagram does _not_ take ownership of the AttributesModel.2. Parameters: enabled True means that AA is enabled.2. diagram1->setAttributesModel( am ). References d.9 KDChart::AbstractPieDiagram Class Reference 165 6. 290 { 6. Parameters: model The AttributesModel to use for this diagram. Correct: AttributesModel *am = new AttributesModel( model. Wrong: diagram1->setAttributesModel( diagram2->attributesModel() ).6. and are owned by her. Definition at line 285 of file KDChartAbstractDiagram.9. References d. inherited] Associate an AttributesModel with this diagram.2.51 void AbstractDiagram::setAntiAliasing (bool enabled) [inherited] Set whether anti-aliasing is to be used while rendering this diagram. diagram2->setAttributesModel( am ). This should thus only be used with AttributesModels that have been explicitely created by the user. 301 { 6.9.9.50 void AbstractDiagram::setAllowOverlappingDataValueTexts (bool allow) [inherited] Set whether data value labels are allowed to overlap. Definition at line 296 of file KDChartAbstractDiagram.

174 scheduleDelayedItemsLayout(). 175 d->databoundariesDirty = true. References d.2. 171 return.cpp."). inherited] Definition at line 195 of file KDChartAbstractDiagram. for painting all datasets in the model. 177 } 6. 161 { 162 if( amodel->sourceModel() != model() ) { 163 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 164 "Trying to set an attributesmodel which works on a different " 165 "model than the diagram. 617 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .54 void AbstractDiagram::setBrush (const QBrush & brush) [inherited] Set the brush to be used.cpp. and KDChart::AbstractDiagram::modelsChanged().cpp.2. References d. Definition at line 609 of file KDChartAbstractDiagram. for painting the given dataset.9.166 KD Chart 2 Class Documentation Definition at line 160 of file KDChartAbstractDiagram.9. 176 emit modelsChanged().cpp. const QBrush & brush) [inherited] Set the brush to be used."). 6. 167 } 168 if( qobject_cast<PrivateAttributesModel*>(amodel) ) { 169 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 170 "Trying to set an attributesmodel that is private to another diagram. pen The brush to use.9. Parameters: brush The brush to use.53 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex & idx) [protected.55 void AbstractDiagram::setBrush (int dataset. 166 return. 608 { 6. Parameters: dataset The dataset’s column in the model. 172 } 173 d->setAttributesModel(amodel).2. Definition at line 602 of file KDChartAbstractDiagram.

KDChart::LineDiagram::setType(). This determines how coordinates in value space are mapped into pixel space. inherited] Set the coordinate plane associated with the diagram.9.2. Definition at line 218 of file KDChartAbstractDiagram. Referenced by KDChart::AbstractCoordinatePlane::addDiagram().9. 140 { 141 d->databoundariesDirty = true. See also: datasetDimension.59 void AbstractDiagram::setDatasetDimension (int dimension) [inherited] Sets the dataset dimension of the diagram. inherited] Definition at line 139 of file KDChartAbstractDiagram.9 KDChart::AbstractPieDiagram Class Reference 167 6.6.9. The chart takes ownership.2. Referenced by KDChart::BarDiagram::setThreeDBarAttributes(). Definition at line 594 of file KDChartAbstractDiagram. and KDChart::BarDiagram::setType().9. for painting the datapoint at the given index. brush The brush to use. and KDChart::AbstractCoordinatePlane::takeDiagram(). 601 { 6. KDChart::LineDiagram::setThree- DLineAttributes().cpp. Parameters: index The datapoint’s index in the model.cpp. References d.2.cpp. 222 { 6.57 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane ∗ plane) [virtual. KDChart::AbstractCartesian- Diagram::setCoordinatePlane(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .58 void AbstractDiagram::setDataBoundariesDirty () const [protected. Reimplemented in KDChart::AbstractCartesianDiagram. Returns: The coordinate plane associated with the diagram. References d.2.56 void AbstractDiagram::setBrush (const QModelIndex & index. 142 } 6. const QBrush & brush) [inherited] Set the brush to be used.

Definition at line 279 of file KDChartAbstractDiagram. References d.2.60 void AbstractDiagram::setDataValueAttributes (const DataValueAttributes & a) [inherited] Set the DataValueAttributes for all datapoints in the model.2. and KDChart::AbstractDiagram::properties- Changed(). Parameters: a The attributes to set.61 void AbstractDiagram::setDataValueAttributes (int dataset.62 void AbstractDiagram::setDataValueAttributes (const QModelIndex & index. References d. Parameters: dataset The dataset to set the attributes for. References d. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: index The datapoint to set the attributes for. 284 { 6. References d. a The attributes to set.9. KDChart::DataValueLabelAttributesRole. Definition at line 251 of file KDChartAbstractDiagram. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given dataset.9.168 KD Chart 2 Class Documentation Parameters: dimension Definition at line 763 of file KDChartAbstractDiagram.2. a The attributes to set.cpp. 770 { 6. Definition at line 240 of file KDChartAbstractDiagram.cpp.cpp.9.cpp. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given index. 259 { 6.

151 d->databoundariesDirty = true. Definition at line 76 of file KDChartAbstractPieDiagram.cpp. Parameters: value the granularity value between 0. 243 qVariantFromValue( a ). 79 } 6.cpp. 152 emit modelsChanged().0 (one tenth of a full circle). References d. References d. 150 scheduleDelayedItemsLayout().63 void AbstractPieDiagram::setGranularity (qreal value) Set the granularity: the smaller the granularity the more your diagram segments will show facettes instead of rounded segments. and KDChart::AbstractDiagram::modelsChanged(). KDChart::AttributesModel::initFrom(). Definition at line 556 of file KDChartAbstractDiagram. 153 } 6. 145 { 146 QAbstractItemView::setModel( newModel ).6.2. 147 AttributesModel* amodel = new PrivateAttributesModel( newModel. Definition at line 144 of file KDChartAbstractDiagram.0.64 void AbstractDiagram::setModel (QAbstractItemModel ∗ model) [virtual. Parameters: pen The pen to use. this ).2. 246 } 247 248 6. 562 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . other values will be interpreted as 1.05 (one twentieth of a degree) and 36.9. inherited] Associate a model with the diagram.65 void AbstractDiagram::setPen (const QPen & pen) [inherited] Set the pen to be used. 245 emit propertiesChanged(). 149 d->setAttributesModel(amodel).9.9 KDChart::AbstractPieDiagram Class Reference 169 240 { 241 d->attributesModel->setData( 242 d->attributesModel->mapFromSource( index ).2. 244 DataValueLabelAttributesRole ). 148 amodel->initFrom( d->attributesModel ).cpp. 77 { 78 d->granularity = value. for painting all datasets in the model.9.

Qt::Vertical. Definition at line 563 of file KDChartAbstractDiagram.2. 555 { 6. 100 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2. and KDChart::BarDiagram::setType().69 void AbstractPieDiagram::setPieAttributes (int column.cpp.9. PieAttributesRole ). Parameters: index The datapoint’s index in the model.170 KD Chart 2 Class Documentation 6.68 void AbstractDiagram::setPercentMode (bool percent) [inherited] Definition at line 307 of file KDChartAbstractDiagram.cpp. 99 emit layoutChanged( this ).2. for painting the datapoint at the given index. pen The pen to use. 571 { 6. const PieAttributes & a) Definition at line 95 of file KDChartAbstractPieDiagram. 312 { 6. pen The pen to use. qVariantFromValue( attrs ). and KDChart::PieAttributesRole.9.67 void AbstractDiagram::setPen (const QModelIndex & index.cpp.cpp. for painting the given dataset.2.9.66 void AbstractDiagram::setPen (int dataset. References d. References d.9. Definition at line 548 of file KDChartAbstractDiagram. const QPen & pen) [inherited] Set the pen to be used. Referenced by KDChart::LineDiagram::setType(). Parameters: dataset The dataset’s row in the model. 96 { 97 d->attributesModel->setHeaderData( 98 column. const QPen & pen) [inherited] Set the pen to be used.

cpp. 68 } 6.74 void AbstractPieDiagram::setThreeDPieAttributes (const QModelIndex & index.2.9 KDChart::AbstractPieDiagram Class Reference 171 6.cpp. PieAttributesRole ). qVariantFromValue( tda ).2.9. Definition at line 65 of file KDChartAbstractPieDiagram.71 void AbstractDiagram::setRootIndex (const QModelIndex & idx) [virtual. and KDChart::PieAttributesRole. 148 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 66 { 67 d->startPosition = degrees. [reimplemented] Definition at line 188 of file KDChartAbstractDiagram.6.9. inherited] Set the root index in the model. 92 emit layoutChanged( this ). References KDChart::ThreeDPieAttributesRole. 666 { return QRegion(). 147 emit layoutChanged( this ). 90 { 91 d->attributesModel->setModelData( qVariantFromValue( attrs ).2. 6. where the diagram starts referencing data for display.cpp. 145 { 146 model()->setData( index. inherited] [reimplemented] Definition at line 664 of file KDChartAbstractDiagram.2. const ThreeDPieAttributes & a) Definition at line 144 of file KDChartAbstractPieDiagram.2.9.70 void AbstractPieDiagram::setPieAttributes (const PieAttributes & a) Definition at line 89 of file KDChartAbstractPieDiagram. ThreeDPieAttributesRole ).72 void AbstractDiagram::setSelection (const QRect & rect. } 6.cpp. QItemSelection- Model::SelectionFlags command) [virtual. 93 } 6.73 void AbstractPieDiagram::setStartPosition (qreal degrees) Set the starting angle for the first dataset.9.9.cpp. References d. References d. References d.

cpp. ThreeDPieAttributesRole ).2. References d. Qt::Vertical. and KDChart::ThreeDPieAttributesRole. 175 ThreeDPieAttributesRole ) ).77 qreal AbstractPieDiagram::startPosition () const Returns: the starting angle for the first dataset.78 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (const QModelIndex & index) const Definition at line 170 of file KDChartAbstractPieDiagram. ThreeDPieAttributesRole ). References d. 132 { 133 d->attributesModel->setModelData( qVariantFromValue( tda ). 176 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.2. qVariantFromValue( tda ). 138 { 139 d->attributesModel->setHeaderData( 140 column. References d. 141 emit layoutChanged( this ). const ThreeDPieAttributes & a) Definition at line 137 of file KDChartAbstractPieDiagram.9.2.9. 171 { 172 return qVariantValue<ThreeDPieAttributes>( 173 d->attributesModel->data( 174 d->attributesModel->mapFromSource( index ).172 KD Chart 2 Class Documentation 6. 142 } 6.cpp. Referenced by KDChart::PieDiagram::paint(). and KDChart::ThreeDPieAttributesRole.9. 73 } 6. References d. 134 emit layoutChanged( this ). 135 } 6. Definition at line 70 of file KDChartAbstractPieDiagram.76 void AbstractPieDiagram::setThreeDPieAttributes (const ThreeDPieAttributes & a) Definition at line 131 of file KDChartAbstractPieDiagram. and KDChart::ThreeDPieAttributesRole.75 void AbstractPieDiagram::setThreeDPieAttributes (int column.9.2. 71 { 72 return d->startPosition.cpp.

80 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes () const Definition at line 153 of file KDChartAbstractPieDiagram.2.9 KDChart::AbstractPieDiagram Class Reference 173 6.9.cpp. for painting datasets to the rainbow palette. References d.9.79 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (int column) const Definition at line 162 of file KDChartAbstractPieDiagram. See also: KDChart::Palette. and KDChart::ThreeDPieAttributesRole. References d.2. 6. 675 { 6. Referenced by KDChart::AbstractDiagram::doItemsLayout().column().82 void KDChart::AbstractDiagram::useDefaultColors () [inherited] Set the palette to be used.6.2. FIXME: fold into one usePalette (KDChart::Palette&) method Definition at line 671 of file KDChartAbstractDiagram.9.cpp. 154 { 155 return qVariantValue<ThreeDPieAttributes>( 156 d->attributesModel->data( ThreeDPieAttributesRole ) ). 167 ThreeDPieAttributesRole ) ).9. for painting datasets to the default palette. 163 { 164 return qVariantValue<ThreeDPieAttributes>( 165 d->attributesModel->data( 166 d->attributesModel->mapFromSource( columnToIndex( column ) ).2. References d. and KDChart::ThreeDPieAttributesRole.cpp.83 void KDChart::AbstractDiagram::useRainbowColors () [inherited] Set the palette to be used.81 void AbstractDiagram::update () const [inherited] Definition at line 777 of file KDChartAbstractDiagram. 168 } 6. See also: KDChart::Palette.9. 157 } 6. References d. Referenced by KDChart::PieDiagram::paint(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.2.

See also: KDChart::Palette. Referenced by KDChart::LineDiagram::paint(). inherited] Implemented in KDChart::PieDiagram.cpp. Definition at line 676 of file KDChartAbstractDiagram.9. inherited] [reimplemented] Definition at line 658 of file KDChartAbstractDiagram.9. 776 { 6.84 void KDChart::AbstractDiagram::useSubduedColors () [inherited] Set the palette to be used.2. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 660 { return true. Returns: The value of the display role at the given row and column as a double.cpp. References KDChart::AbstractDiagram::attributesModelRootIndex(). int column) const [protected.9. 685 { 6. and KDChart::RingDiagram.2. and d. References d.174 KD Chart 2 Class Documentation Definition at line 681 of file KDChartAbstractDiagram. retrieving the data value (DisplayRole) for a given row and column. for painting datasets to the subdued palette. KDChart::PolarDiagram.85 double AbstractDiagram::valueForCell (int row.cpp.2. References d. 680 { 6. column The column to query.87 int AbstractDiagram::verticalOffset () const [virtual. Referenced by KDChart::PolarCoordinatePlane::layoutDiagrams(). inherited] Helper method.cpp.2.86 virtual double KDChart::AbstractPolarDiagram::valueTotals () const [pure virtual. 6. Parameters: row The row to query.9. Definition at line 771 of file KDChartAbstractDiagram.

cpp.h.3.cpp.88 QRect AbstractDiagram::visualRect (const QModelIndex & index) const [virtual. inherited] [reimplemented] Definition at line 667 of file KDChartAbstractDiagram.h • KDChartAbstractPieDiagram.9 KDChart::AbstractPieDiagram Class Reference 175 6. 6.9.3 Member Data Documentation 6. inherited] Definition at line 506 of file KDChartAbstractDiagram.89 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection & selection) const [virtual.1 Q_SIGNALS KDChart::AbstractDiagram::__pad0__ [protected.2.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] [reimplemented] Definition at line 641 of file KDChartAbstractDiagram.9.9.9.6. 645 {} 6.2. The documentation for this class was generated from the following files: • KDChartAbstractPieDiagram.

how many value dimensions it expects each datapoint to have. for painting the datapoint at the given index in the model. QPointF > dataBoundaries () const Return the bottom left and top right data point. etc. • int datasetDimension () const The dataset dimension of a diagram determines. etc. • QList< MarkerAttributes > datasetMarkers () const The set of dataset markers currently used. for use in legends. • QBrush brush (int dataset) const Retrieve the brush to be used for the given dataset.h> Inheritance diagram for KDChart::AbstractPolarDiagram:Collaboration diagram for KDChart::Abstract- PolarDiagram: Public Member Functions • AbstractPolarDiagram (QWidget ∗parent=0. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .10 KDChart::AbstractPolarDiagram Class Reference #include <KDChartAbstractPolarDiagram. for use in legends. const QModelIndex &bottomRight) [reimplemented] • QList< QBrush > datasetBrushes () const The set of dataset brushes currently used. • QList< QPen > datasetPens () const The set of dataset pens currently used. • int columnCount () const • AbstractCoordinatePlane ∗ coordinatePlane () const The coordinate plane associated with the diagram. • virtual void dataChanged (const QModelIndex &topLeft. etc. etc.176 KD Chart 2 Class Documentation 6. for use in legends. PolarCoordinatePlane ∗plane=0) • bool allowOverlappingDataValueTexts () const • bool antiAliasing () const • virtual AttributesModel ∗ attributesModel () const Returns the AttributesModel. • QStringList datasetLabels () const The set of dataset labels currently displayed. • const QPair< QPointF. • QBrush brush (const QModelIndex &index) const Retrieve the brush to be used. that is used by this diagram. that the diagram will display (unless the grid adjusts these values). for use in legends. • QBrush brush () const Retrieve the brush to be used for painting datapoints globally.

const MarkerAttributes &markerAttributes. • virtual void doItemsLayout () [reimplemented] • virtual int horizontalOffset () const [reimplemented] • virtual QModelIndex indexAt (const QPoint &point) const [reimplemented] • virtual bool isIndexHidden (const QModelIndex &index) const [reimplemented] • QStringList itemRowLabels () const The set of item row labels currently displayed.10 KDChart::AbstractPolarDiagram Class Reference 177 • DataValueAttributes dataValueAttributes (const QModelIndex &index) const Retrieve the DataValueAttributes for the given index. • DataValueAttributes dataValueAttributes (int column) const Retrieve the DataValueAttributes for the given dataset. • virtual void scrollTo (const QModelIndex &index. • virtual QModelIndex moveCursor (CursorAction cursorAction. etc. for use in Abscissa axes. const QPointF &point. • QPen pen (int dataset) const Retrieve the pen to be used for the given dataset. const QSizeF &size) • QPen pen (const QModelIndex &index) const Retrieve the pen to be used. const QBrush &brush. • DataValueAttributes dataValueAttributes () const Retrieve the DataValueAttributes speficied globally. • QPen pen () const Retrieve the pen to be used for painting datapoints globally. for painting the datapoint at the given index in the model. Qt::KeyboardModifiers modifiers) [reimplemented] • virtual double numberOfGridRings () const=0 • virtual double numberOfValuesPerDataset () const=0 • virtual void paintMarker (QPainter ∗painter. ScrollHint hint=EnsureVisible) [reimplemented] • void setAllowOverlappingDataValueTexts (bool allow) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6. • bool percentMode () const • const PolarCoordinatePlane ∗ polarCoordinatePlane () const • virtual void resize (const QSizeF &area)=0 Called by the widget’s sizeEvent. const QPen &.

• void setDataValueAttributes (int dataset. • void setPercentMode (bool percent) • virtual void setRootIndex (const QModelIndex &idx) Set the root index in the model.178 KD Chart 2 Class Documentation Set whether data value labels are allowed to overlap. • void setBrush (const QModelIndex &index. const QPen &pen) Set the pen to be used. • virtual void setCoordinatePlane (AbstractCoordinatePlane ∗plane) Set the coordinate plane associated with the diagram. for painting the datapoint at the given index. • void setAntiAliasing (bool enabled) Set whether anti-aliasing is to be used while rendering this diagram. • void setBrush (int dataset. for painting all datasets in the model. for painting the given dataset. for painting the datapoint at the given index. • void setBrush (const QBrush &brush) Set the brush to be used. where the diagram starts referencing data for display. • virtual void setAttributesModel (AttributesModel ∗model) Associate an AttributesModel with this diagram. • void setPen (const QModelIndex &index. const DataValueAttributes &a) Set the DataValueAttributes for the given index. for painting all datasets in the model. for painting the given dataset. • void setDataValueAttributes (const DataValueAttributes &a) Set the DataValueAttributes for all datapoints in the model. • void setDataValueAttributes (const QModelIndex &index. const DataValueAttributes &a) Set the DataValueAttributes for the given dataset. const QBrush &brush) Set the brush to be used. • virtual void setSelection (const QRect &rect. • void setDatasetDimension (int dimension) Sets the dataset dimension of the diagram. QItemSelectionModel::SelectionFlags command) [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . const QBrush &brush) Set the brush to be used. • void setPen (int dataset. • virtual void setModel (QAbstractItemModel ∗model) Associate a model with the diagram. const QPen &pen) Set the pen to be used. • void setPen (const QPen &pen) Set the pen to be used.

when either the model or the AttributesModel is replaced. int column) const Helper method. • void paintDataValueText (QPainter ∗painter. • virtual double valueTotals () const=0 • virtual int verticalOffset () const [reimplemented] • virtual QRect visualRect (const QModelIndex &index) const [reimplemented] • virtual QRegion visualRegionForSelection (const QItemSelection &selection) const [reimplemented] • virtual ∼AbstractPolarDiagram () Protected Member Functions • QModelIndex attributesModelRootIndex () const • virtual const QPair< QPointF. • void useRainbowColors () Set the palette to be used. QPointF > calculateDataBoundaries () const=0 • virtual bool checkInvariants (bool justReturnTheStatus=false) const • QModelIndex columnToIndex (int column) const • void modelsChanged () This signal is emitted. • void setAttributesModelRootIndex (const QModelIndex &) • void setDataBoundariesDirty () const • double valueForCell (int row. for painting datasets to the default palette.6. that are passed in as part of the paint context. • void useSubduedColors () Set the palette to be used. const QPointF &pos) • virtual void paintMarkers (QPainter ∗painter) • void propertiesChanged () Emitted upon change of a property of the Diagram. const QModelIndex &index. retrieving the data value (DisplayRole) for a given row and column. • virtual void paint (PaintContext ∗paintContext)=0 Draw the diagram contents to the rectangle and painter. for painting datasets to the subdued palette. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .10 KDChart::AbstractPolarDiagram Class Reference 179 • void update () const • void useDefaultColors () Set the palette to be used. const QModelIndex &index. for painting datasets to the rainbow palette. dou- ble value) • virtual void paintDataValueTexts (QPainter ∗painter) • void paintMarker (QPainter ∗painter. const QPointF &pos.

2 bool AbstractDiagram::antiAliasing () const [inherited] Returns: Whether anti-aliasing is to be used for rendering this diagram. 306 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .10.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited] Returns: Whether data value labels are allowed to overlap. 45 {} 6.cpp. References d.h. Referenced by KDChart::LineDiagram::paint().2 Member Function Documentation 6.1.2 virtual KDChart::AbstractPolarDiagram::∼AbstractPolarDiagram () [virtual] Definition at line 45 of file KDChartAbstractPolarDiagram. Definition at line 302 of file KDChartAbstractDiagram. 295 { 6.cpp. Definition at line 291 of file KDChartAbstractDiagram.2.10.1 Constructor & Destructor Documentation 6.180 KD Chart 2 Class Documentation Protected Attributes • Q_SIGNALS __pad0__: void layoutChanged( AbstractDiagram∗ ) 6. References d.cpp.2.1 AbstractPolarDiagram::AbstractPolarDiagram (QWidget ∗ parent = 0. parent.10. PolarCoordinatePlane ∗ plane = 0) [explicit] Definition at line 46 of file KDChartAbstractPolarDiagram. plane ) 49 { 50 } 6.1. 48 : AbstractDiagram ( new Private().10.10.10.

inherited] returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual.10.2. KDChart::BarDiagram::numberOfOrdinateSegments(). that is used by this diagram. Definition at line 204 of file KDChartAbstractDiagram. Only if a user- supplied AttributesModel has been set does the pointer returned here not belong to the diagram. for painting the datapoint at the given index in the model. KDChart::LineDiagram::numberOfOrdinateSegments(). inherited] Returns the AttributesModel. KDChart::BarDiagram::calculate- DataBoundaries(). Referenced by KDChart::RingDiagram::paint(). KDChart::Bar- Diagram::numberOfAbscissaSegments(). KDChart::Bar- Diagram::paint(). 638 : QRect AbstractDiagram::visualRect(const QModelIndex &) const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::LineDiagram::paint(). 181 { 182 return d->attributesModel. Returns: The brush to use for painting. Definition at line 632 of file KDChartAbstractDiagram.2.cpp. Parameters: index The index of the datapoint in the model. See also: setAttributesModel Definition at line 180 of file KDChartAbstractDiagram. Returns: The AttributesModel associated with the diagram. KDChart::LineDiagram::numberOfAbscissaSegments().4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected.cpp.10 KDChart::AbstractPolarDiagram Class Reference 181 6.5 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited] Retrieve the brush to be used.2. 183 } 6.10. which should never be deleted.cpp. 210 { 6. KDChart::PolarDiagram::paint().6. References d. References d. By default each diagram owns its own AttributesModel. and KDChart::AbstractDiagram::valueForCell().10. Referenced by KDChart::LineDiagram::calculateDataBoundaries(). and KDChart::Bar- Diagram::setBarAttributes().

KDChart::LineDiagram.9 bool AbstractDiagram::checkInvariants (bool justReturnTheStatus = false) const [protected. Referenced by KDChart::RingDiagram::calculateDataBoundaries().10. KDChart::RingDiagram::paint(). KDChart::PieDiagram::paint().cpp. KDChart::BarDiagram::paint(). Definition at line 624 of file KDChartAbstractDiagram. KDChart::PieDiagram.2.cpp. KDChart::PieDiagram::calculateDataBoundaries(). Definition at line 618 of file KDChartAbstractDiagram. This will fall back automatically to the default settings. KDChart::PolarDiagram::paint(). KDChart::LineDiagram::calculate- DataBoundaries(). virtual. 623 { 6. Referenced by KDChart::AbstractDiagram::dataBoundaries(). Referenced by KDChart::PieDiagram::paint(). inherited] Definition at line 746 of file KDChartAbstractDiagram. KDChart::Polar- Diagram. pure virtual. 6. QPointF> KDChart::Abstract- Diagram::calculateDataBoundaries () const [protected. KDChart::LineDiagram::paint(). References KDChart::AbstractDiagram::coordinatePlane(). KDChart::BarDiagram::calculateDataBoundaries().10.7 QBrush AbstractDiagram::brush () const [inherited] Retrieve the brush to be used for painting datapoints globally.182 KD Chart 2 Class Documentation 6. This will fall back automatically to what was set at model level. and KDChart::RingDiagram. inherited] Implemented in KDChart::BarDiagram. and KDChart::AbstractDiagram::paintMarker(). Returns: The brush to use for painting.6 QBrush AbstractDiagram::brush (int dataset) const [inherited] Retrieve the brush to be used for the given dataset. 631 { 6.2. if there are no dataset specific settings. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . if there are no specific settings.cpp.8 virtual const QPair<QPointF. Returns: The brush to use for painting. Parameters: dataset The dataset to retrieve the brush for.10.10. and KDChart::AbstractDiagram::paintMarker().2. KDChart::PolarDiagram::calculate- DataBoundaries().2.

59 { 60 return static_cast<int>( numberOfValuesPerDataset() ).6. for the diagram. By default this is a Cartesian- CoordinatePlane." ). References numberOfValuesPerDataset().2. and KDChart::PieDiagram::valueTotals(). 217 { 6. KDChart::PolarDiagram::paint()." ). References d. 748 "There is no usable model set.10. "AbstractDiagram::checkInvariants()". "AbstractDiagram::checkInvariants()". This determines how coordinates in value space are mapped into pixel space. KDChart::BarDiagram::paint(). 61 } 6.10 KDChart::AbstractPolarDiagram Class Reference 183 746 { 747 Q_ASSERT_X ( model(). and KDChart::AbstractCartesianDiagram::setCoordinatePlane().cpp. 754 } 755 756 int AbstractDiagram::datasetDimension( ) const 6.11 QModelIndex AbstractDiagram::columnToIndex (int column) const [protected. Referenced by KDChart::PieDiagram::calculateDataBoundaries(). inherited] Definition at line 211 of file KDChartAbstractDiagram. KDChart::PieDiagram::paint(). KDChart::LineDiagram::paint().10 int AbstractPolarDiagram::columnCount () const Definition at line 58 of file KDChartAbstractPolarDiagram. 752 } 753 return model() && coordinatePlane(). 751 "There is no usable coordinate plane set. Returns: The coordinate plane associated with the diagram.10.2. Definition at line 125 of file KDChartAbstractDiagram. 126 { 127 return d->plane.12 AbstractCoordinatePlane ∗ AbstractDiagram::coordinatePlane () const [inherited] The coordinate plane associated with the diagram.cpp.2. KDChart::AbstractCartesianDiagram::layoutPlanes().10. polarCoordinatePlane(). for the diagram. Referenced by KDChart::BarDiagram::calculateDataBoundaries(). 128 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. KDChart::AbstractDiagram::check- Invariants(). 749 750 Q_ASSERT_X ( coordinatePlane().

so you might need to check these too.10. QPointF > AbstractDiagram::dataBoundaries () const [inherited] Return the bottom left and top right data point. References d. for use in legends. References KDChart::AbstractDiagram::calculateDataBoundaries().2. and d. Definition at line 130 of file KDChartAbstractDiagram. const QModelIndex & bottomRight) [virtual.. Classes derived from AbstractDiagram must implement the calculateDataBoundaries function. 234 d->databoundariesDirty = true.184 KD Chart 2 Class Documentation 6. and KDChart::BarDiagram::paint(). that is used for a single cell. 134 d->databoundariesDirty = false.2. that the diagram will display (unless the grid adjusts these values).cpp. they can call setDataBoundariesDirty() Returned value is in diagram coordinates.13 const QPair< QPointF. inherited] [reimplemented] Definition at line 232 of file KDChartAbstractDiagram. in order to find the brush. Note: Cell-level override brushes. Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . If derived classes want to force recalculation of the data boundaries.10. 232 { 233 // We are still too dumb to do intelligent updates. 235 scheduleDelayedItemsLayout().14 void AbstractDiagram::dataChanged (const QModelIndex & topLeft.. to specify their own way of calculating the data boundaries. 135 } 136 return d->databoundaries.2.cpp. etc. take precedence over the dataset values. 6. 131 { 132 if( d->databoundariesDirty ){ 133 d->databoundaries = calculateDataBoundaries (). if set.10. Returns: The current set of dataset brushes. KDChart::Polar- CoordinatePlane::layoutDiagrams(). This method returns a chached result of calculations done by calculateDataBoundaries. 137 } 6.15 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited] The set of dataset brushes currently used. KDChart::LineDiagram::paint(). 236 } 237 238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index.

6..10. 718 } 719 720 QList<QPen> AbstractDiagram::datasetPens() const 6. i += datasetDimension() ){ 702 //qDebug() << "label: " << attributesModel()->headerData( i.2. etc. i < columnCount. KDChart::Legend::datasetCount(). Qt::Vertical. automatic values will be used for the abscissa. 712 { 713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i. the diagram will use the first. etc) column as Y values.16 int AbstractDiagram::datasetDimension () const [inherited] The dataset dimension of a diagram determines. For example a diagram with the default dimension of 1.cpp. Definition at line 698 of file KDChartAbstractDiagram.17 QStringList AbstractDiagram::datasetLabels () const [inherited] The set of dataset labels currently displayed. 699 : " << attributesModel()->columnCount(attributesModel 700 const int columnCount = attributesModel()->columnCount(attributesModelRootIndex()). n). 762 { 6. If the dimension is 2.2. Returns: The dataset dimension of the diagram. DatasetB 714 ret << brush. and KDChart::Legend::setBrushesFromDiagram(). Referenced by KDChart::Legend::buildLegend(). and the second. etc) columns as X values. KDChart::Line- Diagram::paint(). (and the fourth. KDChart::CartesianCoordinatePlane::getDataDimensionsList(). . and KDChart::Legend::datasetCount(). for use in legends. Returns: The set of dataset labels currently displayed. Qt::DisplayRole ) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Qt::Horizontal. 2. If the dimensionality is 1. Definition at line 758 of file KDChartAbstractDiagram. KDChart::LineDiagram::get- CellValues().cpp.10 KDChart::AbstractPolarDiagram Class Reference 185 Definition at line 710 of file KDChartAbstractDiagram. sixth. fifth. Referenced by KDChart::Legend::buildLegend(). 701 for( int i = datasetDimension()-1. (and the third. and KDChart::LineDiagram::setType(). 3. how many value dimensions it expects each datapoint to have. will have one column per datapoint (the y values) and will use automatic values for the x axis (1. Referenced by KDChart::LineDiagram::calculateDataBoundaries(). For each dimension it will expect one column of values in the model.10. References d.. 715 } 716 717 return ret.cpp.

that is shown for a single cell. 739 ret << ma.19 QList< QPen > AbstractDiagram::datasetPens () const [inherited] The set of dataset pens currently used. etc. 729 } 730 731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Qt::Vertical. Definition at line 722 of file KDChartAbstractDiagram.markerAttributes(). Definition at line 733 of file KDChartAbstractDiagram. DataVa 738 const MarkerAttributes &ma = a. 740 } 741 return ret. if set.cpp. Returns: The current set of dataset brushes.186 KD Chart 2 Class Documentation 703 ret << attributesModel()->headerData( i. 727 } 728 return ret. so you might need to check these too.10.2. 724 { 725 QPen pen = qVariantValue<QPen>( attributesModel()->headerData( i. Referenced by KDChart::Legend::buildLegend().10. 742 } 743 744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const 6. for use in legends. Qt::Horizontal. that is used for a single cell. take precedence over the dataset values. Returns: The current set of dataset pens. Qt::DisplayRole ).2. take precedence over the dataset values. Qt::Vertical. DatasetPenRole 726 ret << pen. Note: Cell-level override markers. etc. Note: Cell-level override pens.18 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited] The set of dataset markers currently used. 706 } 707 708 QList<QBrush> AbstractDiagram::datasetBrushes() const 6. Referenced by KDChart::Legend::buildLegend(). 735 { 736 DataValueAttributes a = 737 qVariantValue<DataValueAttributes>( attributesModel()->headerData( i. so you might need to check these too. in order to find the marker.toString(). for use in legends. in order to find the pens. if set.cpp. 704 } 705 return ret.

22 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited] Retrieve the DataValueAttributes speficied globally. This will fall back automatically to what was set at model level. Returns: The DataValueAttributes for the given index.10.6. if there are no datapoint specific settings.20 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex & index) const [inherited] Retrieve the DataValueAttributes for the given index. Definition at line 265 of file KDChartAbstractDiagram. Definition at line 272 of file KDChartAbstractDiagram. 271 { 6. if there are no specific settings.10 KDChart::AbstractPolarDiagram Class Reference 187 6. Returns: The global DataValueAttributes. 264 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.cpp.21 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const [inherited] Retrieve the DataValueAttributes for the given dataset. Parameters: index The datapoint to retrieve the attributes for. Returns: The DataValueAttributes for the given dataset.cpp. Referenced by KDChart::AbstractDiagram::paintDataValueText(). 278 { 6. if there are no dataset specific settings.10. and KDChart::AbstractDiagram::paint- Marker().2. Parameters: dataset The dataset to retrieve the attributes for.2. This will fall back automatically to the default settings.cpp.10. Definition at line 260 of file KDChartAbstractDiagram. This will fall back automatically to what was set at dataset or model level.

10.10.23 void AbstractDiagram::doItemsLayout () [virtual.10. 226 } 227 QAbstractItemView::doItemsLayout().25 QModelIndex AbstractDiagram::indexAt (const QPoint & point) const [virtual.27 QStringList AbstractDiagram::itemRowLabels () const [inherited] The set of item row labels currently displayed.2.cpp. 663 {} 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] [reimplemented] Definition at line 223 of file KDChartAbstractDiagram.2. etc. inherited] [reimplemented] Definition at line 655 of file KDChartAbstractDiagram.24 int AbstractDiagram::horizontalOffset () const [virtual. and KDChart::AbstractDiagram::update(). 228 } 229 230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft.10. 6.cpp. References d. 651 { return QModelIndex().188 KD Chart 2 Class Documentation 6.2.2.cpp.cpp.26 bool AbstractDiagram::isIndexHidden (const QModelIndex & index) const [virtual. 225 update(). for use in Abscissa axes. } 6.2.10. Returns: The set of item row labels currently displayed. 657 { return 0. Definition at line 686 of file KDChartAbstractDiagram. inherited] [reimplemented] Definition at line 661 of file KDChartAbstractDiagram. 223 { 224 d->plane->layoutDiagrams(). } 6.cpp. inherited] [reimplemented] Definition at line 649 of file KDChartAbstractDiagram.

and KDChart::RingDiagram.30 virtual double KDChart::AbstractPolarDiagram::numberOfGridRings () const [pure virtual] Implemented in KDChart::PieDiagram. ++i ){ 690 //qDebug() << "label: " << attributesModel()->headerData( i. and KDChart::AbstractDiagram::set- Model(). inherited] This signal is emitted. pure virtual. Referenced by KDChart::AbstractDiagram::setAttributesModel(). and KDChart::RingDiagram. Referenced by columnCount(). 654 { return 0. Implemented in KDChart::BarDiagram.2. that are passed in as part of the paint context. inherited] [reimplemented] Definition at line 652 of file KDChartAbstractDiagram.2.10. KDChart::LineDiagram. KDChart::PolarDiagram.31 virtual double KDChart::AbstractPolarDiagram::numberOfValuesPerDataset () const [pure virtual] Implemented in KDChart::PieDiagram. Parameters: paintContext All information needed for painting. 6. KDChart::Polar- Diagram. when either the model or the AttributesModel is replaced.2. 6. 689 for( int i = 0. inherited] Draw the diagram contents to the rectangle and painter.10. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Qt::Vertical.toString(). 692 } 693 return ret.10. Qt::DisplayRole ).10 KDChart::AbstractPolarDiagram Class Reference 189 687 : " << attributesModel()->rowCount(attributesModelRoo 688 const int rowCount = attributesModel()->rowCount(attributesModelRootIndex()).6. KDChart::PolarDiagram. } 6. Qt::KeyboardModifiers modifiers) [virtual.10.32 virtual void KDChart::AbstractDiagram::paint (PaintContext ∗ paintContext) [protected. and KDChart::RingDiagram.2. i < rowCount.29 QModelIndex AbstractDiagram::moveCursor (CursorAction cursorAction.10. Qt::Vertical.2. Qt::DisplayRole ). KDChart::PieDiagram.cpp. 694 } 695 696 QStringList AbstractDiagram::datasetLabels() const 6.28 void KDChart::AbstractDiagram::modelsChanged () [protected.t 691 ret << attributesModel()->headerData( i. 6.

33 void AbstractDiagram::paintDataValueText (QPainter ∗ painter. decimalDigits ). 350 painter->rotate( ta.append( a.prefix() ).34 void AbstractDiagram::paintDataValueTexts (QPainter ∗ painter) [protected. inherited] Definition at line 318 of file KDChartAbstractDiagram. 349 painter->translate( pos ). virtual.cpp. index.’ ) ). KDChart::AbstractDiagram::dataValue- Attributes().190 KD Chart 2 Class Documentation 6. and KDChart::BarDiagram::paint(). decimalPos. KDChart::DataValueAttributes::decimalDigits().prefix(). 389 const QPointF pos = coordinatePlane()->translate( QPointF( j. KDChart::PolarDiagram::paint().suffix(). KDChart::TextAttributes::rotation(). 0). value ). 339 340 if ( !a. 327 int decimalPos = QString::number( value ). 329 if ( a. 346 if ( ta.isNull() ) { 330 if ( decimalPos > 0 && value != 0 ) 331 roundedValue = roundValues ( value. 323 if ( !a.10. 328 QString roundedValue. const QPointF & pos.isNull() ) 341 roundedValue. pos.isNull() ) 338 roundedValue.10.toDouble(). double value) [protected. KDChart::DataValueAttributes::suffix(). 352 } 353 } 354 355 QString AbstractDiagram::roundValues( double value. 6. value ) ). 348 painter->setFont( ta. 336 // handle prefix and suffix 337 if ( !a.indexOf( QLatin1Char( ’. 320 { 321 // paint one data series 322 DataValueAttributes a = dataValueAttributes(index).decimalDigits().font() ). and KDChart::DataValueAttributes::textAttributes(). inherited] Definition at line 382 of file KDChartAbstractDiagram.rotation() ). 388 double value = model()->data( index ). const QModelIndex & index. KDChart::Text- Attributes::pen().prepend( a. References KDChart::DataValueAttributes::dataLabel().2.isVisible() ) return. 334 } else 335 roundedValue = a.textAttributes(). 332 else 333 roundedValue = QString::number( value ). j< rowCount. 344 // FIXME draw the non-text bits. etc 345 const TextAttributes &ta = a. KDChart::TextAttributes::isVisible(). 390 paintDataValueText( painter. i. KDChart::DataValueAttributes::isVisible(). 324 325 // handle decimal digits 326 int decimalDigits = a. KDChart::TextAttributes::font(). KDChart::Line- Diagram::paint().isVisible() ) { 347 painter->setPen( ta. roundedValue ). 385 { 386 for ( int j=0. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.cpp. background.pen() ). ++j ) { 387 const QModelIndex index = model()->index( j. Referenced by KDChart::RingDiagram::paint().dataLabel(). 342 343 PainterSaver painterSaver( painter ). KDChart::DataValueAttributes::prefix().suffix() ). rootIndex() ). 351 painter->drawText( QPointF(0.dataLabel().

433 maSize. 426 painter->setBrush( brush ). and KDChart::MarkerAttributes::pen().isVisible() ) return. KDChart::AbstractDiagram::checkInvariants(). inherited] Definition at line 398 of file KDChartAbstractDiagram.markerStyle() ) { 431 case MarkerAttributes::MarkerCircle: 432 painter->drawEllipse( QRectF( 0 . 429 painter->translate( pos ). 399 { 400 401 if ( !checkInvariants() ) return.width()) ). const QBrush & brush. 410 QPen indexPen( ma. 403 if ( !a.pen() ). KDChart::DataValueAttributes::markerAttributes(). const QPointF & point.35 void AbstractDiagram::paintMarker (QPainter ∗ painter.markerColor(). KDChart::MarkerAttributes::isVisible(). const QPen &.2. References KDChart::AbstractDiagram::brush(). 404 const MarkerAttributes &ma = a. 409 QBrush indexBrush( brush( index ) ). const QPointF & pos) [protected.isValid() ) 412 indexBrush. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 434 break. KDChart::MarkerAttributes::markerColor().cpp. const QModelIndex & index. 415 } 416 417 6.2. References KDChart::MarkerAttributes::markerStyle().setColor( ma. 405 if ( !ma. KDChart::AbstractDiagram::dataValueAttributes().height()/2. const MarkerAttributes & markerAttributes.markerAttributes(). 430 switch ( markerAttributes.markerColor() ). and KDChart::AbstractDiagram::paintMarker().6.10. 428 painter->setRenderHint ( QPainter::Antialiasing ). indexPen. KDChart::DataValueAttributes::isVisible().36 void AbstractDiagram::paintMarker (QPainter ∗ painter. pos.10 KDChart::AbstractPolarDiagram Class Reference 191 391 } 392 } 393 } 394 395 6. KDChart::AbstractDiagram::paintMarker(). 411 if ( ma. maSize. 0 .maSize.markerSize() ). maSize ). const QSizeF & size) [virtual.height(). ma. KDChart::MarkerAttributes::markerSize().10.isVisible() ) return. inherited] Definition at line 420 of file KDChartAbstractDiagram.cpp. KDChart::MarkerLayoutItem::paint(). 424 { 425 PainterSaver painterSaver( painter ). 413 414 paintMarker( painter.maSize. 402 DataValueAttributes a = dataValueAttributes(index). indexBrush. 406 407 PainterSaver painterSaver( painter ). 408 QSizeF maSize( ma. 427 painter->setPen( pen ). Referenced by KDChart::LineDiagram::paint().width()/2.

462 QRectF centerRect( -pSize. right.maSize. 482 painter->drawEllipse( QRectF( 0 .color() ). rightTop. -maSize.height()/4 ). 483 maSize.width() ).maSize. maSize. 439 painter->drawRect( rect ). maSize. 0 ). 0 ). topRight.height()/2 ).width()/2. 495 bottomLeft = QPointF( -maSize. 452 painter->drawPolygon( diamondPoints ). maSize.width()/2. leftBottom.width() ).maSize.height()/4 ).192 KD Chart 2 Class Documentation 435 case MarkerAttributes::MarkerSquare: 436 { 437 QRectF rect( 0 . maSize. 438 maSize. 476 painter->drawEllipse( centerRect ). 474 pSize. centerTopRight. 0 . maSize.height()/2. -maSize.width()/4. 498 rightBottom = QPointF( maSize. -pSize. maSize.height()/2. 461 pen1Pixel. 491 centerTopLeft.height()/2 ). 441 break.color() ). 8).height()/4 ). 460 QPen pen1Pixel.setColor( painter->background(). 0 . 442 } 443 case MarkerAttributes::MarkerDiamond: 444 { 445 QVector <QPointF > diamondPoints. 0 .height()/4 ).width()/2.width()/2. 471 QPen pen4Pixel. -pSize.height().height()/2.width()/2.height()/4 ).width()) ). bottomLeft. 453 break. 500 centerTopRight = QPointF( maSize. -maSize.width()/4. 466 break. topLeft. 494 centerBottomLeft = QPointF( -maSize.width()/2. centerBottomLeft. 478 } 479 case MarkerAttributes::MarkerRing: 480 { 481 painter->setBrush( Qt::NoBrush ).width()/2.maSize.height(). pSize. maSize. 446 QPointF top.height(). 493 leftBottom = QPointF( -maSize. bottom.width()/2. -maSize. left. 484 break.width()/2. maSize. 477 break.width()/4. 454 } 455 //Pending Michel: do we need that? Ask: What is the idea about 456 // Marker1Pixel and Marker4Pixels. 485 } 486 case MarkerAttributes::MarkerCross: 487 { 488 QVector <QPointF > crossPoints. pSize. 449 bottom = QPointF( 0.height()/2 ).width() ). 499 rightTop = QPointF( maSize. 463 pSize.maSize.height()/4 ). 447 top = QPointF( 0.height()/2 ).width()/2. 490 centerBottomRight. 492 leftTop = QPointF( -maSize. 465 painter->drawEllipse( centerRect ). maSize.width()/4. painter->brush() ). 457 case MarkerAttributes::Marker1Pixel: 458 { 459 QSizeF pSize(4. 473 QRectF centerRect( -pSize.width()/4.height(). 475 painter->setPen( pen4Pixel ). 451 diamondPoints << top << left << bottom << right. 448 left = QPointF( 0 .4).height()/4 ). 496 bottomRight = QPointF( maSize.maSize. 450 right = QPointF( maSize.setColor( painter->background(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .width()/4. 464 painter->setPen( pen1Pixel ).height()/2. 501 topRight = QPointF( maSize. 497 centerBottomRight = QPointF( maSize. 440 painter->fillRect( rect. 472 pen4Pixel. bottomRight.rightBottom.height()/2 ). 467 } 468 case MarkerAttributes::Marker4Pixels: 469 { 470 QSizeF pSize(8. 489 QPointF leftTop.

cpp. pos ). 539 const QPointF pos = coordinatePlane()->translate( QPointF( j. 516 left = QPointF( -maSize. -maSize.width()/4.height()/2 ).height()/2 ).height()/2 ).10 KDChart::AbstractPolarDiagram Class Reference 193 502 topLeft = QPointF( -maSize. -maSize. virtual. rootIndex() ). 540 paintMarker( painter. 518 top = QPointF( 0. 0 ). 503 centerTopLeft = QPointF( -maSize. Returns: The pen to use for painting. 593 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 521 painter->drawLine( top.2. 526 "Type item does not match a defined Marker Type. maSize.2. index. value ) ).width()/4. 527 } 528 } 529 530 void AbstractDiagram::paintMarkers( QPainter* painter ) 6. i.width()/2. right ).toDouble(). "paintMarkers()". right. Definition at line 586 of file KDChartAbstractDiagram. 523 } 524 default: 525 Q_ASSERT_X ( false. Parameters: index The index of the datapoint in the model. 519 bottom= QPointF( 0.height()/4 ).width()/2. 535 { 536 for ( int j=0.38 QPen AbstractDiagram::pen (const QModelIndex & index) const [inherited] Retrieve the pen to be used. bottom. 538 double value = model()->data( index ). 520 painter->drawLine( left. inherited] Definition at line 532 of file KDChartAbstractDiagram.6." ). 509 510 painter->drawPolygon( crossPoints ). ++j ) { 537 const QModelIndex index = model()->index( j. 541 } 542 } 543 } 544 545 6. j< rowCount. 512 } 513 case MarkerAttributes::MarkerFastCross: 514 { 515 QPointF left.cpp. -maSize. bottom ). 511 break. top. 504 505 crossPoints << leftTop << leftBottom << centerBottomLeft 506 << bottomLeft << bottomRight << centerBottomRight 507 << rightBottom << rightTop << centerTopRight 508 << topRight << topLeft << centerTopLeft.10. 0 ). for painting the datapoint at the given index in the model. 522 break.10.37 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected. 517 right = QPointF( maSize.

10. Returns: The pen to use for painting.39 QPen AbstractDiagram::pen (int dataset) const [inherited] Retrieve the pen to be used for the given dataset.2.194 KD Chart 2 Class Documentation 6.10. Referenced by KDChart::PieDiagram::paint().cpp.cpp. 54 { 55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() ). This will fall back automatically to the default settings. 577 { 6. 585 { 6. if there are no dataset specific settings. Returns: The pen to use for painting. 56 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().40 QPen AbstractDiagram::pen () const [inherited] Retrieve the pen to be used for painting datapoints globally. Referenced by KDChart::PieDiagram::paint().2. 320 { 6. This will fall back automatically to what was set at model level.2. if there are no specific settings.41 bool AbstractDiagram::percentMode () const [inherited] Definition at line 313 of file KDChartAbstractDiagram.10. Definition at line 572 of file KDChartAbstractDiagram. References KDChart::AbstractDiagram::coordinatePlane().42 const PolarCoordinatePlane ∗ AbstractPolarDiagram::polarCoordinatePlane () const Definition at line 53 of file KDChartAbstractPolarDiagram.10.cpp.2. References d. Parameters: dataset The dataset to retrieve the pen for.cpp. Definition at line 578 of file KDChartAbstractDiagram.

KDChart::Polar- Diagram. inherited] Called by the widget’s sizeEvent.10.cpp.46 void AbstractDiagram::setAllowOverlappingDataValueTexts (bool allow) [inherited] Set whether data value labels are allowed to overlap.45 void AbstractDiagram::scrollTo (const QModelIndex & index. 648 { return QModelIndex(). 290 { 6. Parameters: area Implemented in KDChart::BarDiagram. KDChart::LineDiagram. KDChart::LineDiagram::setLine- Attributes().44 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [pure virtual.47 void AbstractDiagram::setAntiAliasing (bool enabled) [inherited] Set whether anti-aliasing is to be used while rendering this diagram. KDChart::LineDiagram::setThreeDLineAttributes(). that are calculated.10. KDChart::PieDiagram.2.10.43 void KDChart::AbstractDiagram::propertiesChanged () [protected.10 KDChart::AbstractPolarDiagram Class Reference 195 6. Parameters: allow True means that overlapping labels are allowed. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Adjust all internal structures.6.2. Referenced by KDChart::AbstractDiagram::setDataValueAttributes().2. and KDChart::RingDiagram.cpp. Parameters: enabled True means that AA is enabled.10.2.10. dependending on the size of the widget. 6. 6. } 6. ScrollHint hint = EnsureVisible) [virtual. Definition at line 285 of file KDChartAbstractDiagram. inherited] [reimplemented] Definition at line 646 of file KDChartAbstractDiagram.2. inherited] Emitted upon change of a property of the Diagram. References d. and KDChart::LineDiagram::setType().

and KDChart::AbstractDiagram::modelsChanged(). Wrong: diagram1->setAttributesModel( diagram2->attributesModel() ). 171 return. 176 emit modelsChanged(). diagram1->setAttributesModel( am ). Note that the diagram does _not_ take ownership of the AttributesModel.cpp. 172 } 173 d->setAttributesModel(amodel)."). 161 { 162 if( amodel->sourceModel() != model() ) { 163 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 164 "Trying to set an attributesmodel which works on a different " 165 "model than the diagram. References d. inherited] Definition at line 195 of file KDChartAbstractDiagram. References d. 0 ). 175 d->databoundariesDirty = true. 167 } 168 if( qobject_cast<PrivateAttributesModel*>(amodel) ) { 169 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 170 "Trying to set an attributesmodel that is private to another diagram. Parameters: model The AttributesModel to use for this diagram. References d. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2. Correct: AttributesModel *am = new AttributesModel( model.10. and are owned by her. This should thus only be used with AttributesModels that have been explicitely created by the user. diagram2->setAttributesModel( am ).10.196 KD Chart 2 Class Documentation Definition at line 296 of file KDChartAbstractDiagram. See also: AttributesModel Definition at line 160 of file KDChartAbstractDiagram. 301 { 6.").cpp. 177 } 6. 174 scheduleDelayedItemsLayout().49 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex & idx) [protected.cpp. 166 return.48 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual. inherited] Associate an AttributesModel with this diagram.2. Setting an AttributesModel that is internal to another diagram is an error.

const QBrush & brush) [inherited] Set the brush to be used. Parameters: brush The brush to use.53 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane ∗ plane) [virtual.10. const QBrush & brush) [inherited] Set the brush to be used.10. 601 { 6. pen The brush to use. for painting the given dataset.cpp. Returns: The coordinate plane associated with the diagram. Definition at line 602 of file KDChartAbstractDiagram.cpp.52 void AbstractDiagram::setBrush (const QModelIndex & index. 608 { 6. The chart takes ownership. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: dataset The dataset’s column in the model.2.10 KDChart::AbstractPolarDiagram Class Reference 197 6. inherited] Set the coordinate plane associated with the diagram.50 void AbstractDiagram::setBrush (const QBrush & brush) [inherited] Set the brush to be used. Definition at line 594 of file KDChartAbstractDiagram.cpp.51 void AbstractDiagram::setBrush (int dataset. Definition at line 609 of file KDChartAbstractDiagram.2.6.10. for painting the datapoint at the given index.10. 617 { 6. This determines how coordinates in value space are mapped into pixel space. Parameters: index The datapoint’s index in the model. brush The brush to use.2. for painting all datasets in the model.2.

54 void AbstractDiagram::setDataBoundariesDirty () const [protected. Definition at line 279 of file KDChartAbstractDiagram.56 void AbstractDiagram::setDataValueAttributes (const DataValueAttributes & a) [inherited] Set the DataValueAttributes for all datapoints in the model.2. 142 } 6.198 KD Chart 2 Class Documentation Reimplemented in KDChart::AbstractCartesianDiagram. 770 { 6.cpp. KDChart::LineDiagram::setType(). KDChart::LineDiagram::setThree- DLineAttributes(). and KDChart::AbstractCoordinatePlane::takeDiagram().55 void AbstractDiagram::setDatasetDimension (int dimension) [inherited] Sets the dataset dimension of the diagram.10.10. Parameters: dimension Definition at line 763 of file KDChartAbstractDiagram. and KDChart::BarDiagram::setType(). References d. 222 { 6. References d. KDChart::AbstractCartesian- Diagram::setCoordinatePlane(). Referenced by KDChart::AbstractCoordinatePlane::addDiagram().cpp.cpp.2. Parameters: a The attributes to set. References d. 284 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 218 of file KDChartAbstractDiagram. 140 { 141 d->databoundariesDirty = true. References d. Referenced by KDChart::BarDiagram::setThreeDBarAttributes().cpp.10. inherited] Definition at line 139 of file KDChartAbstractDiagram. See also: datasetDimension.2.

245 emit propertiesChanged(). 145 { 146 QAbstractItemView::setModel( newModel ). and KDChart::AbstractDiagram::modelsChanged(). 151 d->databoundariesDirty = true. KDChart::DataValueLabelAttributesRole. Definition at line 144 of file KDChartAbstractDiagram.10 KDChart::AbstractPolarDiagram Class Reference 199 6.58 void AbstractDiagram::setDataValueAttributes (const QModelIndex & index.10. 152 emit modelsChanged().59 void AbstractDiagram::setModel (QAbstractItemModel ∗ model) [virtual. 243 qVariantFromValue( a ).10.10.cpp. a The attributes to set. Parameters: index The datapoint to set the attributes for. 246 } 247 248 6.cpp. Definition at line 240 of file KDChartAbstractDiagram. References d. Definition at line 251 of file KDChartAbstractDiagram. this ). 148 amodel->initFrom( d->attributesModel ). const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given dataset. References d.2. 240 { 241 d->attributesModel->setData( 242 d->attributesModel->mapFromSource( index ). References d. and KDChart::AbstractDiagram::properties- Changed(). 147 AttributesModel* amodel = new PrivateAttributesModel( newModel. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given index. KDChart::AttributesModel::initFrom(). 244 DataValueLabelAttributesRole ).2. Parameters: dataset The dataset to set the attributes for.57 void AbstractDiagram::setDataValueAttributes (int dataset. 149 d->setAttributesModel(amodel).cpp.2. 150 scheduleDelayedItemsLayout().6. 153 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . inherited] Associate a model with the diagram. 259 { 6. a The attributes to set.

10.62 void AbstractDiagram::setPen (const QModelIndex & index.10. 312 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: pen The pen to use.cpp.61 void AbstractDiagram::setPen (int dataset. Referenced by KDChart::LineDiagram::setType().2. const QPen & pen) [inherited] Set the pen to be used. Definition at line 556 of file KDChartAbstractDiagram. Definition at line 548 of file KDChartAbstractDiagram.10. Definition at line 563 of file KDChartAbstractDiagram.cpp. 562 { 6. and KDChart::BarDiagram::setType(). pen The pen to use. for painting all datasets in the model.2. Parameters: dataset The dataset’s row in the model.63 void AbstractDiagram::setPercentMode (bool percent) [inherited] Definition at line 307 of file KDChartAbstractDiagram.10. for painting the given dataset. const QPen & pen) [inherited] Set the pen to be used. pen The pen to use. 571 { 6.60 void AbstractDiagram::setPen (const QPen & pen) [inherited] Set the pen to be used.cpp. References d. Parameters: index The datapoint’s index in the model.2.cpp.2. for painting the datapoint at the given index. 555 { 6.200 KD Chart 2 Class Documentation 6.

References d. References d. where the diagram starts referencing data for display.2.cpp.2.2.cpp. 675 { 6. for painting datasets to the default palette. Definition at line 681 of file KDChartAbstractDiagram. FIXME: fold into one usePalette (KDChart::Palette&) method Definition at line 671 of file KDChartAbstractDiagram.10. References d.2. See also: KDChart::Palette. 666 { return QRegion(). [reimplemented] Definition at line 188 of file KDChartAbstractDiagram. } 6. inherited] Set the root index in the model.68 void KDChart::AbstractDiagram::useRainbowColors () [inherited] Set the palette to be used. inherited] [reimplemented] Definition at line 664 of file KDChartAbstractDiagram.67 void KDChart::AbstractDiagram::useDefaultColors () [inherited] Set the palette to be used.2.cpp.10.10 KDChart::AbstractPolarDiagram Class Reference 201 6. See also: KDChart::Palette.10. QItemSelectionModel::SelectionFlags command) [virtual. Referenced by KDChart::AbstractDiagram::doItemsLayout(). 685 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .64 void AbstractDiagram::setRootIndex (const QModelIndex & idx) [virtual.10.cpp. 6.66 void AbstractDiagram::update () const [inherited] Definition at line 777 of file KDChartAbstractDiagram.10. for painting datasets to the rainbow palette.6.cpp.65 void AbstractDiagram::setSelection (const QRect & rect. References d. 6.

2.2. and d. 776 { 6.10. retrieving the data value (DisplayRole) for a given row and column.10.cpp.72 int AbstractDiagram::verticalOffset () const [virtual.71 virtual double KDChart::AbstractPolarDiagram::valueTotals () const [pure virtual] Implemented in KDChart::PieDiagram. Definition at line 771 of file KDChartAbstractDiagram. Parameters: row The row to query. KDChart::PolarDiagram. inherited] [reimplemented] Definition at line 658 of file KDChartAbstractDiagram. int column) const [protected.10. for painting datasets to the subdued palette. Referenced by KDChart::LineDiagram::paint().70 double AbstractDiagram::valueForCell (int row.2.10. and KDChart::RingDiagram. 680 { 6.202 KD Chart 2 Class Documentation 6.2.cpp.69 void KDChart::AbstractDiagram::useSubduedColors () [inherited] Set the palette to be used. References d. Referenced by KDChart::PolarCoordinatePlane::layoutDiagrams(). column The column to query. 660 { return true. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 676 of file KDChartAbstractDiagram.cpp. inherited] Helper method. 6. Returns: The value of the display role at the given row and column as a double. References KDChart::AbstractDiagram::attributesModelRootIndex(). See also: KDChart::Palette.

645 {} 6.74 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection & selection) const [virtual. The documentation for this class was generated from the following files: • KDChartAbstractPolarDiagram.cpp.10.3.2.73 QRect AbstractDiagram::visualRect (const QModelIndex & index) const [virtual.2.10. inherited] [reimplemented] Definition at line 641 of file KDChartAbstractDiagram.3 Member Data Documentation 6. 6. inherited] Definition at line 506 of file KDChartAbstractDiagram.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .10.1 Q_SIGNALS KDChart::AbstractDiagram::__pad0__ [protected.cpp.h.10 KDChart::AbstractPolarDiagram Class Reference 203 6.6.10. inherited] [reimplemented] Definition at line 667 of file KDChartAbstractDiagram.h • KDChartAbstractPolarDiagram.

but only the bits that we really need from it.11.h> Inheritance diagram for KDChart::AbstractProxyModel:Collaboration diagram for KDChart::Abstract- ProxyModel: Public Member Functions • AbstractProxyModel (QObject ∗parent=0) This is basically KDAbstractProxyModel. int col. const QModelIndex & index) const Definition at line 53 of file KDChartAbstractProxyModel. Referenced by KDChart::AttributesModel::setHeaderData(). const QModelIndex &index) const • QModelIndex mapFromSource (const QModelIndex &sourceIndex) const • QModelIndex mapToSource (const QModelIndex &proxyIndex) const • QModelIndex parent (const QModelIndex &index) const 6.2. References mapFromSource(). 56 return mapFromSource(sourceModel()->index( row. 54 { 55 Q_ASSERT(sourceModel()). but only the bits that we really need from it. and KDChart::AttributesModel::setModel- Data().11 KDChart::AbstractProxyModel Class Reference #include <KDChartAbstractProxyModel. Definition at line 12 of file KDChartAbstractProxyModel. mapToSource(index) )).cpp.cpp. 13 : QAbstractProxyModel(parent) {} 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1 QModelIndex KDChart::AbstractProxyModel::index (int row.cpp. col. • QModelIndex index (int row. and mapToSource().1.1 Constructor & Destructor Documentation 6. int col.2.11.11.1 KDChart::AbstractProxyModel::AbstractProxyModel (QObject ∗ parent = 0) [explicit] This is basically KDAbstractProxyModel.11.2 Member Function Documentation 6.2 QModelIndex KDChart::AbstractProxyModel::mapFromSource (const QModelIndex & sourceIndex) const Definition at line 23 of file KDChartAbstractProxyModel. and parent().204 KD Chart 2 Class Documentation 6. 57 } 6.11. Referenced by index().

isValid() ) 26 return QModelIndex().column().2. 47 hack->p = proxyIndex.3 QModelIndex KDChart::AbstractProxyModel::mapToSource (const QModelIndex & proxyIndex) const Definition at line 36 of file KDChartAbstractProxyModel.model() == sourceModel() ).. 50 return sourceIndex. KDChart::AttributesModel::data().internalPointer() ).cpp.2.. 41 // So here we need to create a source index which holds that internal pointer. sourceIndex.row(). 32 // this way AbstractProxyModel preserves the structure of the source model 33 return createIndex( sourceIndex.11. parent().11. 40 Q_ASSERT( proxyIndex. 44 KDPrivateModelIndex* hack = reinterpret_cast<KDPrivateModelIndex*>(&sourceIndex).model() == this ). References mapFromSource().11 KDChart::AbstractProxyModel Class Reference 205 24 { 25 if ( !sourceIndex. 62 return mapFromSource(sourceModel()->parent( mapToSource(index) )). 45 hack->r = proxyIndex. 60 { 61 Q_ASSERT(sourceModel()).h • KDChartAbstractProxyModel. 49 Q_ASSERT( sourceIndex. sourceIndex. 48 hack->m = sourceModel(). 46 hack->c = proxyIndex.isValid() ). 63 } The documentation for this class was generated from the following files: • KDChartAbstractProxyModel. so we have to do the ugly way: 43 QModelIndex sourceIndex. and KDChart::AttributesModel::setData().cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .4 QModelIndex KDChart::AbstractProxyModel::parent (const QModelIndex & index) const Definition at line 59 of file KDChartAbstractProxyModel.model(). 37 { 38 if ( !proxyIndex. 30 31 // Create an index that preserves the internal pointer from the source. 29 Q_ASSERT( sourceIndex. KDChart::AttributesModel::rowCount().model()="<<sourceIndex.internalPointer(). index(). Referenced by KDChart::AttributesModel::columnCount(). 51 } 6. 42 // No way to pass it to sourceModel()->index.cpp. and mapToSource(). 27 //qDebug() << "sourceIndex. 34 } 6.6.row().column(). 28 //qDebug() << "model()="<<sourceModel().isValid() ) 39 return QModelIndex().

cpp.1 AbstractThreeDAttributes::AbstractThreeDAttributes () Definition at line 46 of file KDChartAbstractThreeDAttributes.12.cpp.1.1. 67 { 68 delete _d.1.12 KDChart::AbstractThreeDAttributes Class Reference #include <KDChartAbstractThreeDAttributes.2 AbstractThreeDAttributes::AbstractThreeDAttributes (const AbstractThreeDAttributes &) Definition at line 51 of file KDChartAbstractThreeDAttributes.cpp.12.3 AbstractThreeDAttributes::∼AbstractThreeDAttributes () [pure virtual] Definition at line 66 of file KDChartAbstractThreeDAttributes. _d = 0. 52 : _d( new Private( *r.1 Constructor & Destructor Documentation 6. References d.12.12.d ) ) 53 { 54 } 6. 47 : _d( new Private() ) 48 { 49 } 6. 69 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .206 KD Chart 2 Class Documentation 6.h> Inheritance diagram for KDChart::AbstractThreeDAttributes: Public Member Functions • AbstractThreeDAttributes (const AbstractThreeDAttributes &) • AbstractThreeDAttributes () • double depth () const • bool isEnabled () const • bool operator!= (const AbstractThreeDAttributes &other) const • AbstractThreeDAttributes & operator= (const AbstractThreeDAttributes &) • bool operator== (const AbstractThreeDAttributes &) const • void setDepth (double depth) • void setEnabled (bool enabled) • double validDepth () const • virtual ∼AbstractThreeDAttributes ()=0 6.

3 bool KDChart::AbstractThreeDAttributes::operator!= (const AbstractThreeDAttributes & other) const Definition at line 57 of file KDChartAbstractThreeDAttributes. and KDChart::Bar- Diagram::paint(). References d. 106 } 6. 95 } 6.cpp. Referenced by operator<<().cpp. References d.12 KDChart::AbstractThreeDAttributes Class Reference 207 6. 62 63 return *this. References d. 57 { 58 if( this == &r ) 59 return *this. KDChart::PieDiagram::paint().2. } 6.12.12.d. and validDepth(). 64 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.12.12. operator==(). 60 61 *d = *r.6.12. 104 { 105 return d->depth.2 Member Function Documentation 6. operator==().1 double AbstractThreeDAttributes::depth () const Definition at line 103 of file KDChartAbstractThreeDAttributes.4 AbstractThreeDAttributes & AbstractThreeDAttributes::operator= (const AbstractThreeDAttributes &) Definition at line 56 of file KDChartAbstractThreeDAttributes. KDChart::Bar- Diagram::paint(). 57 { return !operator==(other).h.2 bool AbstractThreeDAttributes::isEnabled () const Definition at line 92 of file KDChartAbstractThreeDAttributes. KDChart::PieDiagram::paint().2. Referenced by operator<<().cpp.2. 93 { 94 return d->enabled.

and KDChart::BarDiagram::threeDItem- Depth().12. 79 } 6.8 double AbstractThreeDAttributes::validDepth () const Definition at line 109 of file KDChartAbstractThreeDAttributes. 110 { 111 return isEnabled() ? d->depth : 0.12. and isEnabled().cpp.6 void AbstractThreeDAttributes::setDepth (double depth) Definition at line 97 of file KDChartAbstractThreeDAttributes. Referenced by KDChart::LineDiagram::threeDItemDepth().cpp.depth() ) 76 return true.2.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.12. 73 { 74 if( isEnabled() == r. References d. 100 } 6.208 KD Chart 2 Class Documentation 6. 112 } The documentation for this class was generated from the following files: • KDChartAbstractThreeDAttributes. Referenced by KDChart::ThreeDPieAttributes::operator==(). References d. 98 { 99 d->depth = depth. References d. and isEnabled().h • KDChartAbstractThreeDAttributes. 88 { 89 d->enabled = enabled.7 void AbstractThreeDAttributes::setEnabled (bool enabled) Definition at line 87 of file KDChartAbstractThreeDAttributes. References depth().cpp.2. 90 } 6.0. KDChart::ThreeDLine- Attributes::operator==().cpp.12. 77 else 78 return false.5 bool AbstractThreeDAttributes::operator== (const AbstractThreeDAttributes &) const Definition at line 72 of file KDChartAbstractThreeDAttributes.isEnabled() && 75 depth() == r. and KDChart::ThreeDBarAttributes::operator==().2.

PaletteTypeSubdued = 2 } Public Member Functions • AttributesModel (QAbstractItemModel ∗model. int role=Qt::DisplayRole) [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • QVariant data (int role) const Returns the data that were specified at global level. Qt::Orientation orientation. or the default data. int col. int role) const Returns the data that were specified at per column level.13 KDChart::AttributesModel Class Reference #include <KDChartAttributesModel. or the default data.13 KDChart::AttributesModel Class Reference 209 6. PaletteTypeRainbow = 1. QObject ∗parent=0) • int columnCount (const QModelIndex &) const [reimplemented] • QVariant data (const QModelIndex &.h> Inheritance diagram for KDChart::AttributesModel:Collaboration diagram for KDChart::AttributesModel: Public Types • enum PaletteType { PaletteTypeDefault = 0. or the globally set data. or QVariant(). int role=Qt::DisplayRole) const [reimplemented] • QVariant data (int column. • QVariant headerData (int section. int role=Qt::DisplayRole) const [reimplemented] • QModelIndex index (int row. • QModelIndex mapFromSource (const QModelIndex &sourceIndex) const • QModelIndex mapToSource (const QModelIndex &proxyIndex) const • QVariant modelData (int role) const • PaletteType paletteType () const • QModelIndex parent (const QModelIndex &index) const • int rowCount (const QModelIndex &) const [reimplemented] • bool setData (const QModelIndex &index. const QVariant &value. or QVariant().6. const QModelIndex &index) const • void initFrom (const AttributesModel ∗other) • bool isKnownAttributesRole (int role) const Returns whether the given role corresponds to one of the known internally used ones.

45 mPaletteType( PaletteTypeDefault ) 46 { 47 setSourceModel(model).1 AttributesModel::AttributesModel (QAbstractItemModel ∗ model.13. • void setSourceModel (QAbstractItemModel ∗sourceModel) [reimplemented] • ∼AttributesModel () Public Attributes • Q_SIGNALS __pad0__: void attributesChanged( const QModelIndex& 6. 6.2 Constructor & Destructor Documentation 6. 48 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1 Member Enumeration Documentation 6. QObject ∗ parent = 0) [explicit] Definition at line 43 of file KDChartAttributesModel.h. int role) • void setPaletteType (PaletteType type) Sets the palettetype used by this attributesmodel. const QVariant &value.13. Qt::Orientation orientation.1.13. References setSourceModel().2.210 KD Chart 2 Class Documentation • bool setHeaderData (int section. 44 : AbstractProxyModel( parent ).13. 46 PaletteTypeRainbow = 1. int role=Qt::DisplayRole) [reimplemented] • bool setModelData (const QVariant value. 44 { 45 PaletteTypeDefault = 0.1 enum KDChart::AttributesModel::PaletteType Enumeration values: PaletteTypeDefault PaletteTypeRainbow PaletteTypeSubdued Definition at line 44 of file KDChartAttributesModel. 47 PaletteTypeSubdued = 2 48 }.cpp.

51 { 52 } 6. 154 } 155 QVariant sourceData = sourceModel()->data( mapToSource(index).cpp.row() ) ) { 163 const QMap<int. 273 { 274 Q_ASSERT(sourceModel()).1 int AttributesModel::columnCount (const QModelIndex &) const [reimplemented] Definition at line 272 of file KDChartAttributesModel. or at global level 169 if( index.3 Member Function Documentation 6. QMap< int.3. 275 return sourceModel()->columnCount( mapToSource(index) ). References data(). role ). QVariant> &dataMap = colDataMap[ index. 276 } 6.model() == this ).isValid() ) 170 return data( index. 152 if( index.contains( role ) ) 165 return dataMap[ role ].row() ].3.6.13.2 QVariant AttributesModel::data (const QModelIndex &.column(). 158 159 // check if we are storing a value for this role at this cell index 160 if ( mDataMap.13. 166 } 167 } 168 // check if there is something set for the column (dataset). int role = Qt::DisplayRole) const [reimplemented] Definition at line 149 of file KDChartAttributesModel.contains( index. 150 { 151 //qDebug() << "AttributesModel::data(" << index << role << ")". 164 if ( dataMap.contains( index.2. and KDChart::AbstractProxyModel::mapToSource().2 AttributesModel::∼AttributesModel () Definition at line 50 of file KDChartAttributesModel.column() ) ) { 161 const QMap< int.13. QVariant> > &colDataMap = mDataMap[ index.column() ].cpp. Referenced by setModelData().isValid() ) 157 return sourceData. 156 if ( sourceData. 173 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . // includes automatic fallback to default 171 172 return QVariant().13 KDChart::AttributesModel Class Reference 211 6. References KDChart::AbstractProxyModel::mapToSource().cpp. 162 if ( colDataMap.13.isValid() ) { 153 Q_ASSERT( index. role ).

124 return v.4 QVariant AttributesModel::data (int role) const Returns the data that were specified at global level. Referenced by data().cpp. Referenced by data().13. headerData(). 69 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp.isValid() ) 123 v = defaultsForRole( role ). KDChart::Palette::defaultPalette(). and KDChart::PolarDiagram::paint(). PaletteTypeRainbow.3. References data(). KDChart::RingDiagram::paint(). Qt::Vertical. int role = Qt::DisplayRole) const [reimplemented] Definition at line 66 of file KDChartAttributesModel.13. PaletteTypeDefault. 139 140 // check if there is something set at global level 141 if ( !v.5 QVariant AttributesModel::headerData (int section. or QVariant(). role ). PaletteTypeSubdued. or QVariant(). KDChart::Palette::get- Brush(). Definition at line 133 of file KDChartAttributesModel. int role) const Returns the data that were specified at per column level.isValid() ) 142 v = data( role ). Qt::Orientation orientation. KDChart::Palette::rainbowPalette(). and modelData(). paletteType().cpp. and isKnownAttributesRole(). 144 } 145 return QVariant(). References isKnownAttributesRole().13. 120 121 // else return the default setting.3.3. 138 v = headerData( column. 146 } 6. 134 { 135 if ( isKnownAttributesRole( role ) ) { 136 // check if there is something set for the column (dataset) 137 QVariant v. or the globally set data. 125 } 126 return QVariant(). and KDChart::Palette::subduedPalette(). 127 } 6. if any 122 if ( !v. or the default data. or the default data. modelData(). Definition at line 115 of file KDChartAttributesModel. 116 { 117 if ( isKnownAttributesRole( role ) ) { 118 // check if there is something set at global level 119 QVariant v = modelData( role ).212 KD Chart 2 Class Documentation 6. References KDChart::DatasetBrushRole.3 QVariant AttributesModel::data (int column. // includes automatic fallback to default 143 return v.

contains( section ) ) { 75 const QMap<int.6. 56 return mapFromSource(sourceModel()->index( row. const QModelIndex & index) const [inherited] Definition at line 53 of file KDChartAbstractProxyModel. role ). 76 if ( dataMap. QVariant> &dataMap = map[ section ]. paletteType(). orientation. orientation. 106 } 107 108 return QVariant().getBrush( section ).6 QModelIndex KDChart::AbstractProxyModel::index (int row.isValid() ) { 100 QBrush brush = qVariantValue<QBrush>( headerData( section.getBrush( section ). let’s use our stored values 73 const QMap<int. mModelDataMap. int col. 71 if ( sourceData. 54 { 55 Q_ASSERT(sourceModel()). QMap<int. 78 } 79 } 80 81 // Default values if nothing else matches 82 switch ( role ) { 83 case Qt::DisplayRole: 84 return QLatin1String( orientation == Qt::Vertical ? "Series " : "Item " ) + QString::number( sec 85 86 case KDChart::DatasetBrushRole: { 87 if ( paletteType() == PaletteTypeSubdued ) 88 return Palette::subduedPalette(). 95 } 96 case KDChart::DatasetPenRole: { 97 // default to the color set for the brush (or it’s defaults) 98 // but only if no per model override was set 99 if ( !modelData( role ). References KDChart::AbstractProxyModel::mapFromSource().color() ). mHorizontalHeaderDataMap. DatasetBrushRole ) ) 101 return QPen( brush. mVerticalHeaderDataMap.contains( role ) ) { 77 return dataMap[ role ].getBrush( section ). 57 } 6. 109 } 6.3. 93 else 94 qWarning("Unknown type of fallback palette!"). 72 // the source model didn’t have data set. 91 else if ( paletteType() == PaletteTypeDefault ) 92 return Palette::defaultPalette().13. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 102 } 103 } 104 default: 105 break. 89 else if ( paletteType() == PaletteTypeRainbow ) 90 return Palette::rainbowPalette().cpp.7 void AttributesModel::initFrom (const AttributesModel ∗ other) Definition at line 54 of file KDChartAttributesModel. Referenced by setHeaderData(). and setModelData().13 KDChart::AttributesModel Class Reference 213 70 QVariant sourceData = sourceModel()->headerData( section. and KDChart::AbstractProxyModel::map- ToSource(). col. and setPaletteType(). References mDataMap. QVariant> >& map = orientation == Qt::Horizontal ? mHorizontalHeaderDataMap 74 if ( map. mapToSource(index) )).3.cpp.13.isValid() ) return sourceData.

192 default: 193 break. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . setData(). 179 switch( role ) { 180 // fallthrough intended 181 case DataValueLabelAttributesRole: 182 case DatasetBrushRole: 183 case DatasetPenRole: 184 case ThreeDAttributesRole: 185 case LineAttributesRole: 186 case ThreeDLineAttributesRole: 187 case BarAttributesRole: 188 case ThreeDBarAttributesRole: 189 case PieAttributesRole: 190 case ThreeDPieAttributesRole: 191 oneOfOurs = true.isValid() ) 26 return QModelIndex(). 62 63 setPaletteType( other->paletteType() ).8 bool AttributesModel::isKnownAttributesRole (int role) const Returns whether the given role corresponds to one of the known internally used ones. and KDChart::ThreeDPieAttributesRole. KDChart::DatasetPenRole. Definition at line 176 of file KDChartAttributesModel.3.9 QModelIndex KDChart::AbstractProxyModel::mapFromSource (const QModelIndex & sourceIndex) const [inherited] Definition at line 23 of file KDChartAbstractProxyModel. 64 } 6. 196 } 6. 61 mModelDataMap = other->mModelDataMap. 60 mVerticalHeaderDataMap = other->mVerticalHeaderDataMap.model()="<<sourceIndex. 28 //qDebug() << "model()="<<sourceModel().3. 27 //qDebug() << "sourceIndex.13. KDChart::ThreeDAttributesRole. KDChart::ThreeDLineAttributes- Role. and KDChart::AbstractProxyModel::parent(). KDChart::PieAttributesRole. 24 { 25 if ( !sourceIndex. and setHeaderData().model(). 59 mHorizontalHeaderDataMap = other->mHorizontalHeaderDataMap. 57 58 mDataMap = other->mDataMap.13.214 KD Chart 2 Class Documentation Referenced by KDChart::AbstractDiagram::setModel(). Referenced by data(). 194 } 195 return oneOfOurs. KDChart::DataValueLabelAttributesRole. KDChart::LineAttributesRole. KDChart::ThreeDBarAttributesRole.cpp. Referenced by KDChart::AbstractProxyModel::index().cpp. KDChart::DatasetBrushRole. 55 { 56 if( other == this || ! other ) return. 177 { 178 bool oneOfOurs = false. References KDChart::BarAttributesRole.

. 46 hack->c = proxyIndex.cpp. Referenced by data().12 AttributesModel::PaletteType AttributesModel::paletteType () const Definition at line 247 of file KDChartAttributesModel. 32 // this way AbstractProxyModel preserves the structure of the source model 33 return createIndex( sourceIndex.3. 262 { 263 return mModelDataMap.cpp.cpp.13. sourceIndex. 40 Q_ASSERT( proxyIndex.internalPointer().13 KDChart::AttributesModel Class Reference 215 29 Q_ASSERT( sourceIndex.isValid() ). so we have to do the ugly way: 43 QModelIndex sourceIndex.13. data().6. Referenced by columnCount(). and initFrom().. 34 } 6. 41 // So here we need to create a source index which holds that internal pointer.column().row().isValid() ) 39 return QModelIndex(). Referenced by headerData(). sourceIndex.10 QModelIndex KDChart::AbstractProxyModel::mapToSource (const QModelIndex & proxyIndex) const [inherited] Definition at line 36 of file KDChartAbstractProxyModel.3. 51 } 6. 48 hack->m = sourceModel(). and setData(). 49 Q_ASSERT( sourceIndex.model() == this ).internalPointer() ). 37 { 38 if ( !proxyIndex.row(). 30 31 // Create an index that preserves the internal pointer from the source. KDChart::AbstractProxy- Model::parent(). 250 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .11 QVariant KDChart::AttributesModel::modelData (int role) const Definition at line 261 of file KDChartAttributesModel. 45 hack->r = proxyIndex.value( role. KDChart::AbstractProxyModel::index(). 50 return sourceIndex. 42 // No way to pass it to sourceModel()->index. 47 hack->p = proxyIndex. QVariant() ). rowCount().model() == sourceModel() ).3.13. and headerData(). 44 KDPrivateModelIndex* hack = reinterpret_cast<KDPrivateModelIndex*>(&sourceIndex).column(). 248 { 249 return mPaletteType. 264 } 6.

13 QModelIndex KDChart::AbstractProxyModel::parent (const QModelIndex & index) const [inherited] Definition at line 59 of file KDChartAbstractProxyModel. 267 { 268 Q_ASSERT(sourceModel()). and KDChart::AbstractProxyModel::mapToSource(). const QVariant & value.14 int AttributesModel::rowCount (const QModelIndex &) const [reimplemented] Definition at line 266 of file KDChartAttributesModel. 216 } else { 217 QMap< int.cpp.13.3. and KDChart::AbstractProxyModel::map- ToSource().13.13.cpp.13. int role = Qt::DisplayRole) [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .column() ].3. Qt::Orientation orientation. QVariant> &dataMap = colDataMap[ index. 63 } 6. 269 return sourceModel()->rowCount( mapToSource(index) ). Referenced by KDChart::BarDiagram::setBarAttributes().15 bool AttributesModel::setData (const QModelIndex & index.row() ]. 213 { 214 if ( !isKnownAttributesRole( role ) ) { 215 return sourceModel()->setData( mapToSource(index).16 bool AttributesModel::setHeaderData (int section. QVariant> > &colDataMap = mDataMap[ index. role ). value ). 221 emit attributesChanged( index. 270 } 6. References isKnownAttributesRole().insert( role. 62 return mapFromSource(sourceModel()->parent( mapToSource(index) )). 219 //qDebug() << "AttributesModel::setData" <<"role" << role << "value" << value. References KDChart::AbstractProxyModel::mapToSource(). 220 dataMap. 218 QMap<int.3. const QVariant & value. 223 } 224 } 6. QMap< int.3.216 KD Chart 2 Class Documentation 6.cpp. 222 return true. 60 { 61 Q_ASSERT(sourceModel()). Referenced by setHeaderData(). References KDChart::AbstractProxyModel::mapFromSource(). and setModelData(). value. int role = Qt::DisplayRole) [reimplemented] Definition at line 212 of file KDChartAttributesModel. index ).

and rowCount().insert( role. value. 237 index( rowCount( QModelIndex() ).13. const QModelIndex&))) 283 QAbstractProxyModel::setSourceModel( sourceModel ). isKnownAttributesRole(). 236 emit attributesChanged( index( 0.cpp. Definition at line 242 of file KDChartAttributesModel. SIGNAL( dataChanged( const QModelIndex&. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. QModelIndex() ) ). QVariant> &dataMap = sectionDataMap[ section ]. 257 columnCount( QModelIndex() ). Referenced by AttributesModel(). 234 QMap<int. KDChart::AbstractProxyModel::index().17 bool KDChart::AttributesModel::setModelData (const QVariant value. QModelIndex() ) ). 258 return true. 253 { 254 mModelDataMap.6. Referenced by initFrom(). 235 dataMap. section. 228 { 229 if ( !isKnownAttributesRole( role ) ) { 230 return sourceModel()->setHeaderData( section. 259 } 6. role ). 279 { 280 if( this->sourceModel() != 0 ) 281 disconnect( this->sourceModel(). 245 } 6.3. 255 emit attributesChanged( index( 0. 239 } 240 } 6. const QModelIndex&)) 282 this. 243 { 244 mPaletteType = type.13.19 void AttributesModel::setSourceModel (QAbstractItemModel ∗ sourceModel) [reimplemented] Definition at line 278 of file KDChartAttributesModel.cpp. 238 return true. References KDChart::AbstractProxyModel::index(). 231 } else { 232 QMap<int. QModelIndex() ). and rowCount(). value ).3. 256 index( rowCount( QModelIndex() ). value ).13. References columnCount(). QMap<int. 0. QModelIndex() ). orientation. section.18 void AttributesModel::setPaletteType (PaletteType type) Sets the palettetype used by this attributesmodel. SIGNAL( dataChanged( const QModelIndex&. int role) Definition at line 252 of file KDChartAttributesModel.insert( role. QVariant> > &sectionDataMap 233 = orientation == Qt::Horizontal ? mHorizontalHeaderDataMap : mVerticalHeaderDataMap.cpp.13 KDChart::AttributesModel Class Reference 217 Definition at line 226 of file KDChartAttributesModel.3.

const QModelIndex&)). const QModelIndex&))). SIGNAL( dataChanged( const QModelIndex&. SIGNAL( dataChanged( const QModelIndex&.1 Q_SIGNALS KDChart::AttributesModel::__pad0__ Definition at line 111 of file KDChartAttributesModel.h • KDChartAttributesModel. 287 } 6.13.4 Member Data Documentation 6.4. 286 this. The documentation for this class was generated from the following files: • KDChartAttributesModel.218 KD Chart 2 Class Documentation 284 if( this->sourceModel() != NULL ) 285 connect( this->sourceModel().h.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .13.

14.14 KDChart::BackgroundAttributes Class Reference 219 6. BackgroundPixmapModeCentered.1 Member Enumeration Documentation 6.1. 49 { BackgroundPixmapModeNone. 50 BackgroundPixmapModeCentered.14 KDChart::BackgroundAttributes Class Reference #include <KDChartBackgroundAttributes. 52 BackgroundPixmapModeStretched }.6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . BackgroundPixmapModeStretched } Public Member Functions • BackgroundAttributes (const BackgroundAttributes &) • BackgroundAttributes () • QBrush brush () const • bool isVisible () const • bool operator!= (const BackgroundAttributes &other) const • BackgroundAttributes & operator= (const BackgroundAttributes &) • bool operator== (const BackgroundAttributes &) const • QPixmap pixmap () const • BackgroundPixmapMode pixmapMode () const • void setBrush (const QBrush &brush) • void setPixmap (const QPixmap &backPixmap) • void setPixmapMode (BackgroundPixmapMode mode) • void setVisible (bool visible) • ∼BackgroundAttributes () 6.1 enum KDChart::BackgroundAttributes::BackgroundPixmapMode Enumeration values: BackgroundPixmapModeNone BackgroundPixmapModeCentered BackgroundPixmapModeScaled BackgroundPixmapModeStretched Definition at line 49 of file KDChartBackgroundAttributes. BackgroundPixmapModeScaled.h.14. 51 BackgroundPixmapModeScaled.h> Public Types • enum BackgroundPixmapMode { BackgroundPixmapModeNone.

3.3 bool KDChart::BackgroundAttributes::operator!= (const BackgroundAttributes & other) const Definition at line 67 of file KDChartBackgroundAttributes.3.1 QBrush KDChart::BackgroundAttributes::brush () const Referenced by operator<<().14.2.2.2 bool KDChart::BackgroundAttributes::isVisible () const Referenced by operator<<().3.3. } 6. 6.14.14.14.14. 6.14.7 BackgroundPixmapMode KDChart::BackgroundAttributes::pixmapMode () const Referenced by operator<<().14.14.14.3.6 QPixmap KDChart::BackgroundAttributes::pixmap () const Referenced by operator<<().14.2 KDChart::BackgroundAttributes::BackgroundAttributes (const BackgroundAttributes &) 6.3 Member Function Documentation 6.14.8 void KDChart::BackgroundAttributes::setBrush (const QBrush & brush) 6.11 void KDChart::BackgroundAttributes::setVisible (bool visible) The documentation for this class was generated from the following file: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .14.2.3.3.1 KDChart::BackgroundAttributes::BackgroundAttributes () 6.2 Constructor & Destructor Documentation 6.14.3.5 bool KDChart::BackgroundAttributes::operator== (const BackgroundAttributes &) const 6.9 void KDChart::BackgroundAttributes::setPixmap (const QPixmap & backPixmap) 6.3 KDChart::BackgroundAttributes::∼BackgroundAttributes () 6.14.220 KD Chart 2 Class Documentation 6.4 BackgroundAttributes& KDChart::BackgroundAttributes::operator= (const BackgroundAttributes &) 6.14.10 void KDChart::BackgroundAttributes::setPixmapMode (BackgroundPixmapMode mode) 6. 6. 67 { return !operator==(other).h. 6.14.3.3.3.

6.14 KDChart::BackgroundAttributes Class Reference 221 • KDChartBackgroundAttributes.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

15.1.1.15.2 Member Function Documentation 6.3 KDChart::BarAttributes::∼BarAttributes () 6.1 Constructor & Destructor Documentation 6.2.15.15.2 KDChart::BarAttributes::BarAttributes (const BarAttributes &) 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.15.15 KDChart::BarAttributes Class Reference #include <KDChartBarAttributes.h> Collaboration diagram for KDChart::BarAttributes: Public Member Functions • BarAttributes (const BarAttributes &) • BarAttributes () • qreal barGapFactor () const • bool drawSolidExcessArrows () const • qreal fixedBarWidth () const • qreal fixedDataValueGap () const • qreal fixedValueBlockGap () const • qreal groupGapFactor () const • bool operator!= (const BarAttributes &other) const • BarAttributes & operator= (const BarAttributes &) • bool operator== (const BarAttributes &) const • void setBarGapFactor (qreal gapFactor) • void setDrawSolidExcessArrows (bool solidArrows) • void setFixedBarWidth (qreal width) • void setFixedDataValueGap (qreal gap) • void setFixedValueBlockGap (qreal gap) • void setGroupGapFactor (qreal gapFactor) • void setUseFixedBarWidth (bool useFixedBarWidth) • void setUseFixedDataValueGap (bool gapIsFixed) • void setUseFixedValueBlockGap (bool gapIsFixed) • bool useFixedBarWidth () const • bool useFixedDataValueGap () const • bool useFixedValueBlockGap () const • ∼BarAttributes () 6.15.1 KDChart::BarAttributes::BarAttributes () 6.222 KD Chart 2 Class Documentation 6.15.15.2 bool KDChart::BarAttributes::drawSolidExcessArrows () const 6.1 qreal KDChart::BarAttributes::barGapFactor () const 6.1.3 qreal KDChart::BarAttributes::fixedBarWidth () const Referenced by KDChart::BarDiagram::paint().2.

2.4 qreal KDChart::BarAttributes::fixedDataValueGap () const Referenced by KDChart::BarDiagram::paint().15.16 void KDChart::BarAttributes::setUseFixedBarWidth (bool useFixedBarWidth) 6.2. 6.15.6 qreal KDChart::BarAttributes::groupGapFactor () const 6.2.15 KDChart::BarAttributes Class Reference 223 6.15.10 void KDChart::BarAttributes::setBarGapFactor (qreal gapFactor) 6.2.2.2.15. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .15.8 BarAttributes& KDChart::BarAttributes::operator= (const BarAttributes &) 6.5 qreal KDChart::BarAttributes::fixedValueBlockGap () const Referenced by KDChart::BarDiagram::paint().15.15.7 bool KDChart::BarAttributes::operator!= (const BarAttributes & other) const Definition at line 71 of file KDChartBarAttributes.14 void KDChart::BarAttributes::setFixedValueBlockGap (qreal gap) 6.15.18 void KDChart::BarAttributes::setUseFixedValueBlockGap (bool gapIsFixed) 6. 6.h.2.2.11 void KDChart::BarAttributes::setDrawSolidExcessArrows (bool solidArrows) 6.2.15.2. 6.2.6.2.15.15.15 void KDChart::BarAttributes::setGroupGapFactor (qreal gapFactor) 6.15.15.15.17 void KDChart::BarAttributes::setUseFixedDataValueGap (bool gapIsFixed) 6.2.15. 71 { return !operator==(other).2.2.2.15. } 6.15.13 void KDChart::BarAttributes::setFixedDataValueGap (qreal gap) 6.12 void KDChart::BarAttributes::setFixedBarWidth (qreal width) 6.19 bool KDChart::BarAttributes::useFixedBarWidth () const Referenced by KDChart::BarDiagram::paint().20 bool KDChart::BarAttributes::useFixedDataValueGap () const Referenced by KDChart::BarDiagram::paint().2.9 bool KDChart::BarAttributes::operator== (const BarAttributes &) const 6.

2.224 KD Chart 2 Class Documentation 6.15.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . The documentation for this class was generated from the following file: • KDChartBarAttributes.21 bool KDChart::BarAttributes::useFixedValueBlockGap () const Referenced by KDChart::BarDiagram::paint().

16 KDChart::BarDiagram Class Reference 225 6. CartesianCoordinatePlane ∗plane=0) • QBrush brush (const QModelIndex &index) const Retrieve the brush to be used. • virtual BarDiagram ∗ clone () const • AbstractCoordinatePlane ∗ coordinatePlane () const The coordinate plane associated with the diagram. Rows } Public Member Functions • virtual void addAxis (CartesianAxis ∗axis) Add the axis to the diagram. Percent. • virtual KDChart::CartesianAxisList axes () const • BarAttributes barAttributes (const QModelIndex &index) const • BarAttributes barAttributes (int column) const • BarAttributes barAttributes () const • BarDiagram (QWidget ∗parent=0. QPointF > dataBoundaries () const Return the bottom left and top right data point. that is used by this diagram. • const QPair< QPointF.6. • virtual void dataChanged (const QModelIndex &topLeft. for painting the datapoint at the given index in the model. • bool allowOverlappingDataValueTexts () const • bool antiAliasing () const • virtual AttributesModel ∗ attributesModel () const Returns the AttributesModel. Stacked. that the diagram will display (unless the grid adjusts these values).h> Inheritance diagram for KDChart::BarDiagram:Collaboration diagram for KDChart::BarDiagram: Public Types • enum BarType { Normal.16 KDChart::BarDiagram Class Reference #include <KDChartBarDiagram. • QBrush brush (int dataset) const Retrieve the brush to be used for the given dataset. • QBrush brush () const Retrieve the brush to be used for painting datapoints globally. const QModelIndex &bottomRight) [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

• int datasetDimension () const The dataset dimension of a diagram determines. • DataValueAttributes dataValueAttributes () const Retrieve the DataValueAttributes speficied globally. • DataValueAttributes dataValueAttributes (const QModelIndex &index) const Retrieve the DataValueAttributes for the given index. for use in legends. for use in Abscissa axes. for use in legends. • QList< QPen > datasetPens () const The set of dataset pens currently used. Qt::KeyboardModifiers modifiers) [reimplemented] • const int numberOfAbscissaSegments () const [reimplemented] • const int numberOfOrdinateSegments () const [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . etc. etc. • virtual void layoutPlanes () • virtual QModelIndex moveCursor (CursorAction cursorAction. • QList< MarkerAttributes > datasetMarkers () const The set of dataset markers currently used. etc. etc. • QStringList datasetLabels () const The set of dataset labels currently displayed. • virtual void doItemsLayout () [reimplemented] • virtual int horizontalOffset () const [reimplemented] • virtual QModelIndex indexAt (const QPoint &point) const [reimplemented] • virtual bool isIndexHidden (const QModelIndex &index) const [reimplemented] • QStringList itemRowLabels () const The set of item row labels currently displayed. for use in legends. • DataValueAttributes dataValueAttributes (int column) const Retrieve the DataValueAttributes for the given dataset. etc.226 KD Chart 2 Class Documentation • QList< QBrush > datasetBrushes () const The set of dataset brushes currently used. for use in legends. how many value dimensions it expects each datapoint to have.

const QPointF &point. for painting the given dataset. • void setBrush (int dataset.16 KDChart::BarDiagram Class Reference 227 • virtual void paintMarker (QPainter ∗painter. • void setDatasetDimension (int dimension) Sets the dataset dimension of the diagram. for painting all datasets in the model. const MarkerAttributes &markerAttributes. const QBrush &brush. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • virtual void setCoordinatePlane (AbstractCoordinatePlane ∗plane) Set the coordinate plane associated with the diagram. • QPen pen () const Retrieve the pen to be used for painting datapoints globally. • QPen pen (int dataset) const Retrieve the pen to be used for the given dataset. • void setDataValueAttributes (const DataValueAttributes &a) Set the DataValueAttributes for all datapoints in the model. const BarAttributes &a) • void setBarAttributes (int column. const QBrush &brush) Set the brush to be used.6. const QPen &. • void setAntiAliasing (bool enabled) Set whether anti-aliasing is to be used while rendering this diagram. • virtual void scrollTo (const QModelIndex &index. • void setBarAttributes (const QModelIndex &index. const QBrush &brush) Set the brush to be used. • void setBrush (const QModelIndex &index. ScrollHint hint=EnsureVisible) [reimplemented] • void setAllowOverlappingDataValueTexts (bool allow) Set whether data value labels are allowed to overlap. const QSizeF &size) • QPen pen (const QModelIndex &index) const Retrieve the pen to be used. • bool percentMode () const • virtual AbstractCartesianDiagram ∗ referenceDiagram () const • virtual QPointF referenceDiagramOffset () const • void resize (const QSizeF &area) Called by the widget’s sizeEvent. • virtual void setAttributesModel (AttributesModel ∗model) Associate an AttributesModel with this diagram. for painting the datapoint at the given index. const BarAttributes &a) • void setBarAttributes (const BarAttributes &a) • void setBrush (const QBrush &brush) Set the brush to be used. for painting the datapoint at the given index in the model.

for painting datasets to the rainbow palette. const DataValueAttributes &a) Set the DataValueAttributes for the given dataset. • void setDataValueAttributes (const QModelIndex &index.228 KD Chart 2 Class Documentation • void setDataValueAttributes (int dataset. • void setPen (const QPen &pen) Set the pen to be used. • void setPen (int dataset. without deleting it. for painting datasets to the subdued palette. • void useSubduedColors () Set the palette to be used. QItemSelectionModel::SelectionFlags command) [reimplemented] • void setThreeDBarAttributes (const QModelIndex &index. const DataValueAttributes &a) Set the DataValueAttributes for the given index. const ThreeDBarAttributes &a) • void setThreeDBarAttributes (const ThreeDBarAttributes &a) • void setType (BarType type) • virtual void takeAxis (CartesianAxis ∗axis) Removes the axis from the diagram. const QPen &pen) Set the pen to be used. • virtual void setModel (QAbstractItemModel ∗model) Associate a model with the diagram. for painting all datasets in the model. const ThreeDBarAttributes &a) • void setThreeDBarAttributes (int column. for painting datasets to the default palette. where the diagram starts referencing data for display. • void setPen (const QModelIndex &index. • virtual int verticalOffset () const [reimplemented] Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . const QPen &pen) Set the pen to be used. for painting the datapoint at the given index. • void setPercentMode (bool percent) • virtual void setReferenceDiagram (AbstractCartesianDiagram ∗diagram. • ThreeDBarAttributes threeDBarAttributes (const QModelIndex &index) const • ThreeDBarAttributes threeDBarAttributes (int column) const • ThreeDBarAttributes threeDBarAttributes () const • BarType type () const • void update () const • void useDefaultColors () Set the palette to be used. • void useRainbowColors () Set the palette to be used. const QPointF &offset=QPointF()) • virtual void setRootIndex (const QModelIndex &idx) Set the root index in the model. • virtual void setSelection (const QRect &rect. for painting the given dataset.

const QModelIndex &index. const QModelIndex &index. const QPointF &pos) • virtual void paintMarkers (QPainter ∗painter) • void propertiesChanged () Emitted upon change of a property of the Diagram. • void paint (PaintContext ∗paintContext) Draw the diagram contents to the rectangle and painter.6. int column) const Helper method. • void resizeEvent (QResizeEvent ∗) • void setAttributesModelRootIndex (const QModelIndex &) • void setDataBoundariesDirty () const • virtual double threeDItemDepth (int column) const • virtual double threeDItemDepth (const QModelIndex &index) const • double valueForCell (int row. Protected Attributes • Q_SIGNALS __pad0__: void layoutChanged( AbstractDiagram∗ ) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . const QPointF &pos. • void paintDataValueText (QPainter ∗painter. QPointF > calculateDataBoundaries () const [reimplemented] • virtual bool checkInvariants (bool justReturnTheStatus=false) const • QModelIndex columnToIndex (int column) const • void modelsChanged () This signal is emitted. when either the model or the AttributesModel is replaced. dou- ble value) • virtual void paintDataValueTexts (QPainter ∗painter) • void paintMarker (QPainter ∗painter. retrieving the data value (DisplayRole) for a given row and column. that are passed in as part of the paint context.16 KDChart::BarDiagram Class Reference 229 • virtual QRect visualRect (const QModelIndex &index) const [reimplemented] • virtual QRegion visualRegionForSelection (const QItemSelection &selection) const [reimplemented] • virtual ∼BarDiagram () Protected Member Functions • QModelIndex attributesModelRootIndex () const • const QPair< QPointF.

2 BarDiagram::∼BarDiagram () [virtual] Definition at line 63 of file KDChartBarDiagram.2 Constructor & Destructor Documentation 6.230 KD Chart 2 Class Documentation 6.cpp.16. 58 Rows }.16.2.1 void AbstractCartesianDiagram::addAxis (CartesianAxis ∗ axis) [virtual. CartesianCoordinatePlane ∗ plane = 0) [explicit] Definition at line 53 of file KDChartBarDiagram. 53 : 54 AbstractCartesianDiagram( new Private().16.16. 6.1 BarDiagram::BarDiagram (QWidget ∗ parent = 0.1. 64 { 65 } 6.2. The diagram takes ownership of the axis and will delete it.3 Member Function Documentation 6.g. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by clone().cpp. plane ) 55 { 56 init(). before calling addAxis on the other diagram. parent. 55 { Normal.h.3. inherited] Add the axis to the diagram.1 Member Enumeration Documentation 6.1 enum KDChart::BarDiagram::BarType Enumeration values: Normal Stacked Percent Rows Definition at line 55 of file KDChartBarDiagram.16.16. 57 Percent.16. for assigning the axis to another diagram) use the takeAxis method. 56 Stacked. 57 } 6. To gain back ownership (e.

16.4 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual. 67 { 68 if ( !d->axesList. inherited] Returns the AttributesModel. that is used by this diagram. References KDChart::AbstractAxis::createObserver(). 72 } 73 } 6.6. Referenced by KDChart::LineDiagram::paint(). Definition at line 291 of file KDChartAbstractDiagram. d.append( axis ).cpp. Only if a user- supplied AttributesModel has been set does the pointer returned here not belong to the diagram. which should never be deleted.cpp. Definition at line 302 of file KDChartAbstractDiagram.3 bool AbstractDiagram::antiAliasing () const [inherited] Returns: Whether anti-aliasing is to be used for rendering this diagram.3.2 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited] Returns: Whether data value labels are allowed to overlap.16. 306 { 6. References d.3. 295 { 6.3.cpp. and KDChart::AbstractCartesian- Diagram::layoutPlanes(). 70 axis->createObserver( this ).16 KDChart::BarDiagram Class Reference 231 See also: takeAxis Definition at line 66 of file KDChartAbstractCartesianDiagram. See also: setAttributesModel Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Returns: The AttributesModel associated with the diagram. References d.contains( axis ) ) { 69 d->axesList. By default each diagram owns its own AttributesModel. 71 layoutPlanes().16.

inherited] Definition at line 85 of file KDChartAbstractCartesianDiagram.16. 183 } 6.6 KDChart::CartesianAxisList AbstractCartesianDiagram::axes () const [virtual. KDChart::LineDiagram::paint().232 KD Chart 2 Class Documentation Definition at line 180 of file KDChartAbstractDiagram. Definition at line 204 of file KDChartAbstractDiagram.3. and KDChart::AbstractDiagram::valueForCell(). calculateDataBoundaries(). 88 } 6. paint(). 128 KDChart::BarAttributesRole ) ). numberOfAbscissaSegments(). References d. 181 { 182 return d->attributesModel. 129 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 124 { 125 return qVariantValue<BarAttributes>( 126 d->attributesModel->data( 127 d->attributesModel->mapFromSource( index ). KDChart::PolarDiagram::paint().cpp.3. References d.7 BarAttributes BarDiagram::barAttributes (const QModelIndex & index) const Definition at line 123 of file KDChartBarDiagram. numberOfOrdinateSegments().16. References d. 210 { 6. Referenced by KDChart::RingDiagram::paint().cpp. 86 { 87 return d->axesList. KDChart::Line- Diagram::numberOfOrdinateSegments().16. and d.cpp. References KDChart::CartesianAxisList. KDChart::LineDiagram::numberOfAbscissaSegments().5 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected. inherited] returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram.3. and setBarAttributes().cpp. Referenced by KDChart::LineDiagram::calculateDataBoundaries().

121 } 6.3.6. 638 : QRect AbstractDiagram::visualRect(const QModelIndex &) const 6. Parameters: index The index of the datapoint in the model.16. Parameters: dataset The dataset to retrieve the brush for.16.cpp.cpp. 120 KDChart::BarAttributesRole ) ). References d. This will fall back automatically to what was set at model level.3. 110 { 111 return qVariantValue<BarAttributes>( 112 d->attributesModel->data( KDChart::BarAttributesRole ) ).3. Referenced by paint().cpp.11 QBrush AbstractDiagram::brush (int dataset) const [inherited] Retrieve the brush to be used for the given dataset.8 BarAttributes BarDiagram::barAttributes (int column) const Definition at line 115 of file KDChartBarDiagram.10 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited] Retrieve the brush to be used.16. Returns: The brush to use for painting. Definition at line 624 of file KDChartAbstractDiagram. 113 } 6. Returns: The brush to use for painting.16.16 KDChart::BarDiagram Class Reference 233 6. for painting the datapoint at the given index in the model.9 BarAttributes BarDiagram::barAttributes () const Definition at line 109 of file KDChartBarDiagram. 631 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 116 { 117 return qVariantValue<BarAttributes>( 118 d->attributesModel->data( 119 d->attributesModel->mapFromSource( columnToIndex( column ) ). References d. if there are no dataset specific settings. Definition at line 632 of file KDChartAbstractDiagram.cpp.3.

QPointF>( QPointF( 0. rootIndex() ) ). 232 } 233 bStarting = false.0.12 QBrush AbstractDiagram::brush () const [inherited] Retrieve the brush to be used for painting datapoints globally. KDChart::AbstractDiagram::coordinatePlane(). ++i ) { 218 for ( int j=0.16.16. 229 if( bStarting ) 230 firstThreeDDepth = depth. This will fall back automatically to the default settings.3. 623 { 6. 0 ). threeDItemDepth(). d.0. 204 205 double xMin = 0.cpp. and type(). 211 212 bool bStarting = true. 231 lastThreeDDepth = depth.Default Normal 214 switch ( type() ){ 215 case BarDiagram::Normal: 216 { 217 for ( int i=0.0. value ). KDChart::Abstract- CoordinatePlane::translate(). 210 double lastThreeDDepth = 0. 206 double xMax = rowCount. 208 double maxThreeDDepth = 0. 213 // calculate boundaries for different line types Normal . yMax = 0. Definition at line 618 of file KDChartAbstractDiagram. References KDChart::AbstractDiagram::attributesModelRootIndex().13 const QPair< QPointF. 200 { 201 if ( !checkInvariants() ) return QPair<QPointF. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . i. 225 226 const double depth = threeDItemDepth( model()->index( j. i. 209 double firstThreeDDepth = 0.cpp.Stacked . 207 double yMin = 0.3. j< rowCount. 0 ) ). at 220 // this is always true yMin can be 0 in case all values 221 // are the same 222 // same for yMax it can be zero if all values are negative 223 yMin = qMin( yMin. QPointF > BarDiagram::calculateDataBoundaries () const [protected. value ). 224 yMax = qMax( yMax. Definition at line 199 of file KDChartBarDiagram.0 ){ 228 maxThreeDDepth = qMax( maxThreeDDepth. Referenced by KDChart::PieDiagram::paint(). ++j ) { 219 const double value = d->attributesModel->data( d->attributesModel->index( j. 227 if( depth > 0. and KDChart::AbstractDiagram::paintMarker(). Returns: The brush to use for painting. i<colCount. if there are no specific settings.234 KD Chart 2 Class Documentation 6.Percent . 203 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex()). virtual] [reimplemented] Implements KDChart::AbstractDiagram. KDChart::AbstractDiagram::check- Invariants(). 202 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex()). QPointF( 0. depth ).

6. 245 stackedValues += model()->data( idx ). if this code is right: We are taking Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . // they are the same but negative 296 } 297 QPointF bottomLeft ( QPointF( xMin. rootIndex() ). j< rowCount. stackedValues ). i<colCount. 284 } 285 default: 286 Q_ASSERT_X ( false." ). value ). //we need at list a range 294 else 295 yMax = 0. 260 } 261 } 262 } 263 break. 278 lastThreeDDepth = depth. 274 if( depth > 0. i<colCount . 299 300 //FIXME(khz): Verify. i. 253 if( depth > 0.Find out stacked Min/Max 242 double stackedValues = 0. 257 lastThreeDDepth = depth.0 ) 293 yMax = 0. 281 } 282 } 283 break. 264 case BarDiagram::Percent: 265 { 266 for ( int i=0. 258 } 259 bStarting = false. stackedValues ). 272 yMax = qMax( yMax. 270 // only positive values are handled 271 double value = model()->data( idx ). ++i ) { 267 for ( int j=0. 255 if( bStarting ) 256 firstThreeDDepth = depth. 251 252 const double depth = threeDItemDepth( idx ). 250 yMax = qMax( yMax. rootIndex() ). "calculateDataBoundaries()". i. 279 } 280 bStarting = false. 287 "Type item does not match a defined bar chart Type. yMin ) ). ++i ) { 244 QModelIndex idx = model()->index( j.0.toDouble().1. 276 if( bStarting ) 277 firstThreeDDepth = depth.16 KDChart::BarDiagram Class Reference 235 234 } 235 } 236 } 237 break. yMax ) ). 298 QPointF topRight ( QPointF( xMax. 246 // this is always true yMin can be 0 in case all values 247 // are the same 248 // same for yMax it can be zero if all values are negative 249 yMin = qMin( yMin. 273 const double depth = threeDItemDepth( idx ). j< rowCount. depth ).0 ){ 275 maxThreeDDepth = qMax( maxThreeDDepth. depth ). 238 case BarDiagram::Stacked: 239 { 240 for ( int j=0. ++j ) { 241 // calculate sum of values per column .0 ){ 254 maxThreeDDepth = qMax( maxThreeDDepth. ++j ) { 268 // Ordinate should begin at 0 the max value being the 100% pos 269 QModelIndex idx = model()->index( j. 243 for ( int i=0. 288 } 289 290 // special cases 291 if ( yMax == yMin ) { 292 if ( yMin == 0.toDouble().

751 "There is no usable coordinate plane set. 754 } 755 756 int AbstractDiagram::datasetDimension( ) const 6. 326 topRight. and KDChart::AbstractDiagram::paintMarker(). QPointF> ( bottomLeft. for the diagram.x()).3. 332 } 6.14 bool AbstractDiagram::checkInvariants (bool justReturnTheStatus = false) const [protected. for the diagram.236 KD Chart 2 Class Documentation 301 // ’any’ ThreeDBarAttributes. KDChart::PieDiagram::calculateDataBoundaries(). KDChart::PieDiagram::paint()." ).y()).cpp. 323 percenty = ((maxThreeDDepth*4) / pBLTranslated. percenty.setY( topRight. 321 } else { 322 percentx = ( maxThreeDDepth / pTRTranslated. References KDChart::AbstractDiagram::coordinatePlane(). 327 } 328 329 //qDebug() << "BarDiagram::calculateDataBoundaries () returns ( " << bottomLeft << topRight <<")". 749 750 Q_ASSERT_X ( coordinatePlane().3. inherited] Definition at line 746 of file KDChartAbstractDiagram. KDChart::LineDiagram::calculate- DataBoundaries(). topRight ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 748 "There is no usable model set. no matter for which cell it is specified 302 // as long.x() + percentx).setX( topRight.cpp. as it is enabled(). 311 //reserve some plane space for the top of the threeD bars 312 //Pending Michel: fixme 4 . virtual.x()). "AbstractDiagram::checkInvariants()".y()). calculateDataBoundaries(). 305 // see: LineDiagram::calculateDataBoundaries () 306 if ( maxThreeDDepth > 0.0 ) { 307 double percentx. 308 //threeDBoundaries calculate a depth percent value and add it 309 QPointF pTRTranslated = coordinatePlane()->translate( topRight ).y() + percenty). 330 331 return QPair<QPointF. Referenced by KDChart::RingDiagram::calculateDataBoundaries().x()).8? 313 if ( d->maxDepth ) 314 maxThreeDDepth = d->maxDepth. 752 } 753 return model() && coordinatePlane(). "AbstractDiagram::checkInvariants()".16.15 BarDiagram ∗ BarDiagram::clone () const [virtual] Definition at line 67 of file KDChartBarDiagram.y()).16. KDChart::RingDiagram::paint(). 318 } else if ( type() == BarDiagram::Stacked ){ 319 percentx = ( maxThreeDDepth / pTRTranslated. 303 // but we are ignoring all ThreeDBarAttributes that might have been set 304 // at a header (using the setter that takes a column as parameter). KDChart::PolarDiagram::calculate- DataBoundaries()." ). 310 QPointF pBLTranslated = coordinatePlane()->translate( bottomLeft ). 746 { 747 Q_ASSERT_X ( model(). 315 if ( type() == BarDiagram::Normal ) { 316 percentx = (maxThreeDDepth / pTRTranslated. 317 percenty = (maxThreeDDepth / pBLTranslated. 324 } 325 topRight. KDChart::LineDiagram::paint(). paint(). 320 percenty = ((maxThreeDDepth*8) / pBLTranslated. KDChart::Polar- Diagram::paint().

16. References d.16. they can call setDataBoundariesDirty() Returned value is in diagram coordinates. KDChart::Line- Diagram::paint(). and KDChart::AbstractCartesianDiagram::setCoordinatePlane(). KDChart::AbstractPolarDiagram::polarCoordinatePlane(). References KDChart::AbstractDiagram::calculateDataBoundaries(). that the diagram will display (unless the grid adjusts these values).cpp. Returns: The coordinate plane associated with the diagram.16 QModelIndex AbstractDiagram::columnToIndex (int column) const [protected. and paint().6. QPointF > AbstractDiagram::dataBoundaries () const [inherited] Return the bottom left and top right data point. KDChart::Polar- CoordinatePlane::layoutDiagrams(). Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(). Definition at line 125 of file KDChartAbstractDiagram. 126 { 127 return d->plane. KDChart::PolarDiagram::paint().cpp. 128 } 6. and d. 68 { 69 return new BarDiagram( new Private( *d ) ). This determines how coordinates in value space are mapped into pixel space.16 KDChart::BarDiagram Class Reference 237 References BarDiagram(). and d. Definition at line 130 of file KDChartAbstractDiagram. Referenced by calculateDataBoundaries().3. This method returns a chached result of calculations done by calculateDataBoundaries.cpp. KDChart::AbstractCartesianDiagram::layoutPlanes(). If derived classes want to force recalculation of the data boundaries. KDChart::AbstractDiagram::checkInvariants().3. Classes derived from AbstractDiagram must implement the calculateDataBoundaries function. to specify their own way of calculating the data boundaries. 217 { 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::LineDiagram::paint().17 AbstractCoordinatePlane ∗ AbstractDiagram::coordinatePlane () const [inherited] The coordinate plane associated with the diagram.16.3. inherited] Definition at line 211 of file KDChartAbstractDiagram.18 const QPair< QPointF. 70 } 6. By default this is a Cartesian- CoordinatePlane. paint().

Referenced by KDChart::Legend::buildLegend()..19 void AbstractDiagram::dataChanged (const QModelIndex & topLeft. 718 } 719 720 QList<QPen> AbstractDiagram::datasetPens() const 6. etc.21 int AbstractDiagram::datasetDimension () const [inherited] The dataset dimension of a diagram determines. that is used for a single cell. inherited] [reimplemented] Definition at line 232 of file KDChartAbstractDiagram.3.16.cpp. and KDChart::Legend::setBrushesFromDiagram().. 135 } 136 return d->databoundaries.16. Qt::Vertical. const QModelIndex & bottomRight) [virtual. 232 { 233 // We are still too dumb to do intelligent updates. 137 } 6. take precedence over the dataset values. KDChart::Legend::datasetCount().16. 712 { 713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i. so you might need to check these too. if set.238 KD Chart 2 Class Documentation 131 { 132 if( d->databoundariesDirty ){ 133 d->databoundaries = calculateDataBoundaries (). Note: Cell-level override brushes. Definition at line 710 of file KDChartAbstractDiagram. for use in legends. 134 d->databoundariesDirty = false.3. 234 d->databoundariesDirty = true.cpp. DatasetB 714 ret << brush. how many value dimensions it expects each datapoint to have.20 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited] The set of dataset brushes currently used. 6. 235 scheduleDelayedItemsLayout(). 715 } 716 717 return ret. Returns: The current set of dataset brushes. References d. 236 } 237 238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index. in order to find the brush. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3.

sixth. Referenced by KDChart::LineDiagram::calculateDataBoundaries(). 2. n). i += datasetDimension() ){ 702 //qDebug() << "label: " << attributesModel()->headerData( i. 3. Returns: The dataset dimension of the diagram. KDChart::LineDiagram::get- CellValues(). Returns: The current set of dataset brushes. etc. and KDChart::Legend::datasetCount(). (and the third.3. Note: Cell-level override markers.cpp.22 QStringList AbstractDiagram::datasetLabels () const [inherited] The set of dataset labels currently displayed. automatic values will be used for the abscissa. Referenced by KDChart::Legend::buildLegend(). take precedence over the dataset values. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . the diagram will use the first.16.16 KDChart::BarDiagram Class Reference 239 For each dimension it will expect one column of values in the model. if set. 701 for( int i = datasetDimension()-1. etc. i < columnCount. that is shown for a single cell. . 699 : " << attributesModel()->columnCount(attributesModel 700 const int columnCount = attributesModel()->columnCount(attributesModelRootIndex()). and the second. fifth. 762 { 6. etc) column as Y values.6. References d. etc) columns as X values. KDChart::Line- Diagram::paint(). 706 } 707 708 QList<QBrush> AbstractDiagram::datasetBrushes() const 6. Definition at line 698 of file KDChartAbstractDiagram.. Qt::DisplayRole ) 703 ret << attributesModel()->headerData( i. for use in legends. for use in legends. 704 } 705 return ret.16. KDChart::CartesianCoordinatePlane::getDataDimensionsList().toString().. Qt::Horizontal. will have one column per datapoint (the y values) and will use automatic values for the x axis (1. and KDChart::LineDiagram::setType(). For example a diagram with the default dimension of 1.23 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited] The set of dataset markers currently used. in order to find the marker. (and the fourth. Definition at line 758 of file KDChartAbstractDiagram.cpp. Returns: The set of dataset labels currently displayed. If the dimensionality is 1.3. Qt::DisplayRole ). If the dimension is 2. so you might need to check these too. Qt::Horizontal.

DataVa 738 const MarkerAttributes &ma = a.3. for use in legends. Qt::Vertical. Referenced by KDChart::Legend::buildLegend(). 729 } 730 731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const 6. in order to find the pens.markerAttributes(). DatasetPenRole 726 ret << pen. 740 } 741 return ret. Referenced by KDChart::Legend::buildLegend(). if there are no datapoint specific settings. etc. Qt::Vertical.cpp. Parameters: index The datapoint to retrieve the attributes for. Definition at line 722 of file KDChartAbstractDiagram.3. Returns: The DataValueAttributes for the given index.25 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex & index) const [inherited] Retrieve the DataValueAttributes for the given index. 739 ret << ma. 724 { 725 QPen pen = qVariantValue<QPen>( attributesModel()->headerData( i. 278 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . if set.cpp. that is used for a single cell.24 QList< QPen > AbstractDiagram::datasetPens () const [inherited] The set of dataset pens currently used. 735 { 736 DataValueAttributes a = 737 qVariantValue<DataValueAttributes>( attributesModel()->headerData( i. Returns: The current set of dataset pens. 727 } 728 return ret. so you might need to check these too.240 KD Chart 2 Class Documentation Definition at line 733 of file KDChartAbstractDiagram. take precedence over the dataset values.16. 742 } 743 744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const 6. This will fall back automatically to what was set at dataset or model level.cpp. Note: Cell-level override pens.16. Definition at line 272 of file KDChartAbstractDiagram.

226 } 227 QAbstractItemView::doItemsLayout(). if there are no dataset specific settings.3.28 void AbstractDiagram::doItemsLayout () [virtual.16. Definition at line 265 of file KDChartAbstractDiagram. This will fall back automatically to what was set at model level. 657 { return 0. Returns: The global DataValueAttributes.16. References d.cpp. 264 { 6. and KDChart::AbstractDiagram::paint- Marker(). 225 update().cpp. Referenced by KDChart::AbstractDiagram::paintDataValueText().3. 271 { 6. Definition at line 260 of file KDChartAbstractDiagram.27 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited] Retrieve the DataValueAttributes speficied globally. inherited] [reimplemented] Definition at line 655 of file KDChartAbstractDiagram. 223 { 224 d->plane->layoutDiagrams().26 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const [inherited] Retrieve the DataValueAttributes for the given dataset. This will fall back automatically to the default settings.16. and KDChart::AbstractDiagram::update().cpp. if there are no specific settings.16.29 int AbstractDiagram::horizontalOffset () const [virtual.16 KDChart::BarDiagram Class Reference 241 6.3. Parameters: dataset The dataset to retrieve the attributes for.6. Returns: The DataValueAttributes for the given dataset.cpp. 6.3. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 228 } 229 230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft. inherited] [reimplemented] Definition at line 223 of file KDChartAbstractDiagram.

Returns: The set of item row labels currently displayed. 93 AbstractCoordinatePlane* plane = coordinatePlane().16. inherited] [reimplemented] Definition at line 649 of file KDChartAbstractDiagram. inherited] Definition at line 90 of file KDChartAbstractCartesianDiagram.cpp.33 void KDChart::AbstractCartesianDiagram::layoutPlanes () [virtual. and KDChart::AbstractCoordinate- Plane::layoutPlanes(). Qt::Vertical. 663 {} 6. inherited] [reimplemented] Definition at line 661 of file KDChartAbstractDiagram. Definition at line 686 of file KDChartAbstractDiagram.242 KD Chart 2 Class Documentation 6. 96 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK".30 QModelIndex AbstractDiagram::indexAt (const QPoint & point) const [virtual. 689 for( int i = 0. 687 : " << attributesModel()->rowCount(attributesModelRoo 688 const int rowCount = attributesModel()->rowCount(attributesModelRootIndex()). 97 } 98 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3.31 bool AbstractDiagram::isIndexHidden (const QModelIndex & index) const [virtual. 694 } 695 696 QStringList AbstractDiagram::datasetLabels() const 6.t 691 ret << attributesModel()->headerData( i.16.cpp.3. 94 if( plane ){ 95 plane->layoutPlanes(). for use in Abscissa axes. Qt::DisplayRole ).3.16. and KDChart::AbstractCartesian- Diagram::takeAxis(). } 6. i < rowCount. 91 { 92 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()". 692 } 693 return ret.toString().32 QStringList AbstractDiagram::itemRowLabels () const [inherited] The set of item row labels currently displayed. Qt::Vertical. 651 { return QModelIndex(). Referenced by KDChart::AbstractCartesianDiagram::addAxis().cpp.cpp.16. Qt::DisplayRole ).3. etc. References KDChart::AbstractDiagram::coordinatePlane(). ++i ){ 690 //qDebug() << "label: " << attributesModel()->headerData( i.

16. Referenced by KDChart::AbstractDiagram::setAttributesModel(). Implements KDChart::AbstractDiagram.cpp.37 const int BarDiagram::numberOfOrdinateSegments () const [virtual] [reimplemented] Implements KDChart::AbstractCartesianDiagram. inherited] This signal is emitted.cpp. 675 } 6.16. and d. Definition at line 672 of file KDChartBarDiagram. Parameters: paintContext All information needed for painting.16. 6. and KDChart::AbstractDiagram::set- Model(). Definition at line 376 of file KDChartBarDiagram.3. and d. 670 } 6. References KDChart::AbstractDiagram::attributesModelRootIndex(). 673 { 674 return d->attributesModel->columnCount(attributesModelRootIndex()). that are passed in as part of the paint context.36 const int BarDiagram::numberOfAbscissaSegments () const [virtual] [reimplemented] Implements KDChart::AbstractCartesianDiagram.3. Definition at line 667 of file KDChartBarDiagram. virtual] Draw the diagram contents to the rectangle and painter.3.16.16.6. Qt::KeyboardModifiers modifiers) [virtual. References KDChart::AbstractDiagram::attributesModelRootIndex().3.35 QModelIndex AbstractDiagram::moveCursor (CursorAction cursorAction.34 void KDChart::AbstractDiagram::modelsChanged () [protected. } 6. when either the model or the AttributesModel is replaced. 668 { 669 return d->attributesModel->rowCount(attributesModelRootIndex()).16 KDChart::BarDiagram Class Reference 243 6.cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3.cpp.38 void BarDiagram::paint (PaintContext ∗ paintContext) [protected. 654 { return 0. inherited] [reimplemented] Definition at line 652 of file KDChartAbstractDiagram.

414 415 //Pending Michel: FixMe 416 if ( ba. 393 double maxDepth = 0. 0.second ).useFixedValueBlockGap() ) 425 spaceBetweenGroups += ba. 426 427 calculateValueAndGapWidths( rowCount.Percent 431 switch ( type() ) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .groupWidth)/(colCount-1). KDChart::BarAttributes::fixedValueBlock- Gap().width() / rowCount. KDChart::Abstract- Diagram::checkInvariants().first ).width()/rowCount) .244 KD Chart 2 Class Documentation References KDChart::AbstractDiagram::attributesModelRootIndex(). 394 double spaceBetweenBars = 0. 419 else 420 spaceBetweenBars = ((ctx->rectangle(). KDChart::AbstractThreeDAttributes::depth().x() .width() ) 409 groupWidth = ctx->rectangle().QPointF> boundaries = dataBoundaries(). KDChart::AbstractDiagram::paintDataValue- Text(). 389 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex()). 421 } 422 423 //Pending Michel: FixMe 424 if ( ba. spaceBetweenBars.boundLeft. d.fixedValueBlockGap(). 384 boundLeft = coordinatePlane()->translate( boundaries. colCount. 428 barWidth. 380 // Calculate width 381 QPointF boundLeft. 402 403 // Pending Michel set a min and max value for the groupWidth related to the area. 401 groupWidth += barWidth. KDChart::AbstractThreeDAttributes::isEnabled(). spaceBetweenGroups ). KDChart::BarAttributes::fixedDataValueGap(). threeDBarAttributes(). 397 398 399 if ( ba.fixedBarWidth().fixedDataValueGap()) ). boundRight.width() / ( rowCount + 2 )*/ width/ (rowCount + 2). KDChart::AbstractDiagram::coordinatePlane(). KDChart::PaintContext::painter().useFixedBarWidth() ) { 400 barWidth = ba. 387 //calculates and stores the values 388 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex()). type(). 410 } 411 412 // maxLimit: allow the space between bars to be larger until area. KDChart::AbstractCoordinatePlane::translate(). 391 BarAttributes ba = barAttributes( model()->index( 0. 396 double groupWidth = /*ctx->rectangle(). 382 QPair<QPointF. 429 430 // paint different bar types: Normal .Stacked . 407 408 if ( groupWidth * rowCount > ctx->rectangle(). KDChart::BarAttributes::fixed- BarWidth(). 386 double width = boundRight. 392 double barWidth = 0. KDChart::BarAttributes::useFixedDataValueGap().groupWidth.x(). rootIndex() ) ). and KDChart::BarAttributes::useFixedValueBlock- Gap(). 383 if( !AbstractGrid::isBoundariesValid(boundaries) ) return.useFixedDataValueGap() ) { 417 if ( ctx->rectangle().width 404 // FixMe 405 if ( groupWidth < 0 ) 406 groupWidth = 0. KDChart::BarAttributes::useFixedBarWidth().width() is covered by the groups 413 double maxLimit = rowCount * (groupWidth + ((colCount-1) * ba. 385 boundRight = coordinatePlane()->translate( boundaries. 390 DataValueTextInfoList list. KDChart::PaintContext::rectangle(). barAttributes().width() > maxLimit ) 418 spaceBetweenBars += ba.fixedDataValueGap(). 395 double spaceBetweenGroups = 0. KDChart::Abstract- Diagram::dataBoundaries(). 377 { 378 if ( !checkInvariants() ) 379 return.

width()/rowCount) .y() . ++i ) { 437 double offset = -groupWidth/2 + spaceBetweenGroups/2. j< colCount. 488 489 value = model()->data( index ). i<rowCount. 458 topPoint. 462 paintBars( ctx.fixedDataValueGap(). 469 case BarDiagram::Stacked: 470 { 471 for ( int i = 0. maxDepth 463 464 offset += barWidth + spaceBetweenBars.groupWidth)/(colCount-1). 449 } 450 } 451 452 for ( int j=0. i<colCount. QSizeF( barWidth . 473 for ( int j = 0. 457 const double barHeight = bottomPoint.6.(offset*rowCount))/ rowCount .y().topPoint.useFixedDataValueGap() ) { 440 if ( spaceBetweenBars > 0 ) { 441 if ( ctx->rectangle(). then move to the next value 436 for ( int i=0. 477 QPointF point.5. value ) ). index. previousPoint. ++j ) { 474 QModelIndex index = model()->index( j. point. value ) ). barHeight ) ). value ) ). k.isEnabled() ) { 480 if ( barWidth > 0 ) 481 barWidth = (width .((offset+(tda.nul 448 offset += barWidth/2. k >= 0 .width() > maxLimit ) 442 offset -= ba.value ) ) 495 const double barHeight = previousPoint. 443 else 444 offset -= ((ctx->rectangle(). 465 } 466 } 467 } 468 break. 498 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . stackedValues . QRectF( point. rootIndex() ). 476 double value = 0. maxDepth ).y(). stackedValues ) ). 497 paintBars( ctx.x() + offset/2 ).append( DataValueTextInfo( index. 0 ) ).(width/rowCount). j< rowCount. rootIndex() ) ). j. 459 //PENDING Michel: FIXME barWidth 460 QModelIndex index = model()->index( i.depth()))*rowCount))/ rowCount.16 KDChart::BarDiagram Class Reference 245 432 { 433 case BarDiagram::Normal: 434 { 435 // we paint the bars for all series next to each other. 490 for ( int k = i.y() . ++j ) { 453 // paint one group 454 const double value = d->attributesModel->data( d->attributesModel->index( i.toDouble(). 478 479 if ( tda. stackedValues = 0. rootIndex() ). index. 461 list.handles max and min limits as well 439 if ( ba.toDouble( 492 point = coordinatePlane()->translate( QPointF( j. barHeight ) ). ++i ) { 472 double offset = spaceBetweenGroups. 438 // case fixed data value gap . 445 446 } else { 447 //allow reducing the gap until the bars are displayed next to each other . 485 } 486 } else 487 barWidth = (ctx->rectangle(). i.x() + offset ). at 455 QPointF topPoint = coordinatePlane()->translate( QPointF( i + 0. 482 if ( barWidth <= 0 ) { 483 barWidth = 0. topPoint. 496 list. --k ) 491 stackedValues += model()->data( model()->index( j.setX( topPoint. j. 494 previousPoint = coordinatePlane()->translate( QPointF( j. 484 maxDepth = offset .setX( point.width() . 456 QPointF bottomPoint = coordinatePlane()->translate( QPointF( i. QSizeF( barWidth. QRectF( topPoint. 493 point. 475 ThreeDBarAttributes tda = threeDBarAttributes( index ).append( DataValueTextInfo( index.point.

k >= 0 . 548 if ( val > 0) 549 stackedValues += val. 541 542 value = model()->data( index ). ++j ) { 511 for ( int i=0. 543 544 // calculate stacked percent value 545 // we only take in account positives values for now. j<rowCount.toDouble(). 507 QVector <double > sumValuesVector. 562 paintBars( ctx. ++i ) { 512 double tmpValue = model()->data( model()->index( j. j<rowCount .y(). 515 if ( i == colCount-1 ) { 516 sumValuesVector << sumValues . 518 } 519 } 520 } 521 522 // calculate stacked percent value 523 for ( int i = 0.toDouble().toDouble(). // always 100 % 506 double sumValues = 0.y() . i<colCount. point.setX( point. previousPoint. 560 561 list. 527 QPointF point. i. 536 maxDepth = offset .depth()))*rowCount))/ rowCount.at( j ) != 0 && value > 0 ) { 553 point = coordinatePlane()->translate( QPointF( j. QRectF( point. i<colCount. 529 ThreeDBarAttributes tda = threeDBarAttributes( index ).x() + offset/2 ).isEnabled() ) { 532 if ( barWidth > 0 ) 533 barWidth = (width . stackedValues/sumValuesVect 554 555 point. 534 if ( barWidth <= 0 ) { 535 barWidth = 0. ++i ) { 524 double offset = spaceBetweenGroups. value ) ). rootIndex() ) ). k.246 KD Chart 2 Class Documentation 499 500 } 501 } 502 break. 513 if ( tmpValue > 0 ) 514 sumValues += tmpValue. maxDepth ).width() . 517 sumValues = 0.(offset*rowCount))/ rowCount. 556 557 previousPoint = coordinatePlane()->translate( QPointF( j. ++j ) { 526 double value = 0. 508 509 //calculate sum of values for each column and store 510 for ( int j=0. 528 QModelIndex index = model()->index( j. 550 } 551 552 if ( sumValuesVector. stackedValues = 0. 530 531 if ( tda. 525 for ( int j=0.point. (stackedValues .val 558 } 559 const double barHeight = previousPoint. 563 564 } 565 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .( width/rowCount).((offset+(tda. 546 for ( int k = i.append( DataValueTextInfo( index. barHeight ) ). QSizeF( barWidth. --k ) { 547 double val = model()->data( model()->index( j. 537 } 538 } 539 else 540 barWidth = (ctx->rectangle(). index. rootIndex() ). i. 503 case BarDiagram::Percent: 504 { 505 double maxValue = 100. rootIndex() ) ).

KDChart::TextAttributes::rotation(). background. inherited] Definition at line 318 of file KDChartAbstractDiagram." ).prefix().isNull() ) { 330 if ( decimalPos > 0 && value != 0 ) 331 roundedValue = roundValues ( value. and paint(). info.append( a. KDChart::DataValueAttributes::isVisible(). 350 painter->rotate( ta. KDChart::TextAttributes::font().prefix() ). 349 painter->translate( pos ). decimalDigits ).suffix(). 570 "Type item does not match a defined bar chart Type. KDChart::DataValueAttributes::prefix(). "paint()".dataLabel(). 342 343 PainterSaver painterSaver( painter ). const QPointF & pos. 574 while ( it. roundedValue ). KDChart::TextAttributes::isVisible(). 320 { 321 // paint one data series 322 DataValueAttributes a = dataValueAttributes(index).6. 346 if ( ta.indexOf( QLatin1Char( ’. 576 paintDataValueText( ctx->painter().index.16 KDChart::BarDiagram Class Reference 247 566 } 567 break.decimalDigits().cpp.pen() ). KDChart::Line- Diagram::paint(). etc 345 const TextAttributes &ta = a. 577 } 578 } 6. 334 } else 335 roundedValue = a. 327 int decimalPos = QString::number( value ). decimalPos.39 void AbstractDiagram::paintDataValueText (QPainter ∗ painter. info. KDChart::PolarDiagram::paint(). and KDChart::DataValueAttributes::textAttributes(). KDChart::AbstractDiagram::dataValue- Attributes(). 332 else 333 roundedValue = QString::number( value ). 348 painter->setFont( ta. KDChart::Text- Attributes::pen().font() ).isVisible() ) { 347 painter->setPen( ta.hasNext() ) { 575 const DataValueTextInfo& info = it.dataLabel(). References KDChart::DataValueAttributes::dataLabel().next(). 344 // FIXME draw the non-text bits. Referenced by KDChart::RingDiagram::paint(). 339 340 if ( !a.isNull() ) 338 roundedValue.textAttributes(). 351 painter->drawText( QPointF(0.16. 328 QString roundedValue. double value) [protected.’ ) ). KDChart::DataValueAttributes::suffix().isNull() ) 341 roundedValue.pos.isVisible() ) return. info. const QModelIndex & index. 568 default: 569 Q_ASSERT_X ( false. 571 } 572 573 DataValueTextInfoListIterator it( list ). 324 325 // handle decimal digits 326 int decimalDigits = a. 352 } 353 } 354 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. 329 if ( a. 336 // handle prefix and suffix 337 if ( !a. 323 if ( !a.value ).suffix() ).rotation() ). 0).prepend( a. KDChart::DataValueAttributes::decimalDigits().

inherited] Definition at line 382 of file KDChartAbstractDiagram.cpp.markerColor(). 404 const MarkerAttributes &ma = a. inherited] Definition at line 398 of file KDChartAbstractDiagram. const QPointF & point. pos. index. 413 414 paintMarker( painter.isVisible() ) return. inherited] Definition at line 420 of file KDChartAbstractDiagram. 390 paintDataValueText( painter. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . i. maSize ). virtual. const QModelIndex & index. ++j ) { 387 const QModelIndex index = model()->index( j. KDChart::MarkerAttributes::markerSize().toDouble(). value ). const QSizeF & size) [virtual. indexBrush. indexPen.42 void AbstractDiagram::paintMarker (QPainter ∗ painter.248 KD Chart 2 Class Documentation 355 QString AbstractDiagram::roundValues( double value.3.isValid() ) 412 indexBrush. 408 QSizeF maSize( ma. 389 const QPointF pos = coordinatePlane()->translate( QPointF( j. value ) ). KDChart::MarkerAttributes::isVisible(). const QPen &.markerSize() ). 402 DataValueAttributes a = dataValueAttributes(index). ma.16.markerColor() ).isVisible() ) return. 403 if ( !a. 391 } 392 } 393 } 394 395 6.pen() ). KDChart::AbstractDiagram::dataValueAttributes().3. const QPointF & pos) [protected. and KDChart::MarkerAttributes::pen(). KDChart::DataValueAttributes::isVisible(). 405 if ( !ma. const MarkerAttributes & markerAttributes. 399 { 400 401 if ( !checkInvariants() ) return. rootIndex() ).cpp.40 void AbstractDiagram::paintDataValueTexts (QPainter ∗ painter) [protected. 406 407 PainterSaver painterSaver( painter ). KDChart::MarkerAttributes::markerColor(). KDChart::DataValueAttributes::markerAttributes(). 385 { 386 for ( int j=0. 388 double value = model()->data( index ).16. 411 if ( ma. References KDChart::AbstractDiagram::brush(). 409 QBrush indexBrush( brush( index ) ). 410 QPen indexPen( ma. const QBrush & brush. j< rowCount. pos.cpp. 6.41 void AbstractDiagram::paintMarker (QPainter ∗ painter.3.16. KDChart::AbstractDiagram::checkInvariants(). 415 } 416 417 6.markerAttributes(). KDChart::AbstractDiagram::paintMarker().setColor( ma.

462 QRectF centerRect( -pSize.height().maSize.height()/2.height().height()/2 ). 446 QPointF top.width()/2. 429 painter->translate( pos ). maSize. maSize. 475 painter->setPen( pen4Pixel ).width()/2.4). 466 break. 473 QRectF centerRect( -pSize. painter->brush() ). 478 } 479 case MarkerAttributes::MarkerRing: 480 { 481 painter->setBrush( Qt::NoBrush ).color() ). KDChart::MarkerLayoutItem::paint().width()/2. 439 painter->drawRect( rect ). 457 case MarkerAttributes::Marker1Pixel: 458 { 459 QSizeF pSize(4. 461 pen1Pixel. -pSize. 442 } 443 case MarkerAttributes::MarkerDiamond: 444 { 445 QVector <QPointF > diamondPoints. pSize. 426 painter->setBrush( brush ).height()/2.width()/2.maSize. 427 painter->setPen( pen ).setColor( painter->background().width()/2. 474 pSize.16 KDChart::BarDiagram Class Reference 249 References KDChart::MarkerAttributes::markerStyle().height()/2. 435 case MarkerAttributes::MarkerSquare: 436 { 437 QRectF rect( 0 . 0 .width()) ).height()/2. 424 { 425 PainterSaver painterSaver( painter ).width()/2. 428 painter->setRenderHint ( QPainter::Antialiasing ). bottom. 454 } 455 //Pending Michel: do we need that? Ask: What is the idea about 456 // Marker1Pixel and Marker4Pixels. 464 painter->setPen( pen1Pixel ). 438 maSize. 450 right = QPointF( maSize. 465 painter->drawEllipse( centerRect ). 0 . 441 break. maSize. 434 break.height().width()) ). 0 .maSize. 460 QPen pen1Pixel. 471 QPen pen4Pixel. -pSize.maSize. maSize.height()/2 ).color() ).width() ). 449 bottom = QPointF( 0. right. 448 left = QPointF( 0 . 452 painter->drawPolygon( diamondPoints ).height(). 451 diamondPoints << top << left << bottom << right. 430 switch ( markerAttributes. 467 } 468 case MarkerAttributes::Marker4Pixels: 469 { 470 QSizeF pSize(8. 0 ). 433 maSize.setColor( painter->background().markerStyle() ) { 431 case MarkerAttributes::MarkerCircle: 432 painter->drawEllipse( QRectF( 0 . 447 top = QPointF( 0. 0 .width() ).maSize. 477 break. left. 472 pen4Pixel.6.height().height()/2. 463 pSize.maSize.width()/2. 453 break. and KDChart::AbstractDiagram::paintMarker(). 0 ).maSize. 483 maSize. 484 break. 482 painter->drawEllipse( QRectF( 0 . 440 painter->fillRect( rect. 8). pSize.maSize. 476 painter->drawEllipse( centerRect ).width() ). 485 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::LineDiagram::paint().

height()/4 ). bottomRight.height()/4 ). right.height()/4 ). 516 left = QPointF( -maSize. 521 painter->drawLine( top." ). 512 } 513 case MarkerAttributes::MarkerFastCross: 514 { 515 QPointF left.width()/4. 539 const QPointF pos = coordinatePlane()->translate( QPointF( j. 519 bottom= QPointF( 0. 499 rightTop = QPointF( maSize.3. inherited] Definition at line 532 of file KDChartAbstractDiagram. pos ). 535 { 536 for ( int j=0. maSize. rightTop.width()/4.height()/4 ). 522 break. right ).rightBottom. 527 } 528 } 529 530 void AbstractDiagram::paintMarkers( QPainter* painter ) 6. 0 ). topRight. topLeft.width()/4.cpp. 518 top = QPointF( 0.height()/2 ).width()/2. 504 505 crossPoints << leftTop << leftBottom << centerBottomLeft 506 << bottomLeft << bottomRight << centerBottomRight 507 << rightBottom << rightTop << centerTopRight 508 << topRight << topLeft << centerTopLeft. rootIndex() ). centerTopRight.16. 491 centerTopLeft. 503 centerTopLeft = QPointF( -maSize. index. 496 bottomRight = QPointF( maSize. bottom ). -maSize. value ) ). -maSize.height()/4 ).width()/2.height()/2 ). 526 "Type item does not match a defined Marker Type.height()/4 ). -maSize. 495 bottomLeft = QPointF( -maSize.width()/2. bottomLeft.height()/2 ). maSize. maSize. 493 leftBottom = QPointF( -maSize. 509 510 painter->drawPolygon( crossPoints ). i.height()/4 ). 502 topLeft = QPointF( -maSize. -maSize. 492 leftTop = QPointF( -maSize. j< rowCount. maSize. 523 } 524 default: 525 Q_ASSERT_X ( false. 498 rightBottom = QPointF( maSize.width()/4.width()/2. maSize. 541 } 542 } 543 } 544 545 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .width()/4.width()/4. 490 centerBottomRight.height()/2 ).height()/2 ). top. 501 topRight = QPointF( maSize.width()/2. 497 centerBottomRight = QPointF( maSize. 489 QPointF leftTop. 500 centerTopRight = QPointF( maSize. leftBottom. ++j ) { 537 const QModelIndex index = model()->index( j. 540 paintMarker( painter.toDouble().width()/4.250 KD Chart 2 Class Documentation 486 case MarkerAttributes::MarkerCross: 487 { 488 QVector <QPointF > crossPoints. maSize.width()/2.43 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected. 538 double value = model()->data( index ). virtual. 517 right = QPointF( maSize. 494 centerBottomLeft = QPointF( -maSize. bottom. centerBottomLeft. 0 ). 520 painter->drawLine( left. -maSize. 511 break. maSize. "paintMarkers()".width()/4.height()/2 ). -maSize.height()/4 ). -maSize.

44 QPen AbstractDiagram::pen (const QModelIndex & index) const [inherited] Retrieve the pen to be used.3. Returns: The pen to use for painting. for painting the datapoint at the given index in the model. Returns: The pen to use for painting. Returns: The pen to use for painting.16.45 QPen AbstractDiagram::pen (int dataset) const [inherited] Retrieve the pen to be used for the given dataset. Definition at line 578 of file KDChartAbstractDiagram.46 QPen AbstractDiagram::pen () const [inherited] Retrieve the pen to be used for painting datapoints globally.cpp. if there are no specific settings.3. This will fall back automatically to what was set at model level.6.3.cpp. if there are no dataset specific settings.16.47 bool AbstractDiagram::percentMode () const [inherited] Definition at line 313 of file KDChartAbstractDiagram. This will fall back automatically to the default settings. Definition at line 586 of file KDChartAbstractDiagram. 593 { 6. Parameters: index The index of the datapoint in the model. Referenced by KDChart::PieDiagram::paint(). References d.cpp. 585 { 6. Parameters: dataset The dataset to retrieve the pen for. 320 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().16.16.3.16 KDChart::BarDiagram Class Reference 251 6. 577 { 6. Definition at line 572 of file KDChartAbstractDiagram.cpp.

3.3.3.51 void BarDiagram::resize (const QSizeF & area) [virtual] Called by the widget’s sizeEvent. and KDChart::LineDiagram::setType().cpp. that are calculated. Definition at line 663 of file KDChartBarDiagram. References d. KDChart::LineDiagram::setLine- Attributes(). 126 } 6.16. 195 { 196 197 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .252 KD Chart 2 Class Documentation 6. dependending on the size of the widget. inherited] Definition at line 128 of file KDChartAbstractCartesianDiagram. inherited] Definition at line 123 of file KDChartAbstractCartesianDiagram. 6.cpp.16.16.50 QPointF AbstractCartesianDiagram::referenceDiagramOffset () const [virtual. References d. Adjust all internal structures. 129 { 130 return d->referenceDiagramOffset. Parameters: area Implements KDChart::AbstractDiagram.16. 664 { 665 } 6.3.49 AbstractCartesianDiagram ∗ AbstractCartesianDiagram::referenceDiagram () const [virtual.52 void BarDiagram::resizeEvent (QResizeEvent ∗) [protected] Definition at line 194 of file KDChartBarDiagram.16.cpp. KDChart::LineDiagram::setThreeDLineAttributes().cpp. inherited] Emitted upon change of a property of the Diagram. Referenced by KDChart::AbstractDiagram::setDataValueAttributes(). 131 } 6.3. 124 { 125 return d->referenceDiagram.48 void KDChart::AbstractDiagram::propertiesChanged () [protected.

54 void AbstractDiagram::setAllowOverlappingDataValueTexts (bool allow) [inherited] Set whether data value labels are allowed to overlap. 290 { 6. References d.3. and are owned by her. inherited] [reimplemented] Definition at line 646 of file KDChartAbstractDiagram. References d.56 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual.cpp. } 6. 0 ).16.55 void AbstractDiagram::setAntiAliasing (bool enabled) [inherited] Set whether anti-aliasing is to be used while rendering this diagram. Setting an AttributesModel that is internal to another diagram is an error. 648 { return QModelIndex(). Wrong: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 285 of file KDChartAbstractDiagram. Definition at line 296 of file KDChartAbstractDiagram.6.3. Correct: AttributesModel *am = new AttributesModel( model.16.cpp.53 void AbstractDiagram::scrollTo (const QModelIndex & index. ScrollHint hint = EnsureVisible) [virtual. Parameters: enabled True means that AA is enabled.cpp. 301 { 6. inherited] Associate an AttributesModel with this diagram. Parameters: allow True means that overlapping labels are allowed.16. diagram2->setAttributesModel( am ).16.16 KDChart::BarDiagram Class Reference 253 6.3. This should thus only be used with AttributesModels that have been explicitely created by the user. diagram1->setAttributesModel( am ).3. Note that the diagram does _not_ take ownership of the AttributesModel.

cpp.58 void BarDiagram::setBarAttributes (const QModelIndex & index. d. Parameters: model The AttributesModel to use for this diagram.254 KD Chart 2 Class Documentation diagram1->setAttributesModel( diagram2->attributesModel() ).16. See also: AttributesModel Definition at line 160 of file KDChartAbstractDiagram. 171 return. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 174 scheduleDelayedItemsLayout()."). inherited] Definition at line 195 of file KDChartAbstractDiagram."). 102 { 103 attributesModel()->setData( 104 d->attributesModel->mapFromSource( index ). const BarAttributes & a) Definition at line 93 of file KDChartBarDiagram. 6.3.57 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex & idx) [protected. 175 d->databoundariesDirty = true. References KDChart::BarAttributesRole. KDChart::BarAttributesRole. and KDChart::AbstractDiagram::modelsChanged(). and d. and KDChart::AttributesModel::setData(). References KDChart::AbstractDiagram::attributesModel().cpp.3.cpp. 167 } 168 if( qobject_cast<PrivateAttributesModel*>(amodel) ) { 169 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 170 "Trying to set an attributesmodel that is private to another diagram. References d. 106 BarAttributesRole ). 161 { 162 if( amodel->sourceModel() != model() ) { 163 qWarning("KDChart::AbstractDiagram::setAttributesModel() failed: " 164 "Trying to set an attributesmodel which works on a different " 165 "model than the diagram. References d. 107 } 6.16. 105 qVariantFromValue( ta ).cpp. 172 } 173 d->setAttributesModel(amodel). 166 return.16. const BarAttributes & a) Definition at line 101 of file KDChartBarDiagram.3.59 void BarDiagram::setBarAttributes (int column. 176 emit modelsChanged(). 177 } 6.

for painting the given dataset.cpp.16. Definition at line 594 of file KDChartAbstractDiagram. 98 BarAttributesRole ).61 void AbstractDiagram::setBrush (const QBrush & brush) [inherited] Set the brush to be used.16 KDChart::BarDiagram Class Reference 255 94 { 95 d->attributesModel->setHeaderData( 96 column.16. for painting the datapoint at the given index. const QBrush & brush) [inherited] Set the brush to be used. 608 { 6. pen The brush to use. 99 } 6.cpp. 97 qVariantFromValue( ta ).16.3.6. 91 } 6. brush The brush to use. and d.3.60 void BarDiagram::setBarAttributes (const BarAttributes & a) Definition at line 88 of file KDChartBarDiagram. 601 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: index The datapoint’s index in the model.3. const QBrush & brush) [inherited] Set the brush to be used. 617 { 6.cpp.16. Definition at line 609 of file KDChartAbstractDiagram. Parameters: brush The brush to use.62 void AbstractDiagram::setBrush (int dataset. for painting all datasets in the model. BarAttributesRole ). Definition at line 602 of file KDChartAbstractDiagram.cpp. Qt::Vertical.3.63 void AbstractDiagram::setBrush (const QModelIndex & index. Parameters: dataset The dataset’s column in the model. References KDChart::BarAttributesRole. 89 { 90 d->attributesModel->setModelData( qVariantFromValue( ta ).

d->axesList ) 113 axis->hide(). Returns: The coordinate plane associated with the diagram.66 void AbstractDiagram::setDatasetDimension (int dimension) [inherited] Sets the dataset dimension of the diagram.3.64 void KDChart::AbstractCartesianDiagram::setCoordinatePlane (AbstractCoordinatePlane ∗ plane) [virtual.16.256 KD Chart 2 Class Documentation 6. inherited] Set the coordinate plane associated with the diagram. Reimplemented from KDChart::AbstractDiagram. 104 105 // show the axes.16. References d.3. The chart takes ownership. 140 { 141 d->databoundariesDirty = true.cpp. 142 } 6. and setType(). KDChart::LineDiagram::setType(). 114 */ 115 } 6. 111 else 112 Q_FOREACH( CartesianAxis* axis.cpp. Parameters: dimension Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::LineDiagram::setThreeDLineAttributes(). References KDChart::AbstractDiagram::coordinatePlane(). d->axesList ) 110 axis->show().16. 103 AbstractDiagram::setCoordinatePlane(plane).65 void AbstractDiagram::setDataBoundariesDirty () const [protected. and KDChart::AbstractDiagram::set- CoordinatePlane(). Definition at line 100 of file KDChartAbstractCartesianDiagram. Referenced by setThreeDBarAttributes(). inherited] Definition at line 139 of file KDChartAbstractDiagram. This determines how coordinates in value space are mapped into pixel space. See also: datasetDimension.3. after all have been adjusted 106 // (because they might be dependend on each other) 107 /* 108 if( plane ) 109 Q_FOREACH( CartesianAxis* axis. 101 { 102 if( coordinatePlane() ) disconnect( coordinatePlane() ).

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: dataset The dataset to set the attributes for.16. References d. Definition at line 240 of file KDChartAbstractDiagram. and KDChart::AbstractDiagram::properties- Changed().68 void AbstractDiagram::setDataValueAttributes (int dataset.6.cpp. References d. 770 { 6.cpp.3.69 void AbstractDiagram::setDataValueAttributes (const QModelIndex & index.67 void AbstractDiagram::setDataValueAttributes (const DataValueAttributes & a) [inherited] Set the DataValueAttributes for all datapoints in the model. a The attributes to set. References d. 259 { 6. Parameters: index The datapoint to set the attributes for. 284 { 6.16 KDChart::BarDiagram Class Reference 257 Definition at line 763 of file KDChartAbstractDiagram.cpp. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given index. KDChart::DataValueLabelAttributesRole.cpp.3. References d. a The attributes to set. Definition at line 279 of file KDChartAbstractDiagram. Definition at line 251 of file KDChartAbstractDiagram.16. Parameters: a The attributes to set.3.16. const DataValueAttributes & a) [inherited] Set the DataValueAttributes for the given dataset.

3. 245 emit propertiesChanged(). 243 qVariantFromValue( a ). pen The pen to use. Parameters: pen The pen to use.16. Definition at line 144 of file KDChartAbstractDiagram.3.cpp.16. 152 emit modelsChanged(). 145 { 146 QAbstractItemView::setModel( newModel ). 150 scheduleDelayedItemsLayout(). 571 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 556 of file KDChartAbstractDiagram. for painting all datasets in the model. Definition at line 563 of file KDChartAbstractDiagram. this ). 151 d->databoundariesDirty = true. 149 d->setAttributesModel(amodel). for painting the given dataset. 244 DataValueLabelAttributesRole ). 246 } 247 248 6. KDChart::AttributesModel::initFrom(). 562 { 6. and KDChart::AbstractDiagram::modelsChanged().16. 147 AttributesModel* amodel = new PrivateAttributesModel( newModel.71 void AbstractDiagram::setPen (const QPen & pen) [inherited] Set the pen to be used.3.cpp.72 void AbstractDiagram::setPen (int dataset.258 KD Chart 2 Class Documentation 240 { 241 d->attributesModel->setData( 242 d->attributesModel->mapFromSource( index ). inherited] Associate a model with the diagram.70 void AbstractDiagram::setModel (QAbstractItemModel ∗ model) [virtual. const QPen & pen) [inherited] Set the pen to be used. 148 amodel->initFrom( d->attributesModel ). References d. 153 } 6. Parameters: dataset The dataset’s row in the model.cpp.

cpp.74 void AbstractDiagram::setPercentMode (bool percent) [inherited] Definition at line 307 of file KDChartAbstractDiagram. 312 { 6. 6. References d. inherited] Set the root index in the model.16 KDChart::BarDiagram Class Reference 259 6. for painting the datapoint at the given index.cpp. 666 { return QRegion(). Parameters: index The datapoint’s index in the model. const QPen & pen) [inherited] Set the pen to be used.cpp. References d.3. inherited] [reimplemented] Definition at line 664 of file KDChartAbstractDiagram. References d.16. and setType(). where the diagram starts referencing data for display.3.3. 121 } 6.cpp.3.73 void AbstractDiagram::setPen (const QModelIndex & index.cpp. [reimplemented] Definition at line 188 of file KDChartAbstractDiagram.16.16. QItemSelectionModel::SelectionFlags command) [virtual.77 void AbstractDiagram::setSelection (const QRect & rect. inherited] Definition at line 117 of file KDChartAbstractCartesianDiagram. 120 d->referenceDiagramOffset = offset. const QPointF & offset = QPointF()) [virtual. Definition at line 548 of file KDChartAbstractDiagram. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 118 { 119 d->referenceDiagram = diagram. Referenced by KDChart::LineDiagram::setType().3.75 void AbstractCartesianDiagram::setReferenceDiagram (AbstractCartesianDiagram ∗ diagram.16. 555 { 6.6. pen The pen to use.16.76 void AbstractDiagram::setRootIndex (const QModelIndex & idx) [virtual.

132 { 133 setDataBoundariesDirty(). 141 d->attributesModel->setHeaderData( 142 column. References d. 145 emit layoutChanged( this ). 155 emit layoutChanged( this ).260 KD Chart 2 Class Documentation 6. References d. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 156 } 6.79 void BarDiagram::setThreeDBarAttributes (int column. Qt::Vertical. 139 { 140 setDataBoundariesDirty(). const ThreeDBarAttributes & a) Definition at line 148 of file KDChartBarDiagram. 154 ThreeDBarAttributesRole ). 143 qVariantFromValue( tda ).78 void BarDiagram::setThreeDBarAttributes (const QModelIndex & index.cpp. KDChart::AbstractDiagram::setDataBoundariesDirty().16. 135 emit layoutChanged( this ).16. KDChart::AbstractDiagram::setDataBoundariesDirty(). 136 } 6. 134 d->attributesModel->setModelData( qVariantFromValue( tda ). and KDChart::Abstract- Diagram::setPercentMode(). ThreeDBarAttributesRole ). 144 ThreeDBarAttributesRole ).3. and KDChart::ThreeDBar- AttributesRole.81 void BarDiagram::setType (BarType type) Definition at line 72 of file KDChartBarDiagram. 151 d->attributesModel->setData( 152 d->attributesModel->mapFromSource(index). KDChart::AbstractDiagram::setDataBoundariesDirty().16.cpp.3. References d. and KDChart::ThreeDBar- AttributesRole.16.3. 153 qVariantFromValue( tda ). 146 } 6. 149 { 150 setDataBoundariesDirty().3.cpp. References d. KDChart::AbstractDiagram::setDataBoundariesDirty().80 void BarDiagram::setThreeDBarAttributes (const ThreeDBarAttributes & a) Definition at line 131 of file KDChartBarDiagram. and KDChart::ThreeDBar- AttributesRole. const ThreeDBarAttributes & a) Definition at line 138 of file KDChartBarDiagram.cpp.

77 // AbstractAxis settings . 82 layoutPlanes().see AbstractDiagram and CartesianAxis 78 setPercentMode( type == BarDiagram::Percent ). and KDChart::AbstractLayoutItem::setParentWidget().cpp. 178 } 6. The diagram no longer owns the axis.3.3.16. KDChart::AbstractAxis::deleteObserver(). Referenced by KDChart::CartesianAxis::∼CartesianAxis(). 79 setDataBoundariesDirty().83 ThreeDBarAttributes BarDiagram::threeDBarAttributes (const QModelIndex & index) const Definition at line 172 of file KDChartBarDiagram.6. 83 } 6. References d.takeAt( idx ). 81 axis->setParentWidget( 0 ). 173 { 174 return qVariantValue<ThreeDBarAttributes>( 175 d->attributesModel->data( 176 d->attributesModel->mapFromSource(index).82 void AbstractCartesianDiagram::takeAxis (CartesianAxis ∗ axis) [virtual.indexOf( axis ). 81 } 6. 75 76 d->barType = type. References d. so it is the caller’s responsibility to delete the axis.16.cpp.cpp.16. 76 { 77 const int idx = d->axesList. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 78 if( idx != -1 ) 79 d->axesList. without deleting it.3. inherited] Removes the axis from the diagram. 80 axis->deleteObserver( this ).16 KDChart::BarDiagram Class Reference 261 73 { 74 if ( type == d->barType ) return. 177 KDChart::ThreeDBarAttributesRole ) ). KDChart::AbstractCartesianDiagram::layout- Planes().84 ThreeDBarAttributes BarDiagram::threeDBarAttributes (int column) const Definition at line 164 of file KDChartBarDiagram. 80 emit layoutChanged( this ). References d. See also: addAxis Definition at line 75 of file KDChartAbstractCartesianDiagram.

References threeDBarAttributes().16. 192 } 6.3.86 double BarDiagram::threeDItemDepth (int column) const [protected. virtual] Implements KDChart::AbstractCartesianDiagram. 170 } 6. Referenced by paint().validDepth().88 BarDiagram::BarType BarDiagram::type () const Definition at line 83 of file KDChartBarDiagram.3.16. virtual] Implements KDChart::AbstractCartesianDiagram.3. Referenced by calculateDataBoundaries().87 double BarDiagram::threeDItemDepth (const QModelIndex & index) const [protected. 162 } 6. Definition at line 180 of file KDChartBarDiagram. References d. 191 KDChart::ThreeDBarAttributesRole ) ).262 KD Chart 2 Class Documentation 165 { 166 return qVariantValue<ThreeDBarAttributes>( 167 d->attributesModel->data( 168 d->attributesModel->mapFromSource( columnToIndex( column ) ). 181 { 182 return threeDBarAttributes( index ).cpp.85 ThreeDBarAttributes BarDiagram::threeDBarAttributes () const Definition at line 158 of file KDChartBarDiagram. Definition at line 185 of file KDChartBarDiagram.cpp.16. and threeDItemDepth(). and paint(). and KDChart::AbstractThreeDAttributes::validDepth(). 186 { 187 return qVariantValue<ThreeDBarAttributes>( 188 d->attributesModel->headerData ( 189 column.cpp. References d. 169 KDChart::ThreeDBarAttributesRole ) ). 183 } 6.cpp. Referenced by calculateDataBoundaries(). 159 { 160 return qVariantValue<ThreeDBarAttributes>( 161 d->attributesModel->data( KDChart::ThreeDBarAttributesRole ) ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 190 Qt::Vertical.3.16. References d.validDepth().

86 } 6. 680 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References d.3.92 void KDChart::AbstractDiagram::useSubduedColors () [inherited] Set the palette to be used.89 void AbstractDiagram::update () const [inherited] Definition at line 777 of file KDChartAbstractDiagram. Referenced by KDChart::AbstractDiagram::doItemsLayout().cpp.3. Definition at line 681 of file KDChartAbstractDiagram.3. for painting datasets to the subdued palette.cpp. See also: KDChart::Palette.cpp. References d.16.16. References d. 6.cpp.6. References d.3. Definition at line 676 of file KDChartAbstractDiagram.91 void KDChart::AbstractDiagram::useRainbowColors () [inherited] Set the palette to be used. 675 { 6. FIXME: fold into one usePalette (KDChart::Palette&) method Definition at line 671 of file KDChartAbstractDiagram. 685 { 6. for painting datasets to the default palette.16 KDChart::BarDiagram Class Reference 263 84 { 85 return d->barType. See also: KDChart::Palette. See also: KDChart::Palette.16.90 void KDChart::AbstractDiagram::useDefaultColors () [inherited] Set the palette to be used.16. for painting datasets to the rainbow palette.

h. inherited] Helper method. inherited] [reimplemented] Definition at line 667 of file KDChartAbstractDiagram. retrieving the data value (DisplayRole) for a given row and column.16. inherited] [reimplemented] Definition at line 641 of file KDChartAbstractDiagram.264 KD Chart 2 Class Documentation 6.1 Q_SIGNALS KDChart::AbstractDiagram::__pad0__ [protected.96 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection & selection) const [virtual.16.3. } 6.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .16. int column) const [protected. 776 { 6. inherited] Definition at line 506 of file KDChartAbstractDiagram.cpp.4 Member Data Documentation 6.cpp. inherited] [reimplemented] Definition at line 658 of file KDChartAbstractDiagram.cpp.16. column The column to query. 6.3. References KDChart::AbstractDiagram::attributesModelRootIndex().93 double AbstractDiagram::valueForCell (int row.3.cpp.94 int AbstractDiagram::verticalOffset () const [virtual. The documentation for this class was generated from the following files: • KDChartBarDiagram.16.95 QRect AbstractDiagram::visualRect (const QModelIndex & index) const [virtual.16.4. Parameters: row The row to query. 645 {} 6.h • KDChartBarDiagram. Returns: The value of the display role at the given row and column as a double. Referenced by KDChart::LineDiagram::paint(). and d. Definition at line 771 of file KDChartAbstractDiagram. 660 { return true.3.

axes need to be assigned to a diagram. Public Types • enum Position { Bottom. Right.1 Detailed Description The class for cartesian axes. in which this axis is used.17 KDChart::CartesianAxis Class Reference #include <KDChartCartesianAxis. • virtual void connectSignals () Wireing the signal/slot connections. See also: PolarAxis.17 KDChart::CartesianAxis Class Reference 265 6.17. AbstractCartesianDiagram Definition at line 48 of file KDChartCartesianAxis.6. returns the coordinate plane. Left } Public Member Functions • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • CartesianAxis (AbstractCartesianDiagram ∗diagram=0) C’tor of the class for cartesian axes.h. Top. For being useful. see AbstractCartesianDiagram::addAxis and AbstractCartesianDiagram::takeAxis.h> Inheritance diagram for KDChart::CartesianAxis:Collaboration diagram for KDChart::CartesianAxis: 6. • void createObserver (AbstractDiagram ∗diagram) • void deleteObserver (AbstractDiagram ∗diagram) • const AbstractDiagram ∗ diagram () const • virtual Qt::Orientations expandingDirections () const pure virtual in QLayoutItem • FrameAttributes frameAttributes () const • virtual QRect geometry () const pure virtual in QLayoutItem Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • const AbstractCoordinatePlane ∗ coordinatePlane () const Convenience function.

• void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) • virtual void setGeometry (const QRect &r) pure virtual in QLayoutItem • void setLabels (const QStringList &list) Use this to specify your own set of strings.266 KD Chart 2 Class Documentation • bool hasDefaultTitleTextAttributes () const • virtual bool isAbscissa () const • virtual bool isEmpty () const pure virtual in QLayoutItem • virtual bool isOrdinate () const • QStringList labels () const Returns a list of strings. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter. then calls paint(). • virtual void paintBackground (QPainter &painter. • virtual void layoutPlanes () • virtual QSize maximumSize () const pure virtual in QLayoutItem • virtual QSize minimumSize () const pure virtual in QLayoutItem • bool observedBy (AbstractDiagram ∗diagram) const • virtual void paint (QPainter ∗) reimpl • void paintAll (QPainter &painter) Call paintAll. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . whenever the size of the item’s contents has changed. • virtual const Position position () const • void removeFromParentLayout () • void resetTitleTextAttributes () Reset the title text attributes to the built-in default:. const QRect &rectangle) • virtual void paintCtx (PaintContext ∗) reimpl • virtual void paintFrame (QPainter &painter. to be used as axis labels. const QRect &rect) Draws the background and frame. as set via setLabels. • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. to trigger that widget’s update. that are used as axis labels.

• TextAttributes textAttributes () const Returns the text attributes to be used for axis labels. in case the normal labels are too long. to be used as axis labels. • void setTextAttributes (const TextAttributes &a) Use this to specify the text attributes to be used for axis labels. • ∼CartesianAxis () Public Attributes • public Q_SLOTS: void update() • protected Q_SLOTS: virtual void delayedInit() Protected Member Functions • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () Protected Attributes • Q_SIGNALS __pad0__: void positionChanged( AbstractArea ∗ ) • QWidget ∗ mParent • QLayout ∗ mParentLayout Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6. • virtual QSize sizeHint () const pure virtual in QLayoutItem • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout.17 KDChart::CartesianAxis Class Reference 267 • virtual void setPosition (Position p) • void setShortLabels (const QStringList &list) Use this to specify your own set of strings. that are used as axis labels. • int tickLength (bool subUnitTicks=false) const • QString titleText () const • TextAttributes titleTextAttributes () const Returns the text attributes that will be used for displaying the title text. as set via setShortLabels. • void setTitleText (const QString &text) • void setTitleTextAttributes (const TextAttributes &a) • QStringList shortLabels () const Returns a list of strings.

3.17.2. 50 : AbstractAxis ( new Private( diagram. 66 } 67 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .268 KD Chart 2 Class Documentation 6.1 enum KDChart::CartesianAxis::Position Enumeration values: Bottom Top Right Left Definition at line 56 of file KDChartCartesianAxis. 59 Right. 6.17. References d. if you pass a diagram as parameter.2 CartesianAxis::∼CartesianAxis () Definition at line 55 of file KDChartCartesianAxis. 61 cd->takeAxis( this ).cpp. and KDChart::AbstractCartesianDiagram::takeAxis(). Otherwise.3 Constructor & Destructor Documentation 6.h. diagram ) 51 { 52 init(). 60 Left 61 }. 56 { 57 Bottom. 56 { 57 // when we remove the first axis it will unregister itself and 58 // propagate the next one to the primary. See also: AbstractCartesianDiagram::addAxis Definition at line 49 of file KDChartCartesianAxis. 58 Top.1 CartesianAxis::CartesianAxis (AbstractCartesianDiagram ∗ diagram = 0) [explicit] C’tor of the class for cartesian axes.2 Member Enumeration Documentation 6.3. Note: If using a zero parent for the constructor.17. you need to call your diagram’s addAxis function to add your axis to the diagram. there is no need to call addAxis. d->secondaryDiagrams ) { 64 AbstractCartesianDiagram *cd = qobject_cast<AbstractCartesianDiagram*>( diagram ). since the constructor does that automatically for you. 62 } 63 Q_FOREACH( AbstractDiagram *diagram. this ). 53 } 6. thus the while loop 59 while ( d->mDiagram ) { 60 AbstractCartesianDiagram *cd = qobject_cast<AbstractCartesianDiagram*>( d->mDiagram ).cpp.17.17. 65 cd->takeAxis( this ).

106 { 107 return geometry(). when you assign the axis to a diagram. or by calling the diagram’s setAxis method. Referenced by KDChart::CartesianCoordinatePlane::drawingArea(). each time.3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase. and paintCtx().4 void AbstractAxis::connectSignals () [virtual. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References d.17. 98 { 99 return d->backgroundAttributes. KDChart::PolarCoordinate- Plane::layoutDiagrams(). virtual.17.cpp.4. Definition at line 105 of file KDChartAbstractArea.17.4. KDChart::AbstractArea::paintAll().4. See also: AbstractCartesianDiagram::addAxis() Definition at line 192 of file KDChartAbstractAxis.17 KDChart::CartesianAxis Class Reference 269 6. inherited] Implements KDChart::AbstractAreaBase.cpp.4 Member Function Documentation 6. This method gets called automatically. either by passing a diagram∗ to the c’tor. not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.17. 76 { 77 Q_UNUSED( position ). 100 } 6.17.2 QRect AbstractArea::areaGeometry () const [protected. paint(). inherited] Wireing the signal/slot connections.cpp. References d. resp.6.cpp. If overwriting this method in derived classes. make sure to call this base method AbstractAxis::connect- Signals(). 108 } 6. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry. Referenced by KDChart::AbstractAxis::createObserver().4. so your axis gets connected to the diagram’s built-in signals.

Referenced by KDChart::AbstractCartesianDiagram::takeAxis(). in which this axis is used. the return value is Zero. 175 { 176 d->unsetDiagram( diagram. returns the coordinate plane.6 void AbstractAxis::createObserver (AbstractDiagram ∗ diagram) [inherited] Definition at line 158 of file KDChartAbstractAxis.cpp. and KDChart::AbstractCartesian- Diagram::∼AbstractCartesianDiagram(). 177 } 6. References d. SIGNAL( diagramDataChanged( AbstractDiagram *) ).cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . SLOT( update() ) ). 197 } 198 } 6.8 const AbstractDiagram ∗ KDChart::AbstractAxis::diagram () const [inherited] Definition at line 300 of file KDChartAbstractAxis.4.4. References KDChart::AbstractAxis::connectSignals(). References d.17. 159 { 160 if( d->setDiagram( diagram. 298 } 6.cpp.7 void AbstractAxis::deleteObserver (AbstractDiagram ∗ diagram) [inherited] Definition at line 174 of file KDChartAbstractAxis. and d. this ) ) 161 connectSignals(). References d. If the axis is not used in a coordinate plane.cpp. this ). 297 return 0.17. 196 this.4.4. 294 { 295 if( d->diagram() ) 296 return d->diagram()->coordinatePlane(). Definition at line 293 of file KDChartAbstractAxis. Referenced by KDChart::AbstractCartesianDiagram::addAxis().17.270 KD Chart 2 Class Documentation 193 { 194 if( d->observer ){ 195 connect( d->observer.5 const AbstractCoordinatePlane ∗ AbstractAxis::coordinatePlane () const [inherited] Convenience function. 162 } 6.17.

701 break. // all positions need to be handeld 704 break.4.17. 705 }. 830 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. 88 { 89 return d->frameAttributes.10 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase.17. 702 default: 703 Q_ASSERT( false ). 698 case Left: 699 case Right: 700 ret = Qt::Vertical.cpp. 706 return ret.9 Qt::Orientations CartesianAxis::expandingDirections () const [virtual] pure virtual in QLayoutItem Definition at line 689 of file KDChartCartesianAxis. 692 switch ( position() ) 693 { 694 case Bottom: 695 case Top: 696 ret = Qt::Horizontal.6. References d. position(). References Bottom. 697 break.11 QRect CartesianAxis::geometry () const [virtual] pure virtual in QLayoutItem Implements KDChart::AbstractAxis. 690 { 691 Qt::Orientations ret. Referenced by KDChart::Legend::clone().17 KDChart::CartesianAxis Class Reference 271 301 { 302 return d->diagram().cpp. Left. 707 } 6.4. References d.4. 90 } 6.17. and Top. Right. Definition at line 827 of file KDChartCartesianAxis. 303 } 6. 828 { 829 return d->geometry.

inherited] Definition at line 175 of file KDChartAbstractAreaBase. References d. 183 return 184 QRect( QPoint(0.isVisible() 182 ? qMax( d->frameAttributes. References KDChart::AbstractAreaBase::areaGeometry(). 114 } 6. 0 ) : 0.adjusted( padding. 179 180 const int padding 181 = d->frameAttributes. 140 { 141 return position() == Bottom || position() == Top.4. and tickLength(). Referenced by titleTextAttributes().14 bool CartesianAxis::isAbscissa () const [virtual] Definition at line 139 of file KDChartCartesianAxis. and KDChart::AbstractArea::paintAll(). // if the axis exists. 176 { 177 Q_ASSERT_X ( d != 0. it has some (perhaps default) content 687 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . "AbstractAreaBase::innerRect()". areaGeometry().4. 178 "Private class was not initialized!" ).17. and Top. 186 } 6. -padding ). padding.padding(). -padding.cpp.4. 142 } 6.4. Referenced by KDChart::TextArea::paintAll().cpp. KDChart::AbstractAreaWidget::paintAll(). 685 { 686 return false.17. and d. 112 { 113 return d->useDefaultTextAttributes. Referenced by paintCtx().size() ) 185 . References Bottom.17. position().13 QRect AbstractAreaBase::innerRect () const [protected.cpp.0).272 KD Chart 2 Class Documentation 6.17.cpp.12 bool CartesianAxis::hasDefaultTitleTextAttributes () const Definition at line 111 of file KDChartCartesianAxis.15 bool CartesianAxis::isEmpty () const [virtual] pure virtual in QLayoutItem Definition at line 684 of file KDChartCartesianAxis.

and KDChart::AbstractCoordinatePlane::layoutPlanes().16 bool CartesianAxis::isOrdinate () const [virtual] Definition at line 144 of file KDChartCartesianAxis. and Right.4.17. position().cpp. and setTitleTextAttributes(). found no plane.18 void CartesianAxis::layoutPlanes () [virtual] Definition at line 127 of file KDChartCartesianAxis. 147 } 6.17 QStringList AbstractAxis::labels () const [inherited] Returns a list of strings. 257 } 6. setPosition(). 136 } 137 } 6.17.17. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 128 { 129 //qDebug() << "CartesianAxis::layoutPlanes()". References d. 255 { 256 return d->hardLabels. Referenced by resetTitleTextAttributes().cpp.4.6.".17. as set via setLabels. and paintCtx(). 145 { 146 return position() == Left || position() == Right. References d. References Left. Referenced by paintCtx().4. setTitleText().19 QSize CartesianAxis::maximumSize () const [virtual] pure virtual in QLayoutItem Definition at line 709 of file KDChartCartesianAxis.4.cpp. Referenced by maximumSize(). 131 //qDebug() << "CartesianAxis::layoutPlanes(): Sorry. 132 AbstractCoordinatePlane* plane = d->diagram()->coordinatePlane().17 KDChart::CartesianAxis Class Reference 273 6. that are used as axis labels. 133 if( plane ){ 134 plane->layoutPlanes(). 135 //qDebug() << "CartesianAxis::layoutPlanes() OK". 130 if( ! d->diagram() || ! d->diagram()->coordinatePlane() ) return.cpp. See also: setLabels Definition at line 254 of file KDChartAbstractAxis.

sizeHint(). 714 715 const TextAttributes labelTA = textAttributes(). Qt::AlignLeft ). 767 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Qt::AlignHCenter | Qt::AlignVCenter ). Left. 741 if( drawLabels ){ 742 // if there’re no label strings. 712 if ( !d->diagram() ) 713 return result.count(). 731 const qreal titleGap = 732 drawTitle 733 ? (QFontMetricsF( titleItem.count() ) 744 { 745 labelItem. refArea. position().first().0) 730 : 0. 725 TextLayoutItem titleItem( titleText(). 735 736 switch ( position() ) 737 { 738 case Bottom: 739 case Top: { 740 qreal h = 0.height(). resp.isEmpty().height() / 3. KDChart::TextLayoutItem::set- Text(). 754 } 755 } 756 // we leave a little gap between axis labels and bottom (or top. 746 h = labelItem. KDChart::TextLayoutItem::realFont(). titleText(). 716 const bool drawLabels = labelTA.isVisible() && ! titleText(). 726 KDChartEnums::MeasureOrientationMinimum. KDChart::AbstractAxis::textAttributes(). static_cast<int>( h ) ).0) 734 : 0. 766 result = QSize ( 10. Referenced by minimumSize(). 717 718 const TextAttributes titleTA( titleTextAttributes() ).isVisible(). 753 h = qMax( h.sizeHint(). KDChart::AbstractCoordinatePlane::gridDimensionsList().setText( labels()[ i ] ).height(). labelTA.sizeHint(). 723 TextLayoutItem labelItem( QString::null. and Top. refArea.setText( QString::number( plane->gridDimensionsList(). 758 } 759 // space for a possible title: 760 if ( drawTitle ) { 761 // we add the title height and leave a little gap between axis labels and axis title 762 h += titleItem. KDChart::TextLayoutItem::sizeHint(). titleTextAttributes().height() + titleGap. 727 const qreal labelGap = 728 drawLabels 729 ? (QFontMetricsF( labelItem. 747 }else{ 748 // find the longest label text: 749 for ( int i = 0. tickLength().height() / 3. i < labels().0. KDChart::Text- Attributes::isVisible(). ’f’. lh ). KDChart::AbstractCoordinate- Plane::parent(). d. 720 721 AbstractCoordinatePlane* plane = d->diagram()->coordinatePlane().274 KD Chart 2 Class Documentation References Bottom. KDChart::AbstractAxis::labels().0. 722 QObject* refArea = plane->parent(). and sizeHint(). titleTA. ++i ) 750 { 751 labelItem.0.realFont() ). 763 } 764 // space for the ticks 765 h += qAbs( tickLength() ) * 3. 710 { 711 QSize result.realFont() ). 719 const bool drawTitle = titleTA. 752 qreal lh = labelItem. Right.end. we take the biggest needed number as height 743 if ( ! labels().) side of axis 757 h += labelGap. 724 KDChartEnums::MeasureOrientationMinimum.

lw ). 772 if( drawLabels ){ 773 // if there’re no label strings. 0 777 w = labelItem. ’f’. 794 } 795 // space for the ticks 796 w += qAbs( tickLength() ) * 3.) side of axis 788 w += labelGap. 10 ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . // all positions need to be handled 804 break. 784 w = qMax( w. 811 { 812 return maximumSize().17. 769 case Left: 770 case Right: { 771 qreal w = 0.last(). 778 }else{ 779 // find the longest label text: 780 for ( int i = 0. 785 } 786 } 787 // we leave a little gap between axis labels and left (or right. 799 // qDebug() << "left/right axis width:" << result << " w:" << w. 783 qreal lw = labelItem.6.21 bool KDChart::AbstractAxis::observedBy (AbstractDiagram ∗ diagram) const [inherited] Definition at line 305 of file KDChartAbstractAxis. resp. References maximumSize().20 QSize CartesianAxis::minimumSize () const [virtual] pure virtual in QLayoutItem Definition at line 810 of file KDChartCartesianAxis.sizeHint(). 808 } 6.17. we take the biggest needed number as width 774 if ( labels().end.height() + titleGap. 802 default: 803 Q_ASSERT( false ).cpp.setText( labels()[ i ] ). References d.sizeHint(). 800 } 801 break.setText( QString::number( plane->gridDimensionsList(). 789 } 790 // space for a possible title: 791 if ( drawTitle ) { 792 // we add the title height and leave a little gap between axis labels and axis title 793 w += titleItem.cpp. 813 } 6.width().width(). i < labels().sizeHint().count() == 0 ) 775 { 776 labelItem.count().17 KDChart::CartesianAxis Class Reference 275 768 break. ++i ) 781 { 782 labelItem. 806 //qDebug() << "*******************" << result. 805 }.4. 807 return result. 797 798 result = QSize ( static_cast<int>( w ).4.0.

23 void AbstractArea::paintAll (QPainter & painter) [inherited] Call paintAll. 92 QRect inner( innerRect() ).4.cpp. 186 painter->setClipRegion( clipRegion ). 173 ctx. d.setCoordinatePlane( d->diagram()->coordinatePlane() ). geometry() ). KDChart::AbstractAreaBase::innerRect(). Definition at line 168 of file KDChartCartesianAxis. 174 ctx. paintCtx(). 184 // enabling clipping so that we’re not drawing outside 185 QRegion clipRegion( rect.left(). 308 } 6. 1.setPainter ( painter ).width(). 182 QPointF(rect. and KDChart::AbstractAreaBase::paintFrame().height() ) ) ).4. KDChart::AbstractLayoutItem::paint(). References KDChart::AbstractArea::areaGeometry(). KDChart::PaintContext::set- CoordinatePlane().17. rect. rect.22 void CartesianAxis::paint (QPainter ∗) [virtual] reimpl Implements KDChart::AbstractLayoutItem. 88 89 // temporarily adjust the widget size. -1. Referenced by KDChart::Chart::paint().setRectangle( 180 QRectF ( 181 //QPointF(0.276 KD Chart 2 Class Documentation 306 { 307 return d->hasDiagram( diagram ). 169 { 170 //qDebug() << "KDChart::CartesianAxis::paint() called". 172 PaintContext ctx. 187 paintCtx( &ctx ). 87 paintFrame( painter. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and KDChart::PaintContext::setRectangle().".adjusted( -1. 188 painter->setClipping( false ). References KDChart::AbstractArea::areaGeometry(). 84 { 85 // Paint the background and frame 86 paintBackground( painter. KDChart::PaintContext::setPainter(). geometry() ). 183 QSizeF(rect. 176 177 //qDebug() << "CartesianAxis::paint( QPainter* painter ) " << " areaGeometry()():" << rect << " s 178 179 ctx. 1 ) ). KDChart::AbstractAreaBase::paintBackground(). 189 //qDebug() << "KDChart::CartesianAxis::paint() done. 190 } 6. and KDChart::AbstractArea::paintIntoRect(). Definition at line 83 of file KDChartAbstractArea. to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ). 171 if( ! d->diagram() || ! d->diagram()->coordinatePlane() ) return. 0). if you want the background and the frame to be drawn before the normal paint() is invoked automatically.top()).17.cpp. 175 const QRect rect( areaGeometry() ).

"AbstractAreaBase::paintBackground()". 130 } else { 131 QMatrix m.left().4. inherited] Definition at line 103 of file KDChartAbstractAreaBase.attributes.left() + inner.drawRect( rect ).17 KDChart::CartesianAxis Class Reference 277 93 inner.24 void AbstractAreaBase::paintBackground (QPainter & painter. 99 paint( &painter ).height() / (double)attributes.top() ).setY( rect.top() + inner. 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.y() .pixmapMode() ) 126 { 127 ol.width() / (double)attributes. 139 m.brush() ). 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m. 102 //qDebug() << "AbstractAreaWidget::paintAll() done. 116 const QPointF newTopLeft( painter.cpp.pixmap().pixmap().isVisible() ) return. Referenced by KDChart::TextArea::paintAll(). 104 { 105 Q_ASSERT_X ( d != 0. attributes. and d.center().center().width() / 2 ).scale( zW. zH ).deviceMatrix(). 117 painter. 119 painter.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.pixmap().setPen( Qt::NoPen ).setX( rect.setBrushOrigin( newTopLeft ). 145 default: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 134 switch( attributes.pixmap(). 138 z = qMin( zW. z ).pixmap(). 118 painter.setBrush( attributes.style() ) { 114 KDChart::PainterSaver painterSaver( &painter ). 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes.topLeft().6.isNull() && 123 attributes. 103 } 6. References attributes.". 95 oldGeometry. zH ).x() .scale( z.17. const QRect & rectangle) [virtual. 115 painter. KDChart::AbstractAreaWidget::paintAll(). and KDChart::AbstractArea::paintAll().drawPixmap( ol. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes. 96 const bool needAdjustGeometry = oldGeometry != inner.height()/ 2 ).height(). 133 double zH = (double)rect.pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z. 132 double zW = (double)rect. 97 if( needAdjustGeometry ) 98 setGeometry( inner ).topLeft() ) ).attributes.map( rect.brush(). 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ).width(). 128 ol. 129 painter.moveTo( 94 oldGeometry. 106 "Private class was not initialized!" ). 144 break.pixmap() ). 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes. 140 } 141 break.

212 // if(isAbscissa()) 213 // qDebug() << " " << "Abscissa:" << dimX. 210 const DataDimension& dimY = dimensions. 149 ol. 202 "Bad function call: PaintContext::coodinatePlane() NOT a cartesian plane." )."<<dimX. KDChart::AbstractCoordinate- Plane::parent(). Top. KDChart::DataDimensionsList. 211 const DataDimension& dim = (isAbscissa() ? dimensions. KDChart::TextLayoutItem::text().. KDChart::TextLayoutItem::intersects().center(). KDChart::TextLayoutItem::geometry(). KDChart::Data- Dimension::distance(). KDChart::PaintContext::coordinatePlane()."<<dimY.width() / 2 ). KDChart::TextLayoutItem::realFont().4.last(). 152 } 153 } 154 #undef attributes 155 } 6. d. tickLength().x() . position(). 199 200 CartesianCoordinatePlane* plane = dynamic_cast<CartesianCoordinatePlane*>(context->coordinatePlane 201 Q_ASSERT_X ( plane.25 void CartesianAxis::paintCtx (PaintContext ∗) [virtual] reimpl Reimplemented from KDChart::AbstractLayoutItem. 208 "Error: plane->gridDimensionsList() did not return exactly two dimensions. 194 { 195 //qDebug() << "KDChart::CartesianAxis::paintCtx() called". KDChart::TextLayoutItem::paint(). 198 "Function call not allowed: The axis is not assigned to any diagram. 206 // test for programming errors: critical 207 Q_ASSERT_X ( dimensions. "CartesianAxis::paint".pixmap().start <<".pm.first(). "CartesianAxis::paint".cpp. 209 DataDimension& dimX = dimensions. KDChart::TextLayout- Item::setGeometry().center(). KDChart::TextLayoutItem::setText().end. 151 painter.distance() ).drawPixmap( ol. KDChart::AbstractAxis::labels().. isOrdinate()." ). isAbscissa(). // Cannot happen. Left.height()/ 2 ). KDChart::DataDimension::start. KDChart::TextAttributes::isVisible(). Referenced by paint().start <<". 203 204 const int MinimumPixelsBetweenRulers = 5.17. KDChart::Abstract- Axis::textAttributes().Line or Bar Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .pm.calculate the range that will be displayed: 219 const qreal absRange = qAbs( dim. KDChart::DataDimension::subStepWidth. 220 221 // Fixme Michel: Need to find the type of chart here . Bottom. KDChart::AbstractCoordinatePlane::gridDimensionsList(). titleText(). KDChart::TextLayoutItem::sizeHint(). ptr." ). 196 197 Q_ASSERT_X ( d->diagram().last()).setX( rect. "CartesianAxis::paint". and KDChart::Cartesian- CoordinatePlane::translate().count() == 2. 216 217 // preparations: 218 // . previously checked 147 } 148 QPixmap pm = attributes. KDChart::DataDimension::isCalculated.first() : dimensions. KDChart::AbstractAxis::shortLabels().end.278 KD Chart 2 Class Documentation 146 . KDChart::DataDimension::calcMode. References KDChart::AbstractArea::areaGeometry(). 214 // else 215 // qDebug() << " " << "Ordinate:" << dimY. Right. 150 ol. pm ). 205 DataDimensionsList dimensions( plane->gridDimensionsList() ). titleTextAttributes().transformed( m ). KDChart::DataDimension::end. Definition at line 193 of file KDChartCartesianAxis.y() .setY( rect. KDChart::DataDimension::step- Width.

stepWidth:" << dimY.17 KDChart::CartesianAxis Class Reference 279 222 // if Bars calculate the number of groups 223 224 qreal numberOfUnitRulers. 272 const bool drawLabels = labelTA. 241 const QPointF p2 = plane->translate( QPointF(dimX.stepWidth ) + 1. 244 if ( isAbscissa() ) 245 { 246 screenRange = qAbs ( p1.y() . 263 } 264 } 265 266 const bool drawUnitRulers = screenRange / numberOfUnitRulers > MinimumPixelsBetweenRulers.stepWidth *= 10. 267 const bool drawSubUnitRulers = 268 (numberOfSubUnitRulers != 0.stepWidth ).isVisible(). 277 QRectF rulerRect.find the reference point at which to start drawing and the increment (line distance). 242 243 double screenRange.height().0.calculate the absolute range in screen pixels: 240 const QPointF p1 = plane->translate( QPointF(dimX.0.end. 270 271 const TextAttributes labelTA = textAttributes().0. 275 QPointF rulerRef.0. 232 if ( isAbscissa() ) 233 numberOfSubUnitRulers = 0. dimY. and do the calculation in the grid calc function 257 if( isAbscissa() && ! dimX. 279 double rulerHeight. 287 switch( position() ) 288 { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .x() ). 225 if ( isAbscissa() ) 226 numberOfUnitRulers = d->diagram()->model()->rowCount() . 234 else { 235 numberOfSubUnitRulers = absRange / qAbs( dimY.6. 259 while( screenRange / numberOfUnitRulers <= MinimumPixelsBetweenRulers ){ 260 dimX. 236 //qDebug() << "dimY. 286 rulerHeight = geoRect. 261 //qDebug() << "adjusting dimX.x() .isCalculated ){ 258 dimX. 282 //qDebug() << " " << (isAbscissa() ? "Abscissa":"Ordinate") << "axis painting with geometr 283 284 // FIXME references are of course different for all locations: 285 rulerWidth = geoRect.start.0.adjusted(0.stepWidth.-1)).0.0) && 269 (screenRange / numberOfSubUnitRulers > MinimumPixelsBetweenRulers). 252 253 254 255 256 //FIXME(khz): Remove this code. 276 QRect geoRect( areaGeometry() ).stepWidth << "numberOfSubUnitRulers:" << numberOfSu 237 } 238 239 // .p2.end) ). dimY. 229 //qDebug() << "absRange" << absRange << "dimY.width().0. 249 } 250 251 const bool useItemCountLabels = isAbscissa() && d->diagram()->datasetDimension() == 1.subStepWidth:" << dimY. 280 281 //for debugging: if( isAbscissa() )ptr->drawRect(geoRect.stepWidth to" << dimX. 227 else { 228 numberOfUnitRulers = absRange / qAbs( dimY.subStepWidth ) + 1.-1.p2.stepWidth = 1. 273 274 // .start) ).1. 262 numberOfUnitRulers = qAbs( dimX.distance() / dimX.y() ). 278 double rulerWidth. 247 } else { 248 screenRange = qAbs ( p1.stepWidth << "numberOfUnitRu 230 } 231 qreal numberOfSubUnitRulers.

320 const qreal maxValueY = dimY.start.topLeft(). 291 rulerRef.setY( geoRect.bottomLeft().setY( geoRect.drawUnitRulers: " << drawUnitRulers << endl 333 << "-.topLeft().setY( geoRect.y() ). 347 348 // that QVector contains all drawn x-ticks (so no subticks are drawn there also) 349 QVector< int > drawnXTicks. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .count().bottomRight(). 299 rulerRef.x() ).bottomLeft(). 338 #endif 339 340 ptr->setPen ( Qt::black ).range x/y: " << dimX. a step vector and a unit vector for the drawing: 318 319 const qreal minValueY = dimY.calcMode == AbstractCoordinatePlane::Logarithmic ).x() ). 323 const bool isLogarithmicX = (dimX. 325 //#define AXES_PAINTING_DEBUG 1 326 #ifdef AXES_PAINTING_DEBUG 327 qDebug() << "CartesianAxis::paint: reference values:" << endl 328 << "-.bottomLeft(). 303 rulerRef. 295 rulerRef.screenRange: " << screenRange << endl 332 << "-.setY( geoRect. 343 //ptr->setBrush ( Qt::red ).minValueX: " << minValueX << " maxValueX: " << maxValueX << endl 336 << "-. 0)! 316 317 // set up a reference point. 324 const bool isLogarithmicY = (dimY.distance() << endl 329 << "-. 352 353 // this draws the unit rulers 354 if ( drawUnitRulers ) { 355 const int hardLabelsCount = labels().rulerWidth ). 296 break.starting with the fourth 312 // .setX( geoRect.bottomLeft().setX( geoRect.y() + rulerHeight ).280 KD Chart 2 Class Documentation 289 case Top: 290 rulerRef.numberOfUnitRulers: " << numberOfUnitRulers << endl 331 << "-. // PENDING(michel) What is this for? 344 QPointF fourthRulerRef ( rulerRef ).y() .the the halfs 313 // .absRange: " << absRange << endl 330 << "-.calcMode == AbstractCoordinatePlane::Logarithmic ).end.distance() << "/" << dimY.bottomRight().ruler reference point:: " << rulerRef << endl 335 << "-. 292 break.setX( geoRect.minValueY: " << minValueY << " maxValueY: " << maxValueY << endl 337 . 322 const qreal maxValueX = dimX. 305 } 306 307 // set up the lines to paint: 308 309 // set up a map of integer positions.rulerHeight ).x() .x() + rulerWidth ).then the tens 314 // this will override all halfs and fourth that hit a higher-order ruler 315 // MAKE SURE TO START AT (0. 304 break. 300 break. 345 346 const QObject* referenceArea = plane->parent(). 310 311 // . 350 // and that does the same for the y-ticks 351 QVector< int > drawnYTicks.setX( geoRect.end.y() ). 297 case Right: 298 rulerRef.drawLabels: " << drawLabels << endl 334 << "-. 301 case Left: 302 rulerRef.start. 293 case Bottom: 294 rulerRef. 341 // Commenting this it causes the frame backround to be painted in red 342 // for some reason and does not look to make sense. 321 const qreal minValueX = dimX.

419 else 420 i += dimX.count().stepWidth. we first find out. 367 368 TextLayoutItem* labelItem = 369 drawLabels 370 ? new TextLayoutItem( QString::number( minValueY ). firstPos. 393 if( drawLabels && hardLabelsCount > 0 && shortLabelsCount > 0 ){ 394 bool labelsAreOverlapping = false. 360 if( useItemCountLabels ){ 361 headerLabels = 362 isOrdinate() 363 ? d->diagram()->datasetLabels() 364 : d->diagram()->itemRowLabels(). 0. 389 390 if ( isAbscissa() ) { 391 // If we have a labels list AND a short labels list.17 KDChart::CartesianAxis Class Reference 281 356 const int shortLabelsCount = shortLabels(). 373 KDChartEnums::MeasureOrientationMinimum.height() * 0. ’f’. 379 labelTA. 417 if ( isLogarithmicX ) 418 i *= 10.stepWidth. 403 } else { 404 labelItem->setText( labels()[ iLabel ] ). 358 359 QStringList headerLabels. 380 referenceArea.stepWidth.5. 0 ) ).count(). 382 Qt::AlignLeft ) 383 : 0. 384 const QFontMetricsF met( 385 drawLabels 386 ? labelItem->realFont() 387 : QFontMetricsF( QApplication::font() ) ). 397 while ( i < maxValueX && !labelsAreOverlapping ) 398 { 399 if ( dimX. use the short labels. 409 410 QPointF secondPos( i + dimX.stepWidth != 1.6. 381 KDChartEnums::MeasureOrientationMinimum. 414 415 if ( iLabel++ > hardLabelsCount . 396 qreal i = minValueX. 421 } 422 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .0 ).0. 365 } 366 const int headerLabelsCount = headerLabels. 392 // if there is enough space for the labels: if not. 371 labelTA. 405 labelItem->setText( labels()[ iLabel + 1 >= hardLabelsCount ? 0 : iLabel + 1 ] 406 } 407 QPointF firstPos( i.0 && ! dim.isCalculated ) 400 { 401 labelItem->setText( QString::number( i. 374 Qt::AlignLeft ) 375 : 0. ’f’. 372 referenceArea. secondPos ). 388 const qreal halfFontHeight = met. 408 firstPos = plane->translate( firstPos ).1 ) 416 iLabel = 0. 402 labelItem2->setText( QString::number( i + dimX. 0 ) ).0 ). 357 bool useShortLabels = false. 395 int iLabel = 0. 376 TextLayoutItem* labelItem2 = 377 drawLabels 378 ? new TextLayoutItem( QString::number( minValueY ). 411 secondPos = plane->translate( secondPos ). 0. 412 413 labelsAreOverlapping = labelItem->intersects( *labelItem2.

434 topPoint = plane->translate( topPoint ).0 ). 435 bottomPoint = plane->translate( bottomPoint ).setY( fourthRulerRef. 0) ).stepWidth. 440 if ( drawLabels ) { 441 if ( isLogarithmicX ) 442 labelItem->setText( QString::number(i. since we are using 450 // the layout item temporarily only. 436 topPoint. 478 else 479 ++idxLabel.topLe 463 { 464 labelItem->paint( ptr ). 431 while ( i < maxValueX ) { 432 QPointF topPoint ( i + ( useItemCountLabels ? 0. 429 qreal iLabelF = minValueX.x() . 0) ). 465 466 labelItem2->setText( labelItem->text() ).y() + tickLength() ). 430 qreal i = minValueX.width() / 2 ).topLeft(). 482 } 483 } 484 if ( isLogarithmicX ) 485 i *= 10. 460 size ) ).0) ) ) ). 480 }else{ 481 iLabelF += dimX. 456 static_cast<int>( topPoint.x() ) ).y() + 457 ( position() == Bottom 458 ? halfFontHeight 459 : ((halfFontHeight + size. 467 oldItemPos = labelItem->geometry(). 468 } 469 470 if( hardLabelsCount ){ 471 if( idxLabel >= hardLabelsCount -1 ) 472 idxLabel = 0. bottomPoint ).5 : 0.0. 486 else 487 i += dimX. 452 labelItem->setGeometry( 453 QRect( 454 QPoint( 455 static_cast<int>( topPoint. 424 } 425 426 labelItem2->setText( QString::null ).setY( fourthRulerRef. labelItem->geometry(). 451 const QSize size( labelItem->sizeHint() ). ’f’. 0.stepWidth != 1. 461 462 if ( ! labelItem2->intersects( *labelItem. 437 bottomPoint.append( static_cast<int>( topPoint. 473 else 474 ++idxLabel. oldItemPos. 443 else if( (dimX. 488 } 489 } else { Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .isCalculated ) 444 labelItem->setText( QString::number(i. ’f’. 428 int idxLabel = 0.0 ). 427 QPoint oldItemPos. 438 ptr->drawLine( topPoint. 433 QPointF bottomPoint ( topPoint ).282 KD Chart 2 Class Documentation 423 useShortLabels = labelsAreOverlapping.y() ).stepWidth.height()) * -1.size.0) && ! dimX. 439 drawnXTicks. 475 }else if( headerLabelsCount ){ 476 if( idxLabel >= headerLabelsCount-1 ) 477 idxLabel = 0. 445 else 446 labelItem->setText( hardLabelsCount 447 ? ( useShortLabels ? shortLabels()[ idxLabel ] : labels()[ idxLabel ] ) 448 : ( headerLabelsCount ? headerLabels[ idxLabel ] : QString::number( iLabe 449 // No need to call labelItem->setParentWidget().

493 qreal labelValue. since we are using 528 // the layout item temporarily only.adjusted(0. 492 int maxLabelsWidth = 0.stepWidth.0. f ). so we to know how much we need to right-shift 496 // our labels.( position() == Left ? labelSize.0. 518 QPointF rightPoint ( 0.7 ). to get them drawn right aligned: 497 labelValue = minValueY.0.ascent() * 0. maxLimit.x() + met.width() : (labelSize. 510 } 511 } 512 labelValue = minValueY.setX( fourthRulerRef. 502 if ( isLogarithmicY ) 503 labelValue *= 10. 504 else 505 labelValue += dimY.x() + tickLength() ).ascent() * 0.y() . 536 if( f == minValueY ){ 537 // first label of the ordinate? 538 // shift it up a bit. labelItem->sizeHint().met. 525 if ( drawLabels ) { 526 labelItem->setText( QString::number( labelValue ) ).0. 491 const double steg = dimY.maxLabelsWid 535 int y.width() ). 499 while ( f <= maxLimit ) { 500 labelItem->setText( QString::number( labelValue ) ).0.17 KDChart::CartesianAxis Class Reference 283 490 const double maxLimit = maxValueY.y() .5 ).0. 550 //ptr->drawRect(labelItem->geometry().f). 544 } else{ 545 y = static_cast<int>( leftPoint. 546 } 547 --y.stepWidth. minValueY.append( static_cast<int>( leftPoint. 498 qreal f = minValueY. 506 if ( isLogarithmicY ) 507 f *= 10.setX( leftPoint.met. 555 else 556 labelValue += dimY.5 : 534 . 551 labelItem->paint( ptr ).-1. steg). 522 rightPoint.-1)). 494 if( drawLabels && position() == Right ){ 495 // Find the wides label.x() 531 ). 529 const QSize labelSize( labelItem->sizeHint() ). f ). 514 qreal f = minValueY. 548 549 labelItem->setGeometry( QRect( QPoint(x. 552 553 if ( isLogarithmicY ) 554 labelValue *= 10.y() ) ). 520 rightPoint = plane->translate( rightPoint ).met. 521 leftPoint. y).width() .y() .x() ). 530 leftPoint. 527 // No need to call labelItem->setParentWidget(). 532 const int x = 533 static_cast<int>( leftPoint. 508 else 509 f += steg.1 ). 515 while ( f <= maxLimit ) { 516 //qDebug("f: %f". rightPoint ). 540 } else if( f + steg > maxLimit ){ 541 // last label of the ordinate? 542 // shift it down a bit. to prevent it from being clipped away 543 y = static_cast<int>( leftPoint. 524 drawnYTicks.setX( fourthRulerRef.ascent() * 0. labelSize ) ).height() * ( position() == Left ? -0.stepWidth. 513 //qDebug("minValueY: %f maxLimit: %f steg: %f". 517 QPointF leftPoint ( 0. 519 leftPoint = plane->translate( leftPoint ).6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . to prevent it from being clipped away 539 y = static_cast<int>( leftPoint. 523 ptr->drawLine( leftPoint. 501 maxLabelsWidth = qMax( maxLabelsWidth.

616 rightPoint = plane->translate( rightPoint ). 599 ++logSubstep.leftPoint.setY( fourthRulerRef. 0 ). 587 if( drawnXTicks. rightPoint ). 591 else 592 ++nextMayBeTick. 579 while ( f <= maxValueX ) { 580 QPointF topPoint ( f.x() + tickLength( true ) ). 593 if ( isLogarithmicX ){ 594 if( logSubstep == 9 ){ 595 fLogSubstep *= 10.count() > nextMayBeTick ) 620 mayBeTick = drawnYTicks[ nextMayBeTick ]. 562 } 563 } 564 if( labelItem ) 565 delete labelItem. 600 }else{ 601 f += dimX. 618 rightPoint. 589 if( qAbs( mayBeTick . f ). 613 QPointF rightPoint ( 0. 602 } 603 } 604 // for the y-axis 605 } else { 606 int nextMayBeTick = 0.count() > nextMayBeTick ) 588 mayBeTick = drawnXTicks[ nextMayBeTick ].y() + tickLength( true ) ).subStepWidth. 578 int logSubstep = 0. f ). 575 int mayBeTick = 0. 566 if( labelItem2 ) 567 delete labelItem2. 596 logSubstep = 0. if we are at the same position as a normal tick 615 leftPoint = plane->translate( leftPoint ). 0 ).y() ) > 1 ) 622 ptr->drawLine( leftPoint. 619 if( drawnYTicks. 608 float f = minValueY. 623 else Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 617 leftPoint. 576 float f = minValueX. 614 // we don’t draw the sub ticks.y() ). 585 topPoint.setY( fourthRulerRef. 560 else 561 f += steg. 621 if( qAbs( mayBeTick . 581 QPointF bottomPoint ( f. 584 bottomPoint = plane->translate( bottomPoint ).0.284 KD Chart 2 Class Documentation 557 } 558 if ( isLogarithmicY ) 559 f *= 10. 568 } 569 570 // this draws the subunit rulers 571 if ( drawSubUnitRulers ) { 572 // for the x-axis 573 if ( isAbscissa() ) { 574 int nextMayBeTick = 0. 577 qreal fLogSubstep = minValueX.x() ). 611 while ( f <= maxValueY ) { 612 QPointF leftPoint ( 0. bottomPoint ). 586 bottomPoint.setX( fourthRulerRef.0.x() ) > 1 ) 590 ptr->drawLine( topPoint. 610 int logSubstep = 0.setX( fourthRulerRef. 609 qreal fLogSubstep = minValueY. if we are at the same position as a normal tick 583 topPoint = plane->translate( topPoint ). 597 } 598 f += fLogSubstep. 607 int mayBeTick = 0.topPoint. 582 // we don’t draw the sub ticks.

6.width() / 2. 663 break.setY( geoRect.". 659 break.adjusted(0.isVisible() ){ 643 TextLayoutItem titleItem( titleText().paint( ptr ). 650 switch( position() ) 651 { 652 case Top: 653 point. 674 //ptr->drawRect(titleItem.0).setGeometry( QRect( QPoint(-size. 0). 668 } 669 PainterSaver painterSaver( ptr ).top() ).isEmpty() ){ 641 const TextAttributes titleTA( titleTextAttributes() ). 625 if ( isLogarithmicY ){ 626 if( logSubstep == 9 ){ 627 fLogSubstep *= 10. 667 break. References attributes.0 ).right() .4.width() / 2. 647 Qt::AlignHCenter|Qt::AlignVCenter ).-1)). 662 point. 660 case Left: 661 point. 658 point.-1.0). 676 } 677 } 678 679 //qDebug() << "KDChart::CartesianAxis::paintCtx() done.top() + geoRect.height() ). 664 case Right: 665 point. const QRect & rectangle) [virtual. 671 if( isOrdinate() ) 672 ptr->rotate( 270. 680 } 6.0. 656 case Bottom: 657 point.26 void AbstractAreaBase::paintFrame (QPainter & painter.height() / 2.top() + geoRect. 648 QPointF point.bottom() .setX( geoRect. 666 point. 646 KDChartEnums::MeasureOrientationMinimum.geometry(). 644 titleTA.setY( geoRect.setX( geoRect.left() ).0. 675 titleItem.0).sizeHint() ).size. and d. 634 } 635 } 636 } 637 } 638 639 640 if( ! titleText(). 632 }else{ 633 f += dimY. 642 if( titleTA. 673 titleItem.width() / 2.setX( geoRect. 649 const QSize size( titleItem.subStepWidth. inherited] Definition at line 158 of file KDChartAbstractAreaBase. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 645 referenceArea.height() / 2. 670 ptr->translate( point ). 628 logSubstep = 0.17 KDChart::CartesianAxis Class Reference 285 624 ++nextMayBeTick.left() + geoRect. 629 } 630 f += fLogSubstep.cpp.height() ).setY( geoRect. size ) ).setX( geoRect.setY( geoRect.left() + geoRect. 631 ++logSubstep.17. 655 break.0). 654 point.size.

then calls paint().setPen( oldPen ). but you would overwrite Abstract- LayoutItem::paint() instead.top() ).left().4.top() ).translate( -rect. isAbscissa().pen() ). and tick- Length(). 77 paintAll( painter ).28 const CartesianAxis::Position CartesianAxis::position () const [virtual] Definition at line 122 of file KDChartCartesianAxis.translate( rect. 125 } 6. References d. 78 painter. 171 #undef attributes 172 } 6. Referenced by expandingDirections(). In most cases there is no need to overwrite this method in a derived class. 72 { 73 const QRect oldGeometry( geometry() ). isOrdinate(). inherited] Reimplemented from KDChart::AbstractAreaBase. 169 painter.17. Definition at line 71 of file KDChartAbstractArea.isVisible() ) return. 162 163 #define attributes d->frameAttributes 164 165 if( !attributes.pen() ). 79 if( oldGeometry != rect ) 80 setGeometry( oldGeometry ). 166 167 const QPen oldPen( painter.4. References KDChart::AbstractArea::paintAll().29 void AbstractArea::positionHasChanged () [protected. -rect.4. virtual.left().setPen( attributes. 159 { 160 Q_ASSERT_X ( d != 0. 74 if( oldGeometry != rect ) 75 setGeometry( rect ). 161 "Private class was not initialized!" ).17. inherited] Draws the background and frame. 81 } 6. rect. paintCtx().286 KD Chart 2 Class Documentation Referenced by KDChart::TextArea::paintAll().27 void AbstractArea::paintIntoRect (QPainter & painter.cpp. 76 painter. maximumSize().drawRect( rect ).17. "AbstractAreaBase::paintFrame()". 170 painter. const QRect & rect) [virtual. 168 painter. 123 { 124 return d->position. KDChart::AbstractAreaWidget::paintAll(). and KDChart::AbstractArea::paintAll().cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

Same font and pen as AbstractAxis::textAttributes() and 1. 109 } 6.cpp. 111 { 112 emit positionChanged( this ). Referenced by KDChart::Legend::clone(). Referenced by KDChart::Chart::takeCoordinatePlane().30 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems.cpp.32 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase.31 void CartesianAxis::resetTitleTextAttributes () Reset the title text attributes to the built-in default:. References d.4. 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ).6.4.17.17. References d.cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .33 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase.17. and layoutPlanes(). 95 } 6. Definition at line 105 of file KDChartCartesianAxis.4. 93 { 94 d->backgroundAttributes = a.cpp.17.17 KDChart::CartesianAxis Class Reference 287 Definition at line 110 of file KDChartAbstractArea.5 times their size. 71 else 72 mParentLayout->removeItem( this ). 113 } 6. 106 { 107 d->useDefaultTextAttributes = true. References d. 73 } 74 } 6. 108 layoutPlanes().4.h.

References d. KD Chart will use these strings as axis labels. 85 } 6. 821 { 822 // qDebug() << "KDChart::CartesianAxis::setGeometry(" << r << ") called" 823 // << (isAbscissa() ? "for Abscissa":"for Ordinate") << "axis". 247 } 6. 245 { 246 d->hardLabels = list. Definition at line 820 of file KDChartCartesianAxis.17. 65 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . If you a smaller number of strings than the number od labels drawn at this axis. 63 { 64 mParentLayout = lay.4.17. instead of calculating them.h.17. repeating the strings. Labels specified via setLabels take precedence: If a non-empty list is passed.cpp. 824 d->geometry = r.288 KD Chart 2 Class Documentation 83 { 84 d->frameAttributes = a. which would be repeatedly used then. By passing an empty QStringList you can reset the default behaviour.4.34 void CartesianAxis::setGeometry (const QRect & r) [virtual] pure virtual in QLayoutItem Implements KDChart::AbstractAxis.4.36 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems. setShortLabels Definition at line 244 of file KDChartAbstractAxis. See also: labels. As an example you could specify the seven days of the week as abscissa labels. References d. KD Chart will iterate over the list. to be used as axis labels. until all labels are drawn.cpp.35 void AbstractAxis::setLabels (const QStringList & list) [inherited] Use this to specify your own set of strings. 825 } 6.

cpp.17. inherited] Inform the item about its widget: This enables the item. to be used as axis labels. that has a non-fixed size. References d.4. References d. if you did not pass a non-empty string list via set- Labels too! By passing an empty QStringList you can reset the default behaviour. Thus.17. Referenced by KDChart::Legend::buildLegend(). and layoutPlanes(). 59 } 6. you need to call setParentWidget on every item. Definition at line 56 of file KDChartLayoutItems. and KDChart::AbstractCartesianDiagram::takeAxis().17. 117 { 118 d->position = p.cpp. 120 } 6. 119 layoutPlanes().cpp. in case the normal labels are too long. setLabels Definition at line 270 of file KDChartAbstractAxis.6.4.17 KDChart::CartesianAxis Class Reference 289 6.39 void AbstractAxis::setShortLabels (const QStringList & list) [inherited] Use this to specify your own set of strings. 57 { 58 mParent = widget. Note: Setting done via setShortLabels will be ignored. whenever the size of the item’s contents has changed. 273 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References KDChart::AbstractLayoutItem::mParent. to trigger that widget’s update.37 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual.4. 271 { 272 d->hardShortLabels = list. See also: shortLabels.38 void CartesianAxis::setPosition (Position p) [virtual] Definition at line 116 of file KDChartCartesianAxis.

290 KD Chart 2 Class Documentation

6.17.4.40 void AbstractAxis::setTextAttributes (const TextAttributes & a) [inherited]

Use this to specify the text attributes to be used for axis labels.
By default, the reference area will be set at painting time. It will be the then-valid coordinate plane’s
parent widget, so normally, it will be the KDChart::Chart. Thus the labels of all of your axes in all of your
diagrams within that Chart will be drawn in same font size, by default.

See also:
textAttributes, setLabels

Definition at line 212 of file KDChartAbstractAxis.cpp.
References d.

213 {
214 d->textAttributes = a;
215 }

6.17.4.41 void CartesianAxis::setTitleText (const QString & text)

Definition at line 74 of file KDChartCartesianAxis.cpp.
References d, and layoutPlanes().

75 {
76 //FIXME(khz): Call update al all places where axis internals are changed!
77 d->titleText = text;
78 layoutPlanes();
79 }

6.17.4.42 void CartesianAxis::setTitleTextAttributes (const TextAttributes & a)

Definition at line 86 of file KDChartCartesianAxis.cpp.
References d, and layoutPlanes().

87 {
88 d->titleTextAttributes = a;
89 d->useDefaultTextAttributes = false;
90 layoutPlanes();
91 }

6.17.4.43 QStringList AbstractAxis::shortLabels () const [inherited]

Returns a list of strings, that are used as axis labels, as set via setShortLabels.

Note:
Setting done via setShortLabels will be ignored, if you did not pass a non-empty string list via set-
Labels too!

See also:
setShortLabels

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.17 KDChart::CartesianAxis Class Reference 291

Definition at line 283 of file KDChartAbstractAxis.cpp.
References d.
Referenced by paintCtx().

284 {
285 return d->hardShortLabels;
286 }

6.17.4.44 QSize CartesianAxis::sizeHint () const [virtual]

pure virtual in QLayoutItem
Definition at line 815 of file KDChartCartesianAxis.cpp.
References maximumSize().

816 {
817 return maximumSize();
818 }

6.17.4.45 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual,
inherited]

Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 73 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextLayoutItem::sizeHint().

74 {
75 // This is exactly like what QWidget::updateGeometry does.
76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called");
77 if( mParent ) {
78 if ( mParent->layout() )
79 mParent->layout()->invalidate();
80 else
81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );
82 }
83 }

6.17.4.46 TextAttributes AbstractAxis::textAttributes () const [inherited]

Returns the text attributes to be used for axis labels.

See also:
setTextAttributes

Definition at line 222 of file KDChartAbstractAxis.cpp.
References d.
Referenced by maximumSize(), paintCtx(), and titleTextAttributes().

223 {
224 return d->textAttributes;
225 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

292 KD Chart 2 Class Documentation

6.17.4.47 int CartesianAxis::tickLength (bool subUnitTicks = false) const

Definition at line 832 of file KDChartCartesianAxis.cpp.
References isAbscissa(), Left, position(), and Top.
Referenced by maximumSize(), and paintCtx().

833 {
834 int result = 0;
835
836 if ( isAbscissa() ) {
837 result = position() == Top ? -4 : 3;
838 } else {
839 result = position() == Left ? -4 : 3;
840 }
841
842 if ( subUnitTicks )
843 result = result < 0 ? result + 1 : result - 1;
844
845 return result;
846 }

6.17.4.48 QString CartesianAxis::titleText () const

Definition at line 81 of file KDChartCartesianAxis.cpp.
References d.
Referenced by maximumSize(), and paintCtx().

82 {
83 return d->titleText;
84 }

6.17.4.49 TextAttributes CartesianAxis::titleTextAttributes () const

Returns the text attributes that will be used for displaying the title text.
This is either the text attributes as specified by setTitleTextAttributes, or (if setTitleTextAttributes() was
not called) the default text attributes.

See also:
resetTitleTextAttributes, hasDefaultTitleTextAttributes

Definition at line 93 of file KDChartCartesianAxis.cpp.
References d, KDChart::TextAttributes::fontSize(), hasDefaultTitleTextAttributes(), KDChart::Text-
Attributes::setFontSize(), KDChart::Measure::setValue(), KDChart::AbstractAxis::textAttributes(), and
KDChart::Measure::value().
Referenced by maximumSize(), and paintCtx().

94 {
95 if( hasDefaultTitleTextAttributes() ){
96 TextAttributes ta( textAttributes() );
97 Measure me( ta.fontSize() );
98 me.setValue( me.value() * 1.5 );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.17 KDChart::CartesianAxis Class Reference 293

99 ta.setFontSize( me );
100 return ta;
101 }
102 return d->titleTextAttributes;
103 }

6.17.5 Member Data Documentation

6.17.5.1 Q_SIGNALS KDChart::AbstractArea::__pad0__ [protected, inherited]

Reimplemented in KDChart::AbstractCoordinatePlane.
Definition at line 86 of file KDChartAbstractArea.h.

6.17.5.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.
Referenced by KDChart::AbstractLayoutItem::setParentWidget().

6.17.5.3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,
inherited]

Definition at line 77 of file KDChartLayoutItems.h.

6.17.5.4 public KDChart::AbstractAxis::Q_SLOTS [inherited]

Definition at line 108 of file KDChartAbstractAxis.h.

6.17.5.5 protected KDChart::AbstractAxis::Q_SLOTS [inherited]

Definition at line 105 of file KDChartAbstractAxis.h.
The documentation for this class was generated from the following files:

• KDChartCartesianAxis.h
• KDChartCartesianAxis.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

294 KD Chart 2 Class Documentation

6.18 KDChart::CartesianCoordinatePlane Class Reference
#include <KDChartCartesianCoordinatePlane.h>
Inheritance diagram for KDChart::CartesianCoordinatePlane:Collaboration diagram for
KDChart::CartesianCoordinatePlane:

Public Types
• enum AxesCalcMode {
Linear,
Logarithmic }

Public Member Functions
• void addDiagram (AbstractDiagram ∗diagram)
Adds a diagram to this coordinate plane.

• void alignToReferencePoint (const RelativePosition &position)
• AxesCalcMode axesCalcModeX () const
• AxesCalcMode axesCalcModeY () const
• BackgroundAttributes backgroundAttributes () const
• CartesianCoordinatePlane (Chart ∗parent=0)
• AbstractDiagram ∗ diagram ()
• ConstAbstractDiagramList diagrams () const
• AbstractDiagramList diagrams ()
• bool doesIsometricScaling ()
• virtual Qt::Orientations expandingDirections () const
pure virtual in QLayoutItem

• FrameAttributes frameAttributes () const
• virtual QRect geometry () const
pure virtual in QLayoutItem

• GridAttributes globalGridAttributes () const
• GridAttributes gridAttributes (Qt::Orientation orientation) const
• DataDimensionsList gridDimensionsList ()
Returns the dimensions used for drawing the grid lines.

• bool hasOwnGridAttributes (Qt::Orientation orientation) const
• QPair< qreal, qreal > horizontalRange () const
• virtual bool isEmpty () const
pure virtual in QLayoutItem

• void layoutPlanes ()
Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().

• virtual QSize maximumSize () const
pure virtual in QLayoutItem

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 295

• virtual QSize minimumSize () const
pure virtual in QLayoutItem

• virtual QSize minimumSizeHint () const
[reimplemented]

• void needLayoutPlanes ()
Emitted when plane needs to trigger the Chart’s layouting of the coord.

• void needRelayout ()
Emitted when plane needs to trigger the Chart’s layouting.

• void needUpdate ()
Emitted when plane needs to update its drawings.

• virtual void paint (QPainter ∗)
reimpl

• void paintAll (QPainter &painter)
Call paintAll, if you want the background and the frame to be drawn before the normal paint() is invoked
automatically.

• virtual void paintBackground (QPainter &painter, const QRect &rectangle)
• virtual void paintCtx (PaintContext ∗context)
Default impl: Paint the complete item using its layouted position and size.

• virtual void paintFrame (QPainter &painter, const QRect &rectangle)
• virtual void paintIntoRect (QPainter &painter, const QRect &rect)
Draws the background and frame, then calls paint().

• const Chart ∗ parent () const
• Chart ∗ parent ()
• void propertiesChanged ()
Emitted upon change of a property of the Coordinate Plane or any of its components.

• AbstractCoordinatePlane ∗ referenceCoordinatePlane () const
There are two ways, in which planes can be caused to interact, in where they are put layouting wise: The
first is the reference plane.

• void relayout ()
Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout().

• void removeFromParentLayout ()
• virtual void replaceDiagram (AbstractDiagram ∗diagram, AbstractDiagram ∗oldDiagram=0)
Replaces the old diagram, or appends the diagram, it there is none yet.

• void resetGridAttributes (Qt::Orientation orientation)
Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.).

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

296 KD Chart 2 Class Documentation

• void setAxesCalcModes (AxesCalcMode mode)
Specifies the calculation modes for all axes.

• void setAxesCalcModeX (AxesCalcMode mode)
Specifies the calculation mode for all Abscissa axes.

• void setAxesCalcModeY (AxesCalcMode mode)
Specifies the calculation mode for all Ordinate axes.

• void setBackgroundAttributes (const BackgroundAttributes &a)
• void setFrameAttributes (const FrameAttributes &a)
• virtual void setGeometry (const QRect &r)
pure virtual in QLayoutItem

• void setGlobalGridAttributes (const GridAttributes &)
Set the grid attributes to be used by this coordinate plane.

• void setGridAttributes (Qt::Orientation orientation, const GridAttributes &)
Set the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.).

• void setHorizontalRange (const QPair< qreal, qreal > &)
Allows setting the boundaries of the visible value space area that the plane displays in horizontal direction.

• void setIsometricScaling (bool onOff)
• void setParent (Chart ∗parent)
Called internally by KDChart::Chart.

• void setParentLayout (QLayout ∗lay)
• virtual void setParentWidget (QWidget ∗widget)
Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the size
of the item’s contents has changed.

• void setReferenceCoordinatePlane (AbstractCoordinatePlane ∗plane)
Set another coordinate plane to be used as the reference plane for this one.

• void setVerticalRange (const QPair< qreal, qreal > &)
Allows setting the boundaries of the visible value space area that the plane displays in vertical direction.

• virtual void setZoomCenter (QPointF center)
Set the point (in value coordinates) to be used as the center point in zoom operations.

• virtual void setZoomFactorX (double factor)
Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

• virtual void setZoomFactorY (double factor)
Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

• virtual QSize sizeHint () const
pure virtual in QLayoutItem

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 297

• virtual void sizeHintChanged () const
Report changed size hint: ask the parent widget to recalculate the layout.

• virtual QSizePolicy sizePolicy () const
[reimplemented]

• virtual void takeDiagram (AbstractDiagram ∗diagram)
Removes the diagram from the plane, without deleting it.

• const QPointF translate (const QPointF &diagramPoint) const
Translate the given point in value space coordinates to a position in pixel space.

• QPair< qreal, qreal > verticalRange () const
• virtual QPointF zoomCenter () const
• virtual double zoomFactorX () const
• virtual double zoomFactorY () const
• ∼CartesianCoordinatePlane ()

Public Attributes
• Q_SIGNALS __pad0__: void destroyedCoordinatePlane( AbstractCoordinatePlane∗ )

Protected Member Functions
• virtual QRect areaGeometry () const
• virtual QRectF calculateRawDataBoundingRect () const
• virtual QRectF drawingArea () const
• virtual DataDimensionsList getDataDimensionsList () const
• QRect innerRect () const
• void layoutDiagrams ()
Distribute the available space among the diagrams and axes.

• void paintEvent (QPaintEvent ∗)
• virtual void positionHasChanged ()

Protected Attributes
• QWidget ∗ mParent
• QLayout ∗ mParentLayout
• protected Q_SLOTS: void slotLayoutChanged( AbstractDiagram∗ )

6.18.1 Member Enumeration Documentation

6.18.1.1 enum KDChart::AbstractCoordinatePlane::AxesCalcMode [inherited]

Enumeration values:
Linear
Logarithmic

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

298 KD Chart 2 Class Documentation

Definition at line 55 of file KDChartAbstractCoordinatePlane.h.

55 { Linear, Logarithmic };

6.18.2 Constructor & Destructor Documentation

6.18.2.1 CartesianCoordinatePlane::CartesianCoordinatePlane (Chart ∗ parent = 0)
[explicit]

Definition at line 65 of file KDChartCartesianCoordinatePlane.cpp.

66 : AbstractCoordinatePlane ( new Private(), parent )
67 {
68 // this bloc left empty intentionally
69 }

6.18.2.2 CartesianCoordinatePlane::∼CartesianCoordinatePlane ()

Definition at line 71 of file KDChartCartesianCoordinatePlane.cpp.

72 {
73 // this bloc left empty intentionally
74 }

6.18.3 Member Function Documentation

6.18.3.1 void CartesianCoordinatePlane::addDiagram (AbstractDiagram ∗ diagram)
[virtual]

Adds a diagram to this coordinate plane.

Parameters:
diagram The diagram to add.

See also:
replaceDiagram, takeDiagram

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 82 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::addDiagram(), and KDChart::AbstractCoordinate-
Plane::propertiesChanged().

83 {
84 Q_ASSERT_X ( dynamic_cast<AbstractCartesianDiagram*> ( diagram ),
85 "CartesianCoordinatePlane::addDiagram", "Only cartesian "
86 "diagrams can be added to a cartesian coordinate plane!" );
87 AbstractCoordinatePlane::addDiagram ( diagram );
88 connect ( diagram, SIGNAL ( layoutChanged ( AbstractDiagram* ) ),
89 SLOT ( slotLayoutChanged ( AbstractDiagram* ) ) );
90
91 connect( diagram, SIGNAL( propertiesChanged() ),this, SIGNAL( propertiesChanged() ) );
92 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 299

6.18.3.2 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position)
[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

76 {
77 Q_UNUSED( position );
78 // PENDING(kalle) FIXME
79 qWarning( "Sorry, not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi
80 }

6.18.3.3 QRect AbstractArea::areaGeometry () const [protected, virtual,
inherited]

Implements KDChart::AbstractAreaBase.
Definition at line 105 of file KDChartAbstractArea.cpp.
Referenced by drawingArea(), KDChart::PolarCoordinatePlane::layoutDiagrams(), KDChart::Cartesian-
Axis::paint(), KDChart::AbstractArea::paintAll(), and KDChart::CartesianAxis::paintCtx().

106 {
107 return geometry();
108 }

6.18.3.4 CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX
() const

Definition at line 408 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by getDataDimensionsList().

409 {
410 return d->coordinateTransformation.axesCalcModeX;
411 }

6.18.3.5 CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY
() const

Definition at line 403 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by getDataDimensionsList().

404 {
405 return d->coordinateTransformation.axesCalcModeY;
406 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

300 KD Chart 2 Class Documentation

6.18.3.6 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const
[inherited]

Definition at line 97 of file KDChartAbstractAreaBase.cpp.
References d.

98 {
99 return d->backgroundAttributes;
100 }

6.18.3.7 QRectF CartesianCoordinatePlane::calculateRawDataBoundingRect () const
[protected, virtual]

Definition at line 163 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractDiagram::dataBoundaries(), and KDChart::AbstractCoordinate-
Plane::diagrams().
Referenced by getDataDimensionsList().

164 {
165 // determine unit of the rectangles of all involved diagrams:
166 QPointF smallestPoint;
167 QPointF largestPoint;
168 bool bStarting = true;
169 Q_FOREACH( const AbstractDiagram* diagram, diagrams() )
170 {
171 QPair<QPointF, QPointF> dataBoundariesPair = diagram->dataBoundaries();
172 //qDebug() << "CartesianCoordinatePlane::calculateRawDataBoundingRect() gets diagram->dataBoun
173 if ( bStarting || dataBoundariesPair.first.x() < smallestPoint.x() )
174 smallestPoint.setX( dataBoundariesPair.first.x() );
175 if ( bStarting || dataBoundariesPair.first.y() < smallestPoint.y() )
176 smallestPoint.setY( dataBoundariesPair.first.y() );
177 if ( bStarting || dataBoundariesPair.second.x() > largestPoint.x() )
178 largestPoint.setX( dataBoundariesPair.second.x() );
179 if ( bStarting || dataBoundariesPair.second.y() > largestPoint.y() )
180 largestPoint.setY( dataBoundariesPair.second.y() );
181 bStarting = false;
182 }
183
184 // if custom boundaries are set on the plane, use them
185 if ( d->horizontalMin != d->horizontalMax ) {
186 smallestPoint.setX( d->horizontalMin );
187 largestPoint.setX( d->horizontalMax );
188 }
189 if ( d->verticalMin != d->verticalMax ) {
190 smallestPoint.setY( d->verticalMin );
191 largestPoint.setY( d->verticalMax );
192 }
193
194 QRectF dataBoundingRect;
195 dataBoundingRect.setBottomLeft ( smallestPoint );
196 dataBoundingRect.setTopRight ( largestPoint );
197 //qDebug() << "CartesianCoordinatePlane::calculateRawDataBoundingRect() returns" << dataBoundingRe
198 return dataBoundingRect;
199 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 301

6.18.3.8 AbstractDiagram ∗ AbstractCoordinatePlane::diagram () [inherited]

Returns:
The first diagram associated with this coordinate plane.

Definition at line 113 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Widget::diagram().

114 {
115 if ( d->diagrams.isEmpty() )
116 {
117 return 0;
118 } else {
119 return d->diagrams.first();
120 }
121 }

6.18.3.9 ConstAbstractDiagramList AbstractCoordinatePlane::diagrams () const
[inherited]

Returns:
The list of diagrams associated with this coordinate plane.

Definition at line 128 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::ConstAbstractDiagramList, and d.

129 {
130 ConstAbstractDiagramList list;
131 #ifndef QT_NO_STL
132 qCopy( d->diagrams.begin(), d->diagrams.end(), std::back_inserter( list ) );
133 #else
134 Q_FOREACH( AbstractDiagram * a, d->diagrams )
135 list.push_back( a );
136 #endif
137 return list;
138 }

6.18.3.10 AbstractDiagramList AbstractCoordinatePlane::diagrams () [inherited]

Returns:
The list of diagrams associated with this coordinate plane.

Definition at line 123 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractDiagramList, and d.
Referenced by calculateRawDataBoundingRect(), getDataDimensionsList(), KDChart::PolarCoordinate-
Plane::layoutDiagrams(), layoutDiagrams(), KDChart::PolarCoordinatePlane::paint(), and paint().

124 {
125 return d->diagrams;
126 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

302 KD Chart 2 Class Documentation

6.18.3.11 bool CartesianCoordinatePlane::doesIsometricScaling ()

Definition at line 356 of file KDChartCartesianCoordinatePlane.cpp.
References d.

357 {
358 return d->isometricScaling;
359 }

6.18.3.12 QRectF CartesianCoordinatePlane::drawingArea () const [protected, virtual]

Definition at line 250 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractArea::areaGeometry().
Referenced by layoutDiagrams(), and paint().

251 {
252 const QRect rect( areaGeometry() );
253 return QRectF ( rect.left()+1, rect.top()+1, rect.width() - 3, rect.height() - 3 );
254 }

6.18.3.13 Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections () const
[virtual, inherited]

pure virtual in QLayoutItem
Definition at line 200 of file KDChartAbstractCoordinatePlane.cpp.

201 {
202 return Qt::Vertical | Qt::Horizontal;
203 }

6.18.3.14 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited]

Definition at line 87 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::Legend::clone().

88 {
89 return d->frameAttributes;
90 }

6.18.3.15 QRect KDChart::AbstractCoordinatePlane::geometry () const [virtual,
inherited]

pure virtual in QLayoutItem
Definition at line 237 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::PolarCoordinatePlane::paint().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 303

238 {
239 return d->geometry;
240 }

6.18.3.16 DataDimensionsList CartesianCoordinatePlane::getDataDimensionsList () const
[protected, virtual]

Implements KDChart::AbstractCoordinatePlane.
Definition at line 201 of file KDChartCartesianCoordinatePlane.cpp.
References axesCalcModeX(), axesCalcModeY(), calculateRawDataBoundingRect(), KDChart::Data-
DimensionsList, KDChart::AbstractDiagram::datasetDimension(), KDChart::AbstractCoordinate-
Plane::diagrams(), gridAttributes(), KDChart::GridAttributes::gridGranularitySequence(), KDChart::Grid-
Attributes::gridStepWidth(), KDChart::GridAttributes::gridSubStepWidth(), and KDChart::Abstract-
Diagram::percentMode().

202 {
203
204 DataDimensionsList l;
205 const AbstractCartesianDiagram* dgr
206 = diagrams().isEmpty() ? 0 : dynamic_cast<const AbstractCartesianDiagram*> (diagrams().first()
207
208 if( dgr ){
209 const QRectF r( calculateRawDataBoundingRect() );
210 // note:
211 // We do *not* access d->gridAttributesHorizontal here, but
212 // we use the getter function, to get the global attrs, if no
213 // special ones have been set for the respective orientation.
214 const GridAttributes gaH( gridAttributes( Qt::Horizontal ) );
215 const GridAttributes gaV( gridAttributes( Qt::Vertical ) );
216 // append the first dimension: for Abscissa axes
217 l.append(
218 DataDimension(
219 r.left(), r.right(),
220 dgr->datasetDimension() > 1,
221 axesCalcModeX(),
222 gaH.gridGranularitySequence(),
223 gaH.gridStepWidth() ) );
224 // append the second dimension: for Ordinate axes
225 if( dgr->percentMode() )
226 l.append(
227 DataDimension(
228 // always return 0-100 when in percentMode
229 0.0, 100.0,
230 true,
231 axesCalcModeY(),
232 KDChartEnums::GranularitySequence_10_20,
233 10.0 ) );
234 else
235 l.append(
236 DataDimension(
237 r.bottom(), r.top(),
238 true,
239 axesCalcModeY(),
240 gaV.gridGranularitySequence(),
241 gaV.gridStepWidth(),
242 gaV.gridSubStepWidth() ) );
243 }else{
244 l.append( DataDimension() ); // This gets us the default 1..0 / 1..0 grid
245 l.append( DataDimension() ); // shown, if there is no diagram on this plane.
246 }
247 return l;
248 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

304 KD Chart 2 Class Documentation

6.18.3.17 GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes () const
[inherited]

Returns:
The grid attributes used by this coordinate plane.

See also:
setGlobalGridAttributes
CartesianCoordinatePlane::gridAttributes

Definition at line 157 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::PolarCoordinatePlane::gridAttributes(), and gridAttributes().

158 {
159 return d->gridAttributes;
160 }

6.18.3.18 GridAttributes KDChart::CartesianCoordinatePlane::gridAttributes (Qt::Orientation
orientation) const

Returns:
The attributes used for grid lines drawn in horizontal direction (or in vertical direction, resp.).

Note:
This function always returns a valid set of grid attributes: If no special grid attributes were set foe
this orientation the global attributes are returned, as returned by AbstractCoordinatePlane::globalGrid-
Attributes.

See also:
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 489 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::globalGridAttributes(), and hasOwnGridAttributes().
Referenced by getDataDimensionsList().

491 {
492 if( hasOwnGridAttributes( orientation ) ){
493 if( orientation == Qt::Horizontal )
494 return d->gridAttributesHorizontal;
495 else
496 return d->gridAttributesVertical;
497 }else{
498 return globalGridAttributes();
499 }
500 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 305

6.18.3.19 KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensions-
List () [inherited]

Returns the dimensions used for drawing the grid lines.
Returned data is the result of (cached) grid calculations, so - if you need that information for your own
tasks - make sure to call again this function after every data modification that has changed the data range,
since grid calculation is based upon the data range, thus the grid start/end might have changed if the data
was changed.

Note:
Returned list will contain different numbers of DataDimension, depending on the kind of coordinate
plane used. For CartesianCoordinatePlane two DataDimension are returned: the first representing
grid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (or
Ordinate axes, resp.).

Returns:
The dimensions used for drawing the grid lines.

See also:
DataDimension

Definition at line 162 of file KDChartAbstractCoordinatePlane.cpp.
References d, and KDChart::DataDimensionsList.
Referenced by layoutDiagrams(), KDChart::CartesianAxis::maximumSize(), and KDChart::Cartesian-
Axis::paintCtx().

163 {
164 return d->grid->updateData( this );
165 }

6.18.3.20 bool KDChart::CartesianCoordinatePlane::hasOwnGridAttributes (Qt::Orientation
orientation) const

Returns:
Returns whether the grid attributes have been set for the respective direction via setGridAttributes(
orientation ).

If false, the grid will use the global attributes set by AbstractCoordinatePlane::globalGridAttributes (or the
default attributes, resp.)

See also:
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes

Definition at line 512 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by gridAttributes().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

306 KD Chart 2 Class Documentation

514 {
515 return
516 ( orientation == Qt::Horizontal )
517 ? d->hasOwnGridAttributesHorizontal
518 : d->hasOwnGridAttributesVertical;
519 }

6.18.3.21 QPair< qreal, qreal > KDChart::CartesianCoordinatePlane::horizontalRange () const

Returns:
The largest and smallest visible horizontal value space value. If this is not explicitely set,or if both
values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.

See also:
KDChart::AbstractDiagram::dataBoundaries

Definition at line 459 of file KDChartCartesianCoordinatePlane.cpp.
References d.

460 {
461 return QPair<qreal, qreal>( d->horizontalMin, d->horizontalMax );
462 }

6.18.3.22 QRect AbstractAreaBase::innerRect () const [protected, inherited]

Definition at line 175 of file KDChartAbstractAreaBase.cpp.
References KDChart::AbstractAreaBase::areaGeometry(), and d.
Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), and
KDChart::AbstractArea::paintAll().

176 {
177 Q_ASSERT_X ( d != 0, "AbstractAreaBase::innerRect()",
178 "Private class was not initialized!" );
179
180 const int padding
181 = d->frameAttributes.isVisible()
182 ? qMax( d->frameAttributes.padding(), 0 ) : 0;
183 return
184 QRect( QPoint(0,0), areaGeometry().size() )
185 .adjusted( padding, padding, -padding, -padding );
186 }

6.18.3.23 bool KDChart::AbstractCoordinatePlane::isEmpty () const [virtual,
inherited]

pure virtual in QLayoutItem
Definition at line 193 of file KDChartAbstractCoordinatePlane.cpp.

194 {
195 return false; // never empty!
196 // coordinate planes with no associated diagrams
197 // are showing a default grid of ()1..10, 1..10) stepWidth 1
198 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

277 const DataDimension dimY = dimensions.top() ) ).last().y() * -diagramYUnitInCoordinatePlane ).start. qMax(dimY. 296 double scaleY. "CartesianCoordinatePlane::layoutDiagrams".count() == 2. 287 diagramArea. 279 const qreal distY = dimY.setBottomRight ( QPointF ( drawArea. 307 coordinateOrigin += diagramArea. 270 //qDebug() << "drawingArea() returns" << drawArea. and setVerticalRange(). 259 if ( diagrams().topLeft(). 257 { 258 //qDebug("KDChart::CartesianCoordinatePlane::layoutDiagrams() called"). 294 double planeHeight = diagramArea. Referenced by setHorizontalRange(). siz ). 269 const QRectF drawArea( drawingArea() ). 276 const DataDimension dimX = dimensions. virtual] Distribute the available space among the diagrams and axes. 271 272 const DataDimensionsList dimensions( gridDimensionsList() ). 293 double planeWidth = diagramArea. 295 double scaleX.height().18 KDChart::CartesianCoordinatePlane Class Reference 307 6. and use it as the diagram area: 285 QRectF diagramArea = drawArea.distance(). 291 double diagramWidth = dataBoundingRect. most clipping 267 // for regular pens should be avoided. this may not be sufficient. and KDChart::DataDimension::start. setIsometricScaling().height().3.width().setTopLeft ( QPointF ( drawArea. 299 double diagramYUnitInCoordinatePlane.6. KDChart::AbstractCoordinatePlane::gridDimensionsList(). 297 298 double diagramXUnitInCoordinatePlane.end). drawingArea().start.24 void CartesianCoordinatePlane::layoutDiagrams () [protected. 308 // calculate isometric scaling factor to maxscale the diagram into 309 // the coordinate system: Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 306 diagramTopLeft. 278 const qreal distX = dimX. KDChart::DataDimensionsList. 275 "Error: gridDimensionsList() did not return exactly two dimensions. 292 double diagramHeight = dataBoundingRect.bottom() ) ). dimY. Definition at line 256 of file KDChartCartesianCoordinatePlane.end)). 288 289 // determine coordinate transformation: 290 QPointF diagramTopLeft = dataBoundingRect. References d. 280 const QPointF pt(qMin(dimX. KDChart::DataDimension::end.topLeft().first(). 286 diagramArea. drawArea. 282 const QRectF dataBoundingRect( pt. KDChart::AbstractCoordinatePlane::diagrams(). Implements KDChart::AbstractCoordinatePlane.cpp.x() * -diagramXUnitInCoordinatePlane. 281 const QSizeF siz( qAbs(distX). This way. 283 284 // calculate the remaining rectangle." ).18. KDChart::DataDimension::distance().right(). 273 // test for programming errors: critical 274 Q_ASSERT_X ( dimensions. 300 301 diagramXUnitInCoordinatePlane = diagramWidth != 0 ? planeWidth / diagramWidth : 1.width(). 303 // calculate diagram origin in plane coordinates: 304 QPointF coordinateOrigin = QPointF ( 305 diagramTopLeft.isEmpty() ) 260 { // FIXME evaluate what can still be prepared 261 // FIXME decide default dimension if no diagrams are present (to make empty planes useable) 262 } 263 // the rectangle the diagrams cover in the *plane*: 264 // (Why -3? We save 1px on each side for the antialiased drawing. 302 diagramYUnitInCoordinatePlane = diagramHeight != 0 ? planeHeight / diagramHeight : 1. and 265 // respect the way QPainter calculates the width of a painted rect (the 266 // size is the rectangle size plus the pen width). -qAbs(distY) ). When pens with a penWidth or larger 268 // than 1 are used.distance(). dimX.left(). drawArea.

329 diagramArea. References d.308 KD Chart 2 Class Documentation 310 if ( d->isometricScaling ) 311 { 312 double scale = qMin ( qAbs ( diagramXUnitInCoordinatePlane ). 330 //qDebug("KDChart::CartesianCoordinatePlane::layoutDiagrams() done.0. so returning a default size here 211 // will not affect its real drawing size. 326 d->coordinateTransformation. 313 qAbs ( diagramYUnitInCoordinatePlane ) ).isoScaleX = scaleX. KDChart::AbstractCartesianDiagram::layoutPlanes(). 327 // adapt diagram area to effect of isometric scaling: 328 diagramArea.cpp.diagramRect = dataBoundingRect.setTopLeft( translate ( dataBoundingRect. 316 scaleY = qAbs( scale / diagramYUnitInCoordinatePlane ).3. Referenced by KDChart::AbstractCoordinatePlane::addDiagram().cpp.unitVectorY = diagramYUnitInCoordinatePlane. 324 d->coordinateTransformation.18.plane *will* 210 // have a parent widget. 258 } 6. 332 } 6. 331 update(). 317 } else { 318 scaleX = 1. Referenced by KDChart::AbstractCoordinatePlane::sizeHint(). 255 { 256 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called"). 206 { 207 if( d->parent ) 208 return d->parent->size().3. 322 d->coordinateTransformation.originTranslation = coordinateOrigin. 212 return QSize(1000. 323 d->coordinateTransformation.topLeft() ) ).isoScaleY = scaleY. and KDChart::AbstractCoordinate- Plane::replaceDiagram(). 319 scaleY = 1. References KDChart::AbstractCoordinatePlane::needLayoutPlanes(). 1000).\ncalling update() now:").0.unitVectorX = diagramXUnitInCoordinatePlane. KDChart::CartesianAxis::layout- Planes(). inherited] pure virtual in QLayoutItem Definition at line 205 of file KDChartAbstractCoordinatePlane. 209 // Note: At external layut calculation time the coord. 314 315 scaleX = qAbs( scale / diagramXUnitInCoordinatePlane ).setBottomRight ( translate ( dataBoundingRect. 213 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 254 of file KDChartAbstractCoordinatePlane.bottomRight() ) ).18.26 QSize KDChart::AbstractCoordinatePlane::maximumSize () const [virtual. 320 } 321 d->coordinateTransformation. 325 d->coordinateTransformation. 257 emit needLayoutPlanes().25 void KDChart::AbstractCoordinatePlane::layoutPlanes () [inherited] Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().

6. 6.3.18. 60). inherited] pure virtual in QLayoutItem Definition at line 215 of file KDChartAbstractCoordinatePlane.32 void CartesianCoordinatePlane::paint (QPainter ∗) [virtual] reimpl Implements KDChart::AbstractLayoutItem.18.31 void KDChart::AbstractCoordinatePlane::needUpdate () [inherited] Emitted when plane needs to update its drawings.27 QSize KDChart::AbstractCoordinatePlane::minimumSize () const [virtual.18.18. d.18 KDChart::CartesianCoordinatePlane Class Reference 309 6. 216 { 217 return QSize(60.cpp.3.30 void KDChart::AbstractCoordinatePlane::needRelayout () [inherited] Emitted when plane needs to trigger the Chart’s layouting. 143 } 6.3. KDChart::PaintContext::setPainter(). // this default can be overwritten by derived classes 218 } 6.18.3.3. 6. KDChart::PaintContext::setCoordinatePlane().3. KDChart::AbstractCoordinatePlane::diagrams(). Referenced by KDChart::AbstractCoordinatePlane::layoutPlanes(). 200 ).29 void KDChart::AbstractCoordinatePlane::needLayoutPlanes () [inherited] Emitted when plane needs to trigger the Chart’s layouting of the coord. and KDChart::PaintContext::setRectangle(). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .28 QSize KDChart::AbstractCoordinatePlane::minimumSizeHint () const [virtual. planes. References KDChart::AbstractDiagramList.18. drawingArea(). Referenced by KDChart::AbstractCoordinatePlane::relayout().cpp. Definition at line 95 of file KDChartCartesianCoordinatePlane. 141 { 142 return QSize( 200. inherited] [reimplemented] Definition at line 140 of file KDChartAbstractCoordinatePlane. 6.cpp.

143 } 144 145 // and disable clipping afterwards 146 painter->setClipping( false ). 99 if( d->bPaintIsRunning ){ 100 d->bNextPaintPending = true. i < diags.")."). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 155 } 6. 126 127 // paint the diagrams: 128 for ( int i = 0.310 KD Chart 2 Class Documentation 96 { 97 // prevent recursive call: 98 //qDebug("attempt plane::paint()"). 101 return. 123 124 // paint the coordinate system rulers: 125 d->grid->drawGrid( &ctx ). 152 } 153 d->bPaintIsRunning = false.18. 151 // painter->drawRect( drawArea ). 154 //qDebug("done: plane::paint()"). i++ ) 129 { 130 //qDebug(" attempt diags[i]->paint ( &ctx ). 114 ctx. 134 135 //if( ! d->bNextPaintPending ) 136 // qApp->processEvents( QEventLoop::ExcludeSocketNotifiers ). 118 119 // enabling clipping so that we’re not drawing outside 120 QRect clipRect = drawArea. 102 } 103 d->bNextPaintPending = false.3. 115 ctx.2.setPainter ( painter ).setCoordinatePlane ( this ). 105 106 //qDebug("start plane::paint()"). 116 const QRectF drawArea( drawingArea() ). 147 148 //for debugging: 149 // painter->drawRect( drawArea.adjusted( -1."). 1. 117 ctx.setRectangle ( drawArea ).size(). 139 PainterSaver painterSaver( painter ).2. 122 painter->setClipRegion( clipRegion ). 121 QRegion clipRegion( clipRect ).adjusted(4.4) ).4.2) ).33 void AbstractArea::paintAll (QPainter & painter) [inherited] Call paintAll. 140 diags[i]->paint ( &ctx ).toRect(). 137 //if( ! d->bNextPaintPending ){ 138 //qDebug(" start diags[i]->paint ( &ctx ). 1 ). 109 //FIXME(khz): make this also work in no diagrams are there 110 // (commenting out the following line should do it) 111 if ( !diags. 141 //} 142 //qDebug(" done: diags[i]->paint ( &ctx ). 131 132 //if ( qApp->hasPendingEvents () ) 133 // continue.4. 107 108 AbstractDiagramList diags = diagrams(). 104 d->bPaintIsRunning = true. -1.isEmpty() ) 112 { 113 PaintContext ctx.adjusted(2. 150 // painter->drawRect( drawArea. if you want the background and the frame to be drawn before the normal paint() is invoked automatically.

"AbstractAreaBase::paintBackground()". Referenced by KDChart::Chart::paint().pixmapMode() ) 126 { 127 ol. 116 const QPointF newTopLeft( painter. 93 inner. 99 paint( &painter ).setBrushOrigin( newTopLeft ). 88 89 // temporarily adjust the widget size.moveTo( 94 oldGeometry. 117 painter.". 97 if( needAdjustGeometry ) 98 setGeometry( inner ). KDChart::AbstractLayoutItem::paint().top() ).brush() ). inherited] Definition at line 103 of file KDChartAbstractAreaBase. geometry() ). 106 "Private class was not initialized!" ).isVisible() ) return. and KDChart::AbstractArea::paintAll().map( rect.top() + inner.6.18. 118 painter. References KDChart::AbstractArea::areaGeometry().topLeft(). KDChart::AbstractAreaWidget::paintAll(). KDChart::AbstractAreaBase::paintBackground(). and KDChart::AbstractAreaBase::paintFrame(). References attributes. to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ).setBrush( attributes.3.deviceMatrix(). and d.isNull() && 123 attributes.34 void AbstractAreaBase::paintBackground (QPainter & painter.width() / 2 ).setX( rect. geometry() ).style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).cpp. 84 { 85 // Paint the background and frame 86 paintBackground( painter. and KDChart::AbstractArea::paintIntoRect(). 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes.topLeft() ) ).attributes. 102 //qDebug() << "AbstractAreaWidget::paintAll() done.drawRect( rect ).18 KDChart::CartesianCoordinatePlane Class Reference 311 Definition at line 83 of file KDChartAbstractArea. 92 QRect inner( innerRect() ). 96 const bool needAdjustGeometry = oldGeometry != inner. 115 painter. 87 paintFrame( painter. 95 oldGeometry. Referenced by KDChart::TextArea::paintAll().left().pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.left() + inner.pixmap().brush(). 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 119 painter. 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes. 103 } 6.cpp. const QRect & rectangle) [virtual. KDChart::AbstractAreaBase::innerRect().x() .pixmap(). 104 { 105 Q_ASSERT_X ( d != 0. 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ). 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.setPen( Qt::NoPen ).center().

312 KD Chart 2 Class Documentation

128 ol.setY( rect.center().y() - attributes.pixmap().height()/ 2 );
129 painter.drawPixmap( ol, attributes.pixmap() );
130 } else {
131 QMatrix m;
132 double zW = (double)rect.width() / (double)attributes.pixmap().width();
133 double zH = (double)rect.height() / (double)attributes.pixmap().height();
134 switch( attributes.pixmapMode() ) {
135 case BackgroundAttributes::BackgroundPixmapModeScaled:
136 {
137 double z;
138 z = qMin( zW, zH );
139 m.scale( z, z );
140 }
141 break;
142 case BackgroundAttributes::BackgroundPixmapModeStretched:
143 m.scale( zW, zH );
144 break;
145 default:
146 ; // Cannot happen, previously checked
147 }
148 QPixmap pm = attributes.pixmap().transformed( m );
149 ol.setX( rect.center().x() - pm.width() / 2 );
150 ol.setY( rect.center().y() - pm.height()/ 2 );
151 painter.drawPixmap( ol, pm );
152 }
153 }
154 #undef attributes
155 }

6.18.3.35 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual,
inherited]

Default impl: Paint the complete item using its layouted position and size.
Reimplemented in KDChart::CartesianAxis.
Definition at line 64 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().

65 {
66 if( context )
67 paint( context->painter() );
68 }

6.18.3.36 void KDChart::CartesianCoordinatePlane::paintEvent (QPaintEvent ∗)
[protected]

6.18.3.37 void AbstractAreaBase::paintFrame (QPainter & painter, const QRect & rectangle)
[virtual, inherited]

Definition at line 158 of file KDChartAbstractAreaBase.cpp.
References attributes, and d.
Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), and
KDChart::AbstractArea::paintAll().

159 {
160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 313

161 "Private class was not initialized!" );
162
163 #define attributes d->frameAttributes
164
165 if( !attributes.isVisible() ) return;
166
167 const QPen oldPen( painter.pen() );
168 painter.setPen( attributes.pen() );
169 painter.drawRect( rect );
170 painter.setPen( oldPen );
171 #undef attributes
172 }

6.18.3.38 void AbstractArea::paintIntoRect (QPainter & painter, const QRect & rect)
[virtual, inherited]

Draws the background and frame, then calls paint().
In most cases there is no need to overwrite this method in a derived class, but you would overwrite Abstract-
LayoutItem::paint() instead.
Definition at line 71 of file KDChartAbstractArea.cpp.
References KDChart::AbstractArea::paintAll().

72 {
73 const QRect oldGeometry( geometry() );
74 if( oldGeometry != rect )
75 setGeometry( rect );
76 painter.translate( rect.left(), rect.top() );
77 paintAll( painter );
78 painter.translate( -rect.left(), -rect.top() );
79 if( oldGeometry != rect )
80 setGeometry( oldGeometry );
81 }

6.18.3.39 const KDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () const
[inherited]

Definition at line 182 of file KDChartAbstractCoordinatePlane.cpp.
References d.

183 {
184 return d->parent;
185 }

6.18.3.40 KDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () [inherited]

Definition at line 187 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

188 {
189 return d->parent;
190 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

314 KD Chart 2 Class Documentation

6.18.3.41 void AbstractArea::positionHasChanged () [protected, virtual,
inherited]

Reimplemented from KDChart::AbstractAreaBase.
Definition at line 110 of file KDChartAbstractArea.cpp.

111 {
112 emit positionChanged( this );
113 }

6.18.3.42 void KDChart::AbstractCoordinatePlane::propertiesChanged () [inherited]

Emitted upon change of a property of the Coordinate Plane or any of its components.
Referenced by addDiagram(), setAxesCalcModes(), setAxesCalcModeX(), setAxesCalcModeY(),
KDChart::PolarCoordinatePlane::setGridAttributes(), setGridAttributes(), setHorizontalRange(), set-
IsometricScaling(), setVerticalRange(), setZoomCenter(), setZoomFactorX(), and setZoomFactorY().

6.18.3.43 AbstractCoordinatePlane ∗ KDChart::AbstractCoordinatePlane::referenceCoordinate-
Plane () const [inherited]

There are two ways, in which planes can be caused to interact, in where they are put layouting wise: The
first is the reference plane.
If such a reference plane is set, on a plane, it will use the same cell in the layout as that one. In addition
to this, planes can share an axis. In that case they will be layed out in relation to each other as suggested
by the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will result
in the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2’s reference plane, both
planes are drawn over each other. The reference plane concept allows two planes to share the same space
even if neither has any axis, and in case there are shared axis, it is used to decided, whether the planes
should be painted on top of each other or layed out vertically or horizontally next to each other.

Returns:
The reference coordinate plane associated with this one.

Definition at line 172 of file KDChartAbstractCoordinatePlane.cpp.
References d.

173 {
174 return d->referenceCoordinatePlane;
175 }

6.18.3.44 void KDChart::AbstractCoordinatePlane::relayout () [inherited]

Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout().
Definition at line 248 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::needRelayout().

249 {
250 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");
251 emit needRelayout();
252 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 315

6.18.3.45 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited]

Definition at line 66 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::takeCoordinatePlane().

67 {
68 if( mParentLayout ){
69 if( widget() )
70 mParentLayout->removeWidget( widget() );
71 else
72 mParentLayout->removeItem( this );
73 }
74 }

6.18.3.46 void AbstractCoordinatePlane::replaceDiagram (AbstractDiagram ∗ diagram,
AbstractDiagram ∗ oldDiagram = 0) [virtual, inherited]

Replaces the old diagram, or appends the diagram, it there is none yet.

Parameters:
diagram The diagram to be used instead of the old diagram. This parameter must not be zero, or the
method will do nothing.
oldDiagram The diagram to be removed by the new diagram. This diagram will be deleted automat-
ically. If the parameter is omitted, the very first diagram will be replaced. In case, there was no
diagram yet, the new diagram will just be added.

Note:
If you want to re-use the old diagram, call takeDiagram and addDiagram, instead of using replace-
Diagram.

See also:
addDiagram, takeDiagram

Definition at line 82 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::addDiagram(), d, KDChart::AbstractCoordinate-
Plane::layoutDiagrams(), KDChart::AbstractCoordinatePlane::layoutPlanes(), and KDChart::Abstract-
CoordinatePlane::takeDiagram().

83 {
84 if( diagram && oldDiagram_ != diagram ){
85 AbstractDiagram* oldDiagram = oldDiagram_;
86 if( d->diagrams.count() ){
87 if( ! oldDiagram )
88 oldDiagram = d->diagrams.first();
89 takeDiagram( oldDiagram );
90 }
91 delete oldDiagram;
92 addDiagram( diagram );
93 layoutDiagrams();
94 layoutPlanes(); // there might be new axes, etc
95 update();
96 }
97 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

316 KD Chart 2 Class Documentation

6.18.3.47 void KDChart::CartesianCoordinatePlane::resetGridAttributes (Qt::Orientation
orientation)

Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.).
By calling this method you specify that the global attributes set by AbstractCoordinatePlane::setGlobal-
GridAttributes be used.

See also:
setGridAttributes, gridAttributes
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 482 of file KDChartCartesianCoordinatePlane.cpp.

484 {
485 setHasOwnGridAttributes( orientation, false );
486 update();
487 }

6.18.3.48 void CartesianCoordinatePlane::setAxesCalcModes (AxesCalcMode mode)

Specifies the calculation modes for all axes.
Definition at line 413 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

414 {
415 if( d->coordinateTransformation.axesCalcModeY != mode ||
416 d->coordinateTransformation.axesCalcModeX != mode ){
417 d->coordinateTransformation.axesCalcModeY = mode;
418 d->coordinateTransformation.axesCalcModeX = mode;
419 emit propertiesChanged();
420 }
421 }

6.18.3.49 void CartesianCoordinatePlane::setAxesCalcModeX (AxesCalcMode mode)

Specifies the calculation mode for all Abscissa axes.
Definition at line 431 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

432 {
433 if( d->coordinateTransformation.axesCalcModeX != mode ){
434 d->coordinateTransformation.axesCalcModeX = mode;
435 emit propertiesChanged();
436 }
437 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 317

6.18.3.50 void CartesianCoordinatePlane::setAxesCalcModeY (AxesCalcMode mode)

Specifies the calculation mode for all Ordinate axes.
Definition at line 423 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

424 {
425 if( d->coordinateTransformation.axesCalcModeY != mode ){
426 d->coordinateTransformation.axesCalcModeY = mode;
427 emit propertiesChanged();
428 }
429 }

6.18.3.51 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a)
[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.
References d.

93 {
94 d->backgroundAttributes = a;
95 }

6.18.3.52 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a)
[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::Legend::clone().

83 {
84 d->frameAttributes = a;
85 }

6.18.3.53 void KDChart::AbstractCoordinatePlane::setGeometry (const QRect & r)
[virtual, inherited]

pure virtual in QLayoutItem

Note:
Do not call this function directly, unless you know exactly what you are doing. Geometry management
is done by KD Chart’s internal layouting measures.

Definition at line 227 of file KDChartAbstractCoordinatePlane.cpp.
References d.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

318 KD Chart 2 Class Documentation

228 {
229 // qDebug() << "KDChart::AbstractCoordinatePlane::setGeometry(" << r << ") called";
230 if( d->geometry != r ){
231 d->geometry = r;
232 // Note: We do *not* call update() here
233 // because it would invoke KDChart::update() recursively.
234 }
235 }

6.18.3.54 void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes (const
GridAttributes &) [inherited]

Set the grid attributes to be used by this coordinate plane.
To disable grid painting, for example, your code should like this:

GridAttributes ga = plane->globalGridAttributes();
ga.setGlobalGridVisible( false );
plane->setGlobalGridAttributes( ga );

See also:
globalGridAttributes
CartesianCoordinatePlane::setGridAttributes

Definition at line 151 of file KDChartAbstractCoordinatePlane.cpp.
References d.

152 {
153 d->gridAttributes = a;
154 update();
155 }

6.18.3.55 void KDChart::CartesianCoordinatePlane::setGridAttributes (Qt::Orientation
orientation, const GridAttributes &)

Set the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.).
To disable horizontal grid painting, for example, your code should like this:

GridAttributes ga = plane->gridAttributes( Qt::Horizontal );
ga.setGridVisible( false );
plane-setGridAttributes( Qt::Horizontal, ga );

Note:
setGridAttributes overwrites the global attributes that were set by AbstractCoordinatePlane::setGlobal-
GridAttributes. To re-activate these global attributes you can call resetGridAttributes.

See also:
resetGridAttributes, gridAttributes
AbstractCoordinatePlane::setGlobalGridAttributes
hasOwnGridAttributes

Definition at line 469 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 319

472 {
473 if( orientation == Qt::Horizontal )
474 d->gridAttributesHorizontal = a;
475 else
476 d->gridAttributesVertical = a;
477 setHasOwnGridAttributes( orientation, true );
478 update();
479 emit propertiesChanged();
480 }

6.18.3.56 void KDChart::CartesianCoordinatePlane::setHorizontalRange (const QPair< qreal,
qreal > &)

Allows setting the boundaries of the visible value space area that the plane displays in horizontal direction.
The horizontal viewport. To disable use of this range, set both values to the same thing, which constiutes a
null range.

Parameters:
A pair of values representing the smalles and the largest horizontal value space coordinate that are still
visible.

Definition at line 439 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

440 {
441 if ( d->horizontalMin != range.first || d->horizontalMax != range.second ) {
442 d->horizontalMin = range.first;
443 d->horizontalMax = range.second;
444 layoutDiagrams();
445 emit propertiesChanged();
446 }
447 }

6.18.3.57 void CartesianCoordinatePlane::setIsometricScaling (bool onOff)

Definition at line 346 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

347 {
348 if ( d->isometricScaling != onOff )
349 {
350 d->isometricScaling = onOff;
351 layoutDiagrams();
352 emit propertiesChanged();
353 }
354 }

6.18.3.58 void KDChart::AbstractCoordinatePlane::setParent (Chart ∗ parent) [inherited]

Called internally by KDChart::Chart.
Definition at line 177 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Chart::addCoordinatePlane(), and KDChart::Chart::takeCoordinatePlane().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

320 KD Chart 2 Class Documentation

178 {
179 d->parent = parent;
180 }

6.18.3.59 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited]

Definition at line 62 of file KDChartLayoutItems.h.

63 {
64 mParentLayout = lay;
65 }

6.18.3.60 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget)
[virtual, inherited]

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the size
of the item’s contents has changed.
Thus, you need to call setParentWidget on every item, that has a non-fixed size.
Definition at line 56 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::Legend::buildLegend(), and KDChart::AbstractCartesianDiagram::takeAxis().

57 {
58 mParent = widget;
59 }

6.18.3.61 void KDChart::AbstractCoordinatePlane::setReferenceCoordinatePlane
(AbstractCoordinatePlane ∗ plane) [inherited]

Set another coordinate plane to be used as the reference plane for this one.

Parameters:
plane The coordinate plane to be used the reference plane for this one.

See also:
referenceCoordinatePlane

Definition at line 167 of file KDChartAbstractCoordinatePlane.cpp.
References d.

168 {
169 d->referenceCoordinatePlane = plane;
170 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 321

6.18.3.62 void KDChart::CartesianCoordinatePlane::setVerticalRange (const QPair< qreal, qreal
> &)

Allows setting the boundaries of the visible value space area that the plane displays in vertical direction.
The vertical viewport. To disable use of this range, set both values to the same thing, which constiutes a
null range.

Parameters:
A pair of values representing the smalles and the largest vertical value space coordinate that are still
visible.

Definition at line 449 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

450 {
451 if ( d->verticalMin != range.first || d->verticalMax != range.second ) {
452 d->verticalMin = range.first;
453 d->verticalMax = range.second;
454 layoutDiagrams();
455 emit propertiesChanged();
456 }
457 }

6.18.3.63 void CartesianCoordinatePlane::setZoomCenter (QPointF center) [virtual]

Set the point (in value coordinates) to be used as the center point in zoom operations.

Parameters:
center The point to use.

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 377 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

378 {
379 if( d->coordinateTransformation.zoom.xCenter != center.x() ||
380 d->coordinateTransformation.zoom.yCenter != center.y() ){
381 d->coordinateTransformation.zoom.xCenter = center.x();
382 d->coordinateTransformation.zoom.yCenter = center.y();
383 emit propertiesChanged();
384 }
385 }

6.18.3.64 void CartesianCoordinatePlane::setZoomFactorX (double factor) [virtual]

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 361 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

322 KD Chart 2 Class Documentation

362 {
363 if( d->coordinateTransformation.zoom.xFactor != factor ){
364 d->coordinateTransformation.zoom.xFactor = factor;
365 emit propertiesChanged();
366 }
367 }

6.18.3.65 void CartesianCoordinatePlane::setZoomFactorY (double factor) [virtual]

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 369 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

370 {
371 if( d->coordinateTransformation.zoom.yFactor != factor ){
372 d->coordinateTransformation.zoom.yFactor = factor;
373 emit propertiesChanged();
374 }
375 }

6.18.3.66 QSize KDChart::AbstractCoordinatePlane::sizeHint () const [virtual,
inherited]

pure virtual in QLayoutItem
Definition at line 220 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::maximumSize().

221 {
222 // we return our maxiumu (which is the full size of the Chart)
223 // even if we know the plane will be smaller
224 return maximumSize();
225 }

6.18.3.67 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual,
inherited]

Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 73 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextLayoutItem::sizeHint().

74 {
75 // This is exactly like what QWidget::updateGeometry does.
76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called");
77 if( mParent ) {
78 if ( mParent->layout() )
79 mParent->layout()->invalidate();
80 else
81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );
82 }
83 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 323

6.18.3.68 QSizePolicy KDChart::AbstractCoordinatePlane::sizePolicy () const [virtual,
inherited]

[reimplemented]
Definition at line 146 of file KDChartAbstractCoordinatePlane.cpp.

147 {
148 return QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
149 }

6.18.3.69 void AbstractCoordinatePlane::takeDiagram (AbstractDiagram ∗ diagram)
[virtual, inherited]

Removes the diagram from the plane, without deleting it.
The plane no longer owns the diagram, so it is the caller’s responsibility to delete the diagram.

See also:
addDiagram, replaceDiagram

Definition at line 100 of file KDChartAbstractCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::layoutDiagrams(), and KDChart::Abstract-
Diagram::setCoordinatePlane().
Referenced by KDChart::AbstractCoordinatePlane::replaceDiagram().

101 {
102 const int idx = d->diagrams.indexOf( diagram );
103 if( idx != -1 ){
104 d->diagrams.removeAt( idx );
105 diagram->setParent( 0 );
106 diagram->setCoordinatePlane( 0 );
107 layoutDiagrams();
108 update();
109 }
110 }

6.18.3.70 const QPointF CartesianCoordinatePlane::translate (const QPointF & diagramPoint)
const [virtual]

Translate the given point in value space coordinates to a position in pixel space.

Parameters:
diagramPoint The point in value coordinates.

Returns:
The translated point.

Implements KDChart::AbstractCoordinatePlane.
Definition at line 334 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by KDChart::CartesianAxis::paintCtx().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

324 KD Chart 2 Class Documentation

335 {
336 // i had to disable the assertion, because it fails for diagramPoint’s
337 // directly on the edge of the diagramRect. i guess it can be replaced by
338 // manually comparing he coordinates, but be aware of the fact that the
339 // user coordinate system may be directed in any way the user choses!
340 // Q_ASSERT_X ( d->coordinateTransformation.diagramRect.contains ( diagramPoint ),
341 // "CartesianCoordinatePlane::translate", "Diagram point has to be inside "
342 // "user-supplied diagram rectangle." );
343 return d->coordinateTransformation.translate ( diagramPoint );
344 }

6.18.3.71 QPair< qreal, qreal > KDChart::CartesianCoordinatePlane::verticalRange () const

Returns:
The largest and smallest visible horizontal value space value. If this is not explicitely set, or if both
values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.

See also:
KDChart::AbstractDiagram::dataBoundaries

Definition at line 464 of file KDChartCartesianCoordinatePlane.cpp.
References d.

465 {
466 return QPair<qreal, qreal>( d->verticalMin, d->verticalMax );
467 }

6.18.3.72 QPointF CartesianCoordinatePlane::zoomCenter () const [virtual]

Returns:
The center point (in value coordinates) of the coordinate plane, that is used for zoom operations.

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 387 of file KDChartCartesianCoordinatePlane.cpp.
References d.

388 {
389 return QPointF( d->coordinateTransformation.zoom.xCenter,
390 d->coordinateTransformation.zoom.yCenter );
391 }

6.18.3.73 double CartesianCoordinatePlane::zoomFactorX () const [virtual]

Returns:
The zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 393 of file KDChartCartesianCoordinatePlane.cpp.
References d.

394 {
395 return d->coordinateTransformation.zoom.xFactor;
396 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.18 KDChart::CartesianCoordinatePlane Class Reference 325

6.18.3.74 double CartesianCoordinatePlane::zoomFactorY () const [virtual]

Returns:
The zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 398 of file KDChartCartesianCoordinatePlane.cpp.
References d.

399 {
400 return d->coordinateTransformation.zoom.yFactor;
401 }

6.18.4 Member Data Documentation

6.18.4.1 Q_SIGNALS KDChart::AbstractCoordinatePlane::__pad0__ [inherited]

Reimplemented from KDChart::AbstractArea.
Definition at line 284 of file KDChartAbstractCoordinatePlane.h.

6.18.4.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.
Referenced by KDChart::AbstractLayoutItem::setParentWidget().

6.18.4.3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,
inherited]

Definition at line 77 of file KDChartLayoutItems.h.

6.18.4.4 protected KDChart::CartesianCoordinatePlane::Q_SLOTS [protected]

Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 197 of file KDChartCartesianCoordinatePlane.h.
The documentation for this class was generated from the following files:

• KDChartCartesianCoordinatePlane.h
• KDChartCartesianCoordinatePlane.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

326 KD Chart 2 Class Documentation

6.19 KDChart::Chart Class Reference
#include <KDChartChart.h>
Inheritance diagram for KDChart::Chart:Collaboration diagram for KDChart::Chart:

6.19.1 Detailed Description

A chart with one or more diagrams.
The Chart class represents a drawing consisting of one or more diagrams and various optional elements
such as legends, axes, text boxes, headers or footers. It takes ownership of all these elements when they are
assigned to it. Each diagram is associated with a coordinate plane, of which the chart can have more than
one. The coordinate planes (and thus the associated diagrams) can be layed out in various ways.
The Chart class makes heavy use of the Qt Interview framework for model/view programming, and thus
requires data to be presented to it in a QAbstractItemModel compatible way. For many simple charts,
especially if the visualized data is static, KDChart::Widget provides an abstracted interface, that hides the
complexity of Interview to a large extent.
Definition at line 61 of file KDChartChart.h.

Public Member Functions
• void addCoordinatePlane (AbstractCoordinatePlane ∗plane)
Adds a coordinate plane to the chart.

• void addHeaderFooter (HeaderFooter ∗headerFooter)
Adds a header or a footer to the chart.

• void addLegend (Legend ∗legend)
Add the given legend to the chart.

• Chart (QWidget ∗parent=0)
• AbstractCoordinatePlane ∗ coordinatePlane ()
Each chart must have at least one coordinate plane.

• CoordinatePlaneList coordinatePlanes ()
The list of coordinate planes.

• int globalLeadingBottom () const
The padding between the start of the widget and the start of the area that is used for drawing at the bottom.

• int globalLeadingLeft () const
The padding between the start of the widget and the start of the area that is used for drawing on the left.

• int globalLeadingRight () const
The padding between the start of the widget and the start of the area that is used for drawing on the right.

• int globalLeadingTop () const
The padding between the start of the widget and the start of the area that is used for drawing at the top.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.19 KDChart::Chart Class Reference 327

• HeaderFooter ∗ headerFooter ()
The first header or footer of the chart.

• HeaderFooterList headerFooters ()
The list of headers and footers associated with the chart.

• Legend ∗ legend ()
The first legend of the chart or 0 if there was none added to the chart.

• LegendList legends ()
The list of all legends associated with the chart.

• void paint (QPainter ∗painter, const QRect &target)
Paints all the contents of the chart.

• void replaceCoordinatePlane (AbstractCoordinatePlane ∗plane, AbstractCoordinatePlane ∗old-
Plane=0)
Replaces the old coordinate plane, or appends the plane, it there is none yet.

• void replaceHeaderFooter (HeaderFooter ∗headerFooter, HeaderFooter ∗oldHeaderFooter=0)
Replaces the old header (or footer, resp.), or appends the new header or footer, it there is none yet.

• void replaceLegend (Legend ∗legend, Legend ∗oldLegend=0)
Replaces the old legend, or appends the new legend, it there is none yet.

• void setCoordinatePlaneLayout (QLayout ∗layout)
• void setGlobalLeading (int left, int top, int right, int bottom)
Set the padding between the margin of the widget and the area that the contents are drawn into.

• void setGlobalLeadingBottom (int leading)
Set the padding between the start of the widget and the start of the area that is used for drawing on the
bottom.

• void setGlobalLeadingLeft (int leading)
Set the padding between the start of the widget and the start of the area that is used for drawing on the left.

• void setGlobalLeadingRight (int leading)
Set the padding between the start of the widget and the start of the area that is used for drawing on the right.

• void setGlobalLeadingTop (int leading)
Set the padding between the start of the widget and the start of the area that is used for drawing at the top.

• void takeCoordinatePlane (AbstractCoordinatePlane ∗plane)
Removes the coordinate plane from the chart, without deleting it.

• void takeHeaderFooter (HeaderFooter ∗headerFooter)
Removes the header (or footer, resp.) from the chart, without deleting it.

• void takeLegend (Legend ∗legend)
Removes the legend from the chart, without deleting it.

• ∼Chart ()

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

328 KD Chart 2 Class Documentation

Public Attributes
• Q_SIGNALS __pad0__: void propertiesChanged()

Protected Member Functions
• void paintEvent (QPaintEvent ∗event)
Draws the background and frame, then calls paint().

• void resizeEvent (QResizeEvent ∗event)
Adjusts the internal layout when the chart is resized.

6.19.2 Constructor & Destructor Documentation

6.19.2.1 Chart::Chart (QWidget ∗ parent = 0) [explicit]

Definition at line 550 of file KDChartChart.cpp.
References addCoordinatePlane().

551 : QWidget ( parent )
552 , _d( new Private( this ) )
553 {
554 #if defined KDAB_EVAL
555 EvalDialog::checkEvalLicense( "KD Chart" );
556 #endif
557
558 addCoordinatePlane( new CartesianCoordinatePlane ( this ) );
559 }

6.19.2.2 Chart::∼Chart ()

Definition at line 561 of file KDChartChart.cpp.

562 {
563 delete _d;
564 }

6.19.3 Member Function Documentation

6.19.3.1 void Chart::addCoordinatePlane (AbstractCoordinatePlane ∗ plane)

Adds a coordinate plane to the chart.
The chart takes ownership.

Parameters:
plane The coordinate plane to add.

See also:
replaceCoordinatePlane, takeCoordinatePlane

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

See also: replaceLegend. 770 } 6. SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ). and KDChart::AbstractCoordinatePlane::setParent().this. d.append( plane ). Referenced by replaceHeaderFooter().append( headerFooter ). this. 769 d->slotRelayout(). References d. Parameters: legend The legend to add.cpp.) to add. SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) ). 591 connect( plane. 585 { 586 connect( plane. SIGNAL( destroyedHeaderFooter( HeaderFooter* ) ). and KDChart::HeaderFooter::setParent(). Parameters: headerFooter The header (or footer. 767 connect( headerFooter. SLOT( slotUnregisterDestroyedHeaderFooter( HeaderFooter* ) ) ). SIGNAL( propertiesChanged() ). takeHeaderFooter Definition at line 761 of file KDChartChart.19.3. SLOT( update() ) ). SIGNAL( needUpdate() ). resp. takeLegend Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6. 590 connect( plane. 765 connect( headerFooter. 595 } 6. 593 plane->setParent( this ). SLOT( slotLayoutPlanes() ) ) .19.2 void Chart::addHeaderFooter (HeaderFooter ∗ headerFooter) Adds a header or a footer to the chart. and replaceCoordinatePlane(). 589 connect( plane. References d. 766 d. 594 d->slotLayoutPlanes(). The chart takes ownership. SIGNAL( positionChanged( HeaderFooter* ) ). SLOT( slotRelayout() ) ) .3 void Chart::addLegend (Legend ∗ legend) Add the given legend to the chart. SIGNAL( propertiesChanged() ) ). 588 connect( plane. d.19 KDChart::Chart Class Reference 329 Definition at line 584 of file KDChartChart.cpp.3. SIGNAL( needRelayout() ). 592 d->coordinatePlanes. 587 d. The chart takes ownership. SIGNAL( needLayoutPlanes() ). Referenced by Chart(). 764 headerFooter->setParent( this ). 768 d. SLOT( slotRelayout() ) ). 762 { 763 d->headerFooters. See also: replaceHeaderFooter.

821 connect( legend. 582 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Initially a default CartesianCoordinatePlane is created.first(). Returns: The list of coordinate planes. SIGNAL( destroyedLegend( Legend* ) ).19. 569 { 570 if ( d->coordinatePlanes. SIGNAL( propertiesChanged() ) ).3. 817 connect( legend.isEmpty() ) 571 { 572 qWarning() << "Chart::coordinatePlane: warning: no coordinate plane defined. Referenced by replaceLegend(). 814 { 815 d->legends. Use replaceCoordinatePlane() to replace it with a different one.330 KD Chart 2 Class Documentation Definition at line 813 of file KDChartChart.this. References KDChart::CoordinatePlaneList. 576 } 577 } 6. 574 } else { 575 return d->coordinatePlanes. SLOT( slotLayoutPlanes() ) ).cpp.".3. 819 connect( legend. Returns: The first coordinate plane of the chart. //slotRelayout() ) ). Definition at line 579 of file KDChartChart. References d. 573 return 0. 580 { 581 return d->coordinatePlanes. 818 d. Definition at line 568 of file KDChartChart. such as a PolarCoordinatePlane.cpp.5 CoordinatePlaneList Chart::coordinatePlanes () The list of coordinate planes. 822 d->slotRelayout().19.append( legend ). SLOT( slotUnregisterDestroyedLegend( Legend* ) ) ). SIGNAL( propertiesChanged() ).cpp. 820 d. and d. 823 } 6. 816 legend->setParent( this ). SIGNAL( positionChanged( AbstractAreaWidget* ) ).4 AbstractCoordinatePlane ∗ Chart::coordinatePlane () Each chart must have at least one coordinate plane. References d.

7 int Chart::globalLeadingLeft () const The padding between the start of the widget and the start of the area that is used for drawing on the left. 641 { 642 return d->globalLeadingLeft.3.6. 676 } 6.cpp.8 int Chart::globalLeadingRight () const The padding between the start of the widget and the start of the area that is used for drawing on the right.19. 674 { 675 return d->globalLeadingBottom. See also: setGlobalLeading Definition at line 640 of file KDChartChart.cpp. References d. 663 { 664 return d->globalLeadingRight. Returns: The padding between the start of the widget and the start of the area that is used for drawing on the left. See also: setGlobalLeading Definition at line 673 of file KDChartChart.19. 643 } 6.19.3. Returns: The padding between the start of the widget and the start of the area that is used for drawing at the bottom.3.19 KDChart::Chart Class Reference 331 6. Returns: The padding between the start of the widget and the start of the area that is used for drawing on the right.6 int Chart::globalLeadingBottom () const The padding between the start of the widget and the start of the area that is used for drawing at the bottom. References d. See also: setGlobalLeading Definition at line 662 of file KDChartChart.cpp. References d. 665 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

isEmpty() ) { 802 return 0. Definition at line 808 of file KDChartChart. 805 } 806 } 6.3. 800 { 801 if( d->headerFooters. Returns: The first header or footer of the chart or 0 if there was none added to the chart.cpp. Returns: The padding between the start of the widget and the start of the area that is used for drawing at the top.19. Definition at line 799 of file KDChartChart.3. Returns: The list of headers and footers associated with the chart. 811 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References d. 809 { 810 return d->headerFooters.11 HeaderFooterList Chart::headerFooters () The list of headers and footers associated with the chart. 803 } else { 804 return d->headerFooters. See also: setGlobalLeading Definition at line 651 of file KDChartChart. References d.3.10 HeaderFooter ∗ Chart::headerFooter () The first header or footer of the chart.9 int Chart::globalLeadingTop () const The padding between the start of the widget and the start of the area that is used for drawing at the top.19.19. 652 { 653 return d->globalLeadingTop.332 KD Chart 2 Class Documentation 6.first(). By default there is none.cpp. and KDChart::HeaderFooterList. 654 } 6.cpp. References d.

Returns: The list of all legends associated with the chart. 862 { 863 return d->legends. Returns: The first legend of the chart or 0 if none exists. References d.12 Legend ∗ Chart::legend () The first legend of the chart or 0 if there was none added to the chart.19.isEmpty() ) 854 { 855 return 0.cpp. Definition at line 851 of file KDChartChart.19 KDChart::Chart Class Reference 333 6.3. Use this method. target The rectangle to be filled by the Chart’s drawing.6. Note: Any global leading settings will be used by the paint method too.19.13 LegendList Chart::legends () The list of all legends associated with the chart. so make sure to set them to zero. 852 { 853 if ( d->legends. Definition at line 861 of file KDChartChart.3. to make KD Chart draw into your QPainter.cpp. Parameters: painter The painter to be drawn into. See also: setGlobalLeading Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and KDChart::LegendList. Referenced by paint().3. 856 } else { 857 return d->legends. 858 } 859 } 6.first().14 void Chart::paint (QPainter ∗ painter. if you want the drawing to have the exact size of the target rectangle. 864 } 6. const QRect & target) Paints all the contents of the chart. References d.19.

727 legend->paintAll( *painter ). 703 painter->drawRect( target ). d->planeLayoutItems ) { 714 planeLayoutItem->paintAll( *painter ). 690 #endif 691 if( d->inPaint || target_. -translation. inPaint: " << d->inPaint. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .0). d->textLayoutItems ) { 717 textLayoutItem->paintAll( *painter ). d->legends ) { 721 //qDebug("legend # %i". 707 painter->translate( translation ). 688 if( 100<nPaint) 689 qFatal("nPaint > 100"). d->layoutItems ) { 711 layoutItem->paintAll( *painter ).cpp. 704 d->slotLayoutPlanes().isEmpty() || !painter ) return. legend->geometry() ).left() ). KDChart::AbstractArea::paintAll(). 705 translation. 684 { 685 //qDebug() << "KDChart::Chart::paint() called.y() ). 743 //qDebug() << "KDChart::Chart::paint() done. 718 } 719 //int i=0. 698 QPoint translation(0. 697 QRect target( target_ ).\n".setX( target_. 722 if( ! legend->isHidden() ){ 723 //legend->forceRebuild().isNull() ) 729 painter->translate( -translation.x(). 696 //painter->drawRect( oldGeometry ). 720 KDAB_FOREACH( Legend *legend. 699 700 if( target != oldGeometry ){ 701 //qDebug() << "KDChart::Chart::paint() calling new setGeometry(" << target << ")". 724 /* 725 const QPoint translation( legend->geometry().setY( target_. 738 if( ! translation.topLeft() ). 692 693 d->inPaint = true. 737 setGeometry( oldGeometry ). 740 } 741 742 d->inPaint = false. 702 setGeometry( target ). 708 } 709 710 KDAB_FOREACH( KDChart::AbstractArea* layoutItem. -translation. 712 } 713 KDAB_FOREACH( KDChart::AbstractArea* planeLayoutItem.334 KD Chart 2 Class Documentation Definition at line 683 of file KDChartChart. 715 } 716 KDAB_FOREACH( KDChart::TextArea* textLayoutItem.x(). 706 translation. 730 */ 731 legend->paintIntoRect( *painter. Referenced by paintEvent().isNull() ) 739 painter->translate( -translation. KDChart::TextArea::paintAll(). 728 if( ! translation. legend(). 732 } 733 } 734 735 if( target_ != oldGeometry ){ 736 //qDebug() << "KDChart::Chart::paint() calling new setGeometry(" << oldGeometry << ")".left() ). References d. 686 #ifdef debug_recursive_paint 687 ++nPaint.++i). and KDChart::AbstractAreaWidget::paintIntoRect(). 726 painter->translate( translation ).y() ). 694 695 const QRect oldGeometry( geometry() ).

16 void Chart::replaceCoordinatePlane (AbstractCoordinatePlane ∗ plane. oldPlane The coordinate plane to be removed by the new plane.6.19. geometry() ). 756 //FIXME(khz): Paint the background/frame too! 757 // (can we derive Chart from AreaWidget ??) 758 paint( &painter. AbstractCoordinatePlane ∗ oldPlane = 0) Replaces the old coordinate plane. or appends the plane. then calls paint(). 599 { 600 if( plane && oldPlane_ != plane ){ 601 AbstractCoordinatePlane* oldPlane = oldPlane_. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References paint(). 759 } 6. See also: addCoordinatePlane. Note: If you want to re-use the old coordinate plane. In case. takeCoordinatePlane Definition at line 597 of file KDChartChart. do not forget to call paint(). or the method will do nothing.cpp. instead of using replaceCoordinatePlane.15 void Chart::paintEvent (QPaintEvent ∗ event) [protected] Draws the background and frame. and takeCoordinatePlane().3. d. 752 { 753 event->accept(). but if you do. References addCoordinatePlane(). there was no plane yet. the very first coordinate plane will be replaced. This parameter must not be zero. In most cases there is no need to override this method in a derived class. See also: paint Definition at line 751 of file KDChartChart. If the parameter is omitted.19 KDChart::Chart Class Reference 335 744 } 6. the new plane will just be added. it there is none yet.count() ){ 603 if( ! oldPlane ) 604 oldPlane = d->coordinatePlanes.cpp. 754 755 QPainter painter( this ). call takeCoordinatePlane and addCoordinatePlane. This plane will be deleted automati- cally.first().19. Parameters: plane The coordinate plane to be used instead of the old plane. 602 if( d->coordinatePlanes.3.

and takeHeaderFooter(). there was no header and no footer yet.3.336 KD Chart 2 Class Documentation 605 takeCoordinatePlane( oldPlane ). If the parameter is omitted. 781 } 782 delete oldHeaderFooter. or the method will do nothing. 609 } 610 } 6. oldLegend The legend to be removed by the new one. Parameters: headerFooter The header or footer to be used instead of the old one. there was no legend yet. 608 addCoordinatePlane( plane ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .18 void Chart::replaceLegend (Legend ∗ legend. or appends the new legend. it there is none yet.count() ){ 778 if( ! oldHeaderFooter ) 779 oldHeaderFooter = d->headerFooters. or appends the new header or footer. the very first legend will be replaced. d. the new header or footer will just be added. References addHeaderFooter(). or the method will do nothing.first(). Note: If you want to re-use the old header or footer.3. 780 takeHeaderFooter( oldHeaderFooter ). the new legend will just be added. call takeHeaderFooter and addHeaderFooter. 777 if( d->headerFooters. See also: addHeaderFooter.cpp. it there is none yet. This parameter must not be zero. takeHeaderFooter Definition at line 772 of file KDChartChart. This legend will be deleted automatically.17 void Chart::replaceHeaderFooter (HeaderFooter ∗ headerFooter.19. 784 } 785 } 6. resp.). instead of using replaceHeaderFooter. Parameters: legend The legend to be used instead of the old one. 783 addHeaderFooter( headerFooter ). HeaderFooter ∗ oldHeaderFooter = 0) Replaces the old header (or footer. If the parameter is omitted. oldHeaderFooter The header or footer to be removed by the new one. 606 } 607 delete oldPlane. This header or footer will be deleted automatically. 774 { 775 if( headerFooter && oldHeaderFooter_ != headerFooter ){ 776 HeaderFooter* oldHeaderFooter = oldHeaderFooter_. In case. In case. the very first header or footer will be replaced.19. This parameter must not be zero. Legend ∗ oldLegend = 0) Replaces the old legend.

747 { 748 d->slotLayoutPlanes(). int right.3. instead of using replaceLegend. and takeLegend(). and set- GlobalLeadingTop().cpp.21 void Chart::setGlobalLeading (int left. 836 } 837 } 6. 826 { 827 if( legend && oldLegend_ != legend ){ 828 Legend* oldLegend = oldLegend_. globalLeadingBottom. References addLegend(). 829 if( d->legends.19. int top. See also: setGlobalLeadingTop. Parameters: left The padding on the left side.3.cpp. 835 addLegend( legend ). setGlobalLeadingBottom(). 749 } 6.cpp.19 KDChart::Chart Class Reference 337 Note: If you want to re-use the old legend. setGlobalLeadingLeft(). takeLegend Definition at line 825 of file KDChartChart. References d. right The padding on the left hand side. 832 takeLegend( oldLegend ). 833 } 834 delete oldLegend.19. setGlobalLeadingRight globalLeadingTop. Definition at line 746 of file KDChartChart. int bottom) Set the padding between the margin of the widget and the area that the contents are drawn into.3. top The padding at the top. call takeLegend and addLegend. globalLeadingLeft.6. setGlobalLeadingRight(). References d. globalLeadingRight Definition at line 625 of file KDChartChart.count() ){ 830 if( ! oldLegend ) 831 oldLegend = d->legends. setGlobalLeadingLeft. bottom The padding on the bottom.first(). d.20 void KDChart::Chart::setCoordinatePlaneLayout (QLayout ∗ layout) 6. setGlobalLeadingBottom.19 void Chart::resizeEvent (QResizeEvent ∗ event) [protected] Adjusts the internal layout when the chart is resized.19. See also: addLegend. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

Parameters: leading The padding value. 638 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .338 KD Chart 2 Class Documentation 626 { 627 setGlobalLeadingLeft( left ).3.cpp.3.19. Referenced by setGlobalLeading().19. 630 setGlobalLeadingBottom( bottom ). References d. 668 { 669 d->globalLeadingBottom = leading. See also: setGlobalLeading Definition at line 634 of file KDChartChart. 637 d->slotRelayout(). 628 setGlobalLeadingTop( top ). Referenced by setGlobalLeading(). References d. 635 { 636 d->globalLeadingLeft = leading. Parameters: leading The padding value.23 void Chart::setGlobalLeadingLeft (int leading) Set the padding between the start of the widget and the start of the area that is used for drawing on the left. 671 } 6.22 void Chart::setGlobalLeadingBottom (int leading) Set the padding between the start of the widget and the start of the area that is used for drawing on the bottom. 631 d->slotRelayout(). See also: setGlobalLeading Definition at line 667 of file KDChartChart. 632 } 6.cpp. 670 d->slotRelayout(). 629 setGlobalLeadingRight( right ).

660 } 6. The chart no longer owns the plane. without deleting it. Referenced by replaceCoordinatePlane().19. See also: addCoordinatePlane. References d.6. Referenced by setGlobalLeading(). See also: setGlobalLeading Definition at line 656 of file KDChartChart.25 void Chart::setGlobalLeadingTop (int leading) Set the padding between the start of the widget and the start of the area that is used for drawing at the top. Referenced by setGlobalLeading(). References d.26 void Chart::takeCoordinatePlane (AbstractCoordinatePlane ∗ plane) Removes the coordinate plane from the chart. 648 d->slotRelayout(). 649 } 6.3. and KDChart::Abstract- CoordinatePlane::setParent().19. takeCoordinatePlane Definition at line 612 of file KDChartChart. 659 d->slotRelayout(). Parameters: leading The padding value. Parameters: leading The padding value. 646 { 647 d->globalLeadingTop = leading.cpp. See also: setGlobalLeading Definition at line 645 of file KDChartChart.3.19. so it is the caller’s responsibility to delete the plane.3.24 void Chart::setGlobalLeadingRight (int leading) Set the padding between the start of the widget and the start of the area that is used for drawing on the right. References d.cpp.cpp. KDChart::AbstractLayoutItem::removeFromParentLayout().19 KDChart::Chart Class Reference 339 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 657 { 658 d->globalLeadingRight = leading.

References d. SLOT( slotUnregisterDestroyedHeaderFooter( HeaderFooter* ) ) ). takeLegend Definition at line 839 of file KDChartChart. 795 } 796 d->slotRelayout(). 792 disconnect( headerFooter.cpp. 620 plane->setParent( 0 ). 790 if( idx != -1 ){ 791 d->headerFooters.takeAt( idx ). The chart no longer owns the header or footer. See also: addLegend. 623 } 6.340 KD Chart 2 Class Documentation 613 { 614 const int idx = d->coordinatePlanes. References d.19. 788 { 789 const int idx = d->headerFooters. 797 } 6. SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ).takeAt( idx ).27 void Chart::takeHeaderFooter (HeaderFooter ∗ headerFooter) Removes the header (or footer. 619 plane->removeFromParentLayout(). 621 } 622 d->slotLayoutPlanes(). The chart no longer owns the legend. resp. and KDChart::HeaderFooter::setParent().indexOf( plane ). 618 d. without deleting it. SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) ). 615 if( idx != -1 ){ 616 d->coordinatePlanes. replaceHeaderFooter Definition at line 787 of file KDChartChart. so it is the caller’s responsibility to delete the header or footer. See also: addHeaderFooter.3.3. so it is the caller’s responsibility to delete the legend.indexOf( headerFooter ). 617 disconnect( plane. without deleting it.cpp. 842 if( idx != -1 ){ 843 d->legends.takeAt( idx ). SIGNAL( destroyedHeaderFooter( HeaderFooter* ) ).28 void Chart::takeLegend (Legend ∗ legend) Removes the legend from the chart.) from the chart. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .indexOf( legend ). Referenced by replaceHeaderFooter(). Referenced by replaceLegend(). 840 { 841 const int idx = d->legends. 794 headerFooter->setParent( 0 ). 793 d.19.

19. SLOT( slotUnregisterDestroyedLegend( Legend* ) ) ).19 KDChart::Chart Class Reference 341 844 disconnect( legend.1 Q_SIGNALS KDChart::Chart::__pad0__ Definition at line 337 of file KDChartChart.6.h • KDChartChart. SIGNAL( destroyedLegend( Legend* ) ). 847 } 848 d->slotRelayout(). The documentation for this class was generated from the following files: • KDChartChart. 845 d.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .4 Member Data Documentation 6.4.19. 846 legend->setParent( 0 ).h. 849 } 6.

to be omitted (or set to Zero.g. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . qreal subStepWidth_=0. (counted == "Item 1". isCalculated specifies whether this dimension’s values are calculated or counted.h> Collaboration diagram for KDChart::DataDimension: 6.10.) sequence is the GranularitySequence. Public Member Functions • DataDimension (qreal start_. resp. "Item 2". qreal end_. when showing an empty plane without any diagrams.2. "Item 3" . Step width is an optional parameter. e. stepWidth..h. or for the labels of an axis.0.1 KDChart::DataDimension::DataDimension () Definition at line 322 of file KDChartAbstractCoordinatePlane.20 KDChart::DataDimension Class Reference #include <KDChartAbstractCoordinatePlane. or for the vertical lines in a grid. and subStepWidth. KDChartEnums::GranularitySequence sequence_.20. using step width 1. used by the CartesianGrid. The default c’tor just gets you counted values from 1.342 KD Chart 2 Class Documentation 6. bool isCalculated_.20.) if the step width is unknown. for the rows in a data model.0) • DataDimension () • qreal distance () const Returns the size of the distance. as specified at for the respective coordinate plane. AbstractCoordinatePlane::AxesCalc- Mode calcMode_..20. equivalent to the width() (or height(). sequence.) of a QRectF. • bool operator!= (const DataDimension &other) const • bool operator== (const DataDimension &r) const Public Attributes • AbstractCoordinatePlane::AxesCalcMode calcMode • qreal end • bool isCalculated • KDChartEnums::GranularitySequence sequence • qreal start • qreal stepWidth • qreal subStepWidth 6.2 Constructor & Destructor Documentation 6.h. resp. References calcMode. qreal stepWidth_=0.1 Detailed Description Helper class for one dimension of data.. Definition at line 320 of file KDChartAbstractCoordinatePlane.

329 bool isCalculated_. 330 AbstractCoordinatePlane::AxesCalcMode calcMode_. qreal end_.2 KDChart::DataDimension::DataDimension (qreal start_. calcMode( calcMode_ ) 338 . Note that this value can be negative. sequence.0.3. Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams().20. sequence( sequence_ ) 339 .3 Member Function Documentation 6.20. end.g. and subStepWidth.20. and KDChart::Cartesian- Axis::paintCtx().h. end. and subStepWidth.1 qreal KDChart::DataDimension::distance () const Returns the size of the distance. resp. end.0) Definition at line 331 of file KDChartAbstractCoordinatePlane. stepWidth. References calcMode. 367 { return !operator==( other ). and isCalculated. 328 qreal end_.6. } 368 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . isCalculated. e. indicating axis labels going in reversed direction.h.2. isCalculated( isCalculated_ ) 337 . References calcMode.2 bool KDChart::DataDimension::operator!= (const DataDimension & other) const Definition at line 370 of file KDChartAbstractCoordinatePlane. References start. bool isCalculated_. stepWidth.h. 334 : start( start_ ) 335 .3. 6.3 bool KDChart::DataDimension::operator== (const DataDimension & r) const Definition at line 358 of file KDChartAbstractCoordinatePlane. AbstractCoordinatePlane::AxesCalcMode calcMode_.h.20. sequence.20 KDChart::DataDimension Class Reference 343 326 {} 327 DataDimension( qreal start_.3.20. 355 { 356 return 6. subStepWidth( subStepWidth_ ) 341 {} 6. stepWidth( stepWidth_ ) 340 . 6. end( end_ ) 336 . qreal subStepWidth_ = 0. References calcMode. equivalent to the width() (or height(). start. qreal stepWidth_ = 0. KDChartEnums::GranularitySequence sequence_. isCalculated.) of a QRectF. Definition at line 353 of file KDChartAbstractCoordinatePlane.

3 bool KDChart::DataDimension::isCalculated Definition at line 375 of file KDChartAbstractCoordinatePlane. and KDChart::CartesianAxis::paintCtx().h. Referenced by DataDimension().7 qreal KDChart::DataDimension::subStepWidth Definition at line 379 of file KDChartAbstractCoordinatePlane. and KDChart::CartesianAxis::paintCtx().344 KD Chart 2 Class Documentation 6. 6. and operator==().h.h.4. 6.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Referenced by DataDimension().4 Member Data Documentation 6. KDChart::CartesianCoordinatePlane::layoutDiagrams().20. KDChart::CartesianCoordinatePlane::layoutDiagrams(). distance(). and KDChart::CartesianAxis::paintCtx(). and KDChart::CartesianAxis::paintCtx().20.20. operator!=().20.h.4.4.h. operator==().6 qreal KDChart::DataDimension::stepWidth Definition at line 378 of file KDChartAbstractCoordinatePlane.20. operator!=(). operator==().5 qreal KDChart::DataDimension::start Definition at line 373 of file KDChartAbstractCoordinatePlane.20. 6.4. and KDChart::CartesianAxis::paintCtx().20. and KDChart::CartesianAxis::paintCtx().1 AbstractCoordinatePlane::AxesCalcMode KDChart::DataDimension::calcMode Definition at line 376 of file KDChartAbstractCoordinatePlane. 6. The documentation for this class was generated from the following file: • KDChartAbstractCoordinatePlane. 6. Referenced by DataDimension(). Referenced by DataDimension().4 KDChartEnums::GranularitySequence KDChart::DataDimension::sequence Definition at line 377 of file KDChartAbstractCoordinatePlane.20. Referenced by DataDimension(). Referenced by DataDimension(). Referenced by DataDimension(). 6.h. operator!=(). operator==(). operator==().4. operator==().h.4.2 qreal KDChart::DataDimension::end Definition at line 374 of file KDChartAbstractCoordinatePlane.4.

Currently. this model is implemented for table models only. • DatasetProxyModel (QObject ∗parent=0) Create a DatasetProxyModel.6.21 KDChart::DatasetProxyModel Class Reference 345 6.21 KDChart::DatasetProxyModel Class Reference #include <KDChartDatasetProxyModel. The way it would work with models represent- ing a tree is to be decided. column x of the original model is not included in the dataset. Any other value is an error. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . This vector (of integers) is supposed to have one value for each column of the original model. int column. The resulting model will only contain the part of the model that is selected by the dataset. • QModelIndex parent (const QModelIndex &child) const • void setDatasetColumnDescriptionVector (const DatasetDescriptionVector &columnConfig) Configure the dataset selection for the columns. int role) const Overloaded from base class.h> Inheritance diagram for KDChart::DatasetProxyModel:Collaboration diagram for KDChart::Dataset- ProxyModel: 6. Public Member Functions • QVariant data (const QModelIndex &index. Qt::Orientation orientation. Definition at line 58 of file KDChartDatasetProxyModel. • QModelIndex mapToSource (const QModelIndex &proxyIndex) const Implements the mapping from the proxy to the source indexes. If it is between 0 and (columnCount() -1).21.h. and the according row and column header data. • void setDatasetDescriptionVectors (const DatasetDescriptionVector &rowConfig.1 Detailed Description DatasetProxyModel takes a KDChart dataset configuration and translates it into a filtering proxy model. If the value at position x is -1. int role=Qt::DisplayRole) const Overloaded from base class. • QVariant headerData (int section. • void setDatasetRowDescriptionVector (const DatasetDescriptionVector &rowConfig) Configure the dataset selection for the rows. • QModelIndex index (int row. The column selection is configured by passing a dataset description vector to the model. it is the column the source column is mapped to in the resulting model. const Dataset- DescriptionVector &columnConfig) Convenience method to configure rows and columns in one step. const QModelIndex &parent=QModelIndex()) const • QModelIndex mapFromSource (const QModelIndex &sourceIndex) const Implements the mapping from the source to the proxy indexes.

See also: setDatasetDescriptionVector Definition at line 35 of file KDChartDatasetProxyModel.21.21. int role) const Overloaded from base class. Without further configuration. this model is invalid. const QModelIndex &) const Decide whether the column is accepted.cpp.cpp. Definition at line 209 of file KDChartDatasetProxyModel.21. 6. role ).2.21.346 KD Chart 2 Class Documentation • void setSourceModel (QAbstractItemModel ∗sourceModel) Overloaded from base class. 36 : QSortFilterProxyModel ( parent ) 37 { 38 } 6. Public Attributes • public Q_SLOTS: void resetDatasetDescriptions() Protected Member Functions • bool filterAcceptsColumn (int sourceColumn.3 Member Function Documentation 6. const QModelIndex &source_parent) const Decide whether the row is accepted. 212 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3.1 DatasetProxyModel::DatasetProxyModel (QObject ∗ parent = 0) [explicit] Create a DatasetProxyModel.1 QVariant DatasetProxyModel::data (const QModelIndex & index. • bool filterAcceptsRow (int source_row. 210 { 211 return sourceModel()->data( mapToSource ( index ).2 Constructor & Destructor Documentation 6. • void setSourceRootIndex (const QModelIndex &rootIdx) Set the root index of the table in the source model.

Definition at line 136 of file KDChartDatasetProxyModel.size() ).3 bool DatasetProxyModel::filterAcceptsRow (int source_row. 151 return true.size() == sourceModel()->rowCount(mRootIndex) ).isEmpty() ) 140 { // no column mapping set up yet. Qt::Orientation orientation. all rows are passed down: 121 return true. 144 Q_ASSERT ( mColSrcToProxyMap. 125 if ( mRowSrcToProxyMap[sourceRow] == -1 ) 126 { // this row is explicitly not accepted: 127 return false.size() ). const QModelIndex &) const [protected] Decide whether the column is accepted.21 KDChart::DatasetProxyModel Class Reference 347 6. 215 { 216 if ( orientation == Qt::Horizontal ) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 138 { 139 if ( mColSrcToProxyMap. 148 } else { 149 Q_ASSERT ( mColSrcToProxyMap[sourceColumn] >= 0 150 && mColSrcToProxyMap[sourceColumn] < mColSrcToProxyMap.3.isEmpty() ) 120 { // no row mapping set.cpp. 145 if ( mColSrcToProxyMap[sourceColumn] == -1 ) 146 { // this column is explicitly not accepted: 147 return false.6. 142 } else { 143 Q_ASSERT ( sourceModel() ).21.3.21. 128 } else { 129 Q_ASSERT ( mRowSrcToProxyMap[sourceRow] >= 0 130 && mRowSrcToProxyMap[sourceRow] < mRowSrcToProxyMap.cpp. 152 } 153 } 154 } 6.cpp. int role = Qt::DisplayRole) const Overloaded from base class.21.2 bool DatasetProxyModel::filterAcceptsColumn (int sourceColumn.3. 131 return true.4 QVariant DatasetProxyModel::headerData (int section. 132 } 133 } 134 } 6. Definition at line 116 of file KDChartDatasetProxyModel. all columns are passed down: 141 return true. Definition at line 214 of file KDChartDatasetProxyModel. 122 } else { 123 Q_ASSERT ( sourceModel() ).size() == sourceModel()->columnCount(mRootIndex) ). const QModelIndex & source_parent) const [protected] Decide whether the row is accepted. 118 { 119 if ( mRowSrcToProxyMap. 124 Q_ASSERT ( mRowSrcToProxyMap.

229 } else { 230 return sourceModel()->headerData ( mapProxyRowToSource ( section ).isValid() ) return sourceIndex.21.isEmpty() ) 89 { 90 return createIndex ( sourceIndex. role ). and parent(). "A source " 84 "model must be set before the selection can be configured. 72 mapProxyColumnToSource(column). 70 { 71 return mapFromSource( sourceModel()->index( mapProxyRowToSource(row).3. 221 } else { 222 return sourceModel()->headerData ( mapProxyColumnToSource ( section ). 82 { 83 Q_ASSERT_X ( sourceModel(). 95 return createIndex ( row.3. 223 orientation." ). column.cpp. 91 sourceIndex. "DatasetProxyModel::mapFromSource". role ). Definition at line 81 of file KDChartDatasetProxyModel. 85 86 if ( !sourceIndex.row(). 87 88 if ( mRowSrcToProxyMap. 73 parent ) ). 94 int column = mapSourceColumnToProxy ( sourceIndex.21. 231 orientation. sourceIndex.isEmpty() && mColSrcToProxyMap. const QModelIndex & parent = QModelIndex()) const Definition at line 68 of file KDChartDatasetProxyModel. int column.internalPointer() ).row() ). 92 } else { 93 int row = mapSourceRowToProxy ( sourceIndex. 74 } 6. 232 } 233 } 234 } 6. References mapFromSource(). Referenced by index(). sourceIndex.6 QModelIndex DatasetProxyModel::mapFromSource (const QModelIndex & sourceIndex) const Implements the mapping from the source to the proxy indexes.cpp.5 QModelIndex DatasetProxyModel::index (int row. 96 } 97 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .column().column() ).348 KD Chart 2 Class Documentation 217 { 218 if ( mapProxyColumnToSource ( section ) == -1 ) 219 { 220 return QVariant().internalPointer() ). 224 } 225 } else { 226 if ( mapProxyRowToSource ( section ) == -1 ) 227 { 228 return QVariant().

mColProxyToSrcMap ). "DatasetProxyModel::mapToSource".21.7 QModelIndex DatasetProxyModel::mapToSource (const QModelIndex & proxyIndex) const Implements the mapping from the proxy to the source indexes. 105 if ( mRowSrcToProxyMap. sourceModel()->columnCount(mRootIndex). "DatasetProxyModel::setDatasetColumnDescriptionVector".cpp.3.21 KDChart::DatasetProxyModel Class Reference 349 6.21.cpp. 52 { 53 Q_ASSERT_X ( sourceModel(). 108 proxyIndex. Definition at line 99 of file KDChartDatasetProxyModel. 109 } else { 110 int row = mapProxyRowToSource ( proxyIndex. proxyIndex.6.row() ). Every call to this method resets the previous dataset description. column. proxyIndex. 113 } 114 } 6. 55 initializeDatasetDecriptors ( configuration.cpp. const DatasetDescriptionVector & columnConfig) Convenience method to configure rows and columns in one step. "A source " 102 "model must be set before the selection can be configured. // clear emits layoutChanged() 58 } 6." ).3.10 void DatasetProxyModel::setDatasetDescriptionVectors (const DatasetDescriptionVector & rowConfig. 57 clear().8 QModelIndex DatasetProxyModel::parent (const QModelIndex & child) const Definition at line 76 of file KDChartDatasetProxyModel.row().3. 54 "A source model must be set before the selection can be configured. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Definition at line 50 of file KDChartDatasetProxyModel. 77 { 78 return mapFromSource( sourceModel()->parent( child ) ).column() ).internalPointer() ).column(). 79 } 6.9 void DatasetProxyModel::setDatasetColumnDescriptionVector (const DatasetDescriptionVector & columnConfig) Configure the dataset selection for the columns. 111 int column = mapProxyColumnToSource ( proxyIndex. References KDChart::DatasetDescriptionVector. Referenced by setDatasetDescriptionVectors(). References mapFromSource().internalPointer() ). 100 { 101 Q_ASSERT_X ( sourceModel(). 112 return createIndex ( row.isEmpty() && mColSrcToProxyMap.3. 56 mColSrcToProxyMap. 103 104 if ( !proxyIndex.21." ).isValid() ) return proxyIndex.21.isEmpty() ) 106 { 107 return createIndex ( proxyIndex.

References KDChart::DatasetDescriptionVector. Definition at line 40 of file KDChartDatasetProxyModel. Referenced by setDatasetDescriptionVectors().3." ). sourceModel()->rowCount(mRootIndex). 267 268 resetDatasetDescriptions(). 269 } 6. 264 mRootIndex = QModelIndex().350 KD Chart 2 Class Documentation Definition at line 60 of file KDChartDatasetProxyModel. and setDataset- RowDescriptionVector(). Definition at line 271 of file KDChartDatasetProxyModel.cpp.12 void DatasetProxyModel::setSourceModel (QAbstractItemModel ∗ sourceModel) Overloaded from base class. mRowProxyToSrcMap ). References KDChart::DatasetDescriptionVector.11 void DatasetProxyModel::setDatasetRowDescriptionVector (const DatasetDescriptionVector & rowConfig) Configure the dataset selection for the rows. 275 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 262 { 263 QSortFilterProxyModel::setSourceModel ( sourceModel ). 65 setDatasetColumnDescriptionVector ( columnConfig ).cpp. 266 SLOT( resetDatasetDescriptions() ) ). 66 } 6. setDatasetColumnDescriptionVector(). Definition at line 261 of file KDChartDatasetProxyModel.cpp. 265 connect ( sourceModel.21. // clear emits layoutChanged() 48 } 6.cpp.3.3. 63 { 64 setDatasetRowDescriptionVector( rowConfig ). 47 clear(). SIGNAL ( layoutChanged() ). 45 initializeDatasetDecriptors ( configuration. 46 mRowSrcToProxyMap. Every call to this method resets the previous dataset description. 44 "A source model must be set before the selection can be configured. "DatasetProxyModel::setDatasetRowDescriptionVector". 272 { 273 mRootIndex = rootIdx. 274 resetDatasetDescriptions(). 42 { 43 Q_ASSERT_X ( sourceModel().13 void DatasetProxyModel::setSourceRootIndex (const QModelIndex & rootIdx) Set the root index of the table in the source model.21.21.

cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h.4 Member Data Documentation 6.4.21.1 public KDChart::DatasetProxyModel::Q_SLOTS Definition at line 97 of file KDChartDatasetProxyModel.6.21.21 KDChart::DatasetProxyModel Class Reference 351 6. The documentation for this class was generated from the following files: • KDChartDatasetProxyModel.h • KDChartDatasetProxyModel.

22.1 Constructor & Destructor Documentation 6.1 void KDChart::DatasetSelectorWidget::mappingDisabled () Referenced by on_groupBox_toggled(). 37 : QFrame ( parent ) 38 .22 KDChart::DatasetSelectorWidget Class Reference #include <KDChartDatasetSelector.2 Member Function Documentation 6. mSourceRowCount ( 0 ) 40 .h> Inheritance diagram for KDChart::DatasetSelectorWidget:Collaboration diagram for KDChart::Dataset- SelectorWidget: Public Member Functions • DatasetSelectorWidget (QWidget ∗parent=0) • void mappingDisabled () • void on_cbReverseColumns_stateChanged (int) • void on_cbReverseRows_stateChanged (int) • void on_groupBox_toggled (bool) • void on_sbColumnCount_valueChanged (int) • void on_sbRowCount_valueChanged (int) • void on_sbStartRow_valueChanged (int) • void setSourceColumnCount (const int &columnCount) Public Attributes • Q_SIGNALS __pad0__: void configureDatasetProxyModel ( const DatasetDescriptionVector& row- Config • Q_SIGNALS const DatasetDescriptionVector & columnConfig • private Q_SLOTS: void on_sbStartColumn_valueChanged ( int ) • public Q_SLOTS: void setSourceRowCount ( const int& rowCount ) 6. 45 setMinimumSize ( minimumSizeHint() ).2.22.352 KD Chart 2 Class Documentation 6.1.cpp.1 DatasetSelectorWidget::DatasetSelectorWidget (QWidget ∗ parent = 0) [explicit] Definition at line 36 of file KDChartDatasetSelector. 46 } 6. mSourceColumnCount ( 0 ) 41 { 42 qWarning("For DatasetSelectorWidget to become useful. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .22. mUi ( new Ui::DatasetSelector () ) 39 . it has to be connected to the proxy model it 43 44 mUi->setupUi ( this ).22.

6 void DatasetSelectorWidget::on_sbRowCount_valueChanged (int) Definition at line 63 of file KDChartDatasetSelector.4 void DatasetSelectorWidget::on_groupBox_toggled (bool) Definition at line 78 of file KDChartDatasetSelector. 79 { 80 if ( state ) 81 { 82 calculateMapping(). 59 { 60 calculateMapping().2.2.cpp.5 void DatasetSelectorWidget::on_sbColumnCount_valueChanged (int) Definition at line 58 of file KDChartDatasetSelector. 69 { 70 calculateMapping(). 85 } 86 } 6. 76 } 6.22.cpp.22.2. 83 } else { 84 emit mappingDisabled(). 71 } 6.22. References mappingDisabled().2 void DatasetSelectorWidget::on_cbReverseColumns_stateChanged (int) Definition at line 73 of file KDChartDatasetSelector.2. 61 } 6.22.cpp.2.6. 74 { 75 calculateMapping().22.22 KDChart::DatasetSelectorWidget Class Reference 353 6.cpp.cpp. 66 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3 void DatasetSelectorWidget::on_cbReverseRows_stateChanged (int) Definition at line 68 of file KDChartDatasetSelector. 64 { 65 calculateMapping().

3.4 public KDChart::DatasetSelectorWidget::Q_SLOTS Definition at line 48 of file KDChartDatasetSelector.22.cpp.2.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .22.22.22.22.3.354 KD Chart 2 Class Documentation 6.h. 6.3.2 Q_SIGNALS const DatasetDescriptionVector& KDChart::DatasetSelector- Widget::columnConfig Definition at line 53 of file KDChartDatasetSelector.2.h. 104 } 105 } 6.3.7 void DatasetSelectorWidget::on_sbStartRow_valueChanged (int) Definition at line 53 of file KDChartDatasetSelector. The documentation for this class was generated from the following files: • KDChartDatasetSelector.h • KDChartDatasetSelector.22. 6.cpp.h. 56 } 6. 54 { 55 calculateMapping(). 6. 99 { 100 if ( columnCount != mSourceColumnCount ) 101 { 102 mSourceColumnCount = columnCount.3 private KDChart::DatasetSelectorWidget::Q_SLOTS Definition at line 59 of file KDChartDatasetSelector.22.8 void DatasetSelectorWidget::setSourceColumnCount (const int & columnCount) Definition at line 98 of file KDChartDatasetSelector.3 Member Data Documentation 6.h. 103 resetDisplayValues().1 Q_SIGNALS KDChart::DatasetSelectorWidget::__pad0__ Definition at line 53 of file KDChartDatasetSelector.

howmany decimal digits are displayed. • void setNegativePosition (const RelativePosition &relPosition) • void setPositivePosition (const RelativePosition &relPosition) • void setPowerOfTenDivisor (int powerOfTenDivisor) • void setPrefix (const QString prefix) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h. • void setFrameAttributes (const FrameAttributes &a) Set the frame attributes to use for the data value labels area. This includes things like the text attributes (font.1 Detailed Description Diagram attributes dealing with data value labels. what markers are used.6. Definition at line 51 of file KDChartDataValueAttributes.h> 6. • void setMarkerAttributes (const MarkerAttributes &a) Set the marker attributes to use for the data values. The DataValueAttributes group all properties that can be set wrt data value labels and if and how they are displayed.23 KDChart::DataValueAttributes Class Reference 355 6. • void setDataLabel (const QString label) a string label instead of the original data value label • void setDecimalDigits (int digits) Set how many decimal digits to display when rendering the data value labels. Public Member Functions • BackgroundAttributes backgroundAttributes () const • QString dataLabel () const • DataValueAttributes (const DataValueAttributes &) • DataValueAttributes () • int decimalDigits () const • FrameAttributes frameAttributes () const • bool isVisible () const • MarkerAttributes markerAttributes () const • RelativePosition negativePosition () const • bool operator!= (const DataValueAttributes &other) const • DataValueAttributes & operator= (const DataValueAttributes &) • bool operator== (const DataValueAttributes &) const • RelativePosition positivePosition () const • int powerOfTenDivisor () const • QString prefix () const • void setBackgroundAttributes (const BackgroundAttributes &a) Set the background attributes to use for the data value labels area.23 KDChart::DataValueAttributes Class Reference #include <KDChartDataValueAttributes.23. color). etc.

2 Constructor & Destructor Documentation 6.356 KD Chart 2 Class Documentation Prepend a prefix to the data value text to be displayed.3.2 KDChart::DataValueAttributes::DataValueAttributes (const DataValueAttributes &) 6.1 BackgroundAttributes KDChart::DataValueAttributes::backgroundAttributes () const Returns: The background attributes used for painting the data value labels area.3 Member Function Documentation 6. Referenced by KDChart::AbstractDiagram::paintDataValueText().2.2. • void setVisible (bool visible) Set whether data value labels should be displayed. 6.1 KDChart::DataValueAttributes::DataValueAttributes () 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2.2 QString KDChart::DataValueAttributes::dataLabel () const Returns: The string to be displayed instead of the data value text.23.23. • void setShowInfinite (bool infinite) • void setSuffix (const QString suffix) Append a suffix to the data value text to be displayed. See also: BackgroundAttributes Referenced by operator<<(). • bool showInfinite () const • QString suffix () const • TextAttributes textAttributes () const • ∼DataValueAttributes () Static Public Member Functions • const DataValueAttributes & defaultAttributes () • const QVariant & defaultAttributesAsVariant () 6.3. • void setTextAttributes (const TextAttributes &a) Set the text attributes to use for the data value labels.23.3 KDChart::DataValueAttributes::∼DataValueAttributes () 6.23.23.23.23.

Referenced by operator<<(). and KDChart::Abstract- Diagram::paintMarker(). 6. } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .23. 6.5 const QVariant& KDChart::DataValueAttributes::defaultAttributesAsVariant () [static] 6.3.3.9 RelativePosition KDChart::DataValueAttributes::negativePosition () const Referenced by operator<<().10 bool KDChart::DataValueAttributes::operator!= (const DataValueAttributes & other) const Definition at line 58 of file KDChartDataValueAttributes.23. and KDChart::AbstractDiagram::paintDataValueText(). See also: FrameAttributes Referenced by operator<<(). KDChart::AbstractDiagram::paintDataValueText().4 const DataValueAttributes& KDChart::DataValueAttributes::defaultAttributes () [static] 6.3.3.23.3.8 MarkerAttributes KDChart::DataValueAttributes::markerAttributes () const Returns: The marker attributes used for decorating the data values.6.7 bool KDChart::DataValueAttributes::isVisible () const Returns: Whether data value labels should be displayed.23. Referenced by operator<<(). 6.23.3. 6. 6.h.3 int KDChart::DataValueAttributes::decimalDigits () const Returns: The number of decimal digits displayed.23.3.3.6 FrameAttributes KDChart::DataValueAttributes::frameAttributes () const Returns: The frame attributes used for painting the data value labels area.23. 58 { return !operator==(other).23. See also: MarkerAttributes Referenced by KDChart::AbstractDiagram::paintMarker().23 KDChart::DataValueAttributes Class Reference 357 6.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .14 int KDChart::DataValueAttributes::powerOfTenDivisor () const Referenced by operator<<(). 6.15 QString KDChart::DataValueAttributes::prefix () const Returns: The string used as a prefix to the data value text.23.3.358 KD Chart 2 Class Documentation 6.3.23. 6.3.12 bool KDChart::DataValueAttributes::operator== (const DataValueAttributes &) const 6. If there are no decimal digits it will not be displayed.11 DataValueAttributes& KDChart::DataValueAttributes::operator= (const DataValueAttributes &) 6.23.16 void KDChart::DataValueAttributes::setBackgroundAttributes (const BackgroundAttributes & a) Set the background attributes to use for the data value labels area.17 void KDChart::DataValueAttributes::setDataLabel (const QString label) a string label instead of the original data value label Parameters: label: the string to be displayed. Referenced by KDChart::AbstractDiagram::paintDataValueText().23.13 RelativePosition KDChart::DataValueAttributes::positivePosition () const Referenced by operator<<().3.23.3.23. 6. 6.23.18 void KDChart::DataValueAttributes::setDecimalDigits (int digits) Set how many decimal digits to display when rendering the data value labels.3.3.23. Parameters: a The background attributes to set. Parameters: digits The number of decimal digits to use.3. See also: BackgroundAttributes 6.

26 void KDChart::DataValueAttributes::setSuffix (const QString suffix) Append a suffix to the data value text to be displayed.3.23. Parameters: prefix The string to prepend.23. This includes the marker type. See also: MarkerAttributes 6.3. 6.23.19 void KDChart::DataValueAttributes::setFrameAttributes (const FrameAttributes & a) Set the frame attributes to use for the data value labels area.3.24 void KDChart::DataValueAttributes::setPrefix (const QString prefix) Prepend a prefix to the data value text to be displayed.3.23. Parameters: a The frame attributes to set.23.3.23.25 void KDChart::DataValueAttributes::setShowInfinite (bool infinite) 6.6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. See also: FrameAttributes 6.22 void KDChart::DataValueAttributes::setPositivePosition (const RelativePosition & relPosition) 6.23 void KDChart::DataValueAttributes::setPowerOfTenDivisor (int powerOfTenDivisor) 6.23.23.3. Parameters: a The marker attributes to set.23 KDChart::DataValueAttributes Class Reference 359 6.20 void KDChart::DataValueAttributes::setMarkerAttributes (const MarkerAttributes & a) Set the marker attributes to use for the data values.21 void KDChart::DataValueAttributes::setNegativePosition (const RelativePosition & relPosition) 6. Parameters: suffix The string to append.3.

3.23.29 bool KDChart::DataValueAttributes::showInfinite () const Referenced by operator<<().23.23.28 void KDChart::DataValueAttributes::setVisible (bool visible) Set whether data value labels should be displayed.3. The documentation for this class was generated from the following file: • KDChartDataValueAttributes.3.30 QString KDChart::DataValueAttributes::suffix () const Returns: The string used as a suffix to the data value text. 6.360 KD Chart 2 Class Documentation 6.27 void KDChart::DataValueAttributes::setTextAttributes (const TextAttributes & a) Set the text attributes to use for the data value labels. Referenced by operator<<().h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 6.31 TextAttributes KDChart::DataValueAttributes::textAttributes () const Returns: The text attributes used for painting data value labels. and KDChart::AbstractDiagram::paintDataValueText().23. Referenced by KDChart::AbstractDiagram::paintDataValueText(). 6.3. See also: TextAttributes 6.3. Parameters: visible Whether data value labels should be displayed.23. Parameters: a The text attributes to set.

1 Detailed Description A DiagramObserver watches the associated diagram for changes and deletion and emits corresponsing signals. 41 : QObject( parent ). • void diagramDataChanged (AbstractDiagram ∗diagram) This signal is emitted whenever the data of the diagram changes.24 KDChart::DiagramObserver Class Reference 361 6.24. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • void slotAttributesChanged () • void slotDataChanged () • void slotModelsChanged () • ∼DiagramObserver () Public Attributes • Q_SIGNALS __pad0__: void diagramDestroyed( AbstractDiagram∗ diagram ) • private Q_SLOTS: void slotDestroyed() 6.1 DiagramObserver::DiagramObserver (AbstractDiagram ∗ diagram. QObject ∗ parent = 0) [explicit] Constructs a new observer observing the given diagram.24. m_diagram( diagram ) 42 { 43 if ( m_diagram ) { 44 connect( m_diagram. SIGNAL(destroyed(QObject*)). QObject ∗parent=0) Constructs a new observer observing the given diagram.6.h> Inheritance diagram for KDChart::DiagramObserver:Collaboration diagram for KDChart::Diagram- Observer: 6. SLOT(slotDestroyed())).h. Public Member Functions • AbstractDiagram ∗ diagram () • const AbstractDiagram ∗ diagram () const • void diagramAttributesChanged (AbstractDiagram ∗diagram) This signal is emitted whenever the attributes of the diagram change. Definition at line 43 of file KDChartDiagramObserver.24.24 KDChart::DiagramObserver Class Reference #include <KDChartDiagramObserver. References slotModelsChanged(). • DiagramObserver (AbstractDiagram ∗diagram. Definition at line 40 of file KDChartDiagramObserver.2 Constructor & Destructor Documentation 6.2.cpp.

3.cpp. SLOT(slotModelsChanged())). References diagramAttributesChanged(). 46 } 47 } 6.24.362 KD Chart 2 Class Documentation 45 connect( m_diagram.4 void KDChart::DiagramObserver::diagramDataChanged (AbstractDiagram ∗ diagram) This signal is emitted whenever the data of the diagram changes.5 void DiagramObserver::slotAttributesChanged () Definition at line 99 of file KDChartDiagramObserver.24.24. 54 } 6. 49 {} 6.3.cpp. 52 { 53 return m_diagram. SIGNAL(modelsChanged()).3. Referenced by slotModelsChanged(). 59 } 6.cpp. Referenced by slotDataChanged().3 void KDChart::DiagramObserver::diagramAttributesChanged (AbstractDiagram ∗ diagram) This signal is emitted whenever the attributes of the diagram change. 6.3. 57 { 58 return m_diagram.1 AbstractDiagram ∗ DiagramObserver::diagram () Definition at line 56 of file KDChartDiagramObserver. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .2. Referenced by KDChart::Legend::datasetCount().2 DiagramObserver::∼DiagramObserver () Definition at line 49 of file KDChartDiagramObserver.2 const AbstractDiagram ∗ DiagramObserver::diagram () const Definition at line 51 of file KDChartDiagramObserver.24.3.24.cpp. 6. Referenced by slotAttributesChanged().24.3 Member Function Documentation 6.24.

24 KDChart::DiagramObserver Class Reference 363 100 { 101 emit diagramAttributesChanged( m_diagram ). 102 } 6.24. 92 } 6.3.h. References diagramDataChanged(). Referenced by slotModelsChanged().6.cpp.24.h. and slotDataChanged().24.24.1 Q_SIGNALS KDChart::DiagramObserver::__pad0__ Definition at line 59 of file KDChartDiagramObserver.6 void DiagramObserver::slotDataChanged () Definition at line 94 of file KDChartDiagramObserver.4.3.24.4 Member Data Documentation 6. The documentation for this class was generated from the following files: • KDChartDiagramObserver.h • KDChartDiagramObserver.2 private KDChart::DiagramObserver::Q_SLOTS Definition at line 66 of file KDChartDiagramObserver. 91 slotAttributesChanged(). 90 slotDataChanged().cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References slotAttributesChanged(). Referenced by DiagramObserver().7 void DiagramObserver::slotModelsChanged () Definition at line 87 of file KDChartDiagramObserver. 95 { 96 emit diagramDataChanged( m_diagram ). 88 { 89 init().cpp.4. 6. 97 } 6.

2 bool KDChart::FrameAttributes::operator!= (const FrameAttributes & other) const Definition at line 59 of file KDChartFrameAttributes.25 KDChart::FrameAttributes Class Reference #include <KDChartFrameAttributes.2 KDChart::FrameAttributes::FrameAttributes (const FrameAttributes &) 6.1 KDChart::FrameAttributes::FrameAttributes () 6. } 6.3 FrameAttributes& KDChart::FrameAttributes::operator= (const FrameAttributes &) 6.h> Public Member Functions • FrameAttributes (const FrameAttributes &) • FrameAttributes () • bool isVisible () const • bool operator!= (const FrameAttributes &other) const • FrameAttributes & operator= (const FrameAttributes &) • bool operator== (const FrameAttributes &) const • int padding () const • QPen pen () const • void setPadding (int padding) • void setPen (const QPen &pen) • void setVisible (bool visible) • ∼FrameAttributes () 6.1.25.1 bool KDChart::FrameAttributes::isVisible () const Referenced by operator<<().2.25.25.25. 59 { return !operator==(other).25.2.364 KD Chart 2 Class Documentation 6.2.2. 6.2.25. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1.1 Constructor & Destructor Documentation 6.25.1.3 KDChart::FrameAttributes::∼FrameAttributes () 6.4 bool KDChart::FrameAttributes::operator== (const FrameAttributes &) const 6.25.2 Member Function Documentation 6.25.25.h.5 int KDChart::FrameAttributes::padding () const Referenced by operator<<().

25.2.2.25.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 6.6 QPen KDChart::FrameAttributes::pen () const Referenced by operator<<().6.25 KDChart::FrameAttributes Class Reference 365 6.2.25.25.2.8 void KDChart::FrameAttributes::setPen (const QPen & pen) 6.7 void KDChart::FrameAttributes::setPadding (int padding) 6.9 void KDChart::FrameAttributes::setVisible (bool visible) The documentation for this class was generated from the following file: • KDChartFrameAttributes.

26.2 Member Function Documentation 6.26.2.3 KDChart::GridAttributes::∼GridAttributes () 6.366 KD Chart 2 Class Documentation 6.26.2 KDChart::GridAttributes::GridAttributes (const GridAttributes &) 6.1.26.h> Public Member Functions • GridAttributes (const GridAttributes &) • GridAttributes () • KDChartEnums::GranularitySequence gridGranularitySequence () const • QPen gridPen () const • qreal gridStepWidth () const • qreal gridSubStepWidth () const • bool isGridVisible () const • bool isSubGridVisible () const • bool operator!= (const GridAttributes &other) const • GridAttributes & operator= (const GridAttributes &) • bool operator== (const GridAttributes &) const • void setGridGranularitySequence (KDChartEnums::GranularitySequence sequence) • void setGridPen (const QPen &pen) • void setGridStepWidth (qreal stepWidth=0.26.26 KDChart::GridAttributes Class Reference #include <KDChartGridAttributes.26.2. 6.1 KDChart::GridAttributes::GridAttributes () 6.1.1 Constructor & Destructor Documentation 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1 KDChartEnums::GranularitySequence KDChart::GridAttributes::gridGranularity- Sequence () const Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().0) • void setGridVisible (bool visible) • void setSubGridPen (const QPen &pen) • void setSubGridVisible (bool visible) • void setZeroLinePen (const QPen &pen) • QPen subGridPen () const • QPen zeroLinePen () const • ∼GridAttributes () 6.26.1.0) • void setGridSubStepWidth (qreal subStepWidth=0.2 QPen KDChart::GridAttributes::gridPen () const Referenced by operator<<().

26.2.2.26.26.15 void KDChart::GridAttributes::setSubGridPen (const QPen & pen) 6.2.26 KDChart::GridAttributes Class Reference 367 6.13 void KDChart::GridAttributes::setGridSubStepWidth (qreal subStepWidth = 0.11 void KDChart::GridAttributes::setGridPen (const QPen & pen) 6.16 void KDChart::GridAttributes::setSubGridVisible (bool visible) 6.0) 6.26.2.3 qreal KDChart::GridAttributes::gridStepWidth () const Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().2. 79 { return !operator==(other).2.26.6 bool KDChart::GridAttributes::isSubGridVisible () const Referenced by operator<<(). and operator<<().2.10 void KDChart::GridAttributes::setGridGranularitySequence (KDChartEnums::GranularitySequence sequence) 6. and operator<<(). 6. 6.5 bool KDChart::GridAttributes::isGridVisible () const Referenced by operator<<().2.17 void KDChart::GridAttributes::setZeroLinePen (const QPen & pen) 6.2. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .26.26.26.8 GridAttributes& KDChart::GridAttributes::operator= (const GridAttributes &) 6.26.2.26.26.26.2.26.9 bool KDChart::GridAttributes::operator== (const GridAttributes &) const 6.18 QPen KDChart::GridAttributes::subGridPen () const Referenced by operator<<(). 6.7 bool KDChart::GridAttributes::operator!= (const GridAttributes & other) const Definition at line 79 of file KDChartGridAttributes.12 void KDChart::GridAttributes::setGridStepWidth (qreal stepWidth = 0.2.h.14 void KDChart::GridAttributes::setGridVisible (bool visible) 6.6. 6.26.2.2.26.2.4 qreal KDChart::GridAttributes::gridSubStepWidth () const Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(). } 6.0) 6.26.2.

26.368 KD Chart 2 Class Documentation 6. The documentation for this class was generated from the following file: • KDChartGridAttributes.19 QPen KDChart::GridAttributes::zeroLinePen () const Referenced by operator<<().2.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

27 KDChart::HeaderFooter Class Reference #include <KDChartHeaderFooter. • virtual void paintFrame (QPainter &painter. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. const QPoint &myPos.h> Inheritance diagram for KDChart::HeaderFooter:Collaboration diagram for KDChart::HeaderFooter: Public Types • enum HeaderFooterType { Header. const QPointF &myPos. Footer } Public Member Functions • void alignToReferencePoint (const RelativePosition &position) • const QObject ∗ autoReferenceArea () const • BackgroundAttributes backgroundAttributes () const • virtual HeaderFooter ∗ clone () const • virtual Qt::Orientations expandingDirections () const pure virtual in QLayoutItem • FrameAttributes frameAttributes () const • virtual QRect geometry () const pure virtual in QLayoutItem • HeaderFooter (Chart ∗parent=0) • virtual bool intersects (const TextLayoutItem &other. const QRect &rectangle) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .27 KDChart::HeaderFooter Class Reference 369 6. const QPoint &other- Pos) const • virtual bool intersects (const TextLayoutItem &other. • virtual void paintBackground (QPainter &painter. const QPointF &otherPos) const • virtual bool isEmpty () const pure virtual in QLayoutItem • virtual QSize maximumSize () const pure virtual in QLayoutItem • virtual QSize minimumSize () const pure virtual in QLayoutItem • virtual void paint (QPainter ∗) • void paintAll (QPainter &painter) Call paintAll.6. const QRect &rectangle) • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size.

370 KD Chart 2 Class Documentation • virtual void paintIntoRect (QPainter &painter. • void setType (HeaderFooterType type) • virtual QSize sizeHint () const pure virtual in QLayoutItem • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout. const QRect &rect) Draws the background and frame. • Position position () const • void positionChanged (HeaderFooter ∗) • virtual QFont realFont () const • virtual qreal realFontSize () const • void removeFromParentLayout () • void setAutoReferenceArea (const QObject ∗area) • void setBackgroundAttributes (const BackgroundAttributes &a) • void setFrameAttributes (const FrameAttributes &a) • virtual void setGeometry (const QRect &r) pure virtual in QLayoutItem • void setParent (QObject ∗parent) • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. • void setPosition (Position position) • void setText (const QString &text) • void setTextAttributes (const TextAttributes &a) Use this to specify the text attributes to be used for this item. to trigger that widget’s update. • HeaderFooterType type () const • virtual ∼HeaderFooter () Public Attributes • Q_SIGNALS __pad0__: void destroyedHeaderFooter( HeaderFooter∗ ) Protected Member Functions • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . then calls paint(). whenever the size of the item’s contents has changed. • QString text () const • TextAttributes textAttributes () const Returns the text attributes to be used for this item.

27.cpp.cpp.27. 55 : 56 TextArea( new Private() ) 57 { 58 setParent( parent ).1 enum KDChart::HeaderFooter::HeaderFooterType Enumeration values: Header Footer Definition at line 54 of file KDChartHeaderFooter. 59 init().1 HeaderFooter::HeaderFooter (Chart ∗ parent = 0) Definition at line 55 of file KDChartHeaderFooter.1 Member Enumeration Documentation 6. 63 { 64 emit destroyedHeaderFooter( this ).cpp.27. References setParent().27. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 54 { Header.2 HeaderFooter::∼HeaderFooter () [virtual] Definition at line 62 of file KDChartHeaderFooter.27. 65 } 6. Referenced by clone(). 55 Footer }.h. 60 } 6.27 KDChart::HeaderFooter Class Reference 371 Protected Attributes • QWidget ∗ mParent • QLayout ∗ mParentLayout 6. 6.2.2.1.6.3.2 Constructor & Destructor Documentation 6.27.1 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase.27.3 Member Function Documentation 6.

not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6. 96 headerFooter->setTextAttributes( textAttributes() ).cpp. KDChart::TextLayoutItem::setTextAttributes(). References d.5 HeaderFooter ∗ HeaderFooter::clone () const [virtual] Definition at line 91 of file KDChartHeaderFooter.372 KD Chart 2 Class Documentation 76 { 77 Q_UNUSED( position ).3 const QObject ∗ KDChart::TextLayoutItem::autoReferenceArea () const [inherited] Definition at line 122 of file KDChartLayoutItems.27. Definition at line 105 of file KDChartTextArea.cpp.2 QRect TextArea::areaGeometry () const [protected.3. setPosition(). 92 { 93 HeaderFooter* headerFooter = new HeaderFooter( new Private( *d ). 123 { 124 return mAutoReferenceArea. HeaderFooter().4 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase.3. 100 } 6. 95 headerFooter->setPosition( position() ).3. References d. Referenced by setParent(). 106 { 107 return geometry(). inherited] Implements KDChart::AbstractAreaBase. References KDChart::TextLayoutItem::geometry(). Referenced by KDChart::TextArea::paintAll(). 98 { 99 return d->backgroundAttributes. 108 } 6. KDChart::TextLayoutItem::textAttributes().27. setType(). position().27.cpp.27. 98 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .3. 125 } 6. virtual. 94 headerFooter->setType( type() ).cpp. and type(). 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry. 0 ). 97 return headerFooter.

and d.9 QRect AbstractAreaBase::innerRect () const [protected.27. 168 { 169 return mRect. Referenced by KDChart::TextArea::areaGeometry().padding(). "AbstractAreaBase::innerRect()". -padding ).0). 179 180 const int padding 181 = d->frameAttributes. Referenced by KDChart::Legend::clone(). KDChart::Text- Area::paintAll(). 178 "Private class was not initialized!" ). 163 { 164 return 0. 88 { 89 return d->frameAttributes.3.6.cpp. // Grow neither vertically nor horizontally 165 } 6. 90 } 6. 170 } 6. and KDChart::TextArea::paintIntoRect().cpp.isVisible() 182 ? qMax( d->frameAttributes.adjusted( padding.8 QRect KDChart::TextLayoutItem::geometry () const [virtual. KDChart::CartesianAxis::paintCtx(). KDChart::TextLayoutItem::paint(). padding.27.cpp. and KDChart::AbstractArea::paintAll(). areaGeometry().3.6 Qt::Orientations KDChart::TextLayoutItem::expandingDirections () const [virtual. inherited] Definition at line 175 of file KDChartAbstractAreaBase.27 KDChart::HeaderFooter Class Reference 373 6.27.27. References d.3. References KDChart::AbstractAreaBase::areaGeometry(). -padding. 176 { 177 Q_ASSERT_X ( d != 0. 0 ) : 0. Referenced by KDChart::TextArea::paintAll(). inherited] pure virtual in QLayoutItem Definition at line 162 of file KDChartLayoutItems.size() ) 185 .3.cpp. inherited] pure virtual in QLayoutItem Definition at line 167 of file KDChartLayoutItems. 183 return 184 QRect( QPoint(0. KDChart::AbstractAreaWidget::paintAll().7 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase. 186 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

249 { 250 if ( mAttributes. r * sin( -angle ) ).27.3. Referenced by KDChart::CartesianAxis::paintCtx(). const QPoint & otherPos) const [virtual.rotatedCorners() ). inherited] Definition at line 248 of file KDChartLayoutItems. 282 otherP1 = QPointF( r * cos( -angle ).x() * cos( -angle ). 246 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .translate( otherPos ).unrotatedSizeHint() ). PI. 254 QPolygon otherPolygon( other. 283 284 // finally we look. const QPoint & myPos.3.translate( myPos ). 0. const QPointF & myPos. myP1.intersects( QRectF( otherP1.y() * otherP1.isEmpty().0 ). 270 // both sizes 271 const QSizeF mySize( unrotatedSizeHint() ). 259 260 // create regions out of it 261 QRegion myRegion( myPolygon ).x() * sin( -angle ) ).0 ) + otherPos .rotation() ) 251 { 252 // that’s the code for the common case: the rotation angles don’t need to match here 253 QPolygon myPolygon( rotatedCorners() ). References KDChart::TextLayoutItem::mAttributes. 255 256 // move the polygons to their positions 257 myPolygon.rotation() * PI / 180. 272 const QSizeF otherSize( other.mAttributes. KDChart::TextLayoutItem::rotatedCorners(). 286 } 287 } 6. 273 274 // that’s myP1 relative to myPos 275 QPointF myP1( mySize. inherited] Definition at line 243 of file KDChartLayoutItems. KDChart::TextAttributes::rotation().do they intersect or not? 265 return ! myRegion.x() + otherP1.11 bool KDChart::TextLayoutItem::intersects (const TextLayoutItem & other. mySize ). otherSize ) ).toPoint().intersect( otherRegion ). const QPointF & otherPos) const [virtual.10 bool KDChart::TextLayoutItem::intersects (const TextLayoutItem & other.cpp.0. whether both rectangles intersect or even not 285 return QRectF( myP1. 278 279 // now rotate both points the negative angle around myPos 280 myP1 = QPointF( myP1.height() * sin( angle ).y() ).x() * otherP1. and KDChart::TextLayoutItem::unrotatedSizeHint(). 244 { 245 return intersects( other. 266 267 } else { 268 // and that’s the code for the special case: the rotation angles match. 262 QRegion otherRegion( otherPolygon ).myPos. 263 264 // now the question .height() * sin( angle ). 276 // that’s otherP1 to myPos 277 QPointF otherP1 = QPointF( otherSize. which is less time con 269 const qreal angle = mAttributes. 0. otherPos.374 KD Chart 2 Class Documentation 6. 258 otherPolygon.toPoint() ). 281 qreal r = sqrt( otherP1.rotation() != other.27. myPos.cpp.

pen() ). 183 { 184 return sizeHint().isValid() ) 331 return. inherited] pure virtual in QLayoutItem Definition at line 172 of file KDChartLayoutItems.3.14 QSize KDChart::TextLayoutItem::minimumSize () const [virtual. 326 { 327 // make sure.15 void KDChart::TextLayoutItem::paint (QPainter ∗) [virtual. 178 { 179 return sizeHint().27. cached font is updated.cpp. if needed: 328 sizeHint().cpp.cpp. References KDChart::TextLayoutItem::sizeHint().cpp.3. 334 painter->setFont( cachedFont ).27. // PENDING(kalle) Review.3. KDChart::Text- Attributes::rotation().13 QSize KDChart::TextLayoutItem::maximumSize () const [virtual.6. 332 333 PainterSaver painterSaver( painter ). quite inflexible 180 } 6.3. // PENDING(kalle) Review. 329 330 if( !mRect. quite inflexible 185 } 6. 337 Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and KDChart::CartesianAxis::paintCtx().12 bool KDChart::TextLayoutItem::isEmpty () const [virtual. Definition at line 325 of file KDChartLayoutItems.27. inherited] Implements KDChart::AbstractLayoutItem. Referenced by KDChart::TextArea::paintAll(). otherwise the layout item would not exist 175 } 6. 336 QRectF rect = geometry(). // never empty. inherited] pure virtual in QLayoutItem Definition at line 177 of file KDChartLayoutItems.27. References KDChart::TextLayoutItem::geometry(). inherited] pure virtual in QLayoutItem Definition at line 182 of file KDChartLayoutItems. 173 { 174 return false.27 KDChart::HeaderFooter Class Reference 375 6. 335 painter->setPen( mAttributes. KDChart::TextAttributes::pen(). and KDChart::TextLayoutItem::sizeHint(). References KDChart::TextLayoutItem::sizeHint().

"AbstractAreaBase::paintBackground()".cpp.top() ). geometry() ).width() / 2.moveTo( 94 oldGeometry. 339 rect.rect. 340 painter->rotate( mAttributes.3. Definition at line 83 of file KDChartTextArea. References attributes. References KDChart::TextArea::areaGeometry().isVisible() ) return. .left(). const QRect & rectangle) [virtual. 342 } 6. KDChart::AbstractAreaBase::innerRect().27. 87 paintFrame( painter.center() ). and KDChart::TextArea::paintIntoRect(). 111 112 /* first draw the brush (may contain a pixmap)*/ Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .16 void TextArea::paintAll (QPainter & painter) [inherited] Call paintAll.17 void AbstractAreaBase::paintBackground (QPainter & painter. and KDChart::TextLayout- Item::setGeometry(). Referenced by KDChart::TextArea::paintAll().moveTopLeft( QPointF( . 95 oldGeometry.top() + inner.height() / 2 ) ). KDChart::AbstractAreaWidget::paintAll().rotation() ). Referenced by KDChart::Chart::paint().". KDChart::TextLayoutItem::paint(). 104 { 105 Q_ASSERT_X ( d != 0. KDChart::Abstract- AreaBase::paintBackground(). 96 const bool needAdjustGeometry = oldGeometry != inner. 97 if( needAdjustGeometry ) 98 setGeometry( inner ). KDChart::TextLayoutItem::geometry(). geometry() ).cpp.376 KD Chart 2 Class Documentation 338 painter->translate( rect.rect. 106 "Private class was not initialized!" ). and KDChart::AbstractArea::paintAll(). 341 painter->drawText( rect. 88 89 // temporarily adjust the widget size. to be sure all content gets calculated 90 // to fit into the inner rectangle 91 const QRect oldGeometry( areaGeometry() ).left() + inner. mText ). inherited] Definition at line 103 of file KDChartAbstractAreaBase. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. 100 if( needAdjustGeometry ) 101 setGeometry( oldGeometry ). 92 QRect inner( innerRect() ). 99 paint( &painter ). 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes. Qt::AlignHCenter | Qt::AlignVCenter. 84 { 85 // Paint the background and frame 86 paintBackground( painter. 93 inner. 102 //qDebug() << "TextAreaWidget::paintAll() done. KDChart::AbstractAreaBase::paintFrame().27. 103 } 6.3. and d.

drawPixmap( ol.pixmapMode() ) 126 { 127 ol.scale( z.width() / 2 ).setBrushOrigin( newTopLeft ). zH ).height() / (double)attributes.width() / 2 ). 134 switch( attributes. 118 painter.attributes.setX( rect.width().27 KDChart::HeaderFooter Class Reference 377 113 if( Qt::NoBrush != attributes.drawRect( rect ). zH ).pm. 116 const QPointF newTopLeft( painter. 115 painter.pixmap(). 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes. 149 ol. attributes.transformed( m ). 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.x() . z ). 128 ol. and KDChart::PaintContext::painter().brush() ). 65 { 66 if( context ) 67 paint( context->painter() ). 119 painter. 150 ol. inherited] Default impl: Paint the complete item using its layouted position and size.width() / (double)attributes.setBrush( attributes.pixmap().pixmap() ). 117 painter.pixmap(). 129 painter. 140 } 141 break. 68 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References KDChart::AbstractLayoutItem::paint(). previously checked 147 } 148 QPixmap pm = attributes.height()/ 2 ). pm ).setPen( Qt::NoPen ).topLeft(). 138 z = qMin( zW. 152 } 153 } 154 #undef attributes 155 } 6.style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).isNull() && 123 attributes.setY( rect.pixmap().attributes.6.brush(). Definition at line 64 of file KDChartLayoutItems. 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.height(). 145 default: 146 .drawPixmap( ol.y() .3.center(). Reimplemented in KDChart::CartesianAxis.center().y() .x() .deviceMatrix(). 144 break.cpp.map( rect.pixmap(). // Cannot happen.setX( rect. 139 m.height()/ 2 ).scale( zW. 133 double zH = (double)rect.setY( rect.pixmap(). 151 painter.pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.topLeft() ) ). 130 } else { 131 QMatrix m.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect.center(). 132 double zW = (double)rect.27.18 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual.center().pm.

120 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . KDChart::AbstractAreaWidget::paintAll(). Referenced by clone().3.top() ).drawRect( rect ). 169 painter.translate( -rect.cpp. 161 "Private class was not initialized!" ).translate( rect.19 void AbstractAreaBase::paintFrame (QPainter & painter.left(). -rect.3. inherited] Definition at line 158 of file KDChartAbstractAreaBase.27. 81 } 6.isVisible() ) return.27.378 KD Chart 2 Class Documentation 6. and KDChart::Text- LayoutItem::setGeometry(). but you would overwrite Text- LayoutItem::paint() instead. and KDChart::AbstractArea::paintAll(). References KDChart::TextLayoutItem::geometry(). 168 painter. Definition at line 71 of file KDChartTextArea. References d. 78 painter. 76 painter. In most cases there is no need to overwrite this method in a derived class. 118 { 119 return d->position.setPen( oldPen ). 74 if( oldGeometry != rect ) 75 setGeometry( rect ).cpp. and d. const QRect & rect) [virtual.27. const QRect & rectangle) [virtual. rect.pen() ).21 Position HeaderFooter::position () const Definition at line 117 of file KDChartHeaderFooter. 166 167 const QPen oldPen( painter. 79 if( oldGeometry != rect ) 80 setGeometry( oldGeometry ). "AbstractAreaBase::paintFrame()". 77 paintAll( painter ). inherited] Draws the background and frame. References attributes.20 void TextArea::paintIntoRect (QPainter & painter. 159 { 160 Q_ASSERT_X ( d != 0.cpp. 171 #undef attributes 172 } 6.pen() ).3. 170 painter. 72 { 73 const QRect oldGeometry( geometry() ). Referenced by KDChart::TextArea::paintAll(). then calls paint(). KDChart::TextArea::paintAll().setPen( attributes.left(). 162 163 #define attributes d->frameAttributes 164 165 if( !attributes.top() ).

6. KDChart::TextAttributes::fontSize().cpp.cpp.27.h. and KDChart::TextAttributes::minimalFontSize().22 void KDChart::HeaderFooter::positionChanged (HeaderFooter ∗) Referenced by setPosition(). 71 else 72 mParentLayout->removeItem( this ). inherited] Definition at line 193 of file KDChartLayoutItems. virtual.25 qreal KDChart::TextLayoutItem::realFontSize () const [virtual.27 KDChart::HeaderFooter Class Reference 379 6. 202 } 6. Definition at line 110 of file KDChartTextArea.cpp.27.27.calculatedValue( 197 mAutoReferenceArea.26 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems. and KDChart::CartesianAxis::paintCtx(). and setType(). References KDChart::Measure::calculatedValue(). Referenced by KDChart::CartesianAxis::maximumSize(). 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ). 113 } 6.minimalFontSize().27. inherited] Reimplemented from KDChart::AbstractAreaBase. Referenced by KDChart::Chart::takeCoordinatePlane(). 224 } 6.3. 198 mAutoReferenceOrientation ).3.3. 194 { 195 return qMax( 196 mAttributes. inherited] Definition at line 220 of file KDChartLayoutItems.24 QFont KDChart::TextLayoutItem::realFont () const [virtual. // we can safely ignore the boolean return value 223 return cachedFont. 6. 221 { 222 realFontWasRecalculated().23 void TextArea::positionHasChanged () [protected.27.fontSize(). 73 } 74 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 201 mAutoReferenceOrientation ) ). 111 { 112 emit positionChanged( this ). 199 mAttributes.3.3.calculatedValue( 200 mAutoReferenceArea.

cpp. References d.27 void KDChart::TextLayoutItem::setAutoReferenceArea (const QObject ∗ area) [inherited] Definition at line 115 of file KDChartLayoutItems. References d. 118 cachedSizeHint = QSize().28 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase.380 KD Chart 2 Class Documentation 6. Referenced by KDChart::Legend::clone(). 188 { 189 mRect = r. inherited] pure virtual in QLayoutItem Definition at line 187 of file KDChartLayoutItems. 119 sizeHint().cpp.cpp.3.30 void KDChart::TextLayoutItem::setGeometry (const QRect & r) [virtual.3. KDChart::CartesianAxis::paintCtx().27. 190 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 95 } 6. and KDChart::Text- Area::paintIntoRect(). 93 { 94 d->backgroundAttributes = a.29 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase. Referenced by KDChart::TextArea::paintAll().3.27. Referenced by setParent(). 85 } 6.27. 120 } 6. 116 { 117 mAutoReferenceArea = area.3. 83 { 84 d->frameAttributes = a.cpp.27. References KDChart::TextLayoutItem::sizeHint().

cpp. 70 if( parent && ! autoReferenceArea() ) 71 setAutoReferenceArea( parent ). and KDChart::AbstractCartesianDiagram::takeAxis(). References KDChart::TextLayoutItem::autoReferenceArea().cpp. 114 emit positionChanged( this ).34 void HeaderFooter::setPosition (Position position) Definition at line 111 of file KDChartHeaderFooter. KDChart::Chart::addHeaderFooter().33 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual. KDChart::Widget::replaceHeaderFooter().27. 63 { 64 mParentLayout = lay. whenever the size of the item’s contents has changed. 57 { 58 mParent = widget. Definition at line 56 of file KDChartLayoutItems.27 KDChart::HeaderFooter Class Reference 381 6. inherited] Inform the item about its widget: This enables the item. Referenced by KDChart::Widget::addHeaderFooter().3. 112 { 113 d->position = position. Referenced by KDChart::Widget::addHeaderFooter(). References d. Referenced by KDChart::Legend::buildLegend(). and KDChart::Chart::takeHeaderFooter().3.31 void HeaderFooter::setParent (QObject ∗ parent) Definition at line 67 of file KDChartHeaderFooter.3. References KDChart::AbstractLayoutItem::mParent. 59 } 6.3. and clone().h. 115 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 68 { 69 QObject::setParent( parent ). Header- Footer(). to trigger that widget’s update. that has a non-fixed size.6.27.32 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems. and positionChanged(). 72 } 6.27.cpp. Thus.27. and KDChart::TextLayoutItem::setAuto- ReferenceArea(). 65 } 6. you need to call setParentWidget on every item.

132 } 6. 104 } 6.27.35 void KDChart::TextLayoutItem::setText (const QString & text) [inherited] Definition at line 127 of file KDChartLayoutItems.36 void KDChart::TextLayoutItem::setTextAttributes (const TextAttributes & a) [inherited] Use this to specify the text attributes to be used for this item. 130 cachedSizeHint = QSize().3. 103 emit positionChanged( this ). Referenced by clone(). 149 } 6.cpp.3.382 KD Chart 2 Class Documentation 6. 147 cachedSizeHint = QSize(). // invalidate size hint 148 sizeHint(). References KDChart::TextLayoutItem::sizeHint().3. inherited] pure virtual in QLayoutItem Definition at line 289 of file KDChartLayoutItems. KDChart::CartesianAxis::maximumSize(). References KDChart::TextLayoutItem::sizeHint().37 void HeaderFooter::setType (HeaderFooterType type) Definition at line 100 of file KDChartHeaderFooter. 145 { 146 mAttributes = a.cpp.cpp. References d.3. and positionChanged(). 128 { 129 mText = text. 131 sizeHint().27.38 QSize KDChart::TextLayoutItem::sizeHint () const [virtual. and KDChart::CartesianAxis::paintCtx().27. Referenced by KDChart::Widget::addHeaderFooter(). Referenced by KDChart::Widget::addHeaderFooter(). and clone(). See also: textAttributes Definition at line 144 of file KDChartLayoutItems. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References KDChart::AbstractLayoutItem::sizeHintChanged(). 101 { 102 d->type = type.27.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called"). 80 else 81 QApplication::postEvent( mParent.41 KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes () const [inherited] Returns the text attributes to be used for this item. 297 return cachedSizeHint. 298 } 6. 135 { 136 return mText.cpp.width(): %i". KDChart::CartesianAxis::paintCtx(). Referenced by KDChart::TextLayoutItem::sizeHint(). Referenced by clone().cachedSizeHint. See also: setTextAttributes Definition at line 156 of file KDChartLayoutItems. KDChart::CartesianAxis::maximumSize(). Definition at line 73 of file KDChartLayoutItems. KDChart::TextLayoutItem::setAutoReference- Area(). new QEvent( QEvent::LayoutRequest ) ).6. 137 } 6.width()).27. KDChart::TextLayoutItem::minimumSize(). 295 } 296 //qDebug("cachedSizeHint. inherited] Report changed size hint: ask the parent widget to recalculate the layout.3.39 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual.3. KDChart::TextLayoutItem::maximumSize().3. 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate(). 74 { 75 // This is exactly like what QWidget::updateGeometry does. 290 { 291 if( realFontWasRecalculated() ) 292 { 293 cachedSizeHint = calcSizeHint( cachedFont ). 294 sizeHintChanged(). 82 } 83 } 6.cpp.27 KDChart::HeaderFooter Class Reference 383 Referenced by KDChart::Legend::buildLegend().40 QString KDChart::TextLayoutItem::text () const [inherited] Definition at line 134 of file KDChartLayoutItems. KDChart::TextLayoutItem::setText().cpp. KDChart::Text- LayoutItem::paint().27. Referenced by KDChart::CartesianAxis::paintCtx(). and KDChart::TextLayoutItem::setTextAttributes().27.

109 } 6.4.4. 6.27.27.3.h. 107 { 108 return d->type.384 KD Chart 2 Class Documentation 157 { 158 return mAttributes.27.3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected. inherited] Definition at line 77 of file KDChartLayoutItems.1 Q_SIGNALS KDChart::HeaderFooter::__pad0__ Reimplemented from KDChart::TextArea. Referenced by KDChart::AbstractLayoutItem::setParentWidget().h.27.4. Definition at line 66 of file KDChartHeaderFooter.h. inherited] Definition at line 76 of file KDChartLayoutItems.h • KDChartHeaderFooter. Referenced by clone().42 HeaderFooter::HeaderFooterType HeaderFooter::type () const Definition at line 106 of file KDChartHeaderFooter. References d.4 Member Data Documentation 6. The documentation for this class was generated from the following files: • KDChartHeaderFooter.cpp.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .27. 6. 159 } 6.

whenever the size of the item’s contents has changed.1 KDChart::HorizontalLineLayoutItem::HorizontalLineLayoutItem () Definition at line 411 of file KDChartLayoutItems.1. • virtual QSize sizeHint () const • virtual void sizeHintChanged () const Report changed size hint: ask the parent widget to recalculate the layout. to trigger that widget’s update.28 KDChart::HorizontalLineLayoutItem Class Reference #include <KDChartLayoutItems.cpp.28 KDChart::HorizontalLineLayoutItem Class Reference 385 6. 412 : AbstractLayoutItem( Qt::AlignCenter ) 413 { 414 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • void removeFromParentLayout () • virtual void setGeometry (const QRect &r) • void setParentLayout (QLayout ∗lay) • virtual void setParentWidget (QWidget ∗widget) Inform the item about its widget: This enables the item. Protected Attributes • QWidget ∗ mParent • QLayout ∗ mParentLayout 6.28.h> Inheritance diagram for KDChart::HorizontalLineLayoutItem:Collaboration diagram for KDChart::HorizontalLineLayoutItem: Public Member Functions • virtual Qt::Orientations expandingDirections () const • virtual QRect geometry () const • HorizontalLineLayoutItem () • virtual bool isEmpty () const • virtual QSize maximumSize () const • virtual QSize minimumSize () const • virtual void paint (QPainter ∗) • virtual void paintCtx (PaintContext ∗context) Default impl: Paint the complete item using its layouted position and size.28.1 Constructor & Destructor Documentation 6.6.

424 } 6.2. otherwise the layout item would not exist 429 } 6.6 void KDChart::HorizontalLineLayoutItem::paint (QPainter ∗) [virtual] Implements KDChart::AbstractLayoutItem. 439 } 6.5 QSize KDChart::HorizontalLineLayoutItem::minimumSize () const [virtual] Definition at line 436 of file KDChartLayoutItems.2.2.28.2 QRect KDChart::HorizontalLineLayoutItem::geometry () const [virtual] Definition at line 421 of file KDChartLayoutItems.386 KD Chart 2 Class Documentation 6.28. QWIDGETSIZE_MAX ).2.28. 422 { 423 return mRect.4 QSize KDChart::HorizontalLineLayoutItem::maximumSize () const [virtual] Definition at line 431 of file KDChartLayoutItems. 437 { 438 return QSize( 0.28.2.3 bool KDChart::HorizontalLineLayoutItem::isEmpty () const [virtual] Definition at line 426 of file KDChartLayoutItems.cpp.cpp. 434 } 6. // Grow neither vertically nor horizontally 419 } 6. 0 ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .1 Qt::Orientations KDChart::HorizontalLineLayoutItem::expandingDirections () const [virtual] Definition at line 416 of file KDChartLayoutItems.cpp. 427 { 428 return false.cpp.cpp. 432 { 433 return QSize( QWIDGETSIZE_MAX.cpp.28.28. 417 { 418 return Qt::Vertical|Qt::Horizontal.28. Definition at line 452 of file KDChartLayoutItems.2 Member Function Documentation 6.2. // never empty.

28.center().2.28. 73 } 74 } 6.8 void KDChart::AbstractLayoutItem::removeFromParentLayout () [inherited] Definition at line 66 of file KDChartLayoutItems. 67 { 68 if( mParentLayout ){ 69 if( widget() ) 70 mParentLayout->removeWidget( widget() ). inherited] Default impl: Paint the complete item using its layouted position and size. References KDChart::AbstractLayoutItem::paint().isValid() ) 455 return. 68 } 6. 71 else 72 mParentLayout->removeItem( this ).10 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited] Definition at line 62 of file KDChartLayoutItems.2. 456 457 painter->drawLine( QPointF( mRect.cpp.h.center().9 void KDChart::HorizontalLineLayoutItem::setGeometry (const QRect & r) [virtual] Definition at line 441 of file KDChartLayoutItems.28. 65 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .28.7 void KDChart::AbstractLayoutItem::paintCtx (PaintContext ∗ context) [virtual. and KDChart::PaintContext::painter(). Referenced by KDChart::Chart::takeCoordinatePlane(). 444 } 6.6.28 KDChart::HorizontalLineLayoutItem Class Reference 387 453 { 454 if( !mRect.left().y() ) ).y() ).right().cpp. mRect. 65 { 66 if( context ) 67 paint( context->painter() ). 458 QPointF( mRect. Definition at line 64 of file KDChartLayoutItems.h.2. mRect.2. 459 } 6. 63 { 64 mParentLayout = lay. Reimplemented in KDChart::CartesianAxis. 442 { 443 mRect = r.

Referenced by KDChart::TextLayoutItem::sizeHint(). References KDChart::AbstractLayoutItem::mParent.2.3 Member Data Documentation 6. 57 { 58 mParent = widget. 447 { 448 return QSize( -1.2. that has a non-fixed size.28.12 QSize KDChart::HorizontalLineLayoutItem::sizeHint () const [virtual] Definition at line 446 of file KDChartLayoutItems.cpp. 59 } 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Thus. inherited] Inform the item about its widget: This enables the item.28.3. whenever the size of the item’s contents has changed.cpp.2. // see qframe. Referenced by KDChart::Legend::buildLegend().13 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual. to trigger that widget’s update. 76 // qDebug("KDChart::AbstractLayoutItem::sizeHintChanged() called"). new QEvent( QEvent::LayoutRequest ) ).28. Referenced by KDChart::AbstractLayoutItem::setParentWidget(). inherited] Definition at line 76 of file KDChartLayoutItems.388 KD Chart 2 Class Documentation 6. Definition at line 56 of file KDChartLayoutItems.cpp 449 } 6.h. 77 if( mParent ) { 78 if ( mParent->layout() ) 79 mParent->layout()->invalidate(). and KDChart::AbstractCartesianDiagram::takeAxis(). inherited] Report changed size hint: ask the parent widget to recalculate the layout. 74 { 75 // This is exactly like what QWidget::updateGeometry does.11 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual.1 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected. 80 else 81 QApplication::postEvent( mParent.cpp. you need to call setParentWidget on every item.28. 82 } 83 } 6. Definition at line 73 of file KDChartLayoutItems.28. 3 ).

28.28 KDChart::HorizontalLineLayoutItem Class Reference 389 6. The documentation for this class was generated from the following files: • KDChartLayoutItems.2 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected.h • KDChartLayoutItems. inherited] Definition at line 77 of file KDChartLayoutItems.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h.6.3.

PositionNorthWest = 2. that may be applied. • enum PositionValue { PositionUnknown = 0. Definition at line 46 of file KDChartEnums. PositionNorth = 3. MeasureCalculationModeAutoOrientation } Measure calculation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart’s internal geometry calculation time.29 KDChartEnums Class Reference #include <KDChartEnums. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .h. MeasureOrientationMaximum } Measure orientation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart’s internal geometry calculation time. • enum MeasureCalculationMode { MeasureCalculationModeAbsolute. to determine a step width within a given data range. GranularitySequenceIrregular } GranularitySequence specifies the values. GranularitySequence_25_50. • enum MeasureOrientation { MeasureOrientationAuto. MeasureCalculationModeAuto.h> Inheritance diagram for KDChartEnums:Collaboration diagram for KDChartEnums: 6. MeasureOrientationMinimum. GranularitySequence_10_50.29.390 KD Chart 2 Class Documentation 6. MeasureCalculationModeRelative.1 Detailed Description Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox. MeasureOrientationHorizontal. MeasureOrientationVertical. MeasureCalculationModeAutoArea. PositionNorthEast = 4. PositionCenter = 1. Public Types • enum GranularitySequence { GranularitySequence_10_20.

• MeasureCalculationMode stringToMeasureCalculationMode (const QString &string) Converts the specified string to a measure calculation mode enum value. PositionSouth = 7.6. • TextLayoutPolicy stringToLayoutPolicy (const QString &string) Converts the specified string to a text layout policy enum value. PositionWest = 9 } Numerical values of the static KDChart::Position instances. • MeasureOrientation stringToMeasureOrientation (const QString &string) Converts the specified string to a measure orientation enum value. for using a Position::value() with a switch() statement. PositionSouthWest = 8. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • QString layoutPolicyToString (TextLayoutPolicy type) Converts the specified text layout policy enum to a string representation. PositionSouthEast = 6. LayoutPolicyShiftHorizontally. • GranularitySequence stringToGranularitySequence (const QString &string) Converts the specified string to a granularity sequence enum value. Static Public Member Functions • QString granularitySequenceToString (GranularitySequence sequence) Converts the specified granularity sequence enum to a string representation. LayoutPolicyShrinkFontSize } Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighboring areas. • QString MeasureOrientationToString (MeasureOrientation mode) Converts the specified measure orientation enum to a string representation. LayoutPolicyShiftVertically. LayoutPolicyRotate.29 KDChartEnums Class Reference 391 PositionEast = 5. • enum TextLayoutPolicy { LayoutJustOverwrite. • QString measureCalculationModeToString (MeasureCalculationMode mode) Converts the specified measure calculation mode enum to a string representation.

or 5. • GranularitySequence_10_20 Step widths can be 1. Value occuring in the GranularitySequence names only are showing their respective relation ship. resp. The reason for using one of the following three pre-defined granularity sequences (instead of just using the best matching step width) is to follow a simple rule: If scaling becomes finer (== smaller step width) no value. Note: Granularity with can be set for Linear axis calculation mode only. or 2. or 2.5 to 2 (or vice versa. there is no way to specify a step width for Logarithmic axes.1 enum KDChartEnums::GranularitySequence GranularitySequence specifies the values. shall loose its line and be NOT on a grid line anymore! This means: Smaller step width may not remove any grid lines.h. For real data they will most times not be used directly.29.2. to determine a step width within a given data range. Note: When ever possible. try to avoid using GranularitySequenceIrregular! Allowing all possible step val- ues. but be multiplied by positive (or negative. 98 GranularitySequenceIrregular }. nor 2. or 5.2 Member Enumeration Documentation 6. • GranularitySequenceIrregular Step widths can be all of these values: 1. • GranularitySequence_10_50 Step widths can be 1.5.5 nor 5. 2. 5. when step size is changed from 2. but they never can be 2. 2. while • for having it divided by two GranularitySequence_10_50 is your choice. Since you probably like having the value 1 as an allowed step width. or 5.5. A granularity sequence is a sequence of values from the following set: 1.). but it may add additional lines in between. nor 2.392 KD Chart 2 Class Documentation 6.) powers of ten. • GranularitySequence_25_50 Step widths can be 2. the granularity sequence decision boils down to a boolean question: • To get ten divided by five you use GranularitySequence_10_20. Enumeration values: GranularitySequence_10_20 GranularitySequence_10_50 GranularitySequence_25_50 GranularitySequenceIrregular Definition at line 94 of file KDChartEnums. resp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 96 GranularitySequence_10_50. that may be applied. that has been on a grid line before. 94 { 95 GranularitySequence_10_20.29. using this granularity sequence involves a serious risk: Your users might be irritated due to ’jump- ing’ grid lines. but they never can be 1.5. 97 GranularitySequence_25_50. but they never can be 2. or 2.5.

215 { MeasureCalculationModeAbsolute. or determined by KD Chart automatically. to be used un- changed. respectively.29.29. 217 MeasureCalculationModeAuto. resp.6. 219 MeasureCalculationModeAutoOrientation }.2 enum KDChartEnums::MeasureCalculationMode Measure calculation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart’s internal geometry calculation time. • MeasureCalculationModeAuto Value is relative. Values stored in relative measure always are interpreted as per-mille of a reference area’s height (or width.h. 6. 216 MeasureCalculationModeRelative. Values stored in relative measure take into account the width (and/or the height. KDChart::Measure values either are relative (calculated in relation to a given AbstractArea). or they are absolute (used as fixed values).) depending on the orientation set for the KDChart::Measure. See also: KDChart::Measure::setCalculationMode Enumeration values: MeasureCalculationModeAbsolute MeasureCalculationModeRelative MeasureCalculationModeAuto MeasureCalculationModeAutoArea MeasureCalculationModeAutoOrientation Definition at line 215 of file KDChartEnums. resp.29 KDChartEnums Class Reference 393 6. and it will determine the orientation too. • MeasureCalculationModeRelative Value is relative. and KD Chart will automatically determine which orientation to use. that is either specified by KDChart::Measure::setReferenceArea. Area is specified by set- ReferenceArea(). 218 MeasureCalculationModeAutoArea. • MeasureCalculationModeAutoArea Value is relative. the reference area is specified by set- ReferenceArea(). • MeasureCalculationModeAutoOrientation Value is relative.3 enum KDChartEnums::MeasureOrientation Measure orientation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart’s internal geometry calculation time.) of a so-called reference area. Orientation is specified by set- Orientation().2. KD Chart will automatically determine which reference area to use.2. KDChart::Measure values either are relative (calculated in relation to a given AbstractArea). and orientation specified by setOrientation(). or they are absolute (used as fixed values). and KD Chart will automatically determine which reference area to use. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . • MeasureCalculationModeAbsolute Value set by setValue() is absolute.

based upon the width (or on the height.which ever is smaller. based upon the width of the reference area.) of the reference area . resp.29. • MeasureOrientationHorizontal Value is calculated. 6.h.) of the reference area . See also: Position Enumeration values: PositionUnknown PositionCenter PositionNorthWest PositionNorth PositionNorthEast PositionEast PositionSouthEast PositionSouth PositionSouthWest Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 286 MeasureOrientationVertical. based upon the width (or on the height. See also: KDChart::Measure::setOrientationMode Enumeration values: MeasureOrientationAuto MeasureOrientationHorizontal MeasureOrientationVertical MeasureOrientationMinimum MeasureOrientationMaximum Definition at line 284 of file KDChartEnums. 287 MeasureOrientationMinimum.2. 284 { MeasureOrientationAuto. • MeasureOrientationMinimum Value is calculated.which ever is smaller.394 KD Chart 2 Class Documentation • MeasureOrientationAuto Value is calculated. • MeasureOrientationMaximum Value is calculated. based upon the height of the reference area. resp.4 enum KDChartEnums::PositionValue Numerical values of the static KDChart::Position instances.) of the reference area: KD Chart will automatically determie an appropriate way. 288 MeasureOrientationMaximum }. based upon the width (or on the height. 285 MeasureOrientationHorizontal. • MeasureOrientationVertical Value is calculated. for using a Position::value() with a switch() statement. resp.

156 { LayoutJustOverwrite. • LayoutPolicyRotate Try counter-clockwise rotation to make the text fit into the space. resp. • LayoutJustOverwrite Just ignore the layout collision and write the text nevertheless. 159 LayoutPolicyShiftHorizontally. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 160 LayoutPolicyShrinkFontSize }. • LayoutPolicyShiftVertically Shift the text baseline upwards (or downwards. 190 PositionNorthWest = 2.h. 197 PositionWest = 9 }. resp. 195 PositionSouth = 7. • LayoutPolicyShrinkFontSize Reduce the text font size.) and draw a connector line between the text and its anchor. 196 PositionSouthWest = 8. 157 LayoutPolicyRotate. 193 PositionEast = 5. 6.h. See also: KDChartParams::setPrintDataValues Enumeration values: LayoutJustOverwrite LayoutPolicyRotate LayoutPolicyShiftVertically LayoutPolicyShiftHorizontally LayoutPolicyShrinkFontSize Definition at line 156 of file KDChartEnums. 158 LayoutPolicyShiftVertically.5 enum KDChartEnums::TextLayoutPolicy Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighboring areas. 187 { 188 PositionUnknown = 0.6. 191 PositionNorth = 3. • LayoutPolicyShiftHorizontally Shift the text baseline to the left (or to the right. 189 PositionCenter = 1.29 KDChartEnums Class Reference 395 PositionWest Definition at line 187 of file KDChartEnums. 194 PositionSouthEast = 6.29.) and draw a connector line between the text and its anchor.2. 192 PositionNorthEast = 4.

111 case GranularitySequence_10_50: 112 return QString::fromLatin1("GranularitySequence_10_50").3.29. 107 { 108 switch( sequence ) { 109 case GranularitySequence_10_20: 110 return QString::fromLatin1("GranularitySequence_10_20").1 QString KDChartEnums::granularitySequenceToString (GranularitySequence sequence) [static] Converts the specified granularity sequence enum to a string representation.3.29.29. 120 } 121 } 6. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . Parameters: type the measure calculation mode to convert Returns: the string representation of the Measure calculation mode enum Definition at line 228 of file KDChartEnums. 119 return QString::fromLatin1("GranularitySequence_10_20"). 117 default: // should not happen 118 qDebug( "Unknown granularity sequence" ).2 QString KDChartEnums::layoutPolicyToString (TextLayoutPolicy type) [static] Converts the specified text layout policy enum to a string representation. 113 case GranularitySequence_25_50: 114 return QString::fromLatin1("GranularitySequence_25_50"). Parameters: type the text layout policy to convert Returns: the string representation of the text layout policy enum 6.h.29.3 QString KDChartEnums::measureCalculationModeToString (MeasureCalculationMode mode) [static] Converts the specified measure calculation mode enum to a string representation. Parameters: type the granularity sequence enum to convert Returns: the string representation of the granularity sequence Definition at line 107 of file KDChartEnums.h. 115 case GranularitySequenceIrregular: 116 return QString::fromLatin1("GranularitySequenceIrregular").3.3 Member Function Documentation 6.396 KD Chart 2 Class Documentation 6.

312 } 313 } 6. 309 default: // should not happen 310 qDebug( "Unknown measure orientation mode" ).29.3. 238 case MeasureCalculationModeRelative: 239 return QString::fromLatin1("MeasureCalculationModeRelative"). 232 case MeasureCalculationModeAuto: 233 return QString::fromLatin1("MeasureCalculationModeAuto").29.6.5 GranularitySequence KDChartEnums::stringToGranularitySequence (const QString & string) [static] Converts the specified string to a granularity sequence enum value. 311 return QString::fromLatin1("MeasureOrientationAuto"). 297 { 298 switch( mode ) { 299 case MeasureOrientationAuto: 300 return QString::fromLatin1("MeasureOrientationAuto"). 242 return QString::fromLatin1("MeasureCalculationModeAuto").4 QString KDChartEnums::MeasureOrientationToString (MeasureOrientation mode) [static] Converts the specified measure orientation enum to a string representation. 307 case MeasureOrientationMaximum: 308 return QString::fromLatin1("MeasureOrientationMaximum"). 240 default: // should not happen 241 qDebug( "Unknown measure calculation mode" ).3. 243 } 244 } 6. 305 case MeasureOrientationMinimum: 306 return QString::fromLatin1("MeasureOrientationMinimum"). Parameters: type the measure orientation to convert Returns: the string representation of the measure orientation enum Definition at line 297 of file KDChartEnums. 301 case MeasureOrientationHorizontal: 302 return QString::fromLatin1("MeasureOrientationHorizontal"). 303 case MeasureOrientationVertical: 304 return QString::fromLatin1("MeasureOrientationVertical"). 234 case MeasureCalculationModeAutoArea: 235 return QString::fromLatin1("MeasureCalculationModeAutoArea").h. Parameters: string the string to convert Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .29 KDChartEnums Class Reference 397 228 { 229 switch( mode ) { 230 case MeasureCalculationModeAbsolute: 231 return QString::fromLatin1("MeasureCalculationModeAbsolute"). 236 case MeasureCalculationModeAutoOrientation: 237 return QString::fromLatin1("MeasureCalculationModeAutoOrientation").

262 if( string == QString::fromLatin1("MeasureCalculationModeRelative") ) 263 return MeasureCalculationModeRelative.29.398 KD Chart 2 Class Documentation Returns: the granularity sequence enum value Definition at line 130 of file KDChartEnums. 260 if( string == QString::fromLatin1("MeasureCalculationModeAutoOrientation") ) 261 return MeasureCalculationModeAutoOrientation. Parameters: string the string to convert Returns: the text layout policy enum value 6. 266 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 139 // default. 141 } 6.3. 135 if( string == QString::fromLatin1("GranularitySequence_25_50") ) 136 return GranularitySequence_25_50. 130 { 131 if( string == QString::fromLatin1("GranularitySequence_10_20") ) 132 return GranularitySequence_10_20.6 TextLayoutPolicy KDChartEnums::stringToLayoutPolicy (const QString & string) [static] Converts the specified string to a text layout policy enum value. 133 if( string == QString::fromLatin1("GranularitySequence_10_50") ) 134 return GranularitySequence_10_50.7 MeasureCalculationMode KDChartEnums::stringToMeasureCalculationMode (const QString & string) [static] Converts the specified string to a measure calculation mode enum value. should not happen 265 return MeasureCalculationModeAuto.h. 256 if( string == QString::fromLatin1("MeasureCalculationModeAuto") ) 257 return MeasureCalculationModeAuto.29. 137 if( string == QString::fromLatin1("GranularitySequenceIrregular") ) 138 return GranularitySequenceIrregular.h. 258 if( string == QString::fromLatin1("MeasureCalculationModeAutoArea") ) 259 return MeasureCalculationModeAutoArea. should not happen 140 return GranularitySequence_10_20.3. 264 // default. 253 { 254 if( string == QString::fromLatin1("MeasureCalculationModeAbsolute") ) 255 return MeasureCalculationModeAbsolute. Parameters: string the string to convert Returns: the measure calculation mode enum value Definition at line 253 of file KDChartEnums.

8 MeasureOrientation KDChartEnums::stringToMeasureOrientation (const QString & string) [static] Converts the specified string to a measure orientation enum value. should not happen 334 return MeasureOrientationAuto.29 KDChartEnums Class Reference 399 6. 329 if( string == QString::fromLatin1("MeasureOrientationMinimum") ) 330 return MeasureOrientationMinimum.29.3. Parameters: string the string to convert Returns: the measure orientation enum value Definition at line 322 of file KDChartEnums. 331 if( string == QString::fromLatin1("MeasureOrientationMaximum") ) 332 return MeasureOrientationMaximum. 327 if( string == QString::fromLatin1("MeasureOrientationVertical") ) 328 return MeasureOrientationVertical. 333 // default. 322 { 323 if( string == QString::fromLatin1("MeasureOrientationAuto") ) 324 return MeasureOrientationAuto. 325 if( string == QString::fromLatin1("MeasureOrientationHorizontal") ) 326 return MeasureOrientationHorizontal.h. 335 } The documentation for this class was generated from the following file: • KDChartEnums.6.h Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .

56 {} Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .30. 51 mMinimumSizeHint() 52 { 53 54 } 6. 42 mMinimumSizeHint() 43 { 44 45 } 6.30.h> Inheritance diagram for KDTextDocument:Collaboration diagram for KDTextDocument: Public Member Functions • KDTextDocument (const QString &text.1 KDTextDocument::KDTextDocument (QObject ∗ parent = 0) [explicit] Definition at line 38 of file KDTextDocument. 39 : QTextDocument( p ). QObject ∗ parent = 0) [explicit] Definition at line 47 of file KDTextDocument. QObject ∗parent=0) • KDTextDocument (QObject ∗parent=0) • QSize minimumSizeHint () • QSize sizeHint () • ∼KDTextDocument () 6.30.1. 48 : QTextDocument( text.1 Constructor & Destructor Documentation 6.30 KDTextDocument Class Reference #include <KDTextDocument.cpp.2 KDTextDocument::KDTextDocument (const QString & text.3 KDTextDocument::∼KDTextDocument () Definition at line 56 of file KDTextDocument.1.cpp. p ). 49 mHintValid( false ). 41 mSizeHint().30. 50 mSizeHint().400 KD Chart 2 Class Documentation 6.cpp. 40 mHintValid( false ).1.

2 QSize KDTextDocument::sizeHint () Definition at line 59 of file KDTextDocument.cpp Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .height() < sz.text().height()) ).block() ). 89 if( mSizeHint.2 Member Function Documentation 6.30. 74 qDebug() << "KDTextDocument::minimumSizeHint() found rect" << documentLayout()->blockBoundingRect( 75 return QSize( static_cast<int>(s. 88 sz.30.30 KDTextDocument Class Reference 401 6. 67 { 68 /* 69 QTextCursor cursor( this ).rheight() = mSizeHint.cpp.width().2. 83 mSizeHint = sizeForWidth( -1 ).atEnd() ) 71 cursor. 94 } 6.cpp.rwidth() = sizeForWidth( 0 ).1 QSize KDTextDocument::minimumSizeHint () Definition at line 66 of file KDTextDocument. 84 QSize sz(-1. 85 86 // PENDING(kalle) Cache 87 sz.30. 81 82 mHintValid = true. 72 qDebug() << "KDTextDocument::minimumSizeHint() found:" << cursor. Referenced by sizeHint(). References minimumSizeHint(). 73 QSizeF s( documentLayout()->blockBoundingRect( cursor. 60 { 61 if( !mHintValid ) 62 (void)minimumSizeHint(). 63 return mSizeHint.block(). 76 static_cast<int>(s. 91 92 mMinimumSizeHint = sz.height().6.height(). 64 } The documentation for this class was generated from the following files: • KDTextDocument.size() ).rheight() = sizeForWidth( 32000 ).2.height()) 90 sz.width()). -1). 93 return sz. 77 */ 78 79 if( mHintValid ) 80 return mMinimumSizeHint.movePosition( QTextCursor::NextBlock ).h • KDTextDocument. 70 if( ! cursor.

• DiagramList diagrams () const The list of all diagrams associated with the legend. not per diagram. QWidget ∗parent) • Legend (QWidget ∗parent=0) • MarkerAttributes markerAttributes (uint dataset) const • Qt::Orientation orientation () const • virtual void paint (QPainter ∗painter) Overwrite this to paint the inner contents of your widget.h. • virtual void forceRebuild () • FrameAttributes frameAttributes () const • Legend (KDChart::AbstractDiagram ∗diagram. Public Member Functions • void addDiagram (KDChart::AbstractDiagram ∗newDiagram) Add the given diagram to the legend. On the other hand. Definition at line 61 of file KDChartLegend.31. since it can be displayed outside of the Chart’s area. using KDChart::Chart::addLegend().1 Detailed Description Legend defines the interface for the legend drawing class. Note: Legend is different from all other classes ofd KD Chart. • Qt::Alignment alignment () const • void alignToReferencePoint (const RelativePosition &position) • BackgroundAttributes backgroundAttributes () const • QBrush brush (uint dataset) const • void buildLegend () • virtual Legend ∗ clone () const • uint datasetCount () const • KDChart::AbstractDiagram ∗ diagram () const The first diagram of the legend or 0 if there was none added to the legend. Legend is the class for drawing legends for all kinds of diagrams ("chart types").402 KD Chart 2 Class Documentation 6. Legend is drawn on chart level. please note that you MUST call Chart::addLegend to get your legend positioned into the correct place of your chart .31 KDChart::Legend Class Reference #include <KDChartLegend.if you want to have the legend shown inside of the chart (that’s probably true for most cases). you can embedd the legend into your own widget. or into another part of a bigger grid. into which you might have inserted the Chart. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . If you want to.h> Inheritance diagram for KDChart::Legend:Collaboration diagram for KDChart::Legend: 6. but you can have more than one legend per chart.

6. if you want the background and the frame to be drawn before the normal paint() is invoked automatically. and for font size of the item texts. const QRect &rect) Draws the background and frame. KDChart::AbstractDiagram ∗old- Diagram=0) Replaces the old diagram. • void resetDiagram (AbstractDiagram ∗) • void resetTexts () Removes all legend texts that might have been set by setText. then calls paint(). • void removeDiagram (KDChart::AbstractDiagram ∗oldDiagram) Removes the diagram from the legend’s list of diagrams. then calls paint(). • virtual void paintFrame (QPainter &painter. • QPen pen (uint dataset) const • Position position () const • void propertiesChanged () Emitted upon change of a property of the Legend or any of its components. • void removeDiagrams () Removes all of the diagram from the legend’s list of diagrams. it there is none yet. IF automatic area detection is set. • void setFrameAttributes (const FrameAttributes &a) • void setMarkerAttributes (uint dataset. or appends the new diagram. 0 ). const QBrush &brush) • void setBrushesFromDiagram (KDChart::AbstractDiagram ∗diagram) • void setColor (uint dataset. • const QWidget ∗ referenceArea () const Returns the reference area. • virtual void paintBackground (QPainter &painter. const MarkerAttributes &) • void setNeedRebuild () • void setOrientation (Qt::Orientation orientation) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . const QColor &color) • void setDefaultColors () • void setDiagram (KDChart::AbstractDiagram ∗newDiagram) A convenience method doing the same as replaceDiagram( newDiagram.31 KDChart::Legend Class Reference 403 • void paintAll (QPainter &painter) Call paintAll. const QRect &rectangle) • virtual void paintIntoRect (QPainter &painter. • void replaceDiagram (KDChart::AbstractDiagram ∗newDiagram. const QRect &rectangle) • virtual void paintEvent (QPaintEvent ∗event) Draws the background and frame.. • virtual void resizeEvent (QResizeEvent ∗event) • void setAlignment (Qt::Alignment) • void setBackgroundAttributes (const BackgroundAttributes &a) • void setBrush (uint dataset. that is used for font size of title text.

cpp. Referenced by clone().31. • void setShowLines (bool legendShowLines) • void setSpacing (uint space) • void setSubduedColors (bool ordered=false) • void setText (uint dataset.31.404 KD Chart 2 Class Documentation • void setPen (uint dataset. 75 : 76 AbstractAreaWidget( new Private(). 79 init(). References d. parent ) 77 { 78 d->referenceArea = parent. IF automatic area detection is set. const QString &text) • void setTextAttributes (const TextAttributes &a) • void setTitleText (const QString &text) • void setTitleTextAttributes (const TextAttributes &a) • virtual void setVisible (bool visible) • bool showLines () const • uint spacing () const • QString text (uint dataset) const • TextAttributes textAttributes () const • QString titleText () const • TextAttributes titleTextAttributes () const • virtual ∼Legend () Public Attributes • Q_SIGNALS __pad0__: void destroyedLegend( Legend∗ ) • private Q_SLOTS: void emitPositionChanged() Protected Member Functions • virtual QRect areaGeometry () const • QRect innerRect () const • virtual void positionHasChanged () 6.2 Constructor & Destructor Documentation 6. 80 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and for font size of the item texts. const QPen &pen) • void setPosition (Position position) • void setRainbowColors () • void setReferenceArea (const QWidget ∗area) Specifies the reference area for font size of title text.1 Legend::Legend (QWidget ∗ parent = 0) [explicit] Definition at line 75 of file KDChartLegend.2.

91 { 92 emit destroyedLegend( this ). References d. removeDiagrams.31.3 Legend::∼Legend () [virtual] Definition at line 90 of file KDChartLegend. replaceDiagram.append( observer ). 209 210 DiagramObserver* oldObs = d->findObserverForDiagram( newDiagram ).2. 205 { 206 if ( newDiagram ) 207 { 208 DiagramObserver* observer = new DiagramObserver( newDiagram.2. diagrams. 88 } 6. and setDiagram(). 216 } 217 connect( observer. removeDiagram. 213 d->observers[ d->observers.2 Legend::Legend (KDChart::AbstractDiagram ∗ diagram. setDiagram Definition at line 204 of file KDChartLegend. QWidget ∗ parent) [explicit] Definition at line 82 of file KDChartLegend.31. 218 SLOT( resetDiagram(AbstractDiagram*) )).cpp. 86 init(). 214 }else{ 215 d->observers. Parameters: newDiagram The diagram to add. 219 connect( observer.3 Member Function Documentation 6.31.3. SIGNAL( diagramDataChanged(AbstractDiagram*) ).31. See also: diagram. 82 : 83 AbstractAreaWidget( new Private(). 93 } 6. Referenced by replaceDiagram(). this ).1 void Legend::addDiagram (KDChart::AbstractDiagram ∗ newDiagram) Add the given diagram to the legend. 87 setDiagram( diagram ). Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .6. parent ) 84 { 85 d->referenceArea = parent. References d. 211 if( oldObs ){ 212 delete oldObs. resetDiagram().indexOf( oldObs ) ] = observer.31 KDChart::Legend Class Reference 405 6.cpp.cpp. SIGNAL( diagramDestroyed(AbstractDiagram*) ). and setNeedRebuild().

31. 119 } 6. 224 } 225 } 6.3.31. 100 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. 98 { 99 return d->backgroundAttributes.5 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const [inherited] Definition at line 97 of file KDChartAbstractAreaBase. 223 setNeedRebuild(). inherited] Implements KDChart::AbstractAreaBase.3.3. Referenced by buildLegend(). 303 { 304 return d->alignment. paint().4 QRect AbstractAreaWidget::areaGeometry () const [protected.3. 221 connect( observer.31. and KDChart::AbstractAreaWidget::paintAll(). 305 } 6.cpp. 78 // PENDING(kalle) FIXME 79 qWarning( "Sorry.3 void AbstractAreaBase::alignToReferencePoint (const RelativePosition & position) [inherited] Definition at line 75 of file KDChartAbstractAreaBase. Definition at line 116 of file KDChartAbstractAreaWidget. 76 { 77 Q_UNUSED( position ). References d. References d. Referenced by clone(). virtual.406 KD Chart 2 Class Documentation 220 SLOT( setNeedRebuild() )). not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosi 80 } 6.31. 117 { 118 return geometry(). 222 SLOT( setNeedRebuild() )). SIGNAL( diagramAttributesChanged(AbstractDiagram*) ).cpp.cpp.2 Qt::Alignment Legend::alignment () const Definition at line 302 of file KDChartLegend.

KDChart::MarkerLayoutItem::sizeHint().6. so layouting 593 // is done at the right time. 615 d->modelBrushes. KDChart::Abstract- Diagram::datasetMarkers().31 KDChart::Legend Class Reference 407 6.31. and setRainbowColors(). orientation(). 597 598 #ifdef debug_legend_paint 599 qDebug() << " Legend::buildLegend() areaGeometry: " << areaGeometry(). 604 } 605 qDeleteAll( d->layoutItems ).end() ) 380 return d->brushes[ dataset ]. KDChart::TextLayoutItem::sizeHint(). propertiesChanged(). KDChart::AbstractDiagram::datasetLabels(). brush().cpp. References d. Referenced by buildLegend(). 586 #endif 587 if( d->cachedGeometry == areaGeometry() ) { 588 #ifdef debug_legend_paint 589 qDebug() << "leaving Legend::buildLegend() with NO action (was already build)". 612 } 613 614 d->modelLabels. 378 { 379 if( d->brushes. 383 } 6. d. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . showLines(). 595 } 596 d->cachedGeometry = areaGeometry(). pen(). 592 // because we send it in the resizeEvent. 594 return.find( dataset ) != d->brushes. markerAttributes(). textAttributes(). 600 #endif 601 602 Q_FOREACH( QLayoutItem* layoutItem.3. 607 608 if( orientation() == Qt::Vertical ) { 609 d->layout->setColumnStretch( 4. Referenced by forceRebuild().6 QBrush Legend::brush (uint dataset) const Definition at line 377 of file KDChartLegend. KDChart::Text- Attributes::isVisible(). and paint().3. References KDChart::AbstractAreaWidget::areaGeometry(). spacing().clear().7 void Legend::buildLegend () Definition at line 582 of file KDChartLegend.cpp. text(). 590 #endif 591 // Note: We do *not* need to send positionChanged here. d->layoutItems ) { 603 d->layout->removeItem( layoutItem ). 610 } else { 611 d->layout->setColumnStretch( 4.31. 583 { 584 #ifdef debug_legend_paint 585 qDebug() << "entering Legend::buildLegend()".clear(). 0 ).clear(). KDChart::AbstractLayoutItem::setParentWidget(). referenceArea(). 606 d->layoutItems. KDChart::Abstract- Diagram::datasetBrushes(). KDChart::AbstractDiagram::datasetPens(). and titleText- Attributes(). 381 else 382 return d->modelBrushes[ dataset ]. titleText(). diagram(). 1 ).

651 if( orientation() == Qt::Vertical ) 652 d->layout->addItem( lineItem.count()*4. 672 else 673 d->layout->addItem( markerItem. 1. 676 677 // PENDING(kalle) Other properties! 678 KDChart::TextLayoutItem* labelItem = 679 new KDChart::TextLayoutItem( text( dataset ). Qt::AlignCenter ). 650 d->layoutItems << lineItem. 617 d->modelMarkers. d->modelLabels. 639 titleItem->setParentWidget( this ).isEmpty() && titleTextAttributes().at(i)->diagram(). 625 } 626 Q_ASSERT( d->modelLabels. i < d->observers. 662 markerAttributes( datas 663 brush( dataset ). 671 1. Qt::AlignCenter ).clear(). second is line 670 1. 0. 0. 682 (orientation() == Qt::Vertical) Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 624 d->modelMarkers += diagram->datasetMarkers(). 681 referenceArea(). 1. 633 titleTextAttributes().count()*4. 1. 653 else 654 d->layout->addItem( lineItem. 621 d->modelLabels += diagram->datasetLabels(). if any. 669 dataset*2+2. 640 641 d->layoutItems << titleItem. 638 Qt::AlignCenter ). 5. 1. 623 d->modelPens += diagram->datasetPens().isVisible() ) { 630 // PENDING(kalle) Other properties! 631 KDChart::TextLayoutItem* titleItem = 632 new KDChart::TextLayoutItem( titleText(). 646 647 // The line between the title and the legend items. 1. ++i){ 619 const AbstractDiagram* diagram = d->observers. // all in row two 675 dataset*4 ). 644 else 645 d->layout->addItem( titleItem. d->modelLabels. Qt::AlignCenter ). 622 d->modelBrushes += diagram->datasetBrushes(). Qt::AlignCenter ). 5. dataset++ ) { 659 // Note: We may use diagram() for all of the MarkerLayoutItem instances. 680 textAttributes(). 620 //qDebug() << "Legend::buildLegend() adding to d->modelLabels :" << diagram->datasetLabels().clear(). 1. 1.count().count() == d->modelBrushes. 0. 0.count() ).408 KD Chart 2 Class Documentation 616 d->modelPens. dataset < d->modelLabels.size(). 674 2. 667 if( orientation() == Qt::Vertical ) 668 d->layout->addItem( markerItem. 0. 635 (orientation() == Qt::Vertical) 636 ? KDChartEnums::MeasureOrientationMinimum 637 : KDChartEnums::MeasureOrientationHorizontal. 664 pen( dataset ). 634 referenceArea(). 665 Qt::AlignLeft ). 627 628 // legend caption 629 if( !titleText(). 642 if( orientation() == Qt::Vertical ) 643 d->layout->addItem( titleItem. 0. 666 d->layoutItems << markerItem. 648 if( showLines() ) { 649 KDChart::HorizontalLineLayoutItem* lineItem = new KDChart::HorizontalLineLayoutItem(). 655 } 656 } 657 658 for ( int dataset = 0. // first row is title. 660 // since all they need the diagram for is to invoke mDiagram->paintMarker() 661 KDChart::MarkerLayoutItem* markerItem = new KDChart::MarkerLayoutItem( diagram(). Qt::AlignCenter ). 618 for (int i = 0.

1 ). 738 emit propertiesChanged(). 734 d->layout->activate(). 1. // all in row two 722 dataset*4+3 ). // first row is title. 740 //emitPositionChanged(). Qt::AlignCenter ). second is line 692 3 ). 685 Qt::AlignLeft ).count()*2. 706 } 707 708 // vertical lines (only in horizontal mode. 689 if( orientation() == Qt::Vertical ) 690 d->layout->addItem( labelItem. 731 } 732 733 // This line is absolutely necessary. 695 2. 703 dataset*2+1+2.count()-1 ) 710 KDChart::VerticalLineLayoutItem* lineItem = new KDChart::VerticalLineLayoutItem(). 743 #endif 744 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and not after the last item) 699 if( orientation() == Qt::Vertical && showLines() && dataset != ( d->modelLabels. 716 } 717 718 if( orientation() != Qt::Vertical ) { // Horizontal needs a spacer 719 d->layout->addItem( new QSpacerItem( spacing(). 720 labelItem->sizeHint(). // all in row two 714 dataset*4+2. 2. 741 #ifdef debug_legend_paint 742 qDebug() << "leaving Legend::buildLegend()". d->modelLabels. 702 d->layout->addItem( lineItem. 5. 730 d->layout->addItem( lineItem. // all in row two 696 dataset*4+1 ). 693 else 694 d->layout->addItem( labelItem. 691 dataset*2+2. 739 //emit positionChanged( this ). 705 1. otherwise: #2516.height(). 711 d->layoutItems << lineItem. 701 d->layoutItems << lineItem. Qt::AlignCenter ). 686 labelItem->setParentWidget( this ). 729 d->layoutItems << lineItem. 723 } 724 } 725 726 // vertical line (only in vertical mode) 727 if( orientation() == Qt::Vertical && showLines() ) { 728 KDChart::VerticalLineLayoutItem* lineItem = new KDChart::VerticalLineLayoutItem(). 687 688 d->layoutItems << labelItem.count()-1 ) ) 700 KDChart::HorizontalLineLayoutItem* lineItem = new KDChart::HorizontalLineLayoutItem(). 735 736 // emit propertiesChanged(). 2. 737 d->layout->activate().6. 713 2. 704 0.height() ) ). qMax( markerItem->sizeHint(). 715 1.31 KDChart::Legend Class Reference 409 683 ? KDChartEnums::MeasureOrientationMinimum 684 : KDChartEnums::MeasureOrientationHorizontal. 712 d->layout->addItem( lineItem. and not after the last item) 709 if( orientation() == Qt::Horizontal && showLines() && dataset != ( d->modelLabels. 721 2. 697 698 // horizontal lines (only in vertical mode.

size().3. set- Alignment(). Legend().cpp. and paint().count().9 uint Legend::datasetCount () const Definition at line 162 of file KDChartLegend.31. set- TitleTextAttributes(). and KDChart::DiagramObserver::diagram().8 Legend ∗ Legend::clone () const [virtual] Definition at line 125 of file KDChartLegend. removeDiagrams. 193 return d->observers. 133 return legend.410 KD Chart 2 Class Documentation 6. 130 legend->setFrameAttributes( frameAttributes() ). textAttributes(). 126 { 127 Legend* legend = new Legend( new Private( *d ). KDChart::AbstractAreaBase::setFrameAttributes().first()->diagram(). setPosition(). and titleTextAttributes(). removeDiagram.10 AbstractDiagram ∗ Legend::diagram () const The first diagram of the legend or 0 if there was none added to the legend. 128 legend->setTextAttributes( textAttributes() ). ++i) { 167 DiagramObserver * obs = d->observers. Returns: The first diagram of the legend or 0. 168 modelLabelsCount += obs->diagram()->datasetLabels(). 169 modelBrushesCount += obs->diagram()->datasetBrushes().31. 132 legend->setAlignment( alignment() ).count(). References d. replaceDiagram. position().isEmpty() ) 192 return 0. References d. 190 { 191 if( d->observers. 170 } 171 Q_ASSERT( modelLabelsCount == modelBrushesCount ). d. setDiagram Definition at line 189 of file KDChartLegend. 163 { 164 int modelLabelsCount = 0. 0 ). 165 int modelBrushesCount = 0.31. KDChart::AbstractDiagram::datasetBrushes(). 194 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . See also: diagrams.cpp. KDChart::AbstractAreaBase::frameAttributes(). KDChart::AbstractDiagram::datasetLabels(). setTextAttributes(). Referenced by buildLegend(). i < d->observers. 134 } 6.cpp. 172 return modelLabelsCount. 173 } 6. 166 for (int i = 0.3. 131 legend->setPosition( position() ).at(i). References alignment(). addDiagram. 129 legend->setTitleTextAttributes( titleTextAttributes() ).3.

6. 476 buildLegend(). References d. 90 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .cpp. Definition at line 469 of file KDChartLegend. 88 { 89 return d->frameAttributes.31.13 FrameAttributes AbstractAreaBase::frameAttributes () const [inherited] Definition at line 87 of file KDChartAbstractAreaBase. 197 { 198 DiagramList list.cpp.3.31 KDChart::Legend Class Reference 411 6. See also: diagram. 477 #ifdef debug_legend_paint 478 qDebug() << "leaving Legend::forceRebuild()". setDiagram Definition at line 196 of file KDChartLegend. ++i) 200 list << d->observers.at(i)->diagram(). 199 for (int i = 0. Returns: The list of all diagrams associated with the legend.31. removeDiagrams. 479 #endif 480 } 6. Referenced by clone(). and setNeedRebuild(). 201 return list. References buildLegend(). References d. 473 #endif 474 //setSpacing(d->layout->spacing()). i < d->observers.11 DiagramList Legend::diagrams () const The list of all diagrams associated with the legend.3.cpp. 475 setNeedRebuild(). 470 { 471 #ifdef debug_legend_paint 472 qDebug() << "entering Legend::forceRebuild()". and KDChart::DiagramList.31.size().12 void Legend::forceRebuild () [virtual] Reimplemented from KDChart::AbstractAreaWidget. 202 } 6. addDiagram.3. Referenced by resizeEvent(). removeDiagram. replaceDiagram.

16 Qt::Orientation Legend::orientation () const Definition at line 315 of file KDChartLegend. height(). -padding.31. inherited] Definition at line 175 of file KDChartAbstractAreaBase.14 QRect AbstractAreaBase::innerRect () const [protected. References KDChart::AbstractAreaBase::areaGeometry(). padding. 425 { 426 if( d->markerAttributes. 0 ) : 0.3.cpp. References d.adjusted( padding. 428 else if ( static_cast<uint>( d->modelMarkers.3. 179 180 const int padding 181 = d->frameAttributes. "AbstractAreaBase::innerRect()".3.count() ) > dataset ) 429 return d->modelMarkers[ dataset ]. You should call rect() (or width().size() ) 185 . -padding ).3. please let your widget draw itself at the top/left corner of the painter. 318 } 6.412 KD Chart 2 Class Documentation 6.0). 183 return 184 QRect( QPoint(0. Referenced by KDChart::TextArea::paintAll().15 MarkerAttributes Legend::markerAttributes (uint dataset) const Definition at line 424 of file KDChartLegend.find( dataset ) != d->markerAttributes.) to find the drawable area’s size: While the paint() method is being executed the frame of the widget is outside of its rect(). resp. Referenced by buildLegend(). 430 return MarkerAttributes().end() ) 427 return d->markerAttributes[ dataset ].31. 431 } 6. Referenced by buildLegend().31. 316 { 317 return d->orientation. 186 } 6.17 void Legend::paint (QPainter ∗ painter) [virtual] Overwrite this to paint the inner contents of your widget. Note: When overriding this method.cpp. References d. so you can use all of rect() for your custom drawing! Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and d. 176 { 177 Q_ASSERT_X ( d != 0.31. 178 "Private class was not initialized!" ). KDChart::AbstractAreaWidget::paintAll().cpp. areaGeometry().isVisible() 182 ? qMax( d->frameAttributes. and KDChart::AbstractArea::paintAll().padding().

and KDChart::AbstractLayoutItem::paint(). 92 // Paint the background and frame 93 paintBackground( painter.31 KDChart::Legend Class Reference 413 See also: paint. rect(). 103 if( contentsRect() != inner ){ 104 //qDebug() << "old contentsRect():" << contentsRect() << " new innerRect:" << inner. 143 if( ! diagram() ) return.-1. 155 } 156 #ifdef debug_legend_paint 157 qDebug() << "leaving Legend::paint( QPainter* painter )". d. if there is no diagram. diagram(). 97 // to be sure all content gets calculated 98 // to fit into the inner rectangle 99 const QRect oldGeometry( areaGeometry() ). References KDChart::AbstractAreaWidget::areaGeometry(). 138 { 139 #ifdef debug_legend_paint 140 qDebug() << "entering Legend::paint( QPainter* painter )". d->layoutItems ) { 154 layoutItem->paint( painter ).18 void AbstractAreaWidget::paintAll (QPainter & painter) [inherited] Call paintAll. Referenced by KDChart::AbstractAreaWidget::paintEvent(). 90 { 91 //qDebug() << "AbstractAreaWidget::paintAll() called". paintIntoRect Implements KDChart::AbstractAreaWidget.adjusted(0.31.-1) ). Definition at line 137 of file KDChartLegend.cpp. 94 paintFrame( painter. KDChart::AbstractAreaWidget::paint(). 95 96 // adjust the widget’s content margins. rect() ). Definition at line 89 of file KDChartAbstractAreaWidget. KDChart::AbstractAreaBase::inner- Rect(). if needed: 149 buildLegend(). 101 //qDebug() << "areaGeometry():" << oldGeometry 102 // << " contentsRect():" << contentsRect() << " inner:" << inner. 144 #ifdef debug_legend_paint 145 qDebug() << " Legend::paint() areaGeometry: " << areaGeometry().cpp. KDChart::AbstractAreaBase::paintBackground(). 146 #endif 147 148 // re-calculate/adjust the Legend’s internal layout and contents.6. if you want the background and the frame to be drawn before the normal paint() is invoked automatically.0. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 141 #endif 142 // rule: We do not show a legend. and KDChart::AbstractAreaWidget::paint- IntoRect().3. buildLegend(). 158 #endif 159 } 6. and KDChart::AbstractAreaBase::paintFrame(). References KDChart::AbstractAreaWidget::areaGeometry(). 100 const QRect inner( innerRect() ). 150 151 // PENDING(kalle) Support palette 152 153 Q_FOREACH( KDChart::AbstractLayoutItem* layoutItem.

drawRect( rect ).31. 110 //forceRebuild(). and d.setBrush( attributes. 107 inner. 128 ol.map( rect. References attributes. 117 painter.pixmap().".scale( zW.attributes.drawPixmap( ol. 133 double zH = (double)rect.topLeft().brush().width() -inner. 139 m. 107 108 #define attributes d->backgroundAttributes 109 110 if( !attributes.attributes. 118 painter.pixmap(). 114 } 6.height()/ 2 ). 108 oldGeometry. 120 } 121 /* next draw the backPixmap over the brush */ 122 if( !attributes.brush() ).width()-1. 140 } 141 break. attributes. 130 } else { 131 QMatrix m.pixmap().pixmapMode() ) { 135 case BackgroundAttributes::BackgroundPixmapModeScaled: 136 { 137 double z.height()-inner. 132 double zW = (double)rect.style() ) { 114 KDChart::PainterSaver painterSaver( &painter ).y() . 104 { 105 Q_ASSERT_X ( d != 0.height().center().width() / (double)attributes.pixmap(). zH ).height() / (double)attributes.setPen( Qt::NoPen ). zH ).pixmap(). previously checked Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .19 void AbstractAreaBase::paintBackground (QPainter & painter. KDChart::AbstractAreaWidget::paintAll().3. 134 switch( attributes.center().topLeft() ) ). Referenced by KDChart::TextArea::paintAll().left(). 144 break. 111 112 /* first draw the brush (may contain a pixmap)*/ 113 if( Qt::NoBrush != attributes. const QRect & rectangle) [virtual. 113 //qDebug() << "AbstractAreaWidget::paintAll() done.top(). 109 oldGeometry.deviceMatrix().x() .width() / 2 ).setBrushOrigin( newTopLeft ).setX( rect.height()-1 ). z ). 119 painter.pixmapMode() ) 126 { 127 ol. and KDChart::AbstractArea::paintAll(). 138 z = qMin( zW.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) { 124 QPointF ol = rect. "AbstractAreaBase::paintBackground()". 142 case BackgroundAttributes::BackgroundPixmapModeStretched: 143 m.isNull() && 123 attributes. 106 "Private class was not initialized!" ). inherited] Definition at line 103 of file KDChartAbstractAreaBase.width(). 145 default: 146 .414 KD Chart 2 Class Documentation 105 setContentsMargins( 106 inner.setY( rect. 116 const QPointF newTopLeft( painter.isVisible() ) return.pixmap() ). 129 painter.cpp. // Cannot happen.scale( z. 111 } 112 paint( &painter ). 125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes. 115 painter.

setPen( attributes. 150 ol. 149 ol.transformed( m ). inherited] Definition at line 158 of file KDChartAbstractAreaBase.pen() ). 169 painter. 171 #undef attributes 172 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .pen() ).pm. References attributes.cpp. but you would overwrite paint() instead.setY( rect.6. See also: paint Definition at line 65 of file KDChartAbstractAreaWidget. then calls paint(). 151 painter. const QRect & rectangle) [virtual.31 KDChart::Legend Class Reference 415 147 } 148 QPixmap pm = attributes.height()/ 2 ).center().pm. 170 painter.x() .setPen( oldPen ). 162 163 #define attributes d->frameAttributes 164 165 if( !attributes. 166 167 const QPen oldPen( painter.width() / 2 ).center(). 66 { 67 Q_UNUSED( event ). pm ).setX( rect. 159 { 160 Q_ASSERT_X ( d != 0. 68 QPainter painter( this ).drawRect( rect ). References KDChart::AbstractAreaWidget::paintAll(). Referenced by KDChart::TextArea::paintAll(). KDChart::AbstractAreaWidget::paintAll(). "AbstractAreaBase::paintFrame()".31.drawPixmap( ol. 152 } 153 } 154 #undef attributes 155 } 6. inherited] Draws the background and frame.20 void AbstractAreaWidget::paintEvent (QPaintEvent ∗ event) [virtual. 168 painter. 161 "Private class was not initialized!" ).21 void AbstractAreaBase::paintFrame (QPainter & painter. 70 } 6.isVisible() ) return.31.cpp. 69 paintAll( painter ). and KDChart::AbstractArea::paintAll().pixmap().y() .3. and d.3. In most cases there is no need to overwrite this method in a derived class.

left(). inherited] Draws the background and frame. 79 painter. Referenced by KDChart::Chart::paint().translate( rect. Referenced by clone().end() ) 411 return d->pens[dataset]. Referenced by buildLegend().top() ). Definition at line 121 of file KDChartAbstractAreaWidget.find( dataset ) != d->pens.3.25 void AbstractAreaWidget::positionHasChanged () [protected.24 Position Legend::position () const Definition at line 291 of file KDChartLegend. In most cases there is no need to overwrite this method in a derived class.cpp.31. References d. 294 } 6. rect. inherited] Reimplemented from KDChart::AbstractAreaBase.31.cpp. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . References KDChart::AbstractAreaWidget::paintAll().31. Definition at line 72 of file KDChartAbstractAreaWidget. virtual. but you would overwrite paint() instead. 409 { 410 if( d->pens. -rect.cpp.23 QPen Legend::pen (uint dataset) const Definition at line 408 of file KDChartLegend.top() ). const QRect & rect) [virtual.cpp.3. 73 { 74 const QRect oldGeometry( geometry() ).22 void AbstractAreaWidget::paintIntoRect (QPainter & painter.416 KD Chart 2 Class Documentation 6.3. then calls paint(). 78 paintAll( painter ).translate( -rect. References d. 80 if( oldGeometry != rect ) 81 setGeometry( oldGeometry ).31.3. 82 } 6. 414 } 6. 292 { 293 return d->position. 77 painter. 412 else 413 return d->modelPens[ dataset ].left(). 75 if( oldGeometry != rect ) 76 setGeometry( rect ).

228 { 229 if( oldDiagram ){ 230 DiagramObserver* oldObs = d->findObserverForDiagram( oldDiagram ).31.6.3. replaceDiagram(). References d. 124 } 6. Referenced by buildLegend(). IF automatic area detection is set.26 void KDChart::Legend::propertiesChanged () Emitted upon change of a property of the Legend or any of its components.cpp.cpp. 236 } 237 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .removeAt( d->observers. References d. 6. 231 if( oldObs ){ 232 delete oldObs. and for font size of the item texts.indexOf( oldObs ) ). See also: diagram. addDiagram. and setVisible().31.28 void Legend::removeDiagram (KDChart::AbstractDiagram ∗ oldDiagram) Removes the diagram from the legend’s list of diagrams.31. removeDiagrams. and setNeedRebuild(). 184 { 185 return (d->referenceArea ? d->referenceArea : static_cast<const QWidget*>(parent())).3. diagrams. that is used for font size of title text. 234 } 235 setNeedRebuild(). 233 d->observers. and resetDiagram().3.27 const QWidget ∗ Legend::referenceArea () const Returns the reference area. replaceDiagram.31 KDChart::Legend Class Reference 417 122 { 123 emit positionChanged( this ). setDiagram Definition at line 227 of file KDChartLegend. Referenced by removeDiagrams(). Referenced by buildLegend(). 186 } 6. See also: setReferenceArea Definition at line 183 of file KDChartLegend.

265 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . and removeDiagram(). 243 } 6. If the parameter is omitted.3. 249 if( ! d->observers. References addDiagram().31. diagrams. References removeDiagram(). KDChart::AbstractDiagram ∗ oldDiagram = 0) Replaces the old diagram. the very first diagram will be replaced. See also: diagram.31 void Legend::resetDiagram (AbstractDiagram ∗) Definition at line 262 of file KDChartLegend. diagrams.cpp. and removeDiagram(). Referenced by setDiagram(). removeDiagram. replaceDiagram.cpp.418 KD Chart 2 Class Documentation 6. i < d->observers. the first diagram will just be removed. 251 if( old ) 252 removeDiagram( old ). 240 { 241 for (int i = 0. In case. d.cpp. addDiagram.30 void Legend::replaceDiagram (KDChart::AbstractDiagram ∗ newDiagram. setDiagram Definition at line 245 of file KDChartLegend. 263 { 264 removeDiagram( oldDiagram ).31. it there is none yet. 255 } 6. there was no diagram yet. removeDiagram. If this parameter is zero. This diagram will be deleted automatically. oldDiagram The diagram to be removed by the new one.3.at(i)->diagram() ). removeDiagrams.isEmpty() && ! old ) 250 old = d->observers. or appends the new diagram. See also: diagram.31. References d. setDiagram Definition at line 239 of file KDChartLegend.3.first()->diagram().29 void Legend::removeDiagrams () Removes all of the diagram from the legend’s list of diagrams. the new diagram will just be added. Referenced by addDiagram(). 247 { 248 KDChart::AbstractDiagram* old = oldDiagram. Parameters: newDiagram The diagram to be used instead of the old one. 253 if( newDiagram ) 254 addDiagram( newDiagram ).size(). ++i) 242 removeDiagram( d->observers. addDiagram.

cpp. 339 { 340 if( ! d->texts.34 void Legend::setAlignment (Qt::Alignment) Definition at line 296 of file KDChartLegend.31.3.31. 95 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .clear(). 299 emitPositionChanged(). 297 { 298 d->alignment = alignment. 342 setNeedRebuild(). Definition at line 338 of file KDChartLegend. 341 d->texts. SLOT(emitPositionChanged())). and setNeedRebuild().31 KDChart::Legend Class Reference 419 6.33 void Legend::resizeEvent (QResizeEvent ∗ event) [virtual] Definition at line 573 of file KDChartLegend. this.6.31. References forceRebuild().35 void AbstractAreaBase::setBackgroundAttributes (const BackgroundAttributes & a) [inherited] Definition at line 92 of file KDChartAbstractAreaBase. This resets the Legend to default behaviour: Texts are created automatically.cpp. 574 { 575 #ifdef debug_legend_paint 576 qDebug() << "Legend::resizeEvent() called". 93 { 94 d->backgroundAttributes = a.cpp. 577 #endif 578 forceRebuild(). References d. 579 QTimer::singleShot(0.31. 580 } 6.3.cpp. References d. Referenced by clone().32 void Legend::resetTexts () Removes all legend texts that might have been set by setText. 300 } 6. 343 } 6.count() ) return.3. References d.3.

420 KD Chart 2 Class Documentation 6. 393 bChangesDone = true. 371 { 372 if( d->brushes[ dataset ] == brush ) return. Qt::cyan ). 499 setColor( 2. i < datasetBrushes. 390 for( int i = 0. 501 setColor( 4. setRainbowColors(). 394 } 395 } 396 if( bChangesDone ) 397 setNeedRebuild().36 void Legend::setBrush (uint dataset. 496 { 497 setColor( 0. 366 d->brushes[ dataset ] = color. const QBrush & brush) Definition at line 370 of file KDChartLegend. i++ ){ 391 if( d->brushes[ i ] != datasetBrushes[ i ] ){ 392 d->brushes[ i ] = datasetBrushes[ i ]. and setNeedRebuild().count().31. 389 QList<QBrush> datasetBrushes = diagram->datasetBrushes(). 368 } 6.3. Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 367 setNeedRebuild().37 void Legend::setBrushesFromDiagram (KDChart::AbstractDiagram ∗ diagram) Definition at line 386 of file KDChartLegend.cpp. Referenced by setDefaultColors(). 500 setColor( 3.3.31.cpp. and setNeedRebuild().31.39 void Legend::setDefaultColors () Definition at line 495 of file KDChartLegend. References d. References setColor(). 373 d->brushes[ dataset ] = brush. 387 { 388 bool bChangesDone = false. and setNeedRebuild(). Qt::blue ). 364 { 365 if( d->brushes[ dataset ] == color ) return. const QColor & color) Definition at line 363 of file KDChartLegend. Qt::red ). Qt::green ). KDChart::AbstractDiagram::datasetBrushes().31. References d. Qt::magenta ). 498 setColor( 1.cpp. 398 } 6.38 void Legend::setColor (uint dataset.3. References d. 375 } 6.cpp. and setSubduedColors(). 374 setNeedRebuild().3.

Qt::darkGreen ).31 KDChart::Legend Class Reference 421 502 setColor( 5. 260 } 6. Qt::darkMagenta ). 506 setColor( 9. If the legend’s list of diagram is empty the given diagram is added to the list.42 void Legend::setMarkerAttributes (uint dataset.41 void AbstractAreaBase::setFrameAttributes (const FrameAttributes & a) [inherited] Definition at line 82 of file KDChartAbstractAreaBase. removeDiagrams. addDiagram. Qt::yellow ). 85 } 6. 503 setColor( 6. References d.cpp.3. replaceDiagram Definition at line 257 of file KDChartLegend.3. Referenced by KDChart::Widget::addLegend(). 421 setNeedRebuild(). 420 d->markerAttributes[ dataset ] = markerAttributes. Legend().6. See also: diagram.31. 0 ). 422 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .. 508 setColor( 11. Referenced by clone(). 505 setColor( 8. Qt::darkYellow ). 507 setColor( 10. Qt::darkBlue ).31. diagrams. removeDiagram. 509 } 6. 83 { 84 d->frameAttributes = a.cpp. const MarkerAttributes &) Definition at line 417 of file KDChartLegend.cpp. Replaces the first diagram by the given diagram. and setNeedRebuild().31. 504 setColor( 7. References d. References replaceDiagram().40 void Legend::setDiagram (KDChart::AbstractDiagram ∗ newDiagram) A convenience method doing the same as replaceDiagram( newDiagram. Qt::darkCyan ).3. and KDChart::Widget::replaceLegend(). 418 { 419 if( d->markerAttributes[dataset] == markerAttributes ) return. 258 { 259 replaceDiagram( newDiagram ). Qt::darkRed ).

resetTexts(). 405 setNeedRebuild().31. removeDiagram(). 274 { 275 d->cachedGeometry = QRectF().cpp. setMarkerAttributes(). 312 emitPositionChanged(). 404 d->pens[dataset] = pen. and setNeedRebuild(). References d. and clone().31. set- ShowLines(). 310 d->orientation = orientation. setTitleText(). setReferenceArea().45 void Legend::setPen (uint dataset. 279 { 280 d->position = position. setColor().3. setBrushes- FromDiagram(). 406 } 6. setSpacing(). and setNeedRebuild().cpp.422 KD Chart 2 Class Documentation 6. setOrientation(). setTextAttributes(). setBrush().cpp.31. 282 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen .46 void Legend::setPosition (Position position) Definition at line 278 of file KDChartLegend. References d.3.44 void Legend::setOrientation (Qt::Orientation orientation) Definition at line 307 of file KDChartLegend. 402 { 403 if( d->pens[dataset] == pen ) return. 281 emitPositionChanged(). setText().31. References d. and setTitleTextAttributes(). References d. 308 { 309 if( d->orientation == orientation ) return. setPen().43 void Legend::setNeedRebuild () Definition at line 273 of file KDChartLegend.3. 276 } 6. Referenced by KDChart::Widget::addLegend().cpp. Referenced by addDiagram().3. 313 } 6. forceRebuild(). const QPen & pen) Definition at line 401 of file KDChartLegend. 311 setNeedRebuild().

resp.3.3. and setColor().8 ). if the Measure given for setTitleTextAttributes (or setTextAttributes. 181 } 6. 523 } 6.31. and setNeedRebuild(). 179 d->referenceArea = area.255) ). brush( i . Note: This parameter is ignored.6. 519 setColor( 6. 324 setNeedRebuild(). 516 setColor( 3. 515 setColor( 2. 326 } Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen . 512 { 513 setColor( 0.47 void Legend::setRainbowColors () Definition at line 511 of file KDChartLegend.light() ). 0.31 KDChart::Legend Class Reference 423 6. 0. References d.31. 128.3.) is not specifying automatic area detection. 517 setColor( 4.49 void Legend::setShowLines (bool legendShowLines) Definition at line 320 of file KDChartLegend. and setNeedRebuild(). KDChartEnums::MeasureCalculationMode Definition at line 176 of file KDChartLegend. QColor( 96. 96. then the size of the legend’s parent widget will be used. If no reference area is specified. 521 for( int i = 8. QColor(160.cpp. 96) ).64) ). References brush().48 void Legend::setReferenceArea (const QWidget ∗ area) Specifies the reference area for font size of title text. i < 16. 177 { 178 if( area == d