kdchart2refman

871
KD Chart 2 Reference Manual [rev.2.0] Generated by Doxygen 1.3.6 Fri Sep 29 03:56:26 2006

Upload: espacotempo

Post on 02-Apr-2015

45 views

Category:

Documents


2 download

TRANSCRIPT

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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12DataValueAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13FrameAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15KDChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22PaintContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24RelativePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25TextAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26Ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29KDChart::AbstractAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

KDChart::CartesianAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265KDChart::AbstractCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . .93

KDChart::CartesianCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . .294KDChart::PolarCoordinatePlane . . . . . . . . . . . . . . . . . . . . . . . . . . . .530

KDChart::AbstractAreaWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43KDChart::Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402

KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .642KDChart::HeaderFooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369

KDChart::AbstractThreeDAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206

KDChart::ThreeDBarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .670KDChart::ThreeDLineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .675KDChart::ThreeDPieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .680

KDChart::BackgroundAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219BackgroundAttributes::PrivateKDChart::BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222BarAttributes::PrivateKDChart::DataDimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342KDChart::DataValueAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355DataValueAttributes::PrivateKDChart::FrameAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364FrameAttributes::PrivateKDChart::GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366GridAttributes::PrivateKDChart::KDPrivateModelIndexKDChart::LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428LineAttributes::PrivateKDChart::MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473MarkerAttributes::PrivateKDChart::Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481

4 KD Chart 2 Hierarchical Index

KDChart::PaintContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486PaintContext::PrivatePalette::PrivateKDChart::PieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491KDChart::Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .590QAbstractItemView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .598

KDChart::AbstractDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114KDChart::AbstractCartesianDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .63

KDChart::BarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225KDChart::LineDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431

KDChart::AbstractPolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176KDChart::AbstractPieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144

KDChart::PieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494KDChart::RingDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .608

KDChart::PolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557

QAbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .599

KDChart::AbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204KDChart::AttributesModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209

KDChart::PrivateAttributesModel

QFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600

KDChart::DatasetSelectorWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352

QLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .601

KDChart::AbstractLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141KDChart::AbstractArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29KDChart::HorizontalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . .385KDChart::MarkerLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476KDChart::TextLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .661

KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .642KDChart::VerticalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684

QObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .602

KDChart::AbstractArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29KDChart::DiagramObserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361KDChart::Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488KDChart::TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .642KDChartEnums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390

QSortFilterProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .603

KDChart::DatasetProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345

QTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604

KDTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400

QWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .605

KDChart::AbstractAreaWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43KDChart::Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326KDChart::Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .689

KDChart::RelativePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .606RelativePosition::PrivateKDChart::TextAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .656TextAttributes::PrivateWidgetKDChart::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 ) . . . . . . . . . .29KDChart::AbstractAreaBase(Base class forAbstractAreaandAbstractAreaWidget: An area in

the chart with a background, a frame, etc ) . . . . . . . . . . . . . . . . . . . . . . . .38KDChart::AbstractAreaWidget(An area in the chart with a background, a frame, etc ) . . . . . .43KDChart::AbstractAxis(The base class for axes ) . . . . . . . . . . . . . . . . . . . . . . . . .50KDChart::AbstractCartesianDiagram(Base class for diagrams based on a cartesian coordianate

system ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63KDChart::AbstractCoordinatePlane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93KDChart::AbstractDiagram(AbstractDiagramdefines the interface for diagram classes ) . . . .114KDChart::AbstractLayoutItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141KDChart::AbstractPieDiagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144KDChart::AbstractPolarDiagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176KDChart::AbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204KDChart::AbstractThreeDAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206KDChart::AttributesModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209KDChart::BackgroundAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219KDChart::BarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222KDChart::BarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225KDChart::CartesianAxis(The class for cartesian axes ) . . . . . . . . . . . . . . . . . . . . . .265KDChart::CartesianCoordinatePlane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294KDChart::Chart(A chart with one or more diagrams ) . . . . . . . . . . . . . . . . . . . . . . .326KDChart::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 ) . . . . . . . . . .342KDChart::DatasetProxyModel(DatasetProxyModeltakes aKDChart dataset configuration and

translates it into a filtering proxy model ) . . . . . . . . . . . . . . . . . . . . . . . . .345KDChart::DatasetSelectorWidget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352KDChart::DataValueAttributes(Diagram attributes dealing with data value labels ) . . . . . . .355KDChart::DiagramObserver(A DiagramObserverwatches the associated diagram for changes

and deletion and emits corresponsing signals ) . . . . . . . . . . . . . . . . . . . . . .361KDChart::FrameAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364KDChart::GridAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366KDChart::HeaderFooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369KDChart::HorizontalLineLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385

6 KD Chart 2 Class Index

KDChartEnums(Project global class providing some enums needed both by KDChartParamsand by KDChartCustomBox ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390

KDTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400KDChart::Legend(Legenddefines the interface for the legend drawing class ) . . . . . . . . . .402KDChart::LineAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428KDChart::LineDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431KDChart::MarkerAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473KDChart::MarkerLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476KDChart::Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481KDChart::PaintContext. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486KDChart::Palette(A Paletteis a set of brushes (or colors) to be used for painting data sets ) . . .488KDChart::PieAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491KDChart::PieDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494KDChart::PolarCoordinatePlane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530KDChart::PolarDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557KDChart::Position(Defines a position, using compass terminology ) . . . . . . . . . . . . . . .590QAbstractItemView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .598QAbstractProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .599QFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600QLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .601QObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .602QSortFilterProxyModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .603QTextDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604QWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .605KDChart::RelativePosition(Defines relative position information: reference area, position in this

area, horizontal / vertical padding, and rotating ) . . . . . . . . . . . . . . . . . . . . .606KDChart::RingDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .608KDChart::TextArea(A text area in the chart with a background, a frame, etc ) . . . . . . . . . .642KDChart::TextAttributes(A set of text attributes ) . . . . . . . . . . . . . . . . . . . . . . . . .656KDChart::TextLayoutItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .661KDChart::ThreeDBarAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .670KDChart::ThreeDLineAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .675KDChart::ThreeDPieAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .680KDChart::VerticalLineLayoutItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684KDChart::Widget(The KDChartwidget for usage without Model/View ) . . . . . . . . . . . .689KDChart::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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .707KDChartAbstractArea.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .708KDChartAbstractAreaBase.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .709KDChartAbstractAreaBase.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .713KDChartAbstractAreaWidget.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .714KDChartAbstractAreaWidget.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .715KDChartAbstractAxis.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .716KDChartAbstractAxis.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .717KDChartAbstractCartesianDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .718KDChartAbstractCartesianDiagram.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .719KDChartAbstractCoordinatePlane.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .720KDChartAbstractCoordinatePlane.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .721KDChartAbstractDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .722KDChartAbstractDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .723KDChartAbstractPieDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .724KDChartAbstractPieDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .725KDChartAbstractPolarDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .726KDChartAbstractPolarDiagram.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .727KDChartAbstractProxyModel.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .728KDChartAbstractProxyModel.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .729KDChartAbstractThreeDAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .730KDChartAbstractThreeDAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .731KDChartAttributesModel.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .732KDChartAttributesModel.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .733KDChartBackgroundAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .734KDChartBackgroundAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .735KDChartBarAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .736KDChartBarAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .737KDChartBarDiagram.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .738KDChartBarDiagram.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .739KDChartCartesianAxis.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .740KDChartCartesianAxis.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .741KDChartCartesianCoordinatePlane.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .742

8 KD Chart 2 File Index

KDChartCartesianCoordinatePlane.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .743KDChartChart.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .744KDChartChart.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .746KDChartDatasetProxyModel.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .747KDChartDatasetProxyModel.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .748KDChartDatasetSelector.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .749KDChartDatasetSelector.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .750KDChartDataValueAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .751KDChartDataValueAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .753KDChartDiagramObserver.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .754KDChartDiagramObserver.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .755KDChartEnums.h(Definition of global enums ) . . . . . . . . . . . . . . . . . . . . . . . . . .756KDChartFrameAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .757KDChartFrameAttributes.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .758KDChartGlobal.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .759KDChartGridAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .764KDChartGridAttributes.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .765KDChartHeaderFooter.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .766KDChartHeaderFooter.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .767KDChartLayoutItems.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .768KDChartLayoutItems.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .769KDChartLegend.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .770KDChartLegend.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .771KDChartLineAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .772KDChartLineAttributes.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .773KDChartLineDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774KDChartLineDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .775KDChartMarkerAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .776KDChartMarkerAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .777KDChartMeasure.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .778KDChartMeasure.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .779KDChartPaintContext.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780KDChartPaintContext.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .781KDChartPalette.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .782KDChartPalette.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .784KDChartPieAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .785KDChartPieAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .786KDChartPieDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .787KDChartPieDiagram.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .789KDChartPolarCoordinatePlane.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .790KDChartPolarCoordinatePlane.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .791KDChartPolarDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .792KDChartPolarDiagram.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .793KDChartPosition.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .794KDChartPosition.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .797KDChartRelativePosition.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .798KDChartRelativePosition.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .799KDChartRingDiagram.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .800KDChartRingDiagram.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .801KDChartTextArea.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .802KDChartTextArea.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .803KDChartTextAttributes.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .804KDChartTextAttributes.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .805KDChartThreeDBarAttributes.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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .807KDChartThreeDLineAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .808KDChartThreeDLineAttributes.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .809KDChartThreeDPieAttributes.cpp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .810KDChartThreeDPieAttributes.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .811KDChartWidget.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .812KDChartWidget.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .814KDChartZoomParameters.h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .815KDTextDocument.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .816KDTextDocument.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

Chapter 5

KD Chart 2 Namespace Documentation

5.1 BackgroundAttributes Namespace Reference

12 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

5.3 DataValueAttributes Namespace Reference 13

5.3 DataValueAttributes Namespace Reference

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

14 KD Chart 2 Namespace Documentation

5.4 FrameAttributes Namespace Reference

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

5.5 GridAttributes Namespace Reference 15

5.5 GridAttributes Namespace Reference

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

16 KD Chart 2 Namespace Documentation

5.6 KDChart Namespace Reference

Classes

• classAbstractArea

An area in the chart with a background, a frame, etc.

• classAbstractAreaBase

Base class forAbstractAreaandAbstractAreaWidget: An area in the chart with a background, a frame, etc.

• classAbstractAreaWidget

An area in the chart with a background, a frame, etc.

• classAbstractAxis

The base class for axes.

• classAbstractCartesianDiagram

Base class for diagrams based on a cartesian coordianate system.

• classAbstractCoordinatePlane• classAbstractDiagram

AbstractDiagramdefines the interface for diagram classes.

• classAbstractLayoutItem• classAbstractPieDiagram• classAbstractPolarDiagram• classAbstractProxyModel• classAbstractThreeDAttributes• classAttributesModel• classBackgroundAttributes• classBarAttributes• classBarDiagram• classCartesianAxis

The class for cartesian axes.

• classCartesianCoordinatePlane• classChart

A chart with one or more diagrams.

• classDataDimension

Helper class for one dimension of data, e.g. for the rows in a data model, or for the labels of an axis, or forthe vertical lines in a grid.

• classDatasetProxyModel

DatasetProxyModeltakes aKDChartdataset configuration and translates it into a filtering proxy model.

• classDatasetSelectorWidget• classDataValueAttributes

Diagram attributes dealing with data value labels.

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

5.6 KDChart Namespace Reference 17

• classDiagramObserver

A DiagramObserverwatches the associated diagram for changes and deletion and emits corresponsingsignals.

• classFrameAttributes

• classGridAttributes

• classHeaderFooter

• classHorizontalLineLayoutItem

• classLegend

Legenddefines the interface for the legend drawing class.

• classLineAttributes

• classLineDiagram

• classMarkerAttributes

• classMarkerLayoutItem

• classMeasure

• classPaintContext

• classPalette

A Paletteis a set of brushes (or colors) to be used for painting data sets.

• classPieAttributes

• classPieDiagram

• classPolarCoordinatePlane

• classPolarDiagram

• classPosition

Defines a position, using compass terminology.

• classRelativePosition

Defines relative position information: reference area, position in this area, horizontal / vertical padding,and rotating.

• classRingDiagram

• classTextArea

A text area in the chart with a background, a frame, etc.

• classTextAttributes

A set of text attributes.

• classTextLayoutItem

• classThreeDBarAttributes

• classThreeDLineAttributes

• classThreeDPieAttributes

• classVerticalLineLayoutItem

• classWidget

The KDChartwidget for usage without Model/View.

• classZoomParameters

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

18 KD Chart 2 Namespace Documentation

Typedefs

• typedef QList< AbstractDiagram∗ > AbstractDiagramList

• typedef QList< CartesianAxis∗ > CartesianAxisList

• typedef QList< constAbstractDiagram∗ > 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

• enumDisplayRoles{

DatasetPenRole= 0x0A79EF95,

DatasetBrushRole,

DataValueLabelAttributesRole,

ThreeDAttributesRole,

LineAttributesRole,

ThreeDLineAttributesRole,

BarAttributesRole,

ThreeDBarAttributesRole,

PieAttributesRole,

ThreeDPieAttributesRole}

5.6.1 Typedef Documentation

5.6.1.1 typedef QList<AbstractDiagram∗> KDChart::AbstractDiagramList

Definition at line 520 of file KDChartAbstractDiagram.h.

Referenced by KDChart::AbstractCoordinatePlane::diagrams(), KDChart::PolarCoordinatePlane::paint(),and KDChart::CartesianCoordinatePlane::paint().

5.6.1.2 typedef QList<CartesianAxis∗> KDChart::CartesianAxisList

Definition at line 128 of file KDChartCartesianAxis.h.

Referenced by KDChart::AbstractCartesianDiagram::axes().

5.6.1.3 typedef QList<constAbstractDiagram∗> KDChart::ConstAbstractDiagramList

Definition at line 521 of file KDChartAbstractDiagram.h.

Referenced by KDChart::AbstractCoordinatePlane::diagrams().

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

5.6 KDChart Namespace Reference 19

5.6.1.4 typedef QList<AbstractCoordinatePlane∗> KDChart::CoordinatePlaneList

Definition at line 41 of file KDChartChart.h.

Referenced by KDChart::Chart::coordinatePlanes().

5.6.1.5 typedef QList<DataDimension> KDChart::DataDimensionsList

Definition at line 42 of file KDChartAbstractCoordinatePlane.h.

Referenced by KDChart::PolarCoordinatePlane::getDataDimensionsList(), KDChart::Cartesian-CoordinatePlane::getDataDimensionsList(), KDChart::AbstractCoordinatePlane::gridDimensionsList(),KDChart::CartesianCoordinatePlane::layoutDiagrams(), and KDChart::CartesianAxis::paintCtx().

5.6.1.6 typedef QVector<int> KDChart::DatasetDescriptionVector

Definition at line 38 of file KDChartDatasetProxyModel.h.

Referenced by KDChart::DatasetProxyModel::setDatasetColumnDescriptionVector(), KDChart::Dataset-ProxyModel::setDatasetDescriptionVectors(), and KDChart::DatasetProxyModel::setDatasetRow-DescriptionVector().

5.6.1.7 typedef QList<AbstractDiagram∗> KDChart::DiagramList

Definition at line 42 of file KDChartLegend.h.

Referenced by KDChart::Legend::diagrams().

5.6.1.8 typedef QList<HeaderFooter∗> KDChart::HeaderFooterList

Definition at line 42 of file KDChartChart.h.

Referenced by KDChart::Chart::headerFooters().

5.6.1.9 typedef QList<Legend∗> KDChart::LegendList

Definition at line 43 of file KDChartChart.h.

Referenced by KDChart::Chart::legends().

5.6.2 Enumeration Type Documentation

5.6.2.1 enumKDChart::DisplayRoles

Enumeration values:DatasetPenRole

DatasetBrushRole

DataValueLabelAttributesRole

ThreeDAttributesRole

LineAttributesRole

ThreeDLineAttributesRole

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

20 KD Chart 2 Namespace Documentation

BarAttributesRole

ThreeDBarAttributesRole

PieAttributesRole

ThreeDPieAttributesRole

Definition at line 244 of file KDChartGlobal.h.

244 {245 DatasetPenRole = 0x0A79EF95,246 DatasetBrushRole,247 DataValueLabelAttributesRole,248 ThreeDAttributesRole,249 LineAttributesRole,250 ThreeDLineAttributesRole,251 BarAttributesRole,252 ThreeDBarAttributesRole,253 PieAttributesRole,254 ThreeDPieAttributesRole255 };

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

5.7 LineAttributes Namespace Reference 21

5.7 LineAttributes Namespace Reference

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

22 KD Chart 2 Namespace Documentation

5.8 MarkerAttributes Namespace Reference

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

5.9 PaintContext Namespace Reference 23

5.9 PaintContext Namespace Reference

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

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

5.11 RelativePosition Namespace Reference 25

5.11 RelativePosition Namespace Reference

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

26 KD Chart 2 Namespace Documentation

5.12 TextAttributes Namespace Reference

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

5.13 Ui Namespace Reference 27

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.1 KDChart::AbstractArea Class Reference

#include <KDChartAbstractArea.h >

Inheritance diagram for KDChart::AbstractArea:Collaboration diagram for KDChart::AbstractArea:

6.1.1 Detailed Description

An area in the chart with a background, a frame, etc.

AbstractAreais the base class for all non-widget chart elements that have a set of background attributesand frame attributes, such as coordinate planes or axes.

Note:This class inherits fromAbstractAreaBase, AbstractLayoutItem, QObject. The reason for this trippleinheritance is that neitherAbstractAreaBasenorAbstractLayoutItemareQObject.

Definition at line 54 of file KDChartAbstractArea.h.

Public Member Functions

• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• FrameAttributesframeAttributes() const• virtual voidpaint(QPainter∗)=0• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

30 KD Chart 2 Class Documentation

Draws the background and frame, then callspaint().

• void removeFromParentLayout()• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• virtual∼AbstractArea()

Protected Member Functions

• AbstractArea()• virtual QRectareaGeometry() const• QRectinnerRect() const• virtual voidpositionHasChanged()

Protected Attributes

• Q_SIGNALS__pad0__: void positionChanged(AbstractArea∗ )• QWidget∗ mParent• QLayout∗ mParentLayout

6.1.2 Constructor & Destructor Documentation

6.1.2.1 AbstractArea::∼AbstractArea () [virtual]

Definition at line 60 of file KDChartAbstractArea.cpp.

61 {62 // this bloc left empty intentionally63 }

6.1.2.2 AbstractArea::AbstractArea () [protected]

Definition at line 52 of file KDChartAbstractArea.cpp.

53 : QObject()54 , KDChart::AbstractAreaBase()55 , KDChart::AbstractLayoutItem()56 {57 // this bloc left empty intentionally58 }

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

6.1 KDChart::AbstractArea Class Reference 31

6.1.3 Member Function Documentation

6.1.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

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

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartAbstractArea.cpp.

Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), KDChart::PolarCoordinate-Plane::layoutDiagrams(), KDChart::CartesianAxis::paint(), paintAll(), and KDChart::Cartesian-Axis::paintCtx().

106 {107 return geometry();108 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.1.3.4 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 }

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

32 KD Chart 2 Class Documentation

6.1.3.5 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 paintAll().

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

6.1.3.6 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual,inherited]

Implemented inKDChart::CartesianAxis, KDChart::CartesianCoordinatePlane, KDChart::TextLayout-Item, KDChart::MarkerLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::VerticalLineLayout-Item, andKDChart::PolarCoordinatePlane.

Referenced by KDChart::Legend::paint(), paintAll(), and KDChart::AbstractLayoutItem::paintCtx().

6.1.3.7 void AbstractArea::paintAll (QPainter & painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartAbstractArea.cpp.

References areaGeometry(), KDChart::AbstractAreaBase::innerRect(), KDChart::AbstractLayout-Item::paint(), KDChart::AbstractAreaBase::paintBackground(), and KDChart::AbstractAreaBase::paint-Frame().

Referenced by KDChart::Chart::paint(), and paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );

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

6.1 KDChart::AbstractArea Class Reference 33

102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), and paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

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

34 KD Chart 2 Class Documentation

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.1.3.10 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 paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-LayoutItem::paint()instead.

Definition at line 71 of file KDChartAbstractArea.cpp.

References 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() );

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

6.1 KDChart::AbstractArea Class Reference 35

79 if( oldGeometry != rect )80 setGeometry( oldGeometry );81 }

6.1.3.12 void AbstractArea::positionHasChanged () [protected, virtual]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartAbstractArea.cpp.

111 {112 emit positionChanged( this );113 }

6.1.3.13 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 else72 mParentLayout->removeItem( this );73 }74 }

6.1.3.14 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.1.3.15 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

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

36 KD Chart 2 Class Documentation

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.1.3.17 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 sizeof 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.1.3.18 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.1.4 Member Data Documentation

6.1.4.1 Q_SIGNALSKDChart::AbstractArea::__pad0__ [protected]

Reimplemented inKDChart::AbstractCoordinatePlane.

Definition at line 86 of file KDChartAbstractArea.h.

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

6.1 KDChart::AbstractArea Class Reference 37

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartAbstractArea.h• KDChartAbstractArea.cpp

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

38 KD Chart 2 Class Documentation

6.2 KDChart::AbstractAreaBase Class Reference

#include <KDChartAbstractAreaBase.h >

Inheritance diagram for KDChart::AbstractAreaBase:

6.2.1 Detailed Description

Base class forAbstractAreaandAbstractAreaWidget: An area in the chart with a background, a frame, etc.

AbstractAreaBaseis the base class for all chart elements that have a set of background attributes and frameattributes, such as legends or axes.

Note:Normally you should not useAbstractAreaBasedirectly, but derive your classes fromAbstractAreaorAbstractAreaWidget.This classis not aQObject, so it is easier to inherit from it, if your are inheriting from aQObjecttoolike AbstractAreaWidgetdoes it.

See also:AbstractArea, AbstractAreaWidget

Definition at line 68 of file KDChartAbstractAreaBase.h.

Public Member Functions

• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• FrameAttributesframeAttributes() const• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)

Protected Member Functions

• AbstractAreaBase()• virtual QRectareaGeometry() const=0• QRectinnerRect() const• virtual voidpositionHasChanged()• virtual∼AbstractAreaBase()

6.2.2 Constructor & Destructor Documentation

6.2.2.1 AbstractAreaBase::AbstractAreaBase () [protected]

Definition at line 57 of file KDChartAbstractAreaBase.cpp.

57 :58 _d( new Private() )59 {60 }

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

6.2 KDChart::AbstractAreaBase Class Reference 39

6.2.2.2 AbstractAreaBase::∼AbstractAreaBase() [protected, virtual]

Definition at line 62 of file KDChartAbstractAreaBase.cpp.

63 {64 delete _d; _d = 0;65 }

6.2.3 Member Function Documentation

6.2.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

6.2.3.2 virtual QRect KDChart::AbstractAreaBase::areaGeometry () const [protected,pure virtual]

Implemented inKDChart::AbstractArea, KDChart::AbstractAreaWidget, andKDChart::TextArea.

Referenced by innerRect().

6.2.3.3 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.2.3.4 FrameAttributes AbstractAreaBase::frameAttributes () const

Definition at line 87 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

88 {89 return d->frameAttributes;90 }

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

40 KD Chart 2 Class Documentation

6.2.3.5 QRect AbstractAreaBase::innerRect () const [protected]

Definition at line 175 of file KDChartAbstractAreaBase.cpp.

References areaGeometry(), and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

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

6.2.3.6 void AbstractAreaBase::paintBackground (QPainter &painter, const QRect & rectangle)[virtual]

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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:

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

6.2 KDChart::AbstractAreaBase Class Reference 41

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 checked147 }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 attributes155 }

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

Definition at line 158 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

6.2.3.8 void AbstractAreaBase::positionHasChanged ()[protected, virtual]

Reimplemented inKDChart::AbstractArea, KDChart::AbstractAreaWidget, andKDChart::TextArea.

Definition at line 188 of file KDChartAbstractAreaBase.cpp.

189 {190 // this bloc left empty intentionally191 }

6.2.3.9 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

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

42 KD Chart 2 Class Documentation

References d.

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

6.2.3.10 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

The documentation for this class was generated from the following files:

• KDChartAbstractAreaBase.h• KDChartAbstractAreaBase.cpp

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

6.3 KDChart::AbstractAreaWidget Class Reference 43

6.3 KDChart::AbstractAreaWidget Class Reference

#include <KDChartAbstractAreaWidget.h >

Inheritance diagram for KDChart::AbstractAreaWidget:Collaboration diagram for KDChart::Abstract-AreaWidget:

6.3.1 Detailed Description

An area in the chart with a background, a frame, etc.

AbstractAreaWidgetis the base for all widget classes that have a set of background attributes and frameattributes, such asKDChart::ChartandKDChart::Legend.

Definition at line 51 of file KDChartAbstractAreaWidget.h.

Public Member Functions

• AbstractAreaWidget(QWidget∗parent=0)• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• virtual void forceRebuild()• FrameAttributesframeAttributes() const• virtual voidpaint(QPainter∗painter)=0

Overwrite this to paint the inner contents of your widget.

• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintEvent(QPaintEvent∗event)

Draws the background and frame, then callspaint().

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)

Public Attributes

• Q_SIGNALS__pad0__: void positionChanged(AbstractAreaWidget∗ )

Protected Member Functions

• virtual QRectareaGeometry() const• QRectinnerRect() const• virtual voidpositionHasChanged()• virtual∼AbstractAreaWidget()

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

44 KD Chart 2 Class Documentation

6.3.2 Constructor & Destructor Documentation

6.3.2.1 AbstractAreaWidget::AbstractAreaWidget (QWidget ∗ parent= 0) [explicit]

Definition at line 46 of file KDChartAbstractAreaWidget.cpp.

47 : QWidget( parent )48 , AbstractAreaBase( new Private() )49 {50 init();51 }

6.3.2.2 AbstractAreaWidget::∼AbstractAreaWidget () [protected, virtual]

Definition at line 53 of file KDChartAbstractAreaWidget.cpp.

54 {55 // this bloc left empty intentionally56 }

6.3.3 Member Function Documentation

6.3.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

6.3.3.2 QRect AbstractAreaWidget::areaGeometry () const [protected, virtual]

ImplementsKDChart::AbstractAreaBase.

Definition at line 116 of file KDChartAbstractAreaWidget.cpp.

Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::paint(), and paintAll().

117 {118 return geometry();119 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

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

6.3 KDChart::AbstractAreaWidget Class Reference 45

6.3.3.4 void AbstractAreaWidget::forceRebuild () [virtual]

Reimplemented inKDChart::Legend.

Definition at line 84 of file KDChartAbstractAreaWidget.cpp.

85 {86 //bloc left empty intentionally87 }

6.3.3.5 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.3.3.6 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(), paintAll(), and KDChart::AbstractArea::paintAll().

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

6.3.3.7 virtual void KDChart::AbstractAreaWidget::paint (QPainter ∗ painter) [purevirtual]

Overwrite this to paint the inner contents of your widget.

Note:When overriding this method, please let your widget draw itself at the top/left corner of the painter.You should call rect() (or width(), height(), resp.) to find the drawable area’s size: While thepaint()method is being executed the frame of the widget is outside of its rect(), so you can use all of rect() foryour custom drawing!

See also:paint, paintIntoRect

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

46 KD Chart 2 Class Documentation

Implemented inKDChart::Legend.

Referenced by paintAll().

6.3.3.8 void AbstractAreaWidget::paintAll (QPainter & painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 89 of file KDChartAbstractAreaWidget.cpp.

References areaGeometry(), KDChart::AbstractAreaBase::innerRect(), paint(), KDChart::AbstractArea-Base::paintBackground(), and KDChart::AbstractAreaBase::paintFrame().

Referenced by paintEvent(), and paintIntoRect().

90 {91 //qDebug() << "AbstractAreaWidget::paintAll() called";92 // Paint the background and frame93 paintBackground( painter, rect() );94 paintFrame( painter, rect().adjusted(0,0,-1,-1) );9596 // adjust the widget’s content margins,97 // to be sure all content gets calculated98 // to fit into the inner rectangle99 const QRect oldGeometry( areaGeometry() );100 const QRect inner( innerRect() );101 //qDebug() << "areaGeometry():" << oldGeometry102 // << " contentsRect():" << contentsRect() << " inner:" << inner;103 if( contentsRect() != inner ){104 //qDebug() << "old contentsRect():" << contentsRect() << " new innerRect:" << inner;105 setContentsMargins(106 inner.left(),107 inner.top(),108 oldGeometry.width() -inner.width()-1,109 oldGeometry.height()-inner.height()-1 );110 //forceRebuild();111 }112 paint( &painter );113 //qDebug() << "AbstractAreaWidget::paintAll() done.";114 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), paintAll(), and KDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );

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

6.3 KDChart::AbstractAreaWidget Class Reference 47

115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

6.3.3.10 void AbstractAreaWidget::paintEvent (QPaintEvent∗ event) [virtual]

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwritepaint()instead.

See also:paint

Definition at line 65 of file KDChartAbstractAreaWidget.cpp.

References paintAll().

66 {67 Q_UNUSED( event );68 QPainter painter( this );69 paintAll( painter );70 }

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

48 KD Chart 2 Class Documentation

6.3.3.11 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(), paintAll(), and KDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

6.3.3.12 void AbstractAreaWidget::paintIntoRect (QPainter & painter, const QRect & rect)[virtual]

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwritepaint()instead.

Definition at line 72 of file KDChartAbstractAreaWidget.cpp.

References paintAll().

Referenced by KDChart::Chart::paint().

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

6.3.3.13 void AbstractAreaWidget::positionHasChanged () [protected, virtual]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 121 of file KDChartAbstractAreaWidget.cpp.

122 {123 emit positionChanged( this );124 }

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

6.3 KDChart::AbstractAreaWidget Class Reference 49

6.3.3.14 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.3.3.15 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

6.3.4 Member Data Documentation

6.3.4.1 Q_SIGNALSKDChart::AbstractAreaWidget::__pad0__

Reimplemented inKDChart::Legend.

Definition at line 108 of file KDChartAbstractAreaWidget.h.

The documentation for this class was generated from the following files:

• KDChartAbstractAreaWidget.h• KDChartAbstractAreaWidget.cpp

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

50 KD Chart 2 Class Documentation

6.4 KDChart::AbstractAxis Class Reference

#include <KDChartAbstractAxis.h >

Inheritance diagram for KDChart::AbstractAxis:Collaboration diagram for KDChart::AbstractAxis:

6.4.1 Detailed Description

The base class for axes.

For being useful, axes need to be assigned to a diagram, seeAbstractCartesianDiagram::addAxisandAbstractCartesianDiagram::takeAxis.

See also:PolarAxis,AbstractCartesianDiagram

Definition at line 63 of file KDChartAbstractAxis.h.

Public Member Functions

• AbstractAxis(AbstractDiagram∗diagram=0)• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• virtual voidconnectSignals()

Wireing the signal/slot connections.

• constAbstractCoordinatePlane∗ coordinatePlane() const

Convenience function, returns the coordinate plane, in which this axis is used.

• void createObserver(AbstractDiagram∗diagram)• void deleteObserver(AbstractDiagram∗diagram)• constAbstractDiagram∗ diagram() const• FrameAttributesframeAttributes() const• virtual QRectgeometry() const=0• QStringListlabels() const

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

• boolobservedBy(AbstractDiagram∗diagram) const• virtual voidpaint(QPainter∗)=0• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

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

6.4 KDChart::AbstractAxis Class Reference 51

• void removeFromParentLayout()

• void setBackgroundAttributes(constBackgroundAttributes&a)

• void setFrameAttributes(constFrameAttributes&a)

• virtual voidsetGeometry(const QRect &rect)=0

• void setLabels(const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels.

• void setParentLayout(QLayout∗lay)

• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setShortLabels(const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels, in case the normal labels are too long.

• void setTextAttributes(constTextAttributes&a)

Use this to specify the text attributes to be used for axis labels.

• QStringListshortLabels() const

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

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• TextAttributestextAttributes() const

Returns the text attributes to be used for axis labels.

• virtual∼AbstractAxis()

Public Attributes

• publicQ_SLOTS: void update()

• protectedQ_SLOTS: virtual void delayedInit()

Protected Member Functions

• virtual QRectareaGeometry() const

• QRectinnerRect() const

• virtual voidpositionHasChanged()

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

52 KD Chart 2 Class Documentation

6.4.2 Constructor & Destructor Documentation

6.4.2.1 AbstractAxis::AbstractAxis (AbstractDiagram ∗ diagram= 0) [explicit]

Definition at line 114 of file KDChartAbstractAxis.cpp.

115 : AbstractArea( new Private( diagram, this ) )116 {117 init();118 QTimer::singleShot(0, this, SLOT(delayedInit()));119 }

6.4.2.2 AbstractAxis::∼AbstractAxis () [virtual]

Definition at line 121 of file KDChartAbstractAxis.cpp.

References d.

122 {123 d->mDiagram = 0;124 d->secondaryDiagrams.clear();125 }

6.4.3 Member Function Documentation

6.4.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

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

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartAbstractArea.cpp.

Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), KDChart::PolarCoordinate-Plane::layoutDiagrams(), KDChart::CartesianAxis::paint(), KDChart::AbstractArea::paintAll(), andKDChart::CartesianAxis::paintCtx().

106 {107 return geometry();108 }

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

6.4 KDChart::AbstractAxis Class Reference 53

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.4.3.4 void AbstractAxis::connectSignals () [virtual]

Wireing the signal/slot connections.

This method gets called automatically, each time, when you assign the axis to a diagram, either by passinga diagram∗ to the c’tor, or by calling the diagram’s setAxis method, resp.

If overwriting this method in derived classes, make sure to call this base methodAbstractAxis::connect-Signals(), so your axis gets connected to the diagram’s built-in signals.

See also:AbstractCartesianDiagram::addAxis()

Definition at line 192 of file KDChartAbstractAxis.cpp.

References d.

Referenced by createObserver().

193 {194 if( d->observer ){195 connect( d->observer, SIGNAL( diagramDataChanged( AbstractDiagram *) ),196 this, SLOT( update() ) );197 }198 }

6.4.3.5 constAbstractCoordinatePlane∗ AbstractAxis::coordinatePlane () const

Convenience function, returns the coordinate plane, in which this axis is used.

If the axis is not used in a coordinate plane, the return value is Zero.

Definition at line 293 of file KDChartAbstractAxis.cpp.

References d.

294 {295 if( d->diagram() )296 return d->diagram()->coordinatePlane();297 return 0;298 }

6.4.3.6 void AbstractAxis::createObserver (AbstractDiagram ∗ diagram)

Definition at line 158 of file KDChartAbstractAxis.cpp.

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

54 KD Chart 2 Class Documentation

References connectSignals(), and d.

Referenced by KDChart::AbstractCartesianDiagram::addAxis().

159 {160 if( d->setDiagram( diagram, this ) )161 connectSignals();162 }

6.4.3.7 void AbstractAxis::deleteObserver (AbstractDiagram ∗ diagram)

Definition at line 174 of file KDChartAbstractAxis.cpp.

References d.

Referenced by KDChart::AbstractCartesianDiagram::takeAxis(), and KDChart::AbstractCartesian-Diagram::∼AbstractCartesianDiagram().

175 {176 d->unsetDiagram( diagram, this );177 }

6.4.3.8 constAbstractDiagram ∗ KDChart::AbstractAxis::diagram () const

Definition at line 300 of file KDChartAbstractAxis.cpp.

References d.

301 {302 return d->diagram();303 }

6.4.3.9 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.4.3.10 virtual QRect KDChart::AbstractAxis::geometry () const [pure virtual]

Implemented inKDChart::CartesianAxis.

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

6.4 KDChart::AbstractAxis Class Reference 55

6.4.3.11 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(), andKDChart::AbstractArea::paintAll().

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

6.4.3.12 QStringList AbstractAxis::labels () const

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

See also:setLabels

Definition at line 254 of file KDChartAbstractAxis.cpp.

References d.

Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

255 {256 return d->hardLabels;257 }

6.4.3.13 bool KDChart::AbstractAxis::observedBy (AbstractDiagram ∗ diagram) const

Definition at line 305 of file KDChartAbstractAxis.cpp.

References d.

306 {307 return d->hasDiagram( diagram );308 }

6.4.3.14 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual,inherited]

Implemented inKDChart::CartesianAxis, KDChart::CartesianCoordinatePlane, KDChart::TextLayout-Item, KDChart::MarkerLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::VerticalLineLayout-Item, andKDChart::PolarCoordinatePlane.

Referenced by KDChart::Legend::paint(), KDChart::AbstractArea::paintAll(), and KDChart::Abstract-LayoutItem::paintCtx().

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

56 KD Chart 2 Class Documentation

6.4.3.15 void AbstractArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractAreaBase::innerRect(),KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::Chart::paint(), and KDChart::AbstractArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */

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

6.4 KDChart::AbstractAxis Class Reference 57

122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.4.3.18 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(), andKDChart::AbstractArea::paintAll().

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

58 KD Chart 2 Class Documentation

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-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.4.3.20 void AbstractArea::positionHasChanged () [protected, virtual, inherited]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartAbstractArea.cpp.

111 {112 emit positionChanged( this );113 }

6.4.3.21 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() )

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

6.4 KDChart::AbstractAxis Class Reference 59

70 mParentLayout->removeWidget( widget() );71 else72 mParentLayout->removeItem( this );73 }74 }

6.4.3.22 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.4.3.23 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

6.4.3.24 virtual void KDChart::AbstractAxis::setGeometry (const QRect & rect) [purevirtual]

Implemented inKDChart::CartesianAxis.

6.4.3.25 void AbstractAxis::setLabels (const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels.

Labels specified via setLabels take precedence: If a non-empty list is passed, KDChartwill use thesestrings as axis labels, instead of calculating them.

If you a smaller number of strings than the number od labels drawn at this axis, KDChartwill iterate overthe list, repeating the strings, until all labels are drawn. As an example you could specify the seven days ofthe week as abscissa labels, which would be repeatedly used then.

By passing an empty QStringList you can reset the default behaviour.

See also:labels, setShortLabels

Definition at line 244 of file KDChartAbstractAxis.cpp.

References d.

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

60 KD Chart 2 Class Documentation

245 {246 d->hardLabels = list;247 }

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.4.3.27 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 sizeof 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.4.3.28 void AbstractAxis::setShortLabels (const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels, in case the normal labels are too long.

Note:Setting done via setShortLabels will be ignored, 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.

See also:shortLabels, setLabels

Definition at line 270 of file KDChartAbstractAxis.cpp.

References d.

271 {272 d->hardShortLabels = list;273 }

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

6.4 KDChart::AbstractAxis Class Reference 61

6.4.3.29 void AbstractAxis::setTextAttributes (constTextAttributes & a)

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’sparent widget, so normally, it will be theKDChart::Chart. Thus the labels of all of your axes in all of yourdiagrams within thatChartwill 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.4.3.30 QStringList AbstractAxis::shortLabels () const

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

Definition at line 283 of file KDChartAbstractAxis.cpp.

References d.

Referenced by KDChart::CartesianAxis::paintCtx().

284 {285 return d->hardShortLabels;286 }

6.4.3.31 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

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

62 KD Chart 2 Class Documentation

6.4.3.32 TextAttributes AbstractAxis::textAttributes () const

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 KDChart::CartesianAxis::maximumSize(), KDChart::CartesianAxis::paintCtx(), andKDChart::CartesianAxis::titleTextAttributes().

223 {224 return d->textAttributes;225 }

6.4.4 Member Data Documentation

6.4.4.1 Q_SIGNALSKDChart::AbstractArea::__pad0__ [protected, inherited]

Reimplemented inKDChart::AbstractCoordinatePlane.

Definition at line 86 of file KDChartAbstractArea.h.

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

Definition at line 77 of file KDChartLayoutItems.h.

6.4.4.4 publicKDChart::AbstractAxis::Q_SLOTS

Definition at line 108 of file KDChartAbstractAxis.h.

6.4.4.5 protectedKDChart::AbstractAxis::Q_SLOTS

Definition at line 105 of file KDChartAbstractAxis.h.

The documentation for this class was generated from the following files:

• KDChartAbstractAxis.h• KDChartAbstractAxis.cpp

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 63

6.5 KDChart::AbstractCartesianDiagram Class Reference

#include <KDChartAbstractCartesianDiagram.h >

Inheritance diagram for KDChart::AbstractCartesianDiagram:Collaboration diagram forKDChart::AbstractCartesianDiagram:

6.5.1 Detailed Description

Base class for diagrams based on a cartesian coordianate system.

TheAbstractCartesianDiagraminterface adds those elements that are specific to diagrams based on a carte-sian coordinate system to the basicAbstractDiagraminterface.

Definition at line 45 of file KDChartAbstractCartesianDiagram.h.

Public Member Functions

• AbstractCartesianDiagram(QWidget∗parent=0,CartesianCoordinatePlane∗plane=0)• virtual voidaddAxis(CartesianAxis∗axis)

Add the axis to the diagram.

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• virtual KDChart::CartesianAxisListaxes() const• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() 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 thesevalues).

• virtual voiddataChanged(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

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

64 KD Chart 2 Class Documentation

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

• QStringListdatasetLabels() const

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.

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual void layoutPlanes()• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual const intnumberOfAbscissaSegments() const=0• virtual const intnumberOfOrdinateSegments() const=0• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, const

QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 65

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• virtual AbstractCartesianDiagram∗ referenceDiagram() const• virtual QPointFreferenceDiagramOffset() const• virtual void resize(const QSizeF &area)=0

Called by the widget’s sizeEvent.

• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• virtual voidsetModel(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.

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

66 KD Chart 2 Class Documentation

• 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 setReferenceDiagram(AbstractCartesianDiagram∗diagram, const QPointF

&offset=QPointF())• virtual voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• virtual void takeAxis(CartesianAxis∗axis)

Removes the axis from the diagram, without deleting it.

• 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 QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼AbstractCartesianDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const=0• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(PaintContext∗paintContext)=0

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 67

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 voidpaintDataValueTexts(QPainter∗painter)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• virtual doublethreeDItemDepth(int column) const=0• virtual doublethreeDItemDepth(const QModelIndex &index) const=0• doublevalueForCell(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.5.2 Constructor & Destructor Documentation

6.5.2.1 AbstractCartesianDiagram::AbstractCartesianDiagram (QWidget ∗ parent= 0,CartesianCoordinatePlane∗ plane= 0) [explicit]

Definition at line 53 of file KDChartAbstractCartesianDiagram.cpp.

54 : AbstractDiagram ( new Private(), parent, plane )55 {56 }

6.5.2.2 KDChart::AbstractCartesianDiagram::∼AbstractCartesianDiagram () [virtual]

Definition at line 58 of file KDChartAbstractCartesianDiagram.cpp.

References d, and KDChart::AbstractAxis::deleteObserver().

59 {60 Q_FOREACH( CartesianAxis* axis, d->axesList ) {61 axis->deleteObserver( this );62 }63 d->axesList.clear();64 }

6.5.3 Member Function Documentation

6.5.3.1 void AbstractCartesianDiagram::addAxis (CartesianAxis∗ axis) [virtual]

Add the axis to the diagram.

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

68 KD Chart 2 Class Documentation

The diagram takes ownership of the axis and will delete it.

To gain back ownership (e.g. for assigning the axis to another diagram) use the takeAxis method, beforecalling addAxis on the other diagram.

See also:takeAxis

Definition at line 66 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractAxis::createObserver(), d, and layoutPlanes().

67 {68 if ( !d->axesList.contains( axis ) ) {69 d->axesList.append( axis );70 axis->createObserver( this );71 layoutPlanes();72 }73 }

6.5.3.2 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.5.3.3 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.5.3.4 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated with the diagram.

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 69

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.5.3.5 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat 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 KDChart::AbstractDiagram::valueForCell().

210 {

6.5.3.6 KDChart::CartesianAxisList AbstractCartesianDiagram::axes () const [virtual]

Definition at line 85 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::CartesianAxisList, and d.

86 {87 return d->axesList;88 }

6.5.3.7 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

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

70 KD Chart 2 Class Documentation

6.5.3.8 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.5.3.9 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

6.5.3.10 virtual const QPair<QPointF, QPointF> KDChart::Abstract-Diagram::calculateDataBoundaries () const [protected, pure virtual,inherited]

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

Referenced by KDChart::AbstractDiagram::dataBoundaries().

6.5.3.11 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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 KDChart::AbstractDiagram::paintMarker().

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 71

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

6.5.3.12 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.5.3.13 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const [inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), layoutPlanes(), KDChart::PolarDiagram::paint(), KDChart::LineDiagram::paint(),KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polarCoordinatePlane(), and set-CoordinatePlane().

126 {127 return d->plane;128 }

6.5.3.14 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

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

72 KD Chart 2 Class Documentation

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.5.3.15 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, const QModelIndex& bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.5.3.16 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese 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(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 73

6.5.3.17 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.5.3.18 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.5.3.19 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited]

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 checkthese too, in order to find the marker, that is shown for a single cell.

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

74 KD Chart 2 Class Documentation

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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.5.3.20 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

6.5.3.21 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 75

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.5.3.22 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.5.3.23 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

6.5.3.24 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

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

76 KD Chart 2 Class Documentation

6.5.3.25 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.5.3.26 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.5.3.27 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.5.3.28 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.5.3.29 void KDChart::AbstractCartesianDiagram::layoutPlanes () [virtual]

Definition at line 90 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractCoordinate-Plane::layoutPlanes().

Referenced by addAxis(), and takeAxis().

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 77

91 {92 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()";93 AbstractCoordinatePlane* plane = coordinatePlane();94 if( plane ){95 plane->layoutPlanes();96 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK";97 }98 }

6.5.3.30 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.5.3.31 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.5.3.32 virtual const int KDChart::AbstractCartesianDiagram::numberOfAbscissaSegments ()const [pure virtual]

Implemented inKDChart::BarDiagram, andKDChart::LineDiagram.

6.5.3.33 virtual const int KDChart::AbstractCartesianDiagram::numberOfOrdinateSegments ()const [pure virtual]

Implemented inKDChart::BarDiagram, andKDChart::LineDiagram.

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

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 inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

6.5.3.35 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

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

78 KD Chart 2 Class Documentation

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::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 series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

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

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 }394395

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 79

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.5.3.38 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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 }

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

80 KD Chart 2 Class Documentation

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 about456 // 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: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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 81

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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

6.5.3.40 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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 {

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

82 KD Chart 2 Class Documentation

6.5.3.41 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.5.3.42 QPen AbstractDiagram::pen () const [inherited]

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 {

6.5.3.43 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.5.3.44 void KDChart::AbstractDiagram::propertiesChanged () [protected, inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 83

6.5.3.45 AbstractCartesianDiagram ∗ AbstractCartesianDiagram::referenceDiagram () const[virtual]

Definition at line 123 of file KDChartAbstractCartesianDiagram.cpp.

References d.

124 {125 return d->referenceDiagram;126 }

6.5.3.46 QPointF AbstractCartesianDiagram::referenceDiagramOffset () const[virtual]

Definition at line 128 of file KDChartAbstractCartesianDiagram.cpp.

References d.

129 {130 return d->referenceDiagramOffset;131 }

6.5.3.47 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [purevirtual, inherited]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.5.3.49 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

Set whether data value labels are allowed to overlap.

Parameters:allow True means that overlapping labels are allowed.

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

84 KD Chart 2 Class Documentation

Definition at line 285 of file KDChartAbstractDiagram.cpp.

References d.

290 {

6.5.3.50 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.5.3.51 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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;

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

6.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.");171 return;172 }173 d->setAttributesModel(amodel);174 scheduleDelayedItemsLayout();175 d->databoundariesDirty = true;176 emit modelsChanged();177 }

6.5.3.52 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.5.3.53 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.5.3.54 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.5.3.55 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

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

86 KD Chart 2 Class Documentation

6.5.3.56 void KDChart::AbstractCartesianDiagram::setCoordinatePlane(AbstractCoordinatePlane∗ plane) [virtual]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented fromKDChart::AbstractDiagram.

Definition at line 100 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractDiagram::set-CoordinatePlane().

101 {102 if( coordinatePlane() ) disconnect( coordinatePlane() );103 AbstractDiagram::setCoordinatePlane(plane);104105 // show the axes, after all have been adjusted106 // (because they might be dependend on each other)107 /*108 if( plane )109 Q_FOREACH( CartesianAxis* axis, d->axesList )110 axis->show();111 else112 Q_FOREACH( CartesianAxis* axis, d->axesList )113 axis->hide();114 */115 }

6.5.3.57 void AbstractDiagram::setDataBoundariesDirty () const [protected, inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.5.3.58 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 87

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.5.3.59 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.5.3.60 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes &a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.5.3.61 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

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

88 KD Chart 2 Class Documentation

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.5.3.62 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.5.3.63 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.5.3.64 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 89

6.5.3.65 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.5.3.66 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

6.5.3.67 void AbstractCartesianDiagram::setReferenceDiagram (AbstractCartesianDiagram ∗diagram, const QPointF & offset= QPointF()) [virtual]

Definition at line 117 of file KDChartAbstractCartesianDiagram.cpp.

References d.

118 {119 d->referenceDiagram = diagram;120 d->referenceDiagramOffset = offset;121 }

6.5.3.68 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.5.3.69 void AbstractDiagram::setSelection (const QRect &rect, QItemSelection-Model::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

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

90 KD Chart 2 Class Documentation

6.5.3.70 void AbstractCartesianDiagram::takeAxis (CartesianAxis∗ axis) [virtual]

Removes the axis from the diagram, without deleting it.

The diagram no longer owns the axis, so it is the caller’s responsibility to delete the axis.

See also:addAxis

Definition at line 75 of file KDChartAbstractCartesianDiagram.cpp.

References d, KDChart::AbstractAxis::deleteObserver(), layoutPlanes(), and KDChart::AbstractLayout-Item::setParentWidget().

Referenced by KDChart::CartesianAxis::∼CartesianAxis().

76 {77 const int idx = d->axesList.indexOf( axis );78 if( idx != -1 )79 d->axesList.takeAt( idx );80 axis->deleteObserver( this );81 axis->setParentWidget( 0 );82 layoutPlanes();83 }

6.5.3.71 virtual double KDChart::AbstractCartesianDiagram::threeDItemDepth (int column)const [protected, pure virtual]

Implemented inKDChart::BarDiagram, andKDChart::LineDiagram.

6.5.3.72 virtual double KDChart::AbstractCartesianDiagram::threeDItemDepth (constQModelIndex & index) const [protected, pure virtual]

Implemented inKDChart::BarDiagram, andKDChart::LineDiagram.

6.5.3.73 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.5.3.74 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

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

6.5 KDChart::AbstractCartesianDiagram Class Reference 91

6.5.3.75 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.5.3.76 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.5.3.77 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.5.3.78 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

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

92 KD Chart 2 Class Documentation

6.5.3.79 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.5.3.80 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection)const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.5.4 Member Data Documentation

6.5.4.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartAbstractCartesianDiagram.h• KDChartAbstractCartesianDiagram.cpp

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 93

6.6 KDChart::AbstractCoordinatePlane Class Reference

#include <KDChartAbstractCoordinatePlane.h >

Inheritance diagram for KDChart::AbstractCoordinatePlane:Collaboration diagram forKDChart::AbstractCoordinatePlane:

Public Types

• enumAxesCalcMode{

Linear,

Logarithmic}

Public Member Functions

• virtual voidaddDiagram(AbstractDiagram∗diagram)

Adds a diagram to this coordinate plane.

• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• AbstractDiagram∗ diagram()• ConstAbstractDiagramListdiagrams() const• AbstractDiagramListdiagrams()• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

• GridAttributesglobalGridAttributes() const• DataDimensionsListgridDimensionsList()

Returns the dimensions used for drawing the grid lines.

• virtual boolisEmpty() const

pure virtual inQLayoutItem

• 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().

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

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

94 KD Chart 2 Class Documentation

• virtual QSizeminimumSizeHint() 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 voidpaint(QPainter∗)=0• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• constChart∗ 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: Thefirst 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 setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setGlobalGridAttributes(constGridAttributes&)

Set the grid attributes to be used by this coordinate plane.

• void setParent(Chart∗parent)

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 95

Called internally byKDChart::Chart.

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setReferenceCoordinatePlane(AbstractCoordinatePlane∗plane)

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

• virtual voidsetZoomCenter(QPointF)

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

• virtual voidsetZoomFactorX(double)

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

• virtual voidsetZoomFactorY(double)

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• virtual QSizePolicysizePolicy() const

[reimplemented]

• virtual void takeDiagram(AbstractDiagram∗diagram)

Removes the diagram from the plane, without deleting it.

• virtual const QPointFtranslate(const QPointF &diagramPoint) const=0

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

• virtual QPointFzoomCenter() const• virtual doublezoomFactorX() const• virtual doublezoomFactorY() const• virtual∼AbstractCoordinatePlane()

Public Attributes

• Q_SIGNALS__pad0__: void destroyedCoordinatePlane(AbstractCoordinatePlane∗ )• publicQ_SLOTS: void update()

Protected Member Functions

• AbstractCoordinatePlane(Chart∗parent=0)• virtual QRectareaGeometry() const• virtual DataDimensionsListgetDataDimensionsList() const=0• QRectinnerRect() const• virtual voidpositionHasChanged()

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

96 KD Chart 2 Class Documentation

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout

6.6.1 Member Enumeration Documentation

6.6.1.1 enumKDChart::AbstractCoordinatePlane::AxesCalcMode

Enumeration values:Linear

Logarithmic

Definition at line 55 of file KDChartAbstractCoordinatePlane.h.

55 { Linear, Logarithmic };

6.6.2 Constructor & Destructor Documentation

6.6.2.1 AbstractCoordinatePlane::AbstractCoordinatePlane (Chart ∗ parent= 0) [explicit,protected]

Definition at line 51 of file KDChartAbstractCoordinatePlane.cpp.

References d.

52 : AbstractArea ( new Private() )53 {54 d->parent = parent;55 d->init();56 }

6.6.2.2 AbstractCoordinatePlane::∼AbstractCoordinatePlane() [virtual]

Definition at line 58 of file KDChartAbstractCoordinatePlane.cpp.

59 {60 emit destroyedCoordinatePlane( this );61 }

6.6.3 Member Function Documentation

6.6.3.1 void AbstractCoordinatePlane::addDiagram (AbstractDiagram ∗ diagram) [virtual]

Adds a diagram to this coordinate plane.

Parameters:diagram The diagram to add.

See also:replaceDiagram, takeDiagram

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 97

Reimplemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Definition at line 68 of file KDChartAbstractCoordinatePlane.cpp.

References d, layoutDiagrams(), layoutPlanes(), and KDChart::AbstractDiagram::setCoordinatePlane().

Referenced by KDChart::PolarCoordinatePlane::addDiagram(), KDChart::CartesianCoordinate-Plane::addDiagram(), and replaceDiagram().

69 {70 // diagrams are invisible and paint through their paint() method71 diagram->hide();7273 d->diagrams.append( diagram );74 diagram->setParent( d->parent );75 diagram->setCoordinatePlane( this );76 layoutDiagrams();77 layoutPlanes(); // there might be new axes, etc78 update();79 }

6.6.3.2 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

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

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartAbstractArea.cpp.

Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), KDChart::PolarCoordinate-Plane::layoutDiagrams(), KDChart::CartesianAxis::paint(), KDChart::AbstractArea::paintAll(), andKDChart::CartesianAxis::paintCtx().

106 {107 return geometry();108 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

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

98 KD Chart 2 Class Documentation

6.6.3.5 AbstractDiagram ∗ AbstractCoordinatePlane::diagram ()

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.6.3.6 ConstAbstractDiagramList AbstractCoordinatePlane::diagrams () const

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_STL132 qCopy( d->diagrams.begin(), d->diagrams.end(), std::back_inserter( list ) );133 #else134 Q_FOREACH( AbstractDiagram * a, d->diagrams )135 list.push_back( a );136 #endif137 return list;138 }

6.6.3.7 AbstractDiagramList AbstractCoordinatePlane::diagrams ()

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 KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(),KDChart::CartesianCoordinatePlane::getDataDimensionsList(), KDChart::PolarCoordinatePlane::layout-Diagrams(), KDChart::CartesianCoordinatePlane::layoutDiagrams(), KDChart::PolarCoordinate-Plane::paint(), and KDChart::CartesianCoordinatePlane::paint().

124 {125 return d->diagrams;126 }

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 99

6.6.3.8 Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections () const[virtual]

pure virtual inQLayoutItem

Definition at line 200 of file KDChartAbstractCoordinatePlane.cpp.

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

6.6.3.9 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.6.3.10 QRect KDChart::AbstractCoordinatePlane::geometry () const [virtual]

pure virtual inQLayoutItem

Definition at line 237 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::PolarCoordinatePlane::paint().

238 {239 return d->geometry;240 }

6.6.3.11 virtualDataDimensionsListKDChart::AbstractCoordinatePlane::getDataDimensions-List () const [protected, pure virtual]

Implemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

6.6.3.12 GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes () const

Returns:The grid attributes used by this coordinate plane.

See also:setGlobalGridAttributesCartesianCoordinatePlane::gridAttributes

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.cpp.

References d.

Referenced by KDChart::PolarCoordinatePlane::gridAttributes(), and KDChart::CartesianCoordinate-Plane::gridAttributes().

158 {159 return d->gridAttributes;160 }

6.6.3.13 KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensions-List ()

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 owntasks - 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 datawas changed.

Note:Returned list will contain different numbers ofDataDimension, depending on the kind of coordinateplane used. ForCartesianCoordinatePlanetwo DataDimensionare returned: the first representinggrid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (orOrdinate 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 KDChart::CartesianCoordinatePlane::layoutDiagrams(), KDChart::Cartesian-Axis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

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

6.6.3.14 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(), andKDChart::AbstractArea::paintAll().

176 {177 Q_ASSERT_X ( d != 0, "AbstractAreaBase::innerRect()",

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 101

178 "Private class was not initialized!" );179180 const int padding181 = d->frameAttributes.isVisible()182 ? qMax( d->frameAttributes.padding(), 0 ) : 0;183 return184 QRect( QPoint(0,0), areaGeometry().size() )185 .adjusted( padding, padding, -padding, -padding );186 }

6.6.3.15 bool KDChart::AbstractCoordinatePlane::isEmpty () const [virtual]

pure virtual inQLayoutItem

Definition at line 193 of file KDChartAbstractCoordinatePlane.cpp.

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

6.6.3.16 virtual void KDChart::AbstractCoordinatePlane::layoutDiagrams () [purevirtual]

Distribute the available space among the diagrams and axes.

Implemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Referenced by addDiagram(), replaceDiagram(), and takeDiagram().

6.6.3.17 void KDChart::AbstractCoordinatePlane::layoutPlanes ()

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

Definition at line 254 of file KDChartAbstractCoordinatePlane.cpp.

References needLayoutPlanes().

Referenced by addDiagram(), KDChart::CartesianAxis::layoutPlanes(), KDChart::AbstractCartesian-Diagram::layoutPlanes(), and replaceDiagram().

255 {256 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");257 emit needLayoutPlanes();258 }

6.6.3.18 QSize KDChart::AbstractCoordinatePlane::maximumSize () const [virtual]

pure virtual inQLayoutItem

Definition at line 205 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by sizeHint().

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

102 KD Chart 2 Class Documentation

206 {207 if( d->parent )208 return d->parent->size();209 // Note: At external layut calculation time the coord.plane *will*210 // have a parent widget, so returning a default size here211 // will not affect its real drawing size.212 return QSize(1000, 1000);213 }

6.6.3.19 QSize KDChart::AbstractCoordinatePlane::minimumSize () const [virtual]

pure virtual inQLayoutItem

Definition at line 215 of file KDChartAbstractCoordinatePlane.cpp.

216 {217 return QSize(60, 60); // this default can be overwritten by derived classes218 }

6.6.3.20 QSize KDChart::AbstractCoordinatePlane::minimumSizeHint () const [virtual]

[reimplemented]

Definition at line 140 of file KDChartAbstractCoordinatePlane.cpp.

141 {142 return QSize( 200, 200 );143 }

6.6.3.21 void KDChart::AbstractCoordinatePlane::needLayoutPlanes ()

Emitted when plane needs to trigger the Chart’s layouting of the coord.

planes.

Referenced by layoutPlanes().

6.6.3.22 void KDChart::AbstractCoordinatePlane::needRelayout ()

Emitted when plane needs to trigger the Chart’s layouting.

Referenced by relayout().

6.6.3.23 void KDChart::AbstractCoordinatePlane::needUpdate ()

Emitted when plane needs to update its drawings.

6.6.3.24 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual,inherited]

Implemented inKDChart::CartesianAxis, KDChart::CartesianCoordinatePlane, KDChart::TextLayout-Item, KDChart::MarkerLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::VerticalLineLayout-Item, andKDChart::PolarCoordinatePlane.

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 103

Referenced by KDChart::Legend::paint(), KDChart::AbstractArea::paintAll(), and KDChart::Abstract-LayoutItem::paintCtx().

6.6.3.25 void AbstractArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractAreaBase::innerRect(),KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::Chart::paint(), and KDChart::AbstractArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );

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

104 KD Chart 2 Class Documentation

118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.6.3.28 void AbstractAreaBase::paintFrame (QPainter &painter, const QRect & rectangle)[virtual, inherited]

Definition at line 158 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 105

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-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.6.3.30 constKDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () const

Definition at line 182 of file KDChartAbstractCoordinatePlane.cpp.

References d.

183 {184 return d->parent;185 }

6.6.3.31 KDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent ()

Definition at line 187 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

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

106 KD Chart 2 Class Documentation

188 {189 return d->parent;190 }

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

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartAbstractArea.cpp.

111 {112 emit positionChanged( this );113 }

6.6.3.33 void KDChart::AbstractCoordinatePlane::propertiesChanged ()

Emitted upon change of a property of the Coordinate Plane or any of its components.

Referenced by KDChart::CartesianCoordinatePlane::addDiagram(), KDChart::Cartesian-CoordinatePlane::setAxesCalcModes(), KDChart::CartesianCoordinatePlane::setAxesCalcModeX(),KDChart::CartesianCoordinatePlane::setAxesCalcModeY(), KDChart::PolarCoordinatePlane::set-GridAttributes(), KDChart::CartesianCoordinatePlane::setGridAttributes(), KDChart::Cartesian-CoordinatePlane::setHorizontalRange(), KDChart::CartesianCoordinatePlane::setIsometricScaling(),KDChart::CartesianCoordinatePlane::setVerticalRange(), KDChart::CartesianCoordinatePlane::setZoom-Center(), KDChart::CartesianCoordinatePlane::setZoomFactorX(), and KDChart::CartesianCoordinate-Plane::setZoomFactorY().

6.6.3.34 AbstractCoordinatePlane∗ KDChart::AbstractCoordinatePlane::referenceCoordinate-Plane () const

There are two ways, in which planes can be caused to interact, in where they are put layouting wise: Thefirst 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 additionto this, planes can share an axis. In that case they will be layed out in relation to each other as suggestedby the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will resultin the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2’s reference plane, bothplanes are drawn over each other. The reference plane concept allows two planes to share the same spaceeven if neither has any axis, and in case there are shared axis, it is used to decided, whether the planesshould 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 }

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 107

6.6.3.35 void KDChart::AbstractCoordinatePlane::relayout ()

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

Definition at line 248 of file KDChartAbstractCoordinatePlane.cpp.

References needRelayout().

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

6.6.3.36 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 else72 mParentLayout->removeItem( this );73 }74 }

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

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 nodiagram 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 addDiagram(), d, layoutDiagrams(), layoutPlanes(), and takeDiagram().

83 {84 if( diagram && oldDiagram_ != diagram ){85 AbstractDiagram* oldDiagram = oldDiagram_;

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

108 KD Chart 2 Class Documentation

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, etc95 update();96 }97 }

6.6.3.38 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.6.3.39 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

6.6.3.40 void KDChart::AbstractCoordinatePlane::setGeometry (const QRect &r) [virtual]

pure virtual inQLayoutItem

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

Definition at line 227 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 109

6.6.3.41 void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes (constGridAttributes &)

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:globalGridAttributesCartesianCoordinatePlane::setGridAttributes

Definition at line 151 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

6.6.3.42 void KDChart::AbstractCoordinatePlane::setParent (Chart ∗ parent)

Called internally byKDChart::Chart.

Definition at line 177 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::addCoordinatePlane(), and KDChart::Chart::takeCoordinatePlane().

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

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.6.3.44 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 sizeof the item’s contents has changed.

Thus, you need to call setParentWidget on every item, that has a non-fixed size.

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

110 KD Chart 2 Class Documentation

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.6.3.45 void KDChart::AbstractCoordinatePlane::setReferenceCoordinatePlane(AbstractCoordinatePlane∗ plane)

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 }

6.6.3.46 virtual void KDChart::AbstractCoordinatePlane::setZoomCenter (QPointF)[virtual]

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

Parameters:center The point to use.

Reimplemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Definition at line 172 of file KDChartAbstractCoordinatePlane.h.

172 :* \code

6.6.3.47 virtual void KDChart::AbstractCoordinatePlane::setZoomFactorX (double)[virtual]

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Definition at line 153 of file KDChartAbstractCoordinatePlane.h.

155 {}

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

6.6 KDChart::AbstractCoordinatePlane Class Reference 111

6.6.3.48 virtual void KDChart::AbstractCoordinatePlane::setZoomFactorY (double)[virtual]

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Definition at line 159 of file KDChartAbstractCoordinatePlane.h.

161 { return QPointF(0.0, 0.0); }

6.6.3.49 QSize KDChart::AbstractCoordinatePlane::sizeHint () const [virtual]

pure virtual inQLayoutItem

Definition at line 220 of file KDChartAbstractCoordinatePlane.cpp.

References maximumSize().

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

6.6.3.50 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.6.3.51 QSizePolicy KDChart::AbstractCoordinatePlane::sizePolicy () const[virtual]

[reimplemented]

Definition at line 146 of file KDChartAbstractCoordinatePlane.cpp.

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

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

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 inKDChart::CartesianCoordinatePlane, andKDChart::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 inKDChart::CartesianCoordinatePlane, andKDChart::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 inKDChart::CartesianCoordinatePlane, andKDChart::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 inKDChart::CartesianCoordinatePlane, andKDChart::PolarCoordinatePlane.

Definition at line 147 of file KDChartAbstractCoordinatePlane.h.

149 {}

6.6.4 Member Data Documentation

6.6.4.1 Q_SIGNALSKDChart::AbstractCoordinatePlane::__pad0__

Reimplemented fromKDChart::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 publicKDChart::AbstractCoordinatePlane::Q_SLOTS

Reimplemented inKDChart::CartesianCoordinatePlane, andKDChart::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

AbstractDiagramdefines the interface for diagram classes.

AbstractDiagramis the base class for diagram classes ("chart types").

It defines the interface, that needs to be implemented for the diagram, to function within theKDChartframework. It extends Interview’sQAbstractItemView.

Definition at line 53 of file KDChartAbstractDiagram.h.

Public Member Functions

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() 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.

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, constQBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)

• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() 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 voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• virtual voidsetModel(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 voidsetRootIndex(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 voidsetSelection(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 QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼AbstractDiagram()

Protected Member Functions

• AbstractDiagram(QWidget∗parent=0,AbstractCoordinatePlane∗plane=0)• AbstractDiagram(Private∗p, QWidget∗parent,AbstractCoordinatePlane∗plane)• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const=0• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(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 voidpaintDataValueTexts(QPainter∗painter)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(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

• doublevalueForCell(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 theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated 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 theAttributesModelthat 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:datasetThe 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 inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::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 (booljustReturnTheStatus= 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." );749750 Q_ASSERT_X ( coordinatePlane(), "AbstractDiagram::checkInvariants()",751 "There is no usable coordinate plane set, for the diagram." );752 }753 return model() && coordinatePlane();754 }755756 int AbstractDiagram::datasetDimension( ) const

6.7.3.10 QModelIndex AbstractDiagram::columnToIndex (intcolumn) 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 aCartesian-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(), andKDChart::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 thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

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 }237238 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 checkthese 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(), andKDChart::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, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 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 tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

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

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

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:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.7.3.20 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.7.3.21 DataValueAttributes AbstractDiagram::dataValueAttributes () const

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

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 }229230 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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

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

This signal is emitted, when either the model or theAttributesModelis 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 (CursorActioncursorAction,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 inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

6.7.3.30 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [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(), andKDChart::DataValueAttributes::textAttributes().

Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), KDChart::Line-Diagram::paint(), and KDChart::BarDiagram::paint().

320 {321 // paint one data series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 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, etc345 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 }354355 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 }394395

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 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

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, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & 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 about456 // 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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 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 }544545

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 (intdataset) 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:datasetThe 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) [purevirtual]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::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 (boolallow)

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 (boolenabled)

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 anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto 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

134 KD Chart 2 Class Documentation

6.7.3.45 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.7.3.46 void AbstractDiagram::setBrush (const QBrush &brush)

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.7.3.47 void AbstractDiagram::setBrush (intdataset, const QBrush & brush)

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.7.3.48 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

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

6.7 KDChart::AbstractDiagram Class Reference 135

6.7.3.49 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

6.7.3.50 void AbstractDiagram::setDataBoundariesDirty () const [protected]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.7.3.51 void AbstractDiagram::setDatasetDimension (intdimension)

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

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

136 KD Chart 2 Class Documentation

6.7.3.52 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.7.3.53 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes &a)

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.7.3.54 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a)

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and propertiesChanged().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

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

6.7 KDChart::AbstractDiagram Class Reference 137

6.7.3.55 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.7.3.56 void AbstractDiagram::setPen (const QPen &pen)

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.7.3.57 void AbstractDiagram::setPen (intdataset, const QPen &pen)

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.7.3.58 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

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

138 KD Chart 2 Class Documentation

6.7.3.59 void AbstractDiagram::setPercentMode (boolpercent)

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

6.7.3.60 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.7.3.61 void AbstractDiagram::setSelection (const QRect &rect, QItemSelection-Model::SelectionFlagscommand) [virtual]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.7.3.62 void AbstractDiagram::update () const

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by doItemsLayout().

6.7.3.63 void KDChart::AbstractDiagram::useDefaultColors ()

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

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

6.7 KDChart::AbstractDiagram Class Reference 139

6.7.3.64 void KDChart::AbstractDiagram::useRainbowColors ()

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.7.3.65 void KDChart::AbstractDiagram::useSubduedColors ()

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.7.3.66 double AbstractDiagram::valueForCell (introw, int column) const [protected]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.7.3.67 int AbstractDiagram::verticalOffset () const [virtual]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

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

140 KD Chart 2 Class Documentation

6.7.3.68 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.7.3.69 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection)const [virtual]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.7.4 Member Data Documentation

6.7.4.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartAbstractDiagram.h• KDChartAbstractDiagram.cpp

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

6.8 KDChart::AbstractLayoutItem Class Reference 141

6.8 KDChart::AbstractLayoutItem Class Reference

#include <KDChartLayoutItems.h >

Inheritance diagram for KDChart::AbstractLayoutItem:Collaboration diagram for KDChart::Abstract-LayoutItem:

Public Member Functions

• AbstractLayoutItem(Qt::Alignment itemAlignment=0)• virtual voidpaint(QPainter∗)=0• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• void removeFromParentLayout()• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout

6.8.1 Constructor & Destructor Documentation

6.8.1.1 KDChart::AbstractLayoutItem::AbstractLayoutItem (Qt::Alignment itemAlignment= 0)

Definition at line 51 of file KDChartLayoutItems.h.

51 :52 QLayoutItem( itemAlignment ),53 mParent( 0 ),54 mParentLayout( 0 ) {}

6.8.2 Member Function Documentation

6.8.2.1 virtual void KDChart::AbstractLayoutItem::paint (QPainter ∗) [pure virtual]

Implemented inKDChart::CartesianAxis, KDChart::CartesianCoordinatePlane, KDChart::TextLayout-Item, KDChart::MarkerLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::VerticalLineLayout-Item, andKDChart::PolarCoordinatePlane.

Referenced by KDChart::Legend::paint(), KDChart::AbstractArea::paintAll(), and paintCtx().

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

142 KD Chart 2 Class Documentation

6.8.2.2 void KDChart::AbstractLayoutItem::paintCtx ( PaintContext ∗ context) [virtual]

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::CartesianAxis.

Definition at line 64 of file KDChartLayoutItems.cpp.

References paint(), and KDChart::PaintContext::painter().

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

6.8.2.3 void KDChart::AbstractLayoutItem::removeFromParentLayout ()

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 else72 mParentLayout->removeItem( this );73 }74 }

6.8.2.4 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay)

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.8.2.5 void KDChart::AbstractLayoutItem::setParentWidget (QWidget ∗ widget) [virtual]

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof 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 mParent.

Referenced by KDChart::Legend::buildLegend(), and KDChart::AbstractCartesianDiagram::takeAxis().

57 {58 mParent = widget;59 }

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

6.8 KDChart::AbstractLayoutItem Class Reference 143

6.8.2.6 void KDChart::AbstractLayoutItem::sizeHintChanged () const [virtual]

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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.8.3 Member Data Documentation

6.8.3.1 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected]

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by setParentWidget().

6.8.3.2 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected]

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartLayoutItems.h• KDChartLayoutItems.cpp

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

144 KD Chart 2 Class Documentation

6.9 KDChart::AbstractPieDiagram Class Reference

#include <KDChartAbstractPieDiagram.h >

Inheritance diagram for KDChart::AbstractPieDiagram:Collaboration diagram for KDChart::AbstractPie-Diagram:

Public Member Functions

• AbstractPieDiagram(QWidget∗parent=0,PolarCoordinatePlane∗plane=0)• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• int columnCount() const• 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() const

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.

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

6.9 KDChart::AbstractPieDiagram Class Reference 145

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• qrealgranularity() const• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual doublenumberOfGridRings() const=0• virtual doublenumberOfValuesPerDataset() const=0• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, const

QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• PieAttributespieAttributes(const QModelIndex &index) const• PieAttributespieAttributes(int column) const• PieAttributespieAttributes() const• constPolarCoordinatePlane∗ polarCoordinatePlane() 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

146 KD Chart 2 Class Documentation

• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• void setGranularity(qreal value)

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

• virtual voidsetModel(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)

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

6.9 KDChart::AbstractPieDiagram Class Reference 147

Set the pen to be used, for painting the datapoint at the given index.

• void setPercentMode(bool percent)• void setPieAttributes(int column, constPieAttributes&a)• void setPieAttributes(constPieAttributes&a)• virtual voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setStartPosition(qreal degrees)

Set the starting angle for the first dataset.

• void setThreeDPieAttributes(const QModelIndex &index, constThreeDPieAttributes&a)• void setThreeDPieAttributes(int column, constThreeDPieAttributes&a)• void setThreeDPieAttributes(constThreeDPieAttributes&a)• qrealstartPosition() const• ThreeDPieAttributesthreeDPieAttributes(const QModelIndex &index) const• ThreeDPieAttributesthreeDPieAttributes(int column) const• ThreeDPieAttributesthreeDPieAttributes() const• 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 doublevalueTotals() const=0• virtual int verticalOffset() const

[reimplemented]

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼AbstractPieDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const=0• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

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

148 KD Chart 2 Class Documentation

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(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 voidpaintDataValueTexts(QPainter∗painter)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• doublevalueForCell(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.9.1 Constructor & Destructor Documentation

6.9.1.1 AbstractPieDiagram::AbstractPieDiagram (QWidget ∗ parent= 0, PolarCoordinatePlane∗ plane= 0) [explicit]

Definition at line 47 of file KDChartAbstractPieDiagram.cpp.

47 :48 AbstractPolarDiagram( new Private(), parent, plane )49 {50 init();51 }

6.9.1.2 AbstractPieDiagram::∼AbstractPieDiagram () [virtual]

Definition at line 53 of file KDChartAbstractPieDiagram.cpp.

54 {55 }

6.9.2 Member Function Documentation

6.9.2.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

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

6.9 KDChart::AbstractPieDiagram Class Reference 149

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.9.2.2 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.9.2.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated 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.9.2.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat corresponds to the root index of the diagram.

Definition at line 204 of file KDChartAbstractDiagram.cpp.

References d.

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

150 KD Chart 2 Class Documentation

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 KDChart::AbstractDiagram::valueForCell().

210 {

6.9.2.5 QBrush AbstractDiagram::brush (const QModelIndex & index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

6.9.2.6 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.9.2.7 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

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

6.9 KDChart::AbstractPieDiagram Class Reference 151

6.9.2.8 virtual const QPair<QPointF, QPointF> KDChart::Abstract-Diagram::calculateDataBoundaries () const [protected, pure virtual,inherited]

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

Referenced by KDChart::AbstractDiagram::dataBoundaries().

6.9.2.9 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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 KDChart::AbstractDiagram::paintMarker().

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

6.9.2.10 int AbstractPolarDiagram::columnCount () const [inherited]

Definition at line 58 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractPolarDiagram::numberOfValuesPerDataset().

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), KDChart::PieDiagram::paint(), andKDChart::PieDiagram::valueTotals().

59 {60 return static_cast<int>( numberOfValuesPerDataset() );61 }

6.9.2.11 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

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

152 KD Chart 2 Class Documentation

6.9.2.12 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const [inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(),KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polar-CoordinatePlane(), and KDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {127 return d->plane;128 }

6.9.2.13 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.9.2.14 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, const QModelIndex& bottomRight) [virtual, inherited]

[reimplemented]

Definition at line 232 of file KDChartAbstractDiagram.cpp.

References d.

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

6.9 KDChart::AbstractPieDiagram Class Reference 153

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

6.9.2.15 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese 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(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.9.2.16 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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().

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

154 KD Chart 2 Class Documentation

762 {

6.9.2.17 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.9.2.18 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const [inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

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

6.9 KDChart::AbstractPieDiagram Class Reference 155

6.9.2.19 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

6.9.2.20 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.9.2.21 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

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

156 KD Chart 2 Class Documentation

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.9.2.22 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

6.9.2.23 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.9.2.24 qreal AbstractPieDiagram::granularity () const

Returns:the granularity.

Definition at line 81 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by KDChart::PieDiagram::paint().

82 {83 return (d->granularity < 0.05 || d->granularity > 36.0)84 ? 1.085 : d->granularity;86 }

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

6.9 KDChart::AbstractPieDiagram Class Reference 157

6.9.2.25 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.9.2.26 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.9.2.27 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.9.2.28 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.9.2.29 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

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

158 KD Chart 2 Class Documentation

6.9.2.30 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.9.2.31 virtual double KDChart::AbstractPolarDiagram::numberOfGridRings () const [purevirtual, inherited]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

6.9.2.32 virtual double KDChart::AbstractPolarDiagram::numberOfValuesPerDataset () const[pure virtual, inherited]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

Referenced by KDChart::AbstractPolarDiagram::columnCount().

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

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 inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

6.9.2.34 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::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 series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 int decimalDigits = a.decimalDigits();

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

6.9 KDChart::AbstractPieDiagram Class Reference 159

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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

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

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 }394395

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {

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

160 KD Chart 2 Class Documentation

400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.9.2.37 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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 about456 // Marker1Pixel and Marker4Pixels.457 case MarkerAttributes::Marker1Pixel:

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

6.9 KDChart::AbstractPieDiagram Class Reference 161

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: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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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:

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

162 KD Chart 2 Class Documentation

525 Q_ASSERT_X ( false, "paintMarkers()",526 "Type item does not match a defined Marker Type." );527 }528 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

6.9.2.39 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.9.2.40 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

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

6.9 KDChart::AbstractPieDiagram Class Reference 163

6.9.2.41 QPen AbstractDiagram::pen () const [inherited]

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 {

6.9.2.42 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.9.2.43 PieAttributes AbstractPieDiagram::pieAttributes (const QModelIndex & index) const

Definition at line 122 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

123 {124 return qVariantValue<PieAttributes>(125 d->attributesModel->data(126 d->attributesModel->mapFromSource( index ),127 PieAttributesRole ) );128 }

6.9.2.44 PieAttributes AbstractPieDiagram::pieAttributes (int column) const

Definition at line 114 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

115 {116 return qVariantValue<PieAttributes>(117 d->attributesModel->data(118 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),119 PieAttributesRole ) );120 }

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

164 KD Chart 2 Class Documentation

6.9.2.45 PieAttributes AbstractPieDiagram::pieAttributes () const

Definition at line 105 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), and KDChart::PieDiagram::paint().

106 {107 return qVariantValue<PieAttributes>(108 d->attributesModel->data( PieAttributesRole ) );109 }

6.9.2.46 constPolarCoordinatePlane∗ AbstractPolarDiagram::polarCoordinatePlane () const[inherited]

Definition at line 53 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::PieDiagram::paint().

54 {55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() );56 }

6.9.2.47 void KDChart::AbstractDiagram::propertiesChanged () [protected, inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.9.2.48 virtual void KDChart::AbstractDiagram::resize (const QSizeF & area) [purevirtual, inherited]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

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

6.9 KDChart::AbstractPieDiagram Class Reference 165

6.9.2.50 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.9.2.51 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.9.2.52 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto use for this diagram.

See also:AttributesModel

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

166 KD Chart 2 Class Documentation

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.9.2.53 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.9.2.54 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.9.2.55 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

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

6.9 KDChart::AbstractPieDiagram Class Reference 167

6.9.2.56 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

6.9.2.57 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

6.9.2.58 void AbstractDiagram::setDataBoundariesDirty () const [protected, inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.9.2.59 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

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

168 KD Chart 2 Class Documentation

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.9.2.60 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.9.2.61 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes &a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.9.2.62 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

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

6.9 KDChart::AbstractPieDiagram Class Reference 169

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.9.2.63 void AbstractPieDiagram::setGranularity (qrealvalue)

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

Parameters:value the granularity value between 0.05 (one twentieth of a degree) and 36.0 (one tenth of a full

circle), other values will be interpreted as 1.0.

Definition at line 76 of file KDChartAbstractPieDiagram.cpp.

References d.

77 {78 d->granularity = value;79 }

6.9.2.64 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.9.2.65 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

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

170 KD Chart 2 Class Documentation

6.9.2.66 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.9.2.67 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.9.2.68 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

6.9.2.69 void AbstractPieDiagram::setPieAttributes (intcolumn, constPieAttributes & a)

Definition at line 95 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

96 {97 d->attributesModel->setHeaderData(98 column, Qt::Vertical, qVariantFromValue( attrs ), PieAttributesRole );99 emit layoutChanged( this );100 }

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

6.9 KDChart::AbstractPieDiagram Class Reference 171

6.9.2.70 void AbstractPieDiagram::setPieAttributes (constPieAttributes & a)

Definition at line 89 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

90 {91 d->attributesModel->setModelData( qVariantFromValue( attrs ), PieAttributesRole );92 emit layoutChanged( this );93 }

6.9.2.71 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.9.2.72 void AbstractDiagram::setSelection (const QRect &rect, QItemSelection-Model::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.9.2.73 void AbstractPieDiagram::setStartPosition (qrealdegrees)

Set the starting angle for the first dataset.

Definition at line 65 of file KDChartAbstractPieDiagram.cpp.

References d.

66 {67 d->startPosition = degrees;68 }

6.9.2.74 void AbstractPieDiagram::setThreeDPieAttributes (const QModelIndex &index, constThreeDPieAttributes & a)

Definition at line 144 of file KDChartAbstractPieDiagram.cpp.

References KDChart::ThreeDPieAttributesRole.

145 {146 model()->setData( index, qVariantFromValue( tda ), ThreeDPieAttributesRole );147 emit layoutChanged( this );148 }

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

172 KD Chart 2 Class Documentation

6.9.2.75 void AbstractPieDiagram::setThreeDPieAttributes (intcolumn, constThreeDPieAttributes & a)

Definition at line 137 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

138 {139 d->attributesModel->setHeaderData(140 column, Qt::Vertical, qVariantFromValue( tda ), ThreeDPieAttributesRole );141 emit layoutChanged( this );142 }

6.9.2.76 void AbstractPieDiagram::setThreeDPieAttributes (constThreeDPieAttributes & a)

Definition at line 131 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

132 {133 d->attributesModel->setModelData( qVariantFromValue( tda ), ThreeDPieAttributesRole );134 emit layoutChanged( this );135 }

6.9.2.77 qreal AbstractPieDiagram::startPosition () const

Returns:the starting angle for the first dataset.

Definition at line 70 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by KDChart::PieDiagram::paint().

71 {72 return d->startPosition;73 }

6.9.2.78 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (const QModelIndex &index) const

Definition at line 170 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

171 {172 return qVariantValue<ThreeDPieAttributes>(173 d->attributesModel->data(174 d->attributesModel->mapFromSource( index ),175 ThreeDPieAttributesRole ) );176 }

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

6.9 KDChart::AbstractPieDiagram Class Reference 173

6.9.2.79 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (int column) const

Definition at line 162 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

163 {164 return qVariantValue<ThreeDPieAttributes>(165 d->attributesModel->data(166 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),167 ThreeDPieAttributesRole ) );168 }

6.9.2.80 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes () const

Definition at line 153 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

Referenced by KDChart::PieDiagram::paint().

154 {155 return qVariantValue<ThreeDPieAttributes>(156 d->attributesModel->data( ThreeDPieAttributesRole ) );157 }

6.9.2.81 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.9.2.82 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

6.9.2.83 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

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

174 KD Chart 2 Class Documentation

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.9.2.84 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.9.2.85 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.9.2.86 virtual double KDChart::AbstractPolarDiagram::valueTotals () const [purevirtual, inherited]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

Referenced by KDChart::PolarCoordinatePlane::layoutDiagrams().

6.9.2.87 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

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

6.9 KDChart::AbstractPieDiagram Class Reference 175

6.9.2.88 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.9.2.89 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection)const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.9.3 Member Data Documentation

6.9.3.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartAbstractPieDiagram.h• KDChartAbstractPieDiagram.cpp

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

176 KD Chart 2 Class Documentation

6.10 KDChart::AbstractPolarDiagram Class Reference

#include <KDChartAbstractPolarDiagram.h >

Inheritance diagram for KDChart::AbstractPolarDiagram:Collaboration diagram for KDChart::Abstract-PolarDiagram:

Public Member Functions

• AbstractPolarDiagram(QWidget∗parent=0,PolarCoordinatePlane∗plane=0)• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• int columnCount() const• 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() const

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.

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

6.10 KDChart::AbstractPolarDiagram Class Reference 177

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual doublenumberOfGridRings() const=0• virtual doublenumberOfValuesPerDataset() const=0• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, const

QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• constPolarCoordinatePlane∗ polarCoordinatePlane() const• virtual void resize(const QSizeF &area)=0

Called by the widget’s sizeEvent.

• virtual voidscrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible)

[reimplemented]

• void setAllowOverlappingDataValueTexts(bool allow)

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

178 KD Chart 2 Class Documentation

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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• virtual voidsetModel(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 voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

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

6.10 KDChart::AbstractPolarDiagram Class Reference 179

• 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 doublevalueTotals() const=0• virtual int verticalOffset() const

[reimplemented]

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼AbstractPolarDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const=0• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(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 voidpaintDataValueTexts(QPainter∗painter)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• doublevalueForCell(int row, int column) const

Helper method, retrieving the data value (DisplayRole) for a given row and column.

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

180 KD Chart 2 Class Documentation

Protected Attributes

• Q_SIGNALS__pad0__: void layoutChanged(AbstractDiagram∗ )

6.10.1 Constructor & Destructor Documentation

6.10.1.1 AbstractPolarDiagram::AbstractPolarDiagram (QWidget ∗ parent = 0,PolarCoordinatePlane∗ plane= 0) [explicit]

Definition at line 46 of file KDChartAbstractPolarDiagram.cpp.

48 : AbstractDiagram ( new Private(), parent, plane )49 {50 }

6.10.1.2 virtual KDChart::AbstractPolarDiagram:: ∼AbstractPolarDiagram () [virtual]

Definition at line 45 of file KDChartAbstractPolarDiagram.h.

45 {}

6.10.2 Member Function Documentation

6.10.2.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.10.2.2 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

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

6.10 KDChart::AbstractPolarDiagram Class Reference 181

6.10.2.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated 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.10.2.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat 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 KDChart::AbstractDiagram::valueForCell().

210 {

6.10.2.5 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

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

182 KD Chart 2 Class Documentation

6.10.2.6 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.10.2.7 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

6.10.2.8 virtual const QPair<QPointF, QPointF> KDChart::Abstract-Diagram::calculateDataBoundaries () const [protected, pure virtual,inherited]

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

Referenced by KDChart::AbstractDiagram::dataBoundaries().

6.10.2.9 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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 KDChart::AbstractDiagram::paintMarker().

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

6.10 KDChart::AbstractPolarDiagram Class Reference 183

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

6.10.2.10 int AbstractPolarDiagram::columnCount () const

Definition at line 58 of file KDChartAbstractPolarDiagram.cpp.

References numberOfValuesPerDataset().

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), KDChart::PieDiagram::paint(), andKDChart::PieDiagram::valueTotals().

59 {60 return static_cast<int>( numberOfValuesPerDataset() );61 }

6.10.2.11 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.10.2.12 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(),KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), polarCoordinatePlane(), andKDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {127 return d->plane;128 }

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

184 KD Chart 2 Class Documentation

6.10.2.13 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.10.2.14 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.10.2.15 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese too, in order to find the brush, that is used for a single cell.

Returns:The current set of dataset brushes.

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

6.10 KDChart::AbstractPolarDiagram Class Reference 185

Definition at line 710 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::datasetCount(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.10.2.16 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.10.2.17 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();

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

186 KD Chart 2 Class Documentation

703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.10.2.18 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.10.2.19 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

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

6.10 KDChart::AbstractPolarDiagram Class Reference 187

6.10.2.20 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.10.2.21 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.10.2.22 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

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

188 KD Chart 2 Class Documentation

6.10.2.23 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.10.2.24 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.10.2.25 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.10.2.26 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.10.2.27 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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.

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

6.10 KDChart::AbstractPolarDiagram Class Reference 189

687 : " << attributesModel()->rowCount(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.10.2.28 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.10.2.29 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.10.2.30 virtual double KDChart::AbstractPolarDiagram::numberOfGridRings () const [purevirtual]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

6.10.2.31 virtual double KDChart::AbstractPolarDiagram::numberOfValuesPerDataset () const[pure virtual]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

Referenced by columnCount().

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

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 inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

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

190 KD Chart 2 Class Documentation

6.10.2.33 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::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 series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

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

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 );

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

6.10 KDChart::AbstractPolarDiagram Class Reference 191

391 }392 }393 }394395

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.10.2.36 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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;

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

192 KD Chart 2 Class Documentation

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 about456 // 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: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 );

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

6.10 KDChart::AbstractPolarDiagram Class Reference 193

502 topLeft = QPointF( -maSize.width()/4, -maSize.height()/2 );503 centerTopLeft = QPointF( -maSize.width()/4, -maSize.height()/4 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

6.10.2.38 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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 {

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

194 KD Chart 2 Class Documentation

6.10.2.39 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.10.2.40 QPen AbstractDiagram::pen () const [inherited]

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 {

6.10.2.41 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.10.2.42 constPolarCoordinatePlane∗ AbstractPolarDiagram::polarCoordinatePlane () const

Definition at line 53 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::PieDiagram::paint().

54 {55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() );56 }

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

6.10 KDChart::AbstractPolarDiagram Class Reference 195

6.10.2.43 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.10.2.44 virtual void KDChart::AbstractDiagram::resize (const QSizeF &area) [purevirtual, inherited]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

Implemented inKDChart::BarDiagram, KDChart::LineDiagram, KDChart::PieDiagram, KDChart::Polar-Diagram, andKDChart::RingDiagram.

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.10.2.46 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.10.2.47 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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

Parameters:enabled True means that AA is enabled.

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

196 KD Chart 2 Class Documentation

Definition at line 296 of file KDChartAbstractDiagram.cpp.

References d.

301 {

6.10.2.48 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.10.2.49 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

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

6.10 KDChart::AbstractPolarDiagram Class Reference 197

6.10.2.50 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.10.2.51 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.10.2.52 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

6.10.2.53 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

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

198 KD Chart 2 Class Documentation

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

6.10.2.54 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.10.2.55 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.10.2.56 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

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

6.10 KDChart::AbstractPolarDiagram Class Reference 199

6.10.2.57 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.10.2.58 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.10.2.59 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

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

200 KD Chart 2 Class Documentation

6.10.2.60 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.10.2.61 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.10.2.62 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.10.2.63 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

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

6.10 KDChart::AbstractPolarDiagram Class Reference 201

6.10.2.64 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.10.2.65 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.10.2.66 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.10.2.67 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

6.10.2.68 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

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

202 KD Chart 2 Class Documentation

6.10.2.69 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.10.2.70 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.10.2.71 virtual double KDChart::AbstractPolarDiagram::valueTotals () const [purevirtual]

Implemented inKDChart::PieDiagram, KDChart::PolarDiagram, andKDChart::RingDiagram.

Referenced by KDChart::PolarCoordinatePlane::layoutDiagrams().

6.10.2.72 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

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

6.10 KDChart::AbstractPolarDiagram Class Reference 203

6.10.2.73 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.10.2.74 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.10.3 Member Data Documentation

6.10.3.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartAbstractPolarDiagram.h• KDChartAbstractPolarDiagram.cpp

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

204 KD Chart 2 Class Documentation

6.11 KDChart::AbstractProxyModel Class Reference

#include <KDChartAbstractProxyModel.h >

Inheritance diagram for KDChart::AbstractProxyModel:Collaboration diagram for KDChart::Abstract-ProxyModel:

Public Member Functions

• AbstractProxyModel(QObject∗parent=0)

This is basically KDAbstractProxyModel, but only the bits that we really need from it.

• QModelIndexindex(int row, int col, const QModelIndex &index) const• QModelIndexmapFromSource(const QModelIndex &sourceIndex) const• QModelIndexmapToSource(const QModelIndex &proxyIndex) const• QModelIndexparent(const QModelIndex &index) const

6.11.1 Constructor & Destructor Documentation

6.11.1.1 KDChart::AbstractProxyModel::AbstractProxyModel ( QObject ∗ parent= 0)[explicit]

This is basically KDAbstractProxyModel, but only the bits that we really need from it.

Definition at line 12 of file KDChartAbstractProxyModel.cpp.

13 : QAbstractProxyModel(parent) {}

6.11.2 Member Function Documentation

6.11.2.1 QModelIndex KDChart::AbstractProxyModel::index (int row, int col, constQModelIndex & index) const

Definition at line 53 of file KDChartAbstractProxyModel.cpp.

References mapFromSource(), and mapToSource().

Referenced by KDChart::AttributesModel::setHeaderData(), and KDChart::AttributesModel::setModel-Data().

54 {55 Q_ASSERT(sourceModel());56 return mapFromSource(sourceModel()->index( row, col, mapToSource(index) ));57 }

6.11.2.2 QModelIndex KDChart::AbstractProxyModel::mapFromSource (const QModelIndex &sourceIndex) const

Definition at line 23 of file KDChartAbstractProxyModel.cpp.

Referenced by index(), and parent().

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

6.11 KDChart::AbstractProxyModel Class Reference 205

24 {25 if ( !sourceIndex.isValid() )26 return QModelIndex();27 //qDebug() << "sourceIndex.model()="<<sourceIndex.model();28 //qDebug() << "model()="<<sourceModel();29 Q_ASSERT( sourceIndex.model() == sourceModel() );3031 // Create an index that preserves the internal pointer from the source;32 // this way AbstractProxyModel preserves the structure of the source model33 return createIndex( sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer() );34 }

6.11.2.3 QModelIndex KDChart::AbstractProxyModel::mapToSource (const QModelIndex &proxyIndex) const

Definition at line 36 of file KDChartAbstractProxyModel.cpp.

Referenced by KDChart::AttributesModel::columnCount(), KDChart::AttributesModel::data(), index(),parent(), KDChart::AttributesModel::rowCount(), and KDChart::AttributesModel::setData().

37 {38 if ( !proxyIndex.isValid() )39 return QModelIndex();40 Q_ASSERT( proxyIndex.model() == this );41 // So here we need to create a source index which holds that internal pointer.42 // No way to pass it to sourceModel()->index... so we have to do the ugly way:43 QModelIndex sourceIndex;44 KDPrivateModelIndex* hack = reinterpret_cast<KDPrivateModelIndex*>(&sourceIndex);45 hack->r = proxyIndex.row();46 hack->c = proxyIndex.column();47 hack->p = proxyIndex.internalPointer();48 hack->m = sourceModel();49 Q_ASSERT( sourceIndex.isValid() );50 return sourceIndex;51 }

6.11.2.4 QModelIndex KDChart::AbstractProxyModel::parent (const QModelIndex & index)const

Definition at line 59 of file KDChartAbstractProxyModel.cpp.

References mapFromSource(), and mapToSource().

60 {61 Q_ASSERT(sourceModel());62 return mapFromSource(sourceModel()->parent( mapToSource(index) ));63 }

The documentation for this class was generated from the following files:

• KDChartAbstractProxyModel.h• KDChartAbstractProxyModel.cpp

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

206 KD Chart 2 Class Documentation

6.12 KDChart::AbstractThreeDAttributes Class Reference

#include <KDChartAbstractThreeDAttributes.h >

Inheritance diagram for KDChart::AbstractThreeDAttributes:

Public Member Functions

• AbstractThreeDAttributes(constAbstractThreeDAttributes&)• AbstractThreeDAttributes()• doubledepth() const• bool isEnabled() const• booloperator!=(constAbstractThreeDAttributes&other) const• AbstractThreeDAttributes& operator=(constAbstractThreeDAttributes&)• booloperator==(constAbstractThreeDAttributes&) const• void setDepth(double depth)• void setEnabled(bool enabled)• doublevalidDepth() const• virtual∼AbstractThreeDAttributes()=0

6.12.1 Constructor & Destructor Documentation

6.12.1.1 AbstractThreeDAttributes::AbstractThreeDAttributes ()

Definition at line 46 of file KDChartAbstractThreeDAttributes.cpp.

47 : _d( new Private() )48 {49 }

6.12.1.2 AbstractThreeDAttributes::AbstractThreeDAttributes (const AbstractThreeDAttributes&)

Definition at line 51 of file KDChartAbstractThreeDAttributes.cpp.

References d.

52 : _d( new Private( *r.d ) )53 {54 }

6.12.1.3 AbstractThreeDAttributes::∼AbstractThreeDAttributes () [pure virtual]

Definition at line 66 of file KDChartAbstractThreeDAttributes.cpp.

67 {68 delete _d; _d = 0;69 }

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

6.12 KDChart::AbstractThreeDAttributes Class Reference 207

6.12.2 Member Function Documentation

6.12.2.1 double AbstractThreeDAttributes::depth () const

Definition at line 103 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), KDChart::PieDiagram::paint(), and KDChart::Bar-Diagram::paint().

104 {105 return d->depth;106 }

6.12.2.2 bool AbstractThreeDAttributes::isEnabled () const

Definition at line 92 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), KDChart::PieDiagram::paint(), KDChart::Bar-Diagram::paint(), and validDepth().

93 {94 return d->enabled;95 }

6.12.2.3 bool KDChart::AbstractThreeDAttributes::operator!= (const AbstractThreeDAttributes& other) const

Definition at line 57 of file KDChartAbstractThreeDAttributes.h.

57 { return !operator==(other); }

6.12.2.4 AbstractThreeDAttributes & AbstractThreeDAttributes::operator= (constAbstractThreeDAttributes &)

Definition at line 56 of file KDChartAbstractThreeDAttributes.cpp.

References d.

57 {58 if( this == &r )59 return *this;6061 *d = *r.d;6263 return *this;64 }

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

208 KD Chart 2 Class Documentation

6.12.2.5 bool AbstractThreeDAttributes::operator== (constAbstractThreeDAttributes &) const

Definition at line 72 of file KDChartAbstractThreeDAttributes.cpp.

References depth(), and isEnabled().

Referenced by KDChart::ThreeDPieAttributes::operator==(), KDChart::ThreeDLine-Attributes::operator==(), and KDChart::ThreeDBarAttributes::operator==().

73 {74 if( isEnabled() == r.isEnabled() &&75 depth() == r.depth() )76 return true;77 else78 return false;79 }

6.12.2.6 void AbstractThreeDAttributes::setDepth (doubledepth)

Definition at line 97 of file KDChartAbstractThreeDAttributes.cpp.

References d.

98 {99 d->depth = depth;100 }

6.12.2.7 void AbstractThreeDAttributes::setEnabled (boolenabled)

Definition at line 87 of file KDChartAbstractThreeDAttributes.cpp.

References d.

88 {89 d->enabled = enabled;90 }

6.12.2.8 double AbstractThreeDAttributes::validDepth () const

Definition at line 109 of file KDChartAbstractThreeDAttributes.cpp.

References d, and isEnabled().

Referenced by KDChart::LineDiagram::threeDItemDepth(), and KDChart::BarDiagram::threeDItem-Depth().

110 {111 return isEnabled() ? d->depth : 0.0;112 }

The documentation for this class was generated from the following files:

• KDChartAbstractThreeDAttributes.h• KDChartAbstractThreeDAttributes.cpp

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

6.13 KDChart::AttributesModel Class Reference 209

6.13 KDChart::AttributesModel Class Reference

#include <KDChartAttributesModel.h >

Inheritance diagram for KDChart::AttributesModel:Collaboration diagram for KDChart::AttributesModel:

Public Types

• enumPaletteType{

PaletteTypeDefault= 0,

PaletteTypeRainbow= 1,

PaletteTypeSubdued= 2 }

Public Member Functions

• AttributesModel(QAbstractItemModel∗model,QObject∗parent=0)• int columnCount(const QModelIndex &) const

[reimplemented]

• QVariantdata(const QModelIndex &, int role=Qt::DisplayRole) const

[reimplemented]

• QVariantdata(int column, int role) const

Returns the data that were specified at per column level, or the globally set data, or the default data, orQVariant().

• QVariantdata(int role) const

Returns the data that were specified at global level, or the default data, or QVariant().

• QVariantheaderData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const

[reimplemented]

• QModelIndexindex(int row, int col, const QModelIndex &index) const• void initFrom (constAttributesModel∗other)• bool isKnownAttributesRole(int role) const

Returns whether the given role corresponds to one of the known internally used ones.

• QModelIndexmapFromSource(const QModelIndex &sourceIndex) const• QModelIndexmapToSource(const QModelIndex &proxyIndex) const• QVariantmodelData(int role) const• PaletteTypepaletteType() const• QModelIndexparent(const QModelIndex &index) const• int rowCount(const QModelIndex &) const

[reimplemented]

• bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole)

[reimplemented]

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

210 KD Chart 2 Class Documentation

• bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, introle=Qt::DisplayRole)

[reimplemented]

• bool setModelData(const QVariant value, int role)

• void setPaletteType(PaletteTypetype)

Sets the palettetype used by this attributesmodel.

• void setSourceModel(QAbstractItemModel∗sourceModel)

[reimplemented]

• ∼AttributesModel()

Public Attributes

• Q_SIGNALS__pad0__: void attributesChanged( const QModelIndex&

6.13.1 Member Enumeration Documentation

6.13.1.1 enumKDChart::AttributesModel::PaletteType

Enumeration values:PaletteTypeDefault

PaletteTypeRainbow

PaletteTypeSubdued

Definition at line 44 of file KDChartAttributesModel.h.

44 {45 PaletteTypeDefault = 0,46 PaletteTypeRainbow = 1,47 PaletteTypeSubdued = 248 };

6.13.2 Constructor & Destructor Documentation

6.13.2.1 AttributesModel::AttributesModel (QAbstractItemModel ∗ model, QObject ∗ parent= 0)[explicit]

Definition at line 43 of file KDChartAttributesModel.cpp.

References setSourceModel().

44 : AbstractProxyModel( parent ),45 mPaletteType( PaletteTypeDefault )46 {47 setSourceModel(model);48 }

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

6.13 KDChart::AttributesModel Class Reference 211

6.13.2.2 AttributesModel::∼AttributesModel ()

Definition at line 50 of file KDChartAttributesModel.cpp.

51 {52 }

6.13.3 Member Function Documentation

6.13.3.1 int AttributesModel::columnCount (const QModelIndex &) const

[reimplemented]

Definition at line 272 of file KDChartAttributesModel.cpp.

References KDChart::AbstractProxyModel::mapToSource().

Referenced by setModelData().

273 {274 Q_ASSERT(sourceModel());275 return sourceModel()->columnCount( mapToSource(index) );276 }

6.13.3.2 QVariant AttributesModel::data (const QModelIndex &, int role = Qt::DisplayRole) const

[reimplemented]

Definition at line 149 of file KDChartAttributesModel.cpp.

References data(), and KDChart::AbstractProxyModel::mapToSource().

150 {151 //qDebug() << "AttributesModel::data(" << index << role << ")";152 if( index.isValid() ) {153 Q_ASSERT( index.model() == this );154 }155 QVariant sourceData = sourceModel()->data( mapToSource(index), role );156 if ( sourceData.isValid() )157 return sourceData;158159 // check if we are storing a value for this role at this cell index160 if ( mDataMap.contains( index.column() ) ) {161 const QMap< int, QMap< int, QVariant> > &colDataMap = mDataMap[ index.column() ];162 if ( colDataMap.contains( index.row() ) ) {163 const QMap<int, QVariant> &dataMap = colDataMap[ index.row() ];164 if ( dataMap.contains( role ) )165 return dataMap[ role ];166 }167 }168 // check if there is something set for the column (dataset), or at global level169 if( index.isValid() )170 return data( index.column(), role ); // includes automatic fallback to default171172 return QVariant();173 }

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

212 KD Chart 2 Class Documentation

6.13.3.3 QVariant AttributesModel::data (int column, int role) const

Returns the data that were specified at per column level, or the globally set data, or the default data, orQVariant().

Definition at line 133 of file KDChartAttributesModel.cpp.

References data(), headerData(), and isKnownAttributesRole().

134 {135 if ( isKnownAttributesRole( role ) ) {136 // check if there is something set for the column (dataset)137 QVariant v;138 v = headerData( column, Qt::Vertical, role );139140 // check if there is something set at global level141 if ( !v.isValid() )142 v = data( role ); // includes automatic fallback to default143 return v;144 }145 return QVariant();146 }

6.13.3.4 QVariant AttributesModel::data (int role) const

Returns the data that were specified at global level, or the default data, or QVariant().

Definition at line 115 of file KDChartAttributesModel.cpp.

References isKnownAttributesRole(), and modelData().

Referenced by data().

116 {117 if ( isKnownAttributesRole( role ) ) {118 // check if there is something set at global level119 QVariant v = modelData( role );120121 // else return the default setting, if any122 if ( !v.isValid() )123 v = defaultsForRole( role );124 return v;125 }126 return QVariant();127 }

6.13.3.5 QVariant AttributesModel::headerData (int section, Qt::Orientation orientation, int role= Qt::DisplayRole) const

[reimplemented]

Definition at line 66 of file KDChartAttributesModel.cpp.

References KDChart::DatasetBrushRole, KDChart::Palette::defaultPalette(), KDChart::Palette::get-Brush(), modelData(), paletteType(), PaletteTypeDefault, PaletteTypeRainbow, PaletteTypeSubdued,KDChart::Palette::rainbowPalette(), and KDChart::Palette::subduedPalette().

Referenced by data(), KDChart::RingDiagram::paint(), and KDChart::PolarDiagram::paint().

69 {

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

6.13 KDChart::AttributesModel Class Reference 213

70 QVariant sourceData = sourceModel()->headerData( section, orientation, role );71 if ( sourceData.isValid() ) return sourceData;72 // the source model didn’t have data set, let’s use our stored values73 const QMap<int, QMap<int, QVariant> >& map = orientation == Qt::Horizontal ? mHorizontalHeaderDataMap : mVerticalHeaderDataMap;74 if ( map.contains( section ) ) {75 const QMap<int, QVariant> &dataMap = map[ section ];76 if ( dataMap.contains( role ) ) {77 return dataMap[ role ];78 }79 }8081 // Default values if nothing else matches82 switch ( role ) {83 case Qt::DisplayRole:84 return QLatin1String( orientation == Qt::Vertical ? "Series " : "Item " ) + QString::number( section ) ;8586 case KDChart::DatasetBrushRole: {87 if ( paletteType() == PaletteTypeSubdued )88 return Palette::subduedPalette().getBrush( section );89 else if ( paletteType() == PaletteTypeRainbow )90 return Palette::rainbowPalette().getBrush( section );91 else if ( paletteType() == PaletteTypeDefault )92 return Palette::defaultPalette().getBrush( section );93 else94 qWarning("Unknown type of fallback palette!");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 set99 if ( !modelData( role ).isValid() ) {100 QBrush brush = qVariantValue<QBrush>( headerData( section, orientation, DatasetBrushRole ) );101 return QPen( brush.color() );102 }103 }104 default:105 break;106 }107108 return QVariant();109 }

6.13.3.6 QModelIndex KDChart::AbstractProxyModel::index (int row, int col, constQModelIndex & index) const [inherited]

Definition at line 53 of file KDChartAbstractProxyModel.cpp.

References KDChart::AbstractProxyModel::mapFromSource(), and KDChart::AbstractProxyModel::map-ToSource().

Referenced by setHeaderData(), and setModelData().

54 {55 Q_ASSERT(sourceModel());56 return mapFromSource(sourceModel()->index( row, col, mapToSource(index) ));57 }

6.13.3.7 void AttributesModel::initFrom (const AttributesModel ∗ other)

Definition at line 54 of file KDChartAttributesModel.cpp.

References mDataMap, mHorizontalHeaderDataMap, mModelDataMap, mVerticalHeaderDataMap,paletteType(), and setPaletteType().

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

214 KD Chart 2 Class Documentation

Referenced by KDChart::AbstractDiagram::setModel().

55 {56 if( other == this || ! other ) return;5758 mDataMap = other->mDataMap;59 mHorizontalHeaderDataMap = other->mHorizontalHeaderDataMap;60 mVerticalHeaderDataMap = other->mVerticalHeaderDataMap;61 mModelDataMap = other->mModelDataMap;6263 setPaletteType( other->paletteType() );64 }

6.13.3.8 bool AttributesModel::isKnownAttributesRole (int role) const

Returns whether the given role corresponds to one of the known internally used ones.

Definition at line 176 of file KDChartAttributesModel.cpp.

References KDChart::BarAttributesRole, KDChart::DatasetBrushRole, KDChart::DatasetPenRole,KDChart::DataValueLabelAttributesRole, KDChart::LineAttributesRole, KDChart::PieAttributesRole,KDChart::ThreeDAttributesRole, KDChart::ThreeDBarAttributesRole, KDChart::ThreeDLineAttributes-Role, and KDChart::ThreeDPieAttributesRole.

Referenced by data(), setData(), and setHeaderData().

177 {178 bool oneOfOurs = false;179 switch( role ) {180 // fallthrough intended181 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;192 default:193 break;194 }195 return oneOfOurs;196 }

6.13.3.9 QModelIndex KDChart::AbstractProxyModel::mapFromSource (const QModelIndex &sourceIndex) const [inherited]

Definition at line 23 of file KDChartAbstractProxyModel.cpp.

Referenced by KDChart::AbstractProxyModel::index(), and KDChart::AbstractProxyModel::parent().

24 {25 if ( !sourceIndex.isValid() )26 return QModelIndex();27 //qDebug() << "sourceIndex.model()="<<sourceIndex.model();28 //qDebug() << "model()="<<sourceModel();

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

6.13 KDChart::AttributesModel Class Reference 215

29 Q_ASSERT( sourceIndex.model() == sourceModel() );3031 // Create an index that preserves the internal pointer from the source;32 // this way AbstractProxyModel preserves the structure of the source model33 return createIndex( sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer() );34 }

6.13.3.10 QModelIndex KDChart::AbstractProxyModel::mapToSource (const QModelIndex &proxyIndex) const [inherited]

Definition at line 36 of file KDChartAbstractProxyModel.cpp.

Referenced by columnCount(), data(), KDChart::AbstractProxyModel::index(), KDChart::AbstractProxy-Model::parent(), rowCount(), and setData().

37 {38 if ( !proxyIndex.isValid() )39 return QModelIndex();40 Q_ASSERT( proxyIndex.model() == this );41 // So here we need to create a source index which holds that internal pointer.42 // No way to pass it to sourceModel()->index... so we have to do the ugly way:43 QModelIndex sourceIndex;44 KDPrivateModelIndex* hack = reinterpret_cast<KDPrivateModelIndex*>(&sourceIndex);45 hack->r = proxyIndex.row();46 hack->c = proxyIndex.column();47 hack->p = proxyIndex.internalPointer();48 hack->m = sourceModel();49 Q_ASSERT( sourceIndex.isValid() );50 return sourceIndex;51 }

6.13.3.11 QVariant KDChart::AttributesModel::modelData (int role) const

Definition at line 261 of file KDChartAttributesModel.cpp.

Referenced by data(), and headerData().

262 {263 return mModelDataMap.value( role, QVariant() );264 }

6.13.3.12 AttributesModel::PaletteType AttributesModel::paletteType () const

Definition at line 247 of file KDChartAttributesModel.cpp.

Referenced by headerData(), and initFrom().

248 {249 return mPaletteType;250 }

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

216 KD Chart 2 Class Documentation

6.13.3.13 QModelIndex KDChart::AbstractProxyModel::parent (const QModelIndex & index)const [inherited]

Definition at line 59 of file KDChartAbstractProxyModel.cpp.

References KDChart::AbstractProxyModel::mapFromSource(), and KDChart::AbstractProxyModel::map-ToSource().

60 {61 Q_ASSERT(sourceModel());62 return mapFromSource(sourceModel()->parent( mapToSource(index) ));63 }

6.13.3.14 int AttributesModel::rowCount (const QModelIndex &) const

[reimplemented]

Definition at line 266 of file KDChartAttributesModel.cpp.

References KDChart::AbstractProxyModel::mapToSource().

Referenced by setHeaderData(), and setModelData().

267 {268 Q_ASSERT(sourceModel());269 return sourceModel()->rowCount( mapToSource(index) );270 }

6.13.3.15 bool AttributesModel::setData (const QModelIndex &index, const QVariant & value,int role = Qt::DisplayRole)

[reimplemented]

Definition at line 212 of file KDChartAttributesModel.cpp.

References isKnownAttributesRole(), and KDChart::AbstractProxyModel::mapToSource().

Referenced by KDChart::BarDiagram::setBarAttributes().

213 {214 if ( !isKnownAttributesRole( role ) ) {215 return sourceModel()->setData( mapToSource(index), value, role );216 } else {217 QMap< int, QMap< int, QVariant> > &colDataMap = mDataMap[ index.column() ];218 QMap<int, QVariant> &dataMap = colDataMap[ index.row() ];219 //qDebug() << "AttributesModel::setData" <<"role" << role << "value" << value;220 dataMap.insert( role, value );221 emit attributesChanged( index, index );222 return true;223 }224 }

6.13.3.16 bool AttributesModel::setHeaderData (intsection, Qt::Orientation orientation, constQVariant & value, int role = Qt::DisplayRole)

[reimplemented]

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

6.13 KDChart::AttributesModel Class Reference 217

Definition at line 226 of file KDChartAttributesModel.cpp.

References KDChart::AbstractProxyModel::index(), isKnownAttributesRole(), and rowCount().

228 {229 if ( !isKnownAttributesRole( role ) ) {230 return sourceModel()->setHeaderData( section, orientation, value, role );231 } else {232 QMap<int, QMap<int, QVariant> > &sectionDataMap233 = orientation == Qt::Horizontal ? mHorizontalHeaderDataMap : mVerticalHeaderDataMap;234 QMap<int, QVariant> &dataMap = sectionDataMap[ section ];235 dataMap.insert( role, value );236 emit attributesChanged( index( 0, section, QModelIndex() ),237 index( rowCount( QModelIndex() ), section, QModelIndex() ) );238 return true;239 }240 }

6.13.3.17 bool KDChart::AttributesModel::setModelData (const QVariant value, int role)

Definition at line 252 of file KDChartAttributesModel.cpp.

References columnCount(), KDChart::AbstractProxyModel::index(), and rowCount().

253 {254 mModelDataMap.insert( role, value );255 emit attributesChanged( index( 0, 0, QModelIndex() ),256 index( rowCount( QModelIndex() ),257 columnCount( QModelIndex() ), QModelIndex() ) );258 return true;259 }

6.13.3.18 void AttributesModel::setPaletteType (PaletteTypetype)

Sets the palettetype used by this attributesmodel.

Definition at line 242 of file KDChartAttributesModel.cpp.

Referenced by initFrom().

243 {244 mPaletteType = type;245 }

6.13.3.19 void AttributesModel::setSourceModel (QAbstractItemModel∗ sourceModel)

[reimplemented]

Definition at line 278 of file KDChartAttributesModel.cpp.

Referenced by AttributesModel().

279 {280 if( this->sourceModel() != 0 )281 disconnect( this->sourceModel(), SIGNAL( dataChanged( const QModelIndex&, const QModelIndex&)),282 this, SIGNAL( dataChanged( const QModelIndex&, const QModelIndex&)));283 QAbstractProxyModel::setSourceModel( sourceModel );

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

218 KD Chart 2 Class Documentation

284 if( this->sourceModel() != NULL )285 connect( this->sourceModel(), SIGNAL( dataChanged( const QModelIndex&, const QModelIndex&)),286 this, SIGNAL( dataChanged( const QModelIndex&, const QModelIndex&)));287 }

6.13.4 Member Data Documentation

6.13.4.1 Q_SIGNALSKDChart::AttributesModel::__pad0__

Definition at line 111 of file KDChartAttributesModel.h.

The documentation for this class was generated from the following files:

• KDChartAttributesModel.h• KDChartAttributesModel.cpp

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

6.14 KDChart::BackgroundAttributes Class Reference 219

6.14 KDChart::BackgroundAttributes Class Reference

#include <KDChartBackgroundAttributes.h >

Public Types

• enumBackgroundPixmapMode{

BackgroundPixmapModeNone,

BackgroundPixmapModeCentered,

BackgroundPixmapModeScaled,

BackgroundPixmapModeStretched}

Public Member Functions

• BackgroundAttributes(constBackgroundAttributes&)

• BackgroundAttributes()

• QBrushbrush() const

• bool isVisible () const

• booloperator!=(constBackgroundAttributes&other) const

• BackgroundAttributes& operator=(constBackgroundAttributes&)

• booloperator==(constBackgroundAttributes&) const

• QPixmappixmap() const

• BackgroundPixmapModepixmapMode() const

• void setBrush(const QBrush &brush)

• void setPixmap(const QPixmap &backPixmap)

• void setPixmapMode(BackgroundPixmapModemode)

• void setVisible(bool visible)

• ∼BackgroundAttributes()

6.14.1 Member Enumeration Documentation

6.14.1.1 enumKDChart::BackgroundAttributes::BackgroundPixmapMode

Enumeration values:BackgroundPixmapModeNone

BackgroundPixmapModeCentered

BackgroundPixmapModeScaled

BackgroundPixmapModeStretched

Definition at line 49 of file KDChartBackgroundAttributes.h.

49 { BackgroundPixmapModeNone,50 BackgroundPixmapModeCentered,51 BackgroundPixmapModeScaled,52 BackgroundPixmapModeStretched };

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

220 KD Chart 2 Class Documentation

6.14.2 Constructor & Destructor Documentation

6.14.2.1 KDChart::BackgroundAttributes::BackgroundAttributes ()

6.14.2.2 KDChart::BackgroundAttributes::BackgroundAttributes (const BackgroundAttributes&)

6.14.2.3 KDChart::BackgroundAttributes::∼BackgroundAttributes ()

6.14.3 Member Function Documentation

6.14.3.1 QBrush KDChart::BackgroundAttributes::brush () const

Referenced by operator<<().

6.14.3.2 bool KDChart::BackgroundAttributes::isVisible () const

Referenced by operator<<().

6.14.3.3 bool KDChart::BackgroundAttributes::operator!= (const BackgroundAttributes & other)const

Definition at line 67 of file KDChartBackgroundAttributes.h.

67 { return !operator==(other); }

6.14.3.4 BackgroundAttributes& KDChart::BackgroundAttributes::operator= (constBackgroundAttributes &)

6.14.3.5 bool KDChart::BackgroundAttributes::operator== (const BackgroundAttributes &)const

6.14.3.6 QPixmap KDChart::BackgroundAttributes::pixmap () const

Referenced by operator<<().

6.14.3.7 BackgroundPixmapModeKDChart::BackgroundAttributes::pixmapMode () const

Referenced by operator<<().

6.14.3.8 void KDChart::BackgroundAttributes::setBrush (const QBrush & brush)

6.14.3.9 void KDChart::BackgroundAttributes::setPixmap (const QPixmap & backPixmap)

6.14.3.10 void KDChart::BackgroundAttributes::setPixmapMode (BackgroundPixmapModemode)

6.14.3.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

6.14 KDChart::BackgroundAttributes Class Reference 221

• KDChartBackgroundAttributes.h

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

222 KD Chart 2 Class Documentation

6.15 KDChart::BarAttributes Class Reference

#include <KDChartBarAttributes.h >

Collaboration diagram for KDChart::BarAttributes:

Public Member Functions

• BarAttributes(constBarAttributes&)• BarAttributes()• qrealbarGapFactor() const• booldrawSolidExcessArrows() const• qrealfixedBarWidth() const• qrealfixedDataValueGap() const• qrealfixedValueBlockGap() const• qrealgroupGapFactor() const• booloperator!=(constBarAttributes&other) const• BarAttributes& operator=(constBarAttributes&)• booloperator==(constBarAttributes&) 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)• booluseFixedBarWidth() const• booluseFixedDataValueGap() const• booluseFixedValueBlockGap() const• ∼BarAttributes()

6.15.1 Constructor & Destructor Documentation

6.15.1.1 KDChart::BarAttributes::BarAttributes ()

6.15.1.2 KDChart::BarAttributes::BarAttributes (const BarAttributes &)

6.15.1.3 KDChart::BarAttributes:: ∼BarAttributes ()

6.15.2 Member Function Documentation

6.15.2.1 qreal KDChart::BarAttributes::barGapFactor () const

6.15.2.2 bool KDChart::BarAttributes::drawSolidExcessArrows () const

6.15.2.3 qreal KDChart::BarAttributes::fixedBarWidth () const

Referenced by KDChart::BarDiagram::paint().

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

6.15 KDChart::BarAttributes Class Reference 223

6.15.2.4 qreal KDChart::BarAttributes::fixedDataValueGap () const

Referenced by KDChart::BarDiagram::paint().

6.15.2.5 qreal KDChart::BarAttributes::fixedValueBlockGap () const

Referenced by KDChart::BarDiagram::paint().

6.15.2.6 qreal KDChart::BarAttributes::groupGapFactor () const

6.15.2.7 bool KDChart::BarAttributes::operator!= (const BarAttributes & other) const

Definition at line 71 of file KDChartBarAttributes.h.

71 { return !operator==(other); }

6.15.2.8 BarAttributes & KDChart::BarAttributes::operator= (const BarAttributes &)

6.15.2.9 bool KDChart::BarAttributes::operator== (const BarAttributes &) const

6.15.2.10 void KDChart::BarAttributes::setBarGapFactor (qreal gapFactor)

6.15.2.11 void KDChart::BarAttributes::setDrawSolidExcessArrows (boolsolidArrows)

6.15.2.12 void KDChart::BarAttributes::setFixedBarWidth (qreal width)

6.15.2.13 void KDChart::BarAttributes::setFixedDataValueGap (qrealgap)

6.15.2.14 void KDChart::BarAttributes::setFixedValueBlockGap (qreal gap)

6.15.2.15 void KDChart::BarAttributes::setGroupGapFactor (qreal gapFactor)

6.15.2.16 void KDChart::BarAttributes::setUseFixedBarWidth (bool useFixedBarWidth)

6.15.2.17 void KDChart::BarAttributes::setUseFixedDataValueGap (boolgapIsFixed)

6.15.2.18 void KDChart::BarAttributes::setUseFixedValueBlockGap (boolgapIsFixed)

6.15.2.19 bool KDChart::BarAttributes::useFixedBarWidth () const

Referenced by KDChart::BarDiagram::paint().

6.15.2.20 bool KDChart::BarAttributes::useFixedDataValueGap () const

Referenced by KDChart::BarDiagram::paint().

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

224 KD Chart 2 Class Documentation

6.15.2.21 bool KDChart::BarAttributes::useFixedValueBlockGap () const

Referenced by KDChart::BarDiagram::paint().

The documentation for this class was generated from the following file:

• KDChartBarAttributes.h

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

6.16 KDChart::BarDiagram Class Reference 225

6.16 KDChart::BarDiagram Class Reference

#include <KDChartBarDiagram.h >

Inheritance diagram for KDChart::BarDiagram:Collaboration diagram for KDChart::BarDiagram:

Public Types

• enumBarType{

Normal,

Stacked,

Percent,

Rows}

Public Member Functions

• virtual voidaddAxis(CartesianAxis∗axis)

Add the axis to the diagram.

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• virtual KDChart::CartesianAxisListaxes() const• BarAttributesbarAttributes(const QModelIndex &index) const• BarAttributesbarAttributes(int column) const• BarAttributesbarAttributes() const• BarDiagram(QWidget∗parent=0,CartesianCoordinatePlane∗plane=0)• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• virtual BarDiagram∗ clone() const• 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 thesevalues).

• virtual voiddataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)

[reimplemented]

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

226 KD Chart 2 Class Documentation

• 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 tohave.

• QStringListdatasetLabels() const

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.

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual void layoutPlanes()• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• const intnumberOfAbscissaSegments() const

[reimplemented]

• const intnumberOfOrdinateSegments() const

[reimplemented]

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

6.16 KDChart::BarDiagram Class Reference 227

• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, constQBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)

• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• virtual AbstractCartesianDiagram∗ referenceDiagram() const• virtual QPointFreferenceDiagramOffset() const• void resize(const QSizeF &area)

Called by the widget’s sizeEvent.

• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith this diagram.

• void setBarAttributes(const QModelIndex &index, constBarAttributes&a)• void setBarAttributes(int column, constBarAttributes&a)• void setBarAttributes(constBarAttributes&a)• 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

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

228 KD Chart 2 Class Documentation

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• virtual voidsetModel(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 setReferenceDiagram(AbstractCartesianDiagram∗diagram, const QPointF

&offset=QPointF())• virtual voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setThreeDBarAttributes(const QModelIndex &index, constThreeDBarAttributes&a)• void setThreeDBarAttributes(int column, constThreeDBarAttributes&a)• void setThreeDBarAttributes(constThreeDBarAttributes&a)• void setType(BarTypetype)• virtual void takeAxis(CartesianAxis∗axis)

Removes the axis from the diagram, without deleting it.

• ThreeDBarAttributesthreeDBarAttributes(const QModelIndex &index) const• ThreeDBarAttributesthreeDBarAttributes(int column) const• ThreeDBarAttributesthreeDBarAttributes() const• BarTypetype() const• 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]

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

6.16 KDChart::BarDiagram Class Reference 229

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼BarDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const

• const QPair< QPointF, QPointF> calculateDataBoundaries() const

[reimplemented]

• virtual boolcheckInvariants(bool justReturnTheStatus=false) const

• QModelIndexcolumnToIndex(int column) const

• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• void paint(PaintContext∗paintContext)

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 voidpaintDataValueTexts(QPainter∗painter)

• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)

• virtual voidpaintMarkers(QPainter∗painter)

• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void resizeEvent(QResizeEvent∗)• void setAttributesModelRootIndex(const QModelIndex &)

• void setDataBoundariesDirty() const

• virtual doublethreeDItemDepth(int column) const

• virtual doublethreeDItemDepth(const QModelIndex &index) const

• doublevalueForCell(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∗ )

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

230 KD Chart 2 Class Documentation

6.16.1 Member Enumeration Documentation

6.16.1.1 enumKDChart::BarDiagram::BarType

Enumeration values:Normal

Stacked

Percent

Rows

Definition at line 55 of file KDChartBarDiagram.h.

55 { Normal,56 Stacked,57 Percent,58 Rows };

6.16.2 Constructor & Destructor Documentation

6.16.2.1 BarDiagram::BarDiagram (QWidget ∗ parent= 0, CartesianCoordinatePlane∗ plane= 0)[explicit]

Definition at line 53 of file KDChartBarDiagram.cpp.

Referenced by clone().

53 :54 AbstractCartesianDiagram( new Private(), parent, plane )55 {56 init();57 }

6.16.2.2 BarDiagram::∼BarDiagram () [virtual]

Definition at line 63 of file KDChartBarDiagram.cpp.

64 {65 }

6.16.3 Member Function Documentation

6.16.3.1 void AbstractCartesianDiagram::addAxis (CartesianAxis ∗ axis) [virtual,inherited]

Add the axis to the diagram.

The diagram takes ownership of the axis and will delete it.

To gain back ownership (e.g. for assigning the axis to another diagram) use the takeAxis method, beforecalling addAxis on the other diagram.

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

6.16 KDChart::BarDiagram Class Reference 231

See also:takeAxis

Definition at line 66 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractAxis::createObserver(), d, and KDChart::AbstractCartesian-Diagram::layoutPlanes().

67 {68 if ( !d->axesList.contains( axis ) ) {69 d->axesList.append( axis );70 axis->createObserver( this );71 layoutPlanes();72 }73 }

6.16.3.2 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.16.3.3 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.16.3.4 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated with the diagram.

See also:setAttributesModel

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

232 KD Chart 2 Class Documentation

Definition at line 180 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), and setBarAttributes().

181 {182 return d->attributesModel;183 }

6.16.3.5 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat corresponds to the root index of the diagram.

Definition at line 204 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::calculateDataBoundaries(), calculateDataBoundaries(),KDChart::LineDiagram::numberOfAbscissaSegments(), numberOfAbscissaSegments(), KDChart::Line-Diagram::numberOfOrdinateSegments(), numberOfOrdinateSegments(), KDChart::LineDiagram::paint(),paint(), and KDChart::AbstractDiagram::valueForCell().

210 {

6.16.3.6 KDChart::CartesianAxisList AbstractCartesianDiagram::axes () const [virtual,inherited]

Definition at line 85 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::CartesianAxisList, and d.

86 {87 return d->axesList;88 }

6.16.3.7 BarAttributes BarDiagram::barAttributes (const QModelIndex & index) const

Definition at line 123 of file KDChartBarDiagram.cpp.

References d.

124 {125 return qVariantValue<BarAttributes>(126 d->attributesModel->data(127 d->attributesModel->mapFromSource( index ),128 KDChart::BarAttributesRole ) );129 }

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

6.16 KDChart::BarDiagram Class Reference 233

6.16.3.8 BarAttributes BarDiagram::barAttributes (int column) const

Definition at line 115 of file KDChartBarDiagram.cpp.

References d.

116 {117 return qVariantValue<BarAttributes>(118 d->attributesModel->data(119 d->attributesModel->mapFromSource( columnToIndex( column ) ),120 KDChart::BarAttributesRole ) );121 }

6.16.3.9 BarAttributes BarDiagram::barAttributes () const

Definition at line 109 of file KDChartBarDiagram.cpp.

References d.

Referenced by paint().

110 {111 return qVariantValue<BarAttributes>(112 d->attributesModel->data( KDChart::BarAttributesRole ) );113 }

6.16.3.10 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

6.16.3.11 QBrush AbstractDiagram::brush (intdataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

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

234 KD Chart 2 Class Documentation

6.16.3.12 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

6.16.3.13 const QPair< QPointF, QPointF > BarDiagram::calculateDataBoundaries () const[protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 199 of file KDChartBarDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractDiagram::coordinatePlane(), d, threeDItemDepth(), KDChart::Abstract-CoordinatePlane::translate(), and type().

200 {201 if ( !checkInvariants() ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );202 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex());203 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex());204205 double xMin = 0;206 double xMax = rowCount;207 double yMin = 0, yMax = 0;208 double maxThreeDDepth = 0.0;209 double firstThreeDDepth = 0.0;210 double lastThreeDDepth = 0.0;211212 bool bStarting = true;213 // calculate boundaries for different line types Normal - Stacked - Percent - Default Normal214 switch ( type() ){215 case BarDiagram::Normal:216 {217 for ( int i=0; i<colCount; ++i ) {218 for ( int j=0; j< rowCount; ++j ) {219 const double value = d->attributesModel->data( d->attributesModel->index( j, i, attributesModelRootIndex() ) ).toDouble();220 // this is always true yMin can be 0 in case all values221 // are the same222 // same for yMax it can be zero if all values are negative223 yMin = qMin( yMin, value );224 yMax = qMax( yMax, value );225226 const double depth = threeDItemDepth( model()->index( j, i, rootIndex() ) );227 if( depth > 0.0 ){228 maxThreeDDepth = qMax( maxThreeDDepth, depth );229 if( bStarting )230 firstThreeDDepth = depth;231 lastThreeDDepth = depth;232 }233 bStarting = false;

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

6.16 KDChart::BarDiagram Class Reference 235

234 }235 }236 }237 break;238 case BarDiagram::Stacked:239 {240 for ( int j=0; j< rowCount; ++j ) {241 // calculate sum of values per column - Find out stacked Min/Max242 double stackedValues = 0;243 for ( int i=0; i<colCount ; ++i ) {244 QModelIndex idx = model()->index( j, i, rootIndex() );245 stackedValues += model()->data( idx ).toDouble();246 // this is always true yMin can be 0 in case all values247 // are the same248 // same for yMax it can be zero if all values are negative249 yMin = qMin( yMin, stackedValues );250 yMax = qMax( yMax, stackedValues );251252 const double depth = threeDItemDepth( idx );253 if( depth > 0.0 ){254 maxThreeDDepth = qMax( maxThreeDDepth, depth );255 if( bStarting )256 firstThreeDDepth = depth;257 lastThreeDDepth = depth;258 }259 bStarting = false;260 }261 }262 }263 break;264 case BarDiagram::Percent:265 {266 for ( int i=0; i<colCount; ++i ) {267 for ( int j=0; j< rowCount; ++j ) {268 // Ordinate should begin at 0 the max value being the 100% pos269 QModelIndex idx = model()->index( j, i, rootIndex() );270 // only positive values are handled271 double value = model()->data( idx ).toDouble();272 yMax = qMax( yMax, value );273 const double depth = threeDItemDepth( idx );274 if( depth > 0.0 ){275 maxThreeDDepth = qMax( maxThreeDDepth, depth );276 if( bStarting )277 firstThreeDDepth = depth;278 lastThreeDDepth = depth;279 }280 bStarting = false;281 }282 }283 break;284 }285 default:286 Q_ASSERT_X ( false, "calculateDataBoundaries()",287 "Type item does not match a defined bar chart Type." );288 }289290 // special cases291 if ( yMax == yMin ) {292 if ( yMin == 0.0 )293 yMax = 0.1; //we need at list a range294 else295 yMax = 0.0; // they are the same but negative296 }297 QPointF bottomLeft ( QPointF( xMin, yMin ) );298 QPointF topRight ( QPointF( xMax, yMax ) );299300 //FIXME(khz): Verify, if this code is right: We are taking

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

236 KD Chart 2 Class Documentation

301 // ’any’ ThreeDBarAttributes, no matter for which cell it is specified302 // as long, as it is enabled(),303 // but we are ignoring all ThreeDBarAttributes that might have been set304 // at a header (using the setter that takes a column as parameter).305 // see: LineDiagram::calculateDataBoundaries ()306 if ( maxThreeDDepth > 0.0 ) {307 double percentx, percenty;308 //threeDBoundaries calculate a depth percent value and add it309 QPointF pTRTranslated = coordinatePlane()->translate( topRight );310 QPointF pBLTranslated = coordinatePlane()->translate( bottomLeft );311 //reserve some plane space for the top of the threeD bars312 //Pending Michel: fixme 4 - 8?313 if ( d->maxDepth )314 maxThreeDDepth = d->maxDepth;315 if ( type() == BarDiagram::Normal ) {316 percentx = (maxThreeDDepth / pTRTranslated.x());317 percenty = (maxThreeDDepth / pBLTranslated.y());318 } else if ( type() == BarDiagram::Stacked ){319 percentx = ( maxThreeDDepth / pTRTranslated.x());320 percenty = ((maxThreeDDepth*8) / pBLTranslated.y());321 } else {322 percentx = ( maxThreeDDepth / pTRTranslated.x());323 percenty = ((maxThreeDDepth*4) / pBLTranslated.y());324 }325 topRight.setX( topRight.x() + percentx);326 topRight.setY( topRight.y() + percenty);327 }328329 //qDebug() << "BarDiagram::calculateDataBoundaries () returns ( " << bottomLeft << topRight <<")";330331 return QPair<QPointF, QPointF> ( bottomLeft, topRight );332 }

6.16.3.14 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::RingDiagram::calculateDataBoundaries(), KDChart::PolarDiagram::calculate-DataBoundaries(), KDChart::PieDiagram::calculateDataBoundaries(), KDChart::LineDiagram::calculate-DataBoundaries(), calculateDataBoundaries(), KDChart::RingDiagram::paint(), KDChart::Polar-Diagram::paint(), KDChart::PieDiagram::paint(), KDChart::LineDiagram::paint(), paint(), andKDChart::AbstractDiagram::paintMarker().

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

6.16.3.15 BarDiagram ∗ BarDiagram::clone () const [virtual]

Definition at line 67 of file KDChartBarDiagram.cpp.

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

6.16 KDChart::BarDiagram Class Reference 237

References BarDiagram(), and d.

68 {69 return new BarDiagram( new Private( *d ) );70 }

6.16.3.16 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.16.3.17 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(), KDChart::Line-Diagram::paint(), paint(), KDChart::AbstractPolarDiagram::polarCoordinatePlane(), andKDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {127 return d->plane;128 }

6.16.3.18 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::calculateDataBoundaries(), and d.

Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(), KDChart::Polar-CoordinatePlane::layoutDiagrams(), KDChart::LineDiagram::paint(), and paint().

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

238 KD Chart 2 Class Documentation

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

6.16.3.19 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.16.3.20 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese 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(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.16.3.21 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

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

6.16 KDChart::BarDiagram Class Reference 239

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.16.3.22 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.16.3.23 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese too, in order to find the marker, that is shown for a single cell.

Returns:The current set of dataset brushes.

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

240 KD Chart 2 Class Documentation

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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.16.3.24 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

6.16.3.25 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

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

6.16 KDChart::BarDiagram Class Reference 241

6.16.3.26 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.16.3.27 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

6.16.3.28 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.16.3.29 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

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

242 KD Chart 2 Class Documentation

6.16.3.30 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.16.3.31 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.16.3.32 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.16.3.33 void KDChart::AbstractCartesianDiagram::layoutPlanes () [virtual,inherited]

Definition at line 90 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractCoordinate-Plane::layoutPlanes().

Referenced by KDChart::AbstractCartesianDiagram::addAxis(), and KDChart::AbstractCartesian-Diagram::takeAxis().

91 {92 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()";93 AbstractCoordinatePlane* plane = coordinatePlane();94 if( plane ){95 plane->layoutPlanes();96 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK";97 }98 }

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

6.16 KDChart::BarDiagram Class Reference 243

6.16.3.34 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.16.3.35 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.16.3.36 const int BarDiagram::numberOfAbscissaSegments () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 667 of file KDChartBarDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

668 {669 return d->attributesModel->rowCount(attributesModelRootIndex());670 }

6.16.3.37 const int BarDiagram::numberOfOrdinateSegments () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 672 of file KDChartBarDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

673 {674 return d->attributesModel->columnCount(attributesModelRootIndex());675 }

6.16.3.38 void BarDiagram::paint (PaintContext ∗ paintContext) [protected, 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.

ImplementsKDChart::AbstractDiagram.

Definition at line 376 of file KDChartBarDiagram.cpp.

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

244 KD Chart 2 Class Documentation

References KDChart::AbstractDiagram::attributesModelRootIndex(), barAttributes(), KDChart::Abstract-Diagram::checkInvariants(), KDChart::AbstractDiagram::coordinatePlane(), d, KDChart::Abstract-Diagram::dataBoundaries(), KDChart::AbstractThreeDAttributes::depth(), KDChart::BarAttributes::fixed-BarWidth(), KDChart::BarAttributes::fixedDataValueGap(), KDChart::BarAttributes::fixedValueBlock-Gap(), KDChart::AbstractThreeDAttributes::isEnabled(), KDChart::AbstractDiagram::paintDataValue-Text(), KDChart::PaintContext::painter(), KDChart::PaintContext::rectangle(), threeDBarAttributes(),KDChart::AbstractCoordinatePlane::translate(), type(), KDChart::BarAttributes::useFixedBarWidth(),KDChart::BarAttributes::useFixedDataValueGap(), and KDChart::BarAttributes::useFixedValueBlock-Gap().

377 {378 if ( !checkInvariants() )379 return;380 // Calculate width381 QPointF boundLeft, boundRight;382 QPair<QPointF,QPointF> boundaries = dataBoundaries();383 if( !AbstractGrid::isBoundariesValid(boundaries) ) return;384 boundLeft = coordinatePlane()->translate( boundaries.first );385 boundRight = coordinatePlane()->translate( boundaries.second );386 double width = boundRight.x() - boundLeft.x();387 //calculates and stores the values388 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex());389 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex());390 DataValueTextInfoList list;391 BarAttributes ba = barAttributes( model()->index( 0, 0, rootIndex() ) );392 double barWidth = 0;393 double maxDepth = 0;394 double spaceBetweenBars = 0;395 double spaceBetweenGroups = 0;396 double groupWidth = /*ctx->rectangle().width() / ( rowCount + 2 )*/ width/ (rowCount + 2);397398399 if ( ba.useFixedBarWidth() ) {400 barWidth = ba.fixedBarWidth();401 groupWidth += barWidth;402403 // Pending Michel set a min and max value for the groupWidth related to the area.width404 // FixMe405 if ( groupWidth < 0 )406 groupWidth = 0;407408 if ( groupWidth * rowCount > ctx->rectangle().width() )409 groupWidth = ctx->rectangle().width() / rowCount;410 }411412 // maxLimit: allow the space between bars to be larger until area.width() is covered by the groups.413 double maxLimit = rowCount * (groupWidth + ((colCount-1) * ba.fixedDataValueGap()) );414415 //Pending Michel: FixMe416 if ( ba.useFixedDataValueGap() ) {417 if ( ctx->rectangle().width() > maxLimit )418 spaceBetweenBars += ba.fixedDataValueGap();419 else420 spaceBetweenBars = ((ctx->rectangle().width()/rowCount) - groupWidth)/(colCount-1);421 }422423 //Pending Michel: FixMe424 if ( ba.useFixedValueBlockGap() )425 spaceBetweenGroups += ba.fixedValueBlockGap();426427 calculateValueAndGapWidths( rowCount, colCount,groupWidth,428 barWidth, spaceBetweenBars, spaceBetweenGroups );429430 // paint different bar types: Normal - Stacked - Percent431 switch ( type() )

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

6.16 KDChart::BarDiagram Class Reference 245

432 {433 case BarDiagram::Normal:434 {435 // we paint the bars for all series next to each other, then move to the next value436 for ( int i=0; i<rowCount; ++i ) {437 double offset = -groupWidth/2 + spaceBetweenGroups/2;438 // case fixed data value gap - handles max and min limits as well439 if ( ba.useFixedDataValueGap() ) {440 if ( spaceBetweenBars > 0 ) {441 if ( ctx->rectangle().width() > maxLimit )442 offset -= ba.fixedDataValueGap();443 else444 offset -= ((ctx->rectangle().width()/rowCount) - groupWidth)/(colCount-1);445446 } else {447 //allow reducing the gap until the bars are displayed next to each other - null gap448 offset += barWidth/2;449 }450 }451452 for ( int j=0; j< colCount; ++j ) {453 // paint one group454 const double value = d->attributesModel->data( d->attributesModel->index( i, j, attributesModelRootIndex() ) ).toDouble();455 QPointF topPoint = coordinatePlane()->translate( QPointF( i + 0.5, value ) );456 QPointF bottomPoint = coordinatePlane()->translate( QPointF( i, 0 ) );457 const double barHeight = bottomPoint.y() - topPoint.y();458 topPoint.setX( topPoint.x() + offset );459 //PENDING Michel: FIXME barWidth460 QModelIndex index = model()->index( i, j, rootIndex() );461 list.append( DataValueTextInfo( index, topPoint, value ) );462 paintBars( ctx, index, QRectF( topPoint, QSizeF( barWidth, barHeight ) ), maxDepth );463464 offset += barWidth + spaceBetweenBars;465 }466 }467 }468 break;469 case BarDiagram::Stacked:470 {471 for ( int i = 0; i<colCount; ++i ) {472 double offset = spaceBetweenGroups;473 for ( int j = 0; j< rowCount; ++j ) {474 QModelIndex index = model()->index( j, i, rootIndex() );475 ThreeDBarAttributes tda = threeDBarAttributes( index );476 double value = 0, stackedValues = 0;477 QPointF point, previousPoint;478479 if ( tda.isEnabled() ) {480 if ( barWidth > 0 )481 barWidth = (width - ((offset+(tda.depth()))*rowCount))/ rowCount;482 if ( barWidth <= 0 ) {483 barWidth = 0;484 maxDepth = offset - (width/rowCount);485 }486 } else487 barWidth = (ctx->rectangle().width() - (offset*rowCount))/ rowCount ;488489 value = model()->data( index ).toDouble();490 for ( int k = i; k >= 0 ; --k )491 stackedValues += model()->data( model()->index( j, k, rootIndex() ) ).toDouble();492 point = coordinatePlane()->translate( QPointF( j, stackedValues ) );493 point.setX( point.x() + offset/2 );494 previousPoint = coordinatePlane()->translate( QPointF( j, stackedValues - value ) );495 const double barHeight = previousPoint.y() - point.y();496 list.append( DataValueTextInfo( index, point, value ) );497 paintBars( ctx, index, QRectF( point, QSizeF( barWidth , barHeight ) ), maxDepth );498 }

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

246 KD Chart 2 Class Documentation

499500 }501 }502 break;503 case BarDiagram::Percent:504 {505 double maxValue = 100; // always 100 %506 double sumValues = 0;507 QVector <double > sumValuesVector;508509 //calculate sum of values for each column and store510 for ( int j=0; j<rowCount; ++j ) {511 for ( int i=0; i<colCount; ++i ) {512 double tmpValue = model()->data( model()->index( j, i, rootIndex() ) ).toDouble();513 if ( tmpValue > 0 )514 sumValues += tmpValue;515 if ( i == colCount-1 ) {516 sumValuesVector << sumValues ;517 sumValues = 0;518 }519 }520 }521522 // calculate stacked percent value523 for ( int i = 0; i<colCount; ++i ) {524 double offset = spaceBetweenGroups;525 for ( int j=0; j<rowCount ; ++j ) {526 double value = 0, stackedValues = 0;527 QPointF point, previousPoint;528 QModelIndex index = model()->index( j, i, rootIndex() );529 ThreeDBarAttributes tda = threeDBarAttributes( index );530531 if ( tda.isEnabled() ) {532 if ( barWidth > 0 )533 barWidth = (width - ((offset+(tda.depth()))*rowCount))/ rowCount;534 if ( barWidth <= 0 ) {535 barWidth = 0;536 maxDepth = offset - ( width/rowCount);537 }538 }539 else540 barWidth = (ctx->rectangle().width() - (offset*rowCount))/ rowCount;541542 value = model()->data( index ).toDouble();543544 // calculate stacked percent value545 // we only take in account positives values for now.546 for ( int k = i; k >= 0 ; --k ) {547 double val = model()->data( model()->index( j, k, rootIndex() ) ).toDouble();548 if ( val > 0)549 stackedValues += val;550 }551552 if ( sumValuesVector.at( j ) != 0 && value > 0 ) {553 point = coordinatePlane()->translate( QPointF( j, stackedValues/sumValuesVector.at(j)* maxValue ) );554555 point.setX( point.x() + offset/2 );556557 previousPoint = coordinatePlane()->translate( QPointF( j, (stackedValues - value)/sumValuesVector.at(j)* maxValue ) );558 }559 const double barHeight = previousPoint.y() - point.y();560561 list.append( DataValueTextInfo( index, point, value ) );562 paintBars( ctx, index, QRectF( point, QSizeF( barWidth, barHeight ) ), maxDepth );563564 }565 }

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

6.16 KDChart::BarDiagram Class Reference 247

566 }567 break;568 default:569 Q_ASSERT_X ( false, "paint()",570 "Type item does not match a defined bar chart Type." );571 }572573 DataValueTextInfoListIterator it( list );574 while ( it.hasNext() ) {575 const DataValueTextInfo& info = it.next();576 paintDataValueText( ctx->painter(), info.index, info.pos, info.value );577 }578 }

6.16.3.39 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::prefix(), KDChart::TextAttributes::rotation(),KDChart::DataValueAttributes::suffix(), and KDChart::DataValueAttributes::textAttributes().

Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), KDChart::Line-Diagram::paint(), and paint().

320 {321 // paint one data series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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

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

248 KD Chart 2 Class Documentation

355 QString AbstractDiagram::roundValues( double value,

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

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 }394395

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.16.3.42 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

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

6.16 KDChart::BarDiagram Class Reference 249

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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 about456 // 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: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 }

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

250 KD Chart 2 Class Documentation

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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

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

6.16 KDChart::BarDiagram Class Reference 251

6.16.3.44 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.16.3.45 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.16.3.46 QPen AbstractDiagram::pen () const [inherited]

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 {

6.16.3.47 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

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

252 KD Chart 2 Class Documentation

6.16.3.48 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.16.3.49 AbstractCartesianDiagram ∗ AbstractCartesianDiagram::referenceDiagram () const[virtual, inherited]

Definition at line 123 of file KDChartAbstractCartesianDiagram.cpp.

References d.

124 {125 return d->referenceDiagram;126 }

6.16.3.50 QPointF AbstractCartesianDiagram::referenceDiagramOffset () const[virtual,inherited]

Definition at line 128 of file KDChartAbstractCartesianDiagram.cpp.

References d.

129 {130 return d->referenceDiagramOffset;131 }

6.16.3.51 void BarDiagram::resize (const QSizeF &area) [virtual]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

ImplementsKDChart::AbstractDiagram.

Definition at line 663 of file KDChartBarDiagram.cpp.

664 {665 }

6.16.3.52 void BarDiagram::resizeEvent (QResizeEvent∗) [protected]

Definition at line 194 of file KDChartBarDiagram.cpp.

195 {196197 }

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

6.16 KDChart::BarDiagram Class Reference 253

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.16.3.54 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.16.3.55 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.16.3.56 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat is internal to another diagram is an error.

Correct:

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

Wrong:

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

254 KD Chart 2 Class Documentation

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

Parameters:model TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.16.3.57 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.16.3.58 void BarDiagram::setBarAttributes (const QModelIndex &index, constBarAttributes& a)

Definition at line 101 of file KDChartBarDiagram.cpp.

References KDChart::AbstractDiagram::attributesModel(), KDChart::BarAttributesRole, d, andKDChart::AttributesModel::setData().

102 {103 attributesModel()->setData(104 d->attributesModel->mapFromSource( index ),105 qVariantFromValue( ta ),106 BarAttributesRole );107 }

6.16.3.59 void BarDiagram::setBarAttributes (int column, constBarAttributes & a)

Definition at line 93 of file KDChartBarDiagram.cpp.

References KDChart::BarAttributesRole, and d.

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

6.16 KDChart::BarDiagram Class Reference 255

94 {95 d->attributesModel->setHeaderData(96 column, Qt::Vertical,97 qVariantFromValue( ta ),98 BarAttributesRole );99 }

6.16.3.60 void BarDiagram::setBarAttributes (constBarAttributes & a)

Definition at line 88 of file KDChartBarDiagram.cpp.

References KDChart::BarAttributesRole, and d.

89 {90 d->attributesModel->setModelData( qVariantFromValue( ta ), BarAttributesRole );91 }

6.16.3.61 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.16.3.62 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.16.3.63 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

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

256 KD Chart 2 Class Documentation

6.16.3.64 void KDChart::AbstractCartesianDiagram::setCoordinatePlane(AbstractCoordinatePlane∗ plane) [virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented fromKDChart::AbstractDiagram.

Definition at line 100 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractDiagram::set-CoordinatePlane().

101 {102 if( coordinatePlane() ) disconnect( coordinatePlane() );103 AbstractDiagram::setCoordinatePlane(plane);104105 // show the axes, after all have been adjusted106 // (because they might be dependend on each other)107 /*108 if( plane )109 Q_FOREACH( CartesianAxis* axis, d->axesList )110 axis->show();111 else112 Q_FOREACH( CartesianAxis* axis, d->axesList )113 axis->hide();114 */115 }

6.16.3.65 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by setThreeDBarAttributes(), KDChart::LineDiagram::setThreeDLineAttributes(),KDChart::LineDiagram::setType(), and setType().

140 {141 d->databoundariesDirty = true;142 }

6.16.3.66 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

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

6.16 KDChart::BarDiagram Class Reference 257

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.16.3.67 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.16.3.68 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.16.3.69 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

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

258 KD Chart 2 Class Documentation

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.16.3.70 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.16.3.71 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.16.3.72 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

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

6.16 KDChart::BarDiagram Class Reference 259

6.16.3.73 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.16.3.74 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and setType().

312 {

6.16.3.75 void AbstractCartesianDiagram::setReferenceDiagram (AbstractCartesianDiagram ∗diagram, const QPointF & offset= QPointF()) [virtual, inherited]

Definition at line 117 of file KDChartAbstractCartesianDiagram.cpp.

References d.

118 {119 d->referenceDiagram = diagram;120 d->referenceDiagramOffset = offset;121 }

6.16.3.76 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.16.3.77 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

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

260 KD Chart 2 Class Documentation

6.16.3.78 void BarDiagram::setThreeDBarAttributes (const QModelIndex &index, constThreeDBarAttributes & a)

Definition at line 148 of file KDChartBarDiagram.cpp.

References d, KDChart::AbstractDiagram::setDataBoundariesDirty(), and KDChart::ThreeDBar-AttributesRole.

149 {150 setDataBoundariesDirty();151 d->attributesModel->setData(152 d->attributesModel->mapFromSource(index),153 qVariantFromValue( tda ),154 ThreeDBarAttributesRole );155 emit layoutChanged( this );156 }

6.16.3.79 void BarDiagram::setThreeDBarAttributes (intcolumn, constThreeDBarAttributes &a)

Definition at line 138 of file KDChartBarDiagram.cpp.

References d, KDChart::AbstractDiagram::setDataBoundariesDirty(), and KDChart::ThreeDBar-AttributesRole.

139 {140 setDataBoundariesDirty();141 d->attributesModel->setHeaderData(142 column, Qt::Vertical,143 qVariantFromValue( tda ),144 ThreeDBarAttributesRole );145 emit layoutChanged( this );146 }

6.16.3.80 void BarDiagram::setThreeDBarAttributes (constThreeDBarAttributes & a)

Definition at line 131 of file KDChartBarDiagram.cpp.

References d, KDChart::AbstractDiagram::setDataBoundariesDirty(), and KDChart::ThreeDBar-AttributesRole.

132 {133 setDataBoundariesDirty();134 d->attributesModel->setModelData( qVariantFromValue( tda ), ThreeDBarAttributesRole );135 emit layoutChanged( this );136 }

6.16.3.81 void BarDiagram::setType (BarType type)

Definition at line 72 of file KDChartBarDiagram.cpp.

References d, KDChart::AbstractDiagram::setDataBoundariesDirty(), and KDChart::Abstract-Diagram::setPercentMode().

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

6.16 KDChart::BarDiagram Class Reference 261

73 {74 if ( type == d->barType ) return;7576 d->barType = type;77 // AbstractAxis settings - see AbstractDiagram and CartesianAxis78 setPercentMode( type == BarDiagram::Percent );79 setDataBoundariesDirty();80 emit layoutChanged( this );81 }

6.16.3.82 void AbstractCartesianDiagram::takeAxis (CartesianAxis ∗ axis) [virtual,inherited]

Removes the axis from the diagram, without deleting it.

The diagram no longer owns the axis, so it is the caller’s responsibility to delete the axis.

See also:addAxis

Definition at line 75 of file KDChartAbstractCartesianDiagram.cpp.

References d, KDChart::AbstractAxis::deleteObserver(), KDChart::AbstractCartesianDiagram::layout-Planes(), and KDChart::AbstractLayoutItem::setParentWidget().

Referenced by KDChart::CartesianAxis::∼CartesianAxis().

76 {77 const int idx = d->axesList.indexOf( axis );78 if( idx != -1 )79 d->axesList.takeAt( idx );80 axis->deleteObserver( this );81 axis->setParentWidget( 0 );82 layoutPlanes();83 }

6.16.3.83 ThreeDBarAttributes BarDiagram::threeDBarAttributes (const QModelIndex & index)const

Definition at line 172 of file KDChartBarDiagram.cpp.

References d.

173 {174 return qVariantValue<ThreeDBarAttributes>(175 d->attributesModel->data(176 d->attributesModel->mapFromSource(index),177 KDChart::ThreeDBarAttributesRole ) );178 }

6.16.3.84 ThreeDBarAttributes BarDiagram::threeDBarAttributes (int column) const

Definition at line 164 of file KDChartBarDiagram.cpp.

References d.

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

262 KD Chart 2 Class Documentation

165 {166 return qVariantValue<ThreeDBarAttributes>(167 d->attributesModel->data(168 d->attributesModel->mapFromSource( columnToIndex( column ) ),169 KDChart::ThreeDBarAttributesRole ) );170 }

6.16.3.85 ThreeDBarAttributes BarDiagram::threeDBarAttributes () const

Definition at line 158 of file KDChartBarDiagram.cpp.

References d.

Referenced by paint(), and threeDItemDepth().

159 {160 return qVariantValue<ThreeDBarAttributes>(161 d->attributesModel->data( KDChart::ThreeDBarAttributesRole ) );162 }

6.16.3.86 double BarDiagram::threeDItemDepth (intcolumn) const [protected, virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 185 of file KDChartBarDiagram.cpp.

References d.

186 {187 return qVariantValue<ThreeDBarAttributes>(188 d->attributesModel->headerData (189 column,190 Qt::Vertical,191 KDChart::ThreeDBarAttributesRole ) ).validDepth();192 }

6.16.3.87 double BarDiagram::threeDItemDepth (const QModelIndex &index) const[protected, virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 180 of file KDChartBarDiagram.cpp.

References threeDBarAttributes(), and KDChart::AbstractThreeDAttributes::validDepth().

Referenced by calculateDataBoundaries().

181 {182 return threeDBarAttributes( index ).validDepth();183 }

6.16.3.88 BarDiagram::BarType BarDiagram::type () const

Definition at line 83 of file KDChartBarDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), and paint().

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

6.16 KDChart::BarDiagram Class Reference 263

84 {85 return d->barType;86 }

6.16.3.89 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.16.3.90 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

6.16.3.91 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.16.3.92 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

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

264 KD Chart 2 Class Documentation

6.16.3.93 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.16.3.94 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

6.16.3.95 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.16.3.96 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.16.4 Member Data Documentation

6.16.4.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartBarDiagram.h• KDChartBarDiagram.cpp

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

6.17 KDChart::CartesianAxis Class Reference 265

6.17 KDChart::CartesianAxis Class Reference

#include <KDChartCartesianAxis.h >

Inheritance diagram for KDChart::CartesianAxis:Collaboration diagram for KDChart::CartesianAxis:

6.17.1 Detailed Description

The class for cartesian axes.

For being useful, axes need to be assigned to a diagram, seeAbstractCartesianDiagram::addAxisandAbstractCartesianDiagram::takeAxis.

See also:PolarAxis,AbstractCartesianDiagram

Definition at line 48 of file KDChartCartesianAxis.h.

Public Types

• enumPosition{

Bottom,

Top,

Right,

Left }

Public Member Functions

• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• CartesianAxis(AbstractCartesianDiagram∗diagram=0)

C’tor of the class for cartesian axes.

• virtual voidconnectSignals()

Wireing the signal/slot connections.

• constAbstractCoordinatePlane∗ coordinatePlane() const

Convenience function, returns the coordinate plane, in which this axis is used.

• void createObserver(AbstractDiagram∗diagram)• void deleteObserver(AbstractDiagram∗diagram)• constAbstractDiagram∗ diagram() const• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

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

266 KD Chart 2 Class Documentation

• boolhasDefaultTitleTextAttributes() const• virtual boolisAbscissa() const• virtual boolisEmpty() const

pure virtual inQLayoutItem

• virtual boolisOrdinate() const• QStringListlabels() const

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

• virtual void layoutPlanes()• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

• boolobservedBy(AbstractDiagram∗diagram) const• virtual voidpaint(QPainter∗)

reimpl

• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗)

reimpl

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• virtual constPositionposition() const• void removeFromParentLayout()• void resetTitleTextAttributes()

Reset the title text attributes to the built-in default:.

• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setLabels(const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels.

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

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

6.17 KDChart::CartesianAxis Class Reference 267

• virtual voidsetPosition(Positionp)

• void setShortLabels(const QStringList &list)

Use this to specify your own set of strings, to be used as axis labels, in case the normal labels are too long.

• void setTextAttributes(constTextAttributes&a)

Use this to specify the text attributes to be used for axis labels.

• void setTitleText(const QString &text)

• void setTitleTextAttributes(constTextAttributes&a)

• QStringListshortLabels() const

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

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• TextAttributestextAttributes() const

Returns the text attributes to be used for axis labels.

• int tickLength(bool subUnitTicks=false) const

• QStringtitleText () const

• TextAttributestitleTextAttributes() const

Returns the text attributes that will be used for displaying the title text.

• ∼CartesianAxis()

Public Attributes

• publicQ_SLOTS: void update()

• protectedQ_SLOTS: virtual void delayedInit()

Protected Member Functions

• virtual QRectareaGeometry() const

• QRectinnerRect() const

• virtual voidpositionHasChanged()

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

268 KD Chart 2 Class Documentation

6.17.2 Member Enumeration Documentation

6.17.2.1 enumKDChart::CartesianAxis::Position

Enumeration values:BottomTopRightLeft

Definition at line 56 of file KDChartCartesianAxis.h.

56 {57 Bottom,58 Top,59 Right,60 Left61 };

6.17.3 Constructor & Destructor Documentation

6.17.3.1 CartesianAxis::CartesianAxis (AbstractCartesianDiagram ∗ diagram= 0) [explicit]

C’tor of the class for cartesian axes.

Note:If using a zero parent for the constructor, you need to call your diagram’s addAxis function to addyour axis to the diagram. Otherwise, there is no need to call addAxis, since the constructor does thatautomatically for you, if you pass a diagram as parameter.

See also:AbstractCartesianDiagram::addAxis

Definition at line 49 of file KDChartCartesianAxis.cpp.

50 : AbstractAxis ( new Private( diagram, this ), diagram )51 {52 init();53 }

6.17.3.2 CartesianAxis::∼CartesianAxis ()

Definition at line 55 of file KDChartCartesianAxis.cpp.

References d, and KDChart::AbstractCartesianDiagram::takeAxis().

56 {57 // when we remove the first axis it will unregister itself and58 // propagate the next one to the primary, thus the while loop59 while ( d->mDiagram ) {60 AbstractCartesianDiagram *cd = qobject_cast<AbstractCartesianDiagram*>( d->mDiagram );61 cd->takeAxis( this );62 }63 Q_FOREACH( AbstractDiagram *diagram, d->secondaryDiagrams ) {64 AbstractCartesianDiagram *cd = qobject_cast<AbstractCartesianDiagram*>( diagram );65 cd->takeAxis( this );66 }67 }

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

6.17 KDChart::CartesianAxis Class Reference 269

6.17.4 Member Function Documentation

6.17.4.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

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

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartAbstractArea.cpp.

Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), KDChart::PolarCoordinate-Plane::layoutDiagrams(), paint(), KDChart::AbstractArea::paintAll(), and paintCtx().

106 {107 return geometry();108 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.17.4.4 void AbstractAxis::connectSignals () [virtual, inherited]

Wireing the signal/slot connections.

This method gets called automatically, each time, when you assign the axis to a diagram, either by passinga diagram∗ to the c’tor, or by calling the diagram’s setAxis method, resp.

If overwriting this method in derived classes, make sure to call this base methodAbstractAxis::connect-Signals(), so your axis gets connected to the diagram’s built-in signals.

See also:AbstractCartesianDiagram::addAxis()

Definition at line 192 of file KDChartAbstractAxis.cpp.

References d.

Referenced by KDChart::AbstractAxis::createObserver().

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

270 KD Chart 2 Class Documentation

193 {194 if( d->observer ){195 connect( d->observer, SIGNAL( diagramDataChanged( AbstractDiagram *) ),196 this, SLOT( update() ) );197 }198 }

6.17.4.5 constAbstractCoordinatePlane∗ AbstractAxis::coordinatePlane () const[inherited]

Convenience function, returns the coordinate plane, in which this axis is used.

If the axis is not used in a coordinate plane, the return value is Zero.

Definition at line 293 of file KDChartAbstractAxis.cpp.

References d.

294 {295 if( d->diagram() )296 return d->diagram()->coordinatePlane();297 return 0;298 }

6.17.4.6 void AbstractAxis::createObserver (AbstractDiagram ∗ diagram) [inherited]

Definition at line 158 of file KDChartAbstractAxis.cpp.

References KDChart::AbstractAxis::connectSignals(), and d.

Referenced by KDChart::AbstractCartesianDiagram::addAxis().

159 {160 if( d->setDiagram( diagram, this ) )161 connectSignals();162 }

6.17.4.7 void AbstractAxis::deleteObserver (AbstractDiagram ∗ diagram) [inherited]

Definition at line 174 of file KDChartAbstractAxis.cpp.

References d.

Referenced by KDChart::AbstractCartesianDiagram::takeAxis(), and KDChart::AbstractCartesian-Diagram::∼AbstractCartesianDiagram().

175 {176 d->unsetDiagram( diagram, this );177 }

6.17.4.8 constAbstractDiagram ∗ KDChart::AbstractAxis::diagram () const [inherited]

Definition at line 300 of file KDChartAbstractAxis.cpp.

References d.

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

6.17 KDChart::CartesianAxis Class Reference 271

301 {302 return d->diagram();303 }

6.17.4.9 Qt::Orientations CartesianAxis::expandingDirections () const [virtual]

pure virtual inQLayoutItem

Definition at line 689 of file KDChartCartesianAxis.cpp.

References Bottom, Left, position(), Right, and Top.

690 {691 Qt::Orientations ret;692 switch ( position() )693 {694 case Bottom:695 case Top:696 ret = Qt::Horizontal;697 break;698 case Left:699 case Right:700 ret = Qt::Vertical;701 break;702 default:703 Q_ASSERT( false ); // all positions need to be handeld704 break;705 };706 return ret;707 }

6.17.4.10 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.17.4.11 QRect CartesianAxis::geometry () const[virtual]

pure virtual inQLayoutItem

ImplementsKDChart::AbstractAxis.

Definition at line 827 of file KDChartCartesianAxis.cpp.

References d.

828 {829 return d->geometry;830 }

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

272 KD Chart 2 Class Documentation

6.17.4.12 bool CartesianAxis::hasDefaultTitleTextAttributes () const

Definition at line 111 of file KDChartCartesianAxis.cpp.

References d.

Referenced by titleTextAttributes().

112 {113 return d->useDefaultTextAttributes;114 }

6.17.4.13 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(), andKDChart::AbstractArea::paintAll().

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

6.17.4.14 bool CartesianAxis::isAbscissa () const[virtual]

Definition at line 139 of file KDChartCartesianAxis.cpp.

References Bottom, position(), and Top.

Referenced by paintCtx(), and tickLength().

140 {141 return position() == Bottom || position() == Top;142 }

6.17.4.15 bool CartesianAxis::isEmpty () const [virtual]

pure virtual inQLayoutItem

Definition at line 684 of file KDChartCartesianAxis.cpp.

685 {686 return false; // if the axis exists, it has some (perhaps default) content687 }

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

6.17 KDChart::CartesianAxis Class Reference 273

6.17.4.16 bool CartesianAxis::isOrdinate () const [virtual]

Definition at line 144 of file KDChartCartesianAxis.cpp.

References Left, position(), and Right.

Referenced by paintCtx().

145 {146 return position() == Left || position() == Right;147 }

6.17.4.17 QStringList AbstractAxis::labels () const [inherited]

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

See also:setLabels

Definition at line 254 of file KDChartAbstractAxis.cpp.

References d.

Referenced by maximumSize(), and paintCtx().

255 {256 return d->hardLabels;257 }

6.17.4.18 void CartesianAxis::layoutPlanes () [virtual]

Definition at line 127 of file KDChartCartesianAxis.cpp.

References d, and KDChart::AbstractCoordinatePlane::layoutPlanes().

Referenced by resetTitleTextAttributes(), setPosition(), setTitleText(), and setTitleTextAttributes().

128 {129 //qDebug() << "CartesianAxis::layoutPlanes()";130 if( ! d->diagram() || ! d->diagram()->coordinatePlane() ) return;131 //qDebug() << "CartesianAxis::layoutPlanes(): Sorry, found no plane.";132 AbstractCoordinatePlane* plane = d->diagram()->coordinatePlane();133 if( plane ){134 plane->layoutPlanes();135 //qDebug() << "CartesianAxis::layoutPlanes() OK";136 }137 }

6.17.4.19 QSize CartesianAxis::maximumSize () const[virtual]

pure virtual inQLayoutItem

Definition at line 709 of file KDChartCartesianAxis.cpp.

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

274 KD Chart 2 Class Documentation

References Bottom, d, KDChart::AbstractCoordinatePlane::gridDimensionsList(), KDChart::Text-Attributes::isVisible(), KDChart::AbstractAxis::labels(), Left, KDChart::AbstractCoordinate-Plane::parent(), position(), KDChart::TextLayoutItem::realFont(), Right, KDChart::TextLayoutItem::set-Text(), KDChart::TextLayoutItem::sizeHint(), KDChart::AbstractAxis::textAttributes(), tickLength(),titleText(), titleTextAttributes(), and Top.

Referenced by minimumSize(), and sizeHint().

710 {711 QSize result;712 if ( !d->diagram() )713 return result;714715 const TextAttributes labelTA = textAttributes();716 const bool drawLabels = labelTA.isVisible();717718 const TextAttributes titleTA( titleTextAttributes() );719 const bool drawTitle = titleTA.isVisible() && ! titleText().isEmpty();720721 AbstractCoordinatePlane* plane = d->diagram()->coordinatePlane();722 QObject* refArea = plane->parent();723 TextLayoutItem labelItem( QString::null, labelTA, refArea,724 KDChartEnums::MeasureOrientationMinimum, Qt::AlignLeft );725 TextLayoutItem titleItem( titleText(), titleTA, refArea,726 KDChartEnums::MeasureOrientationMinimum, Qt::AlignHCenter | Qt::AlignVCenter );727 const qreal labelGap =728 drawLabels729 ? (QFontMetricsF( labelItem.realFont() ).height() / 3.0)730 : 0.0;731 const qreal titleGap =732 drawTitle733 ? (QFontMetricsF( titleItem.realFont() ).height() / 3.0)734 : 0.0;735736 switch ( position() )737 {738 case Bottom:739 case Top: {740 qreal h = 0;741 if( drawLabels ){742 // if there’re no label strings, we take the biggest needed number as height743 if ( ! labels().count() )744 {745 labelItem.setText( QString::number( plane->gridDimensionsList().first().end, ’f’, 0 ) );746 h = labelItem.sizeHint().height();747 }else{748 // find the longest label text:749 for ( int i = 0; i < labels().count(); ++i )750 {751 labelItem.setText( labels()[ i ] );752 qreal lh = labelItem.sizeHint().height();753 h = qMax( h, lh );754 }755 }756 // we leave a little gap between axis labels and bottom (or top, resp.) side of axis757 h += labelGap;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 title762 h += titleItem.sizeHint().height() + titleGap;763 }764 // space for the ticks765 h += qAbs( tickLength() ) * 3.0;766 result = QSize ( 10, static_cast<int>( h ) );767 }

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

6.17 KDChart::CartesianAxis Class Reference 275

768 break;769 case Left:770 case Right: {771 qreal w = 0;772 if( drawLabels ){773 // if there’re no label strings, we take the biggest needed number as width774 if ( labels().count() == 0 )775 {776 labelItem.setText( QString::number( plane->gridDimensionsList().last().end, ’f’, 0 ) );777 w = labelItem.sizeHint().width();778 }else{779 // find the longest label text:780 for ( int i = 0; i < labels().count(); ++i )781 {782 labelItem.setText( labels()[ i ] );783 qreal lw = labelItem.sizeHint().width();784 w = qMax( w, lw );785 }786 }787 // we leave a little gap between axis labels and left (or right, resp.) side of axis788 w += labelGap;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 title793 w += titleItem.sizeHint().height() + titleGap;794 }795 // space for the ticks796 w += qAbs( tickLength() ) * 3.0;797798 result = QSize ( static_cast<int>( w ), 10 );799 // qDebug() << "left/right axis width:" << result << " w:" << w;800 }801 break;802 default:803 Q_ASSERT( false ); // all positions need to be handled804 break;805 };806 //qDebug() << "*******************" << result;807 return result;808 }

6.17.4.20 QSize CartesianAxis::minimumSize () const[virtual]

pure virtual inQLayoutItem

Definition at line 810 of file KDChartCartesianAxis.cpp.

References maximumSize().

811 {812 return maximumSize();813 }

6.17.4.21 bool KDChart::AbstractAxis::observedBy (AbstractDiagram ∗ diagram) const[inherited]

Definition at line 305 of file KDChartAbstractAxis.cpp.

References d.

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

276 KD Chart 2 Class Documentation

306 {307 return d->hasDiagram( diagram );308 }

6.17.4.22 void CartesianAxis::paint (QPainter∗) [virtual]

reimpl

ImplementsKDChart::AbstractLayoutItem.

Definition at line 168 of file KDChartCartesianAxis.cpp.

References KDChart::AbstractArea::areaGeometry(), d, paintCtx(), KDChart::PaintContext::set-CoordinatePlane(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

169 {170 //qDebug() << "KDChart::CartesianAxis::paint() called";171 if( ! d->diagram() || ! d->diagram()->coordinatePlane() ) return;172 PaintContext ctx;173 ctx.setPainter ( painter );174 ctx.setCoordinatePlane( d->diagram()->coordinatePlane() );175 const QRect rect( areaGeometry() );176177 //qDebug() << "CartesianAxis::paint( QPainter* painter ) " << " areaGeometry()():" << rect << " sizeHint():" << sizeHint();178179 ctx.setRectangle(180 QRectF (181 //QPointF(0, 0),182 QPointF(rect.left(), rect.top()),183 QSizeF(rect.width(), rect.height() ) ) );184 // enabling clipping so that we’re not drawing outside185 QRegion clipRegion( rect.adjusted( -1, -1, 1, 1 ) );186 painter->setClipRegion( clipRegion );187 paintCtx( &ctx );188 painter->setClipping( false );189 //qDebug() << "KDChart::CartesianAxis::paint() done.";190 }

6.17.4.23 void AbstractArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractAreaBase::innerRect(),KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::Chart::paint(), and KDChart::AbstractArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );

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

6.17 KDChart::CartesianAxis Class Reference 277

93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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:

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

278 KD Chart 2 Class Documentation

146 ; // Cannot happen, previously checked147 }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 attributes155 }

6.17.4.25 void CartesianAxis::paintCtx (PaintContext ∗) [virtual]

reimpl

Reimplemented fromKDChart::AbstractLayoutItem.

Definition at line 193 of file KDChartCartesianAxis.cpp.

References KDChart::AbstractArea::areaGeometry(), Bottom, KDChart::DataDimension::calcMode,KDChart::PaintContext::coordinatePlane(), d, KDChart::DataDimensionsList, KDChart::Data-Dimension::distance(), KDChart::DataDimension::end, KDChart::TextLayoutItem::geometry(),KDChart::AbstractCoordinatePlane::gridDimensionsList(), KDChart::TextLayoutItem::intersects(),isAbscissa(), KDChart::DataDimension::isCalculated, isOrdinate(), KDChart::TextAttributes::isVisible(),KDChart::AbstractAxis::labels(), Left, KDChart::TextLayoutItem::paint(), KDChart::AbstractCoordinate-Plane::parent(), position(), ptr, KDChart::TextLayoutItem::realFont(), Right, KDChart::TextLayout-Item::setGeometry(), KDChart::TextLayoutItem::setText(), KDChart::AbstractAxis::shortLabels(),KDChart::TextLayoutItem::sizeHint(), KDChart::DataDimension::start, KDChart::DataDimension::step-Width, KDChart::DataDimension::subStepWidth, KDChart::TextLayoutItem::text(), KDChart::Abstract-Axis::textAttributes(), tickLength(), titleText(), titleTextAttributes(), Top, and KDChart::Cartesian-CoordinatePlane::translate().

Referenced by paint().

194 {195 //qDebug() << "KDChart::CartesianAxis::paintCtx() called";196197 Q_ASSERT_X ( d->diagram(), "CartesianAxis::paint",198 "Function call not allowed: The axis is not assigned to any diagram." );199200 CartesianCoordinatePlane* plane = dynamic_cast<CartesianCoordinatePlane*>(context->coordinatePlane());201 Q_ASSERT_X ( plane, "CartesianAxis::paint",202 "Bad function call: PaintContext::coodinatePlane() NOT a cartesian plane." );203204 const int MinimumPixelsBetweenRulers = 5;205 DataDimensionsList dimensions( plane->gridDimensionsList() );206 // test for programming errors: critical207 Q_ASSERT_X ( dimensions.count() == 2, "CartesianAxis::paint",208 "Error: plane->gridDimensionsList() did not return exactly two dimensions." );209 DataDimension& dimX = dimensions.first();210 const DataDimension& dimY = dimensions.last();211 const DataDimension& dim = (isAbscissa() ? dimensions.first() : dimensions.last());212 // if(isAbscissa())213 // qDebug() << " " << "Abscissa:" << dimX.start <<".."<<dimX.end;214 // else215 // qDebug() << " " << "Ordinate:" << dimY.start <<".."<<dimY.end;216217 // preparations:218 // - calculate the range that will be displayed:219 const qreal absRange = qAbs( dim.distance() );220221 // Fixme Michel: Need to find the type of chart here - Line or Bar

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

6.17 KDChart::CartesianAxis Class Reference 279

222 // if Bars calculate the number of groups223224 qreal numberOfUnitRulers;225 if ( isAbscissa() )226 numberOfUnitRulers = d->diagram()->model()->rowCount() - 1.0;227 else {228 numberOfUnitRulers = absRange / qAbs( dimY.stepWidth ) + 1.0;229 //qDebug() << "absRange" << absRange << "dimY.stepWidth:" << dimY.stepWidth << "numberOfUnitRulers:" << numberOfUnitRulers;230 }231 qreal numberOfSubUnitRulers;232 if ( isAbscissa() )233 numberOfSubUnitRulers = 0.0;234 else {235 numberOfSubUnitRulers = absRange / qAbs( dimY.subStepWidth ) + 1.0;236 //qDebug() << "dimY.subStepWidth:" << dimY.stepWidth << "numberOfSubUnitRulers:" << numberOfSubUnitRulers;237 }238239 // - calculate the absolute range in screen pixels:240 const QPointF p1 = plane->translate( QPointF(dimX.start, dimY.start) );241 const QPointF p2 = plane->translate( QPointF(dimX.end, dimY.end) );242243 double screenRange;244 if ( isAbscissa() )245 {246 screenRange = qAbs ( p1.x() - p2.x() );247 } else {248 screenRange = qAbs ( p1.y() - p2.y() );249 }250251 const bool useItemCountLabels = isAbscissa() && d->diagram()->datasetDimension() == 1;252253254255256 //FIXME(khz): Remove this code, and do the calculation in the grid calc function257 if( isAbscissa() && ! dimX.isCalculated ){258 dimX.stepWidth = 1.0;259 while( screenRange / numberOfUnitRulers <= MinimumPixelsBetweenRulers ){260 dimX.stepWidth *= 10.0;261 //qDebug() << "adjusting dimX.stepWidth to" << dimX.stepWidth;262 numberOfUnitRulers = qAbs( dimX.distance() / dimX.stepWidth );263 }264 }265266 const bool drawUnitRulers = screenRange / numberOfUnitRulers > MinimumPixelsBetweenRulers;267 const bool drawSubUnitRulers =268 (numberOfSubUnitRulers != 0.0) &&269 (screenRange / numberOfSubUnitRulers > MinimumPixelsBetweenRulers);270271 const TextAttributes labelTA = textAttributes();272 const bool drawLabels = labelTA.isVisible();273274 // - find the reference point at which to start drawing and the increment (line distance);275 QPointF rulerRef;276 QRect geoRect( areaGeometry() );277 QRectF rulerRect;278 double rulerWidth;279 double rulerHeight;280281 //for debugging: if( isAbscissa() )ptr->drawRect(geoRect.adjusted(0,0,-1,-1));282 //qDebug() << " " << (isAbscissa() ? "Abscissa":"Ordinate") << "axis painting with geometry" << geoRect;283284 // FIXME references are of course different for all locations:285 rulerWidth = geoRect.width();286 rulerHeight = geoRect.height();287 switch( position() )288 {

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

280 KD Chart 2 Class Documentation

289 case Top:290 rulerRef.setX( geoRect.topLeft().x() );291 rulerRef.setY( geoRect.topLeft().y() + rulerHeight );292 break;293 case Bottom:294 rulerRef.setX( geoRect.bottomLeft().x() );295 rulerRef.setY( geoRect.bottomLeft().y() - rulerHeight );296 break;297 case Right:298 rulerRef.setX( geoRect.bottomRight().x() - rulerWidth );299 rulerRef.setY( geoRect.bottomRight().y() );300 break;301 case Left:302 rulerRef.setX( geoRect.bottomLeft().x() + rulerWidth );303 rulerRef.setY( geoRect.bottomLeft().y() );304 break;305 }306307 // set up the lines to paint:308309 // set up a map of integer positions,310311 // - starting with the fourth312 // - the the halfs313 // - then the tens314 // this will override all halfs and fourth that hit a higher-order ruler315 // MAKE SURE TO START AT (0, 0)!316317 // set up a reference point, a step vector and a unit vector for the drawing:318319 const qreal minValueY = dimY.start;320 const qreal maxValueY = dimY.end;321 const qreal minValueX = dimX.start;322 const qreal maxValueX = dimX.end;323 const bool isLogarithmicX = (dimX.calcMode == AbstractCoordinatePlane::Logarithmic );324 const bool isLogarithmicY = (dimY.calcMode == AbstractCoordinatePlane::Logarithmic );325 //#define AXES_PAINTING_DEBUG 1326 #ifdef AXES_PAINTING_DEBUG327 qDebug() << "CartesianAxis::paint: reference values:" << endl328 << "-- range x/y: " << dimX.distance() << "/" << dimY.distance() << endl329 << "-- absRange: " << absRange << endl330 << "-- numberOfUnitRulers: " << numberOfUnitRulers << endl331 << "-- screenRange: " << screenRange << endl332 << "-- drawUnitRulers: " << drawUnitRulers << endl333 << "-- drawLabels: " << drawLabels << endl334 << "-- ruler reference point:: " << rulerRef << endl335 << "-- minValueX: " << minValueX << " maxValueX: " << maxValueX << endl336 << "-- minValueY: " << minValueY << " maxValueY: " << maxValueY << endl337 ;338 #endif339340 ptr->setPen ( Qt::black );341 // Commenting this it causes the frame backround to be painted in red342 // for some reason and does not look to make sense.343 //ptr->setBrush ( Qt::red ); // PENDING(michel) What is this for?344 QPointF fourthRulerRef ( rulerRef );345346 const QObject* referenceArea = plane->parent();347348 // that QVector contains all drawn x-ticks (so no subticks are drawn there also)349 QVector< int > drawnXTicks;350 // and that does the same for the y-ticks351 QVector< int > drawnYTicks;352353 // this draws the unit rulers354 if ( drawUnitRulers ) {355 const int hardLabelsCount = labels().count();

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

6.17 KDChart::CartesianAxis Class Reference 281

356 const int shortLabelsCount = shortLabels().count();357 bool useShortLabels = false;358359 QStringList headerLabels;360 if( useItemCountLabels ){361 headerLabels =362 isOrdinate()363 ? d->diagram()->datasetLabels()364 : d->diagram()->itemRowLabels();365 }366 const int headerLabelsCount = headerLabels.count();367368 TextLayoutItem* labelItem =369 drawLabels370 ? new TextLayoutItem( QString::number( minValueY ),371 labelTA,372 referenceArea,373 KDChartEnums::MeasureOrientationMinimum,374 Qt::AlignLeft )375 : 0;376 TextLayoutItem* labelItem2 =377 drawLabels378 ? new TextLayoutItem( QString::number( minValueY ),379 labelTA,380 referenceArea,381 KDChartEnums::MeasureOrientationMinimum,382 Qt::AlignLeft )383 : 0;384 const QFontMetricsF met(385 drawLabels386 ? labelItem->realFont()387 : QFontMetricsF( QApplication::font() ) );388 const qreal halfFontHeight = met.height() * 0.5;389390 if ( isAbscissa() ) {391 // If we have a labels list AND a short labels list, we first find out,392 // if there is enough space for the labels: if not, use the short labels.393 if( drawLabels && hardLabelsCount > 0 && shortLabelsCount > 0 ){394 bool labelsAreOverlapping = false;395 int iLabel = 0;396 qreal i = minValueX;397 while ( i < maxValueX && !labelsAreOverlapping )398 {399 if ( dimX.stepWidth != 1.0 && ! dim.isCalculated )400 {401 labelItem->setText( QString::number( i, ’f’, 0 ) );402 labelItem2->setText( QString::number( i + dimX.stepWidth, ’f’, 0 ) );403 } else {404 labelItem->setText( labels()[ iLabel ] );405 labelItem->setText( labels()[ iLabel + 1 >= hardLabelsCount ? 0 : iLabel + 1 ] );406 }407 QPointF firstPos( i, 0.0 );408 firstPos = plane->translate( firstPos );409410 QPointF secondPos( i + dimX.stepWidth, 0.0 );411 secondPos = plane->translate( secondPos );412413 labelsAreOverlapping = labelItem->intersects( *labelItem2, firstPos, secondPos );414415 if ( iLabel++ > hardLabelsCount - 1 )416 iLabel = 0;417 if ( isLogarithmicX )418 i *= 10.0;419 else420 i += dimX.stepWidth;421 }422

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

282 KD Chart 2 Class Documentation

423 useShortLabels = labelsAreOverlapping;424 }425426 labelItem2->setText( QString::null );427 QPoint oldItemPos;428 int idxLabel = 0;429 qreal iLabelF = minValueX;430 qreal i = minValueX;431 while ( i < maxValueX ) {432 QPointF topPoint ( i + ( useItemCountLabels ? 0.5 : 0.0 ), 0.0 );433 QPointF bottomPoint ( topPoint );434 topPoint = plane->translate( topPoint );435 bottomPoint = plane->translate( bottomPoint );436 topPoint.setY( fourthRulerRef.y() + tickLength() );437 bottomPoint.setY( fourthRulerRef.y() );438 ptr->drawLine( topPoint, bottomPoint );439 drawnXTicks.append( static_cast<int>( topPoint.x() ) );440 if ( drawLabels ) {441 if ( isLogarithmicX )442 labelItem->setText( QString::number(i, ’f’, 0) );443 else if( (dimX.stepWidth != 1.0) && ! dimX.isCalculated )444 labelItem->setText( QString::number(i, ’f’, 0) );445 else446 labelItem->setText( hardLabelsCount447 ? ( useShortLabels ? shortLabels()[ idxLabel ] : labels()[ idxLabel ] )448 : ( headerLabelsCount ? headerLabels[ idxLabel ] : QString::number( iLabelF ) ) );449 // No need to call labelItem->setParentWidget(), since we are using450 // the layout item temporarily only.451 const QSize size( labelItem->sizeHint() );452 labelItem->setGeometry(453 QRect(454 QPoint(455 static_cast<int>( topPoint.x() - size.width() / 2 ),456 static_cast<int>( topPoint.y() +457 ( position() == Bottom458 ? halfFontHeight459 : ((halfFontHeight + size.height()) * -1.0) ) ) ),460 size ) );461462 if ( ! labelItem2->intersects( *labelItem, oldItemPos, labelItem->geometry().topLeft() ) )463 {464 labelItem->paint( ptr );465466 labelItem2->setText( labelItem->text() );467 oldItemPos = labelItem->geometry().topLeft();468 }469470 if( hardLabelsCount ){471 if( idxLabel >= hardLabelsCount -1 )472 idxLabel = 0;473 else474 ++idxLabel;475 }else if( headerLabelsCount ){476 if( idxLabel >= headerLabelsCount-1 )477 idxLabel = 0;478 else479 ++idxLabel;480 }else{481 iLabelF += dimX.stepWidth;482 }483 }484 if ( isLogarithmicX )485 i *= 10.0;486 else487 i += dimX.stepWidth;488 }489 } else {

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

6.17 KDChart::CartesianAxis Class Reference 283

490 const double maxLimit = maxValueY;491 const double steg = dimY.stepWidth;492 int maxLabelsWidth = 0;493 qreal labelValue;494 if( drawLabels && position() == Right ){495 // Find the wides label, so we to know how much we need to right-shift496 // our labels, to get them drawn right aligned:497 labelValue = minValueY;498 qreal f = minValueY;499 while ( f <= maxLimit ) {500 labelItem->setText( QString::number( labelValue ) );501 maxLabelsWidth = qMax( maxLabelsWidth, labelItem->sizeHint().width() );502 if ( isLogarithmicY )503 labelValue *= 10.0;504 else505 labelValue += dimY.stepWidth;506 if ( isLogarithmicY )507 f *= 10.0;508 else509 f += steg;510 }511 }512 labelValue = minValueY;513 //qDebug("minValueY: %f maxLimit: %f steg: %f", minValueY, maxLimit, steg);514 qreal f = minValueY;515 while ( f <= maxLimit ) {516 //qDebug("f: %f",f);517 QPointF leftPoint ( 0.0, f );518 QPointF rightPoint ( 0.0, f );519 leftPoint = plane->translate( leftPoint );520 rightPoint = plane->translate( rightPoint );521 leftPoint.setX( fourthRulerRef.x() + tickLength() );522 rightPoint.setX( fourthRulerRef.x() );523 ptr->drawLine( leftPoint, rightPoint );524 drawnYTicks.append( static_cast<int>( leftPoint.y() ) );525 if ( drawLabels ) {526 labelItem->setText( QString::number( labelValue ) );527 // No need to call labelItem->setParentWidget(), since we are using528 // the layout item temporarily only.529 const QSize labelSize( labelItem->sizeHint() );530 leftPoint.setX( leftPoint.x()531 );532 const int x =533 static_cast<int>( leftPoint.x() + met.height() * ( position() == Left ? -0.5 : 0.5) )534 - ( position() == Left ? labelSize.width() : (labelSize.width() - maxLabelsWidth) );535 int y;536 if( f == minValueY ){537 // first label of the ordinate?538 // shift it up a bit, to prevent it from being clipped away539 y = static_cast<int>( leftPoint.y() - met.ascent() * 0.7 );540 } else if( f + steg > maxLimit ){541 // last label of the ordinate?542 // shift it down a bit, to prevent it from being clipped away543 y = static_cast<int>( leftPoint.y() - met.ascent() * 0.1 );544 } else{545 y = static_cast<int>( leftPoint.y() - met.ascent() * 0.5 );546 }547 --y;548549 labelItem->setGeometry( QRect( QPoint(x, y), labelSize ) );550 //ptr->drawRect(labelItem->geometry().adjusted(0,0,-1,-1));551 labelItem->paint( ptr );552553 if ( isLogarithmicY )554 labelValue *= 10.0;555 else556 labelValue += dimY.stepWidth;

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

284 KD Chart 2 Class Documentation

557 }558 if ( isLogarithmicY )559 f *= 10.0;560 else561 f += steg;562 }563 }564 if( labelItem )565 delete labelItem;566 if( labelItem2 )567 delete labelItem2;568 }569570 // this draws the subunit rulers571 if ( drawSubUnitRulers ) {572 // for the x-axis573 if ( isAbscissa() ) {574 int nextMayBeTick = 0;575 int mayBeTick = 0;576 float f = minValueX;577 qreal fLogSubstep = minValueX;578 int logSubstep = 0;579 while ( f <= maxValueX ) {580 QPointF topPoint ( f, 0 );581 QPointF bottomPoint ( f, 0 );582 // we don’t draw the sub ticks, if we are at the same position as a normal tick583 topPoint = plane->translate( topPoint );584 bottomPoint = plane->translate( bottomPoint );585 topPoint.setY( fourthRulerRef.y() + tickLength( true ) );586 bottomPoint.setY( fourthRulerRef.y() );587 if( drawnXTicks.count() > nextMayBeTick )588 mayBeTick = drawnXTicks[ nextMayBeTick ];589 if( qAbs( mayBeTick - topPoint.x() ) > 1 )590 ptr->drawLine( topPoint, bottomPoint );591 else592 ++nextMayBeTick;593 if ( isLogarithmicX ){594 if( logSubstep == 9 ){595 fLogSubstep *= 10.0;596 logSubstep = 0;597 }598 f += fLogSubstep;599 ++logSubstep;600 }else{601 f += dimX.subStepWidth;602 }603 }604 // for the y-axis605 } else {606 int nextMayBeTick = 0;607 int mayBeTick = 0;608 float f = minValueY;609 qreal fLogSubstep = minValueY;610 int logSubstep = 0;611 while ( f <= maxValueY ) {612 QPointF leftPoint ( 0, f );613 QPointF rightPoint ( 0, f );614 // we don’t draw the sub ticks, if we are at the same position as a normal tick615 leftPoint = plane->translate( leftPoint );616 rightPoint = plane->translate( rightPoint );617 leftPoint.setX( fourthRulerRef.x() + tickLength( true ) );618 rightPoint.setX( fourthRulerRef.x() );619 if( drawnYTicks.count() > nextMayBeTick )620 mayBeTick = drawnYTicks[ nextMayBeTick ];621 if( qAbs( mayBeTick - leftPoint.y() ) > 1 )622 ptr->drawLine( leftPoint, rightPoint );623 else

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

6.17 KDChart::CartesianAxis Class Reference 285

624 ++nextMayBeTick;625 if ( isLogarithmicY ){626 if( logSubstep == 9 ){627 fLogSubstep *= 10.0;628 logSubstep = 0;629 }630 f += fLogSubstep;631 ++logSubstep;632 }else{633 f += dimY.subStepWidth;634 }635 }636 }637 }638639640 if( ! titleText().isEmpty() ){641 const TextAttributes titleTA( titleTextAttributes() );642 if( titleTA.isVisible() ){643 TextLayoutItem titleItem( titleText(),644 titleTA,645 referenceArea,646 KDChartEnums::MeasureOrientationMinimum,647 Qt::AlignHCenter|Qt::AlignVCenter );648 QPointF point;649 const QSize size( titleItem.sizeHint() );650 switch( position() )651 {652 case Top:653 point.setX( geoRect.left() + geoRect.width() / 2.0);654 point.setY( geoRect.top() );655 break;656 case Bottom:657 point.setX( geoRect.left() + geoRect.width() / 2.0);658 point.setY( geoRect.bottom() - size.height() );659 break;660 case Left:661 point.setX( geoRect.left() );662 point.setY( geoRect.top() + geoRect.height() / 2.0);663 break;664 case Right:665 point.setX( geoRect.right() - size.height() );666 point.setY( geoRect.top() + geoRect.height() / 2.0);667 break;668 }669 PainterSaver painterSaver( ptr );670 ptr->translate( point );671 if( isOrdinate() )672 ptr->rotate( 270.0 );673 titleItem.setGeometry( QRect( QPoint(-size.width() / 2, 0), size ) );674 //ptr->drawRect(titleItem.geometry().adjusted(0,0,-1,-1));675 titleItem.paint( ptr );676 }677 }678679 //qDebug() << "KDChart::CartesianAxis::paintCtx() done.";680 }

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

Definition at line 158 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

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

286 KD Chart 2 Class Documentation

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-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.17.4.28 constCartesianAxis::PositionCartesianAxis::position () const [virtual]

Definition at line 122 of file KDChartCartesianAxis.cpp.

References d.

Referenced by expandingDirections(), isAbscissa(), isOrdinate(), maximumSize(), paintCtx(), and tick-Length().

123 {124 return d->position;125 }

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

Reimplemented fromKDChart::AbstractAreaBase.

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

6.17 KDChart::CartesianAxis Class Reference 287

Definition at line 110 of file KDChartAbstractArea.cpp.

111 {112 emit positionChanged( this );113 }

6.17.4.30 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 else72 mParentLayout->removeItem( this );73 }74 }

6.17.4.31 void CartesianAxis::resetTitleTextAttributes ()

Reset the title text attributes to the built-in default:.

Same font and pen asAbstractAxis::textAttributes()and 1.5 times their size.

Definition at line 105 of file KDChartCartesianAxis.cpp.

References d, and layoutPlanes().

106 {107 d->useDefaultTextAttributes = true;108 layoutPlanes();109 }

6.17.4.32 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.17.4.33 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

288 KD Chart 2 Class Documentation

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

6.17.4.34 void CartesianAxis::setGeometry (const QRect &r) [virtual]

pure virtual inQLayoutItem

ImplementsKDChart::AbstractAxis.

Definition at line 820 of file KDChartCartesianAxis.cpp.

References d.

821 {822 // qDebug() << "KDChart::CartesianAxis::setGeometry(" << r << ") called"823 // << (isAbscissa() ? "for Abscissa":"for Ordinate") << "axis";824 d->geometry = r;825 }

6.17.4.35 void AbstractAxis::setLabels (const QStringList &list) [inherited]

Use this to specify your own set of strings, to be used as axis labels.

Labels specified via setLabels take precedence: If a non-empty list is passed, KDChartwill use thesestrings as axis labels, instead of calculating them.

If you a smaller number of strings than the number od labels drawn at this axis, KDChartwill iterate overthe list, repeating the strings, until all labels are drawn. As an example you could specify the seven days ofthe week as abscissa labels, which would be repeatedly used then.

By passing an empty QStringList you can reset the default behaviour.

See also:labels, setShortLabels

Definition at line 244 of file KDChartAbstractAxis.cpp.

References d.

245 {246 d->hardLabels = list;247 }

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

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

6.17 KDChart::CartesianAxis Class Reference 289

6.17.4.37 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 sizeof 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.17.4.38 void CartesianAxis::setPosition (Positionp) [virtual]

Definition at line 116 of file KDChartCartesianAxis.cpp.

References d, and layoutPlanes().

117 {118 d->position = p;119 layoutPlanes();120 }

6.17.4.39 void AbstractAxis::setShortLabels (const QStringList &list) [inherited]

Use this to specify your own set of strings, to be used as axis labels, in case the normal labels are too long.

Note:Setting done via setShortLabels will be ignored, 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.

See also:shortLabels, setLabels

Definition at line 270 of file KDChartAbstractAxis.cpp.

References d.

271 {272 d->hardShortLabels = list;273 }

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

290 KD Chart 2 Class Documentation

6.17.4.40 void AbstractAxis::setTextAttributes (constTextAttributes & 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’sparent widget, so normally, it will be theKDChart::Chart. Thus the labels of all of your axes in all of yourdiagrams within thatChartwill 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 (constTextAttributes & 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 inQLayoutItem

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 else81 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 (boolsubUnitTicks= 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;835836 if ( isAbscissa() ) {837 result = position() == Top ? -4 : 3;838 } else {839 result = position() == Left ? -4 : 3;840 }841842 if ( subUnitTicks )843 result = result < 0 ? result + 1 : result - 1;844845 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 (ifsetTitleTextAttributes()wasnot 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(), andKDChart::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_SIGNALSKDChart::AbstractArea::__pad0__ [protected, inherited]

Reimplemented inKDChart::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 publicKDChart::AbstractAxis::Q_SLOTS [inherited]

Definition at line 108 of file KDChartAbstractAxis.h.

6.17.5.5 protectedKDChart::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 forKDChart::CartesianCoordinatePlane:

Public Types

• enumAxesCalcMode{

Linear,

Logarithmic}

Public Member Functions

• void addDiagram(AbstractDiagram∗diagram)

Adds a diagram to this coordinate plane.

• void alignToReferencePoint(constRelativePosition&position)• AxesCalcModeaxesCalcModeX() const• AxesCalcModeaxesCalcModeY() const• BackgroundAttributesbackgroundAttributes() const• CartesianCoordinatePlane(Chart∗parent=0)• AbstractDiagram∗ diagram()• ConstAbstractDiagramListdiagrams() const• AbstractDiagramListdiagrams()• booldoesIsometricScaling()• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

• GridAttributesglobalGridAttributes() const• GridAttributesgridAttributes(Qt::Orientation orientation) const• DataDimensionsListgridDimensionsList()

Returns the dimensions used for drawing the grid lines.

• boolhasOwnGridAttributes(Qt::Orientation orientation) const• QPair< qreal, qreal> horizontalRange() const• virtual boolisEmpty() const

pure virtual inQLayoutItem

• void layoutPlanes()

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

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

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

6.18 KDChart::CartesianCoordinatePlane Class Reference 295

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSizeHint() 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 voidpaint(QPainter∗)reimpl

• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• constChart∗ 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: Thefirst 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(AxesCalcModemode)

Specifies the calculation modes for all axes.

• void setAxesCalcModeX(AxesCalcModemode)

Specifies the calculation mode for all Abscissa axes.

• void setAxesCalcModeY(AxesCalcModemode)

Specifies the calculation mode for all Ordinate axes.

• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setGlobalGridAttributes(constGridAttributes&)

Set the grid attributes to be used by this coordinate plane.

• void setGridAttributes(Qt::Orientation orientation, constGridAttributes&)

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 byKDChart::Chart.

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof 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 voidsetZoomCenter(QPointF center)

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

• virtual voidsetZoomFactorX(double factor)

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

• virtual voidsetZoomFactorY(double factor)

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

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

6.18 KDChart::CartesianCoordinatePlane Class Reference 297

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• virtual QSizePolicysizePolicy() const

[reimplemented]

• virtual void takeDiagram(AbstractDiagram∗diagram)

Removes the diagram from the plane, without deleting it.

• const QPointFtranslate(const QPointF &diagramPoint) const

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

• QPair< qreal, qreal> verticalRange() const• virtual QPointFzoomCenter() const• virtual doublezoomFactorX() const• virtual doublezoomFactorY() const• ∼CartesianCoordinatePlane()

Public Attributes

• Q_SIGNALS__pad0__: void destroyedCoordinatePlane(AbstractCoordinatePlane∗ )

Protected Member Functions

• virtual QRectareaGeometry() const• virtual QRectFcalculateRawDataBoundingRect() const• virtual QRectFdrawingArea() const• virtual DataDimensionsListgetDataDimensionsList() const• QRectinnerRect() const• void layoutDiagrams()

Distribute the available space among the diagrams and axes.

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

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout• protectedQ_SLOTS: void slotLayoutChanged(AbstractDiagram∗ )

6.18.1 Member Enumeration Documentation

6.18.1.1 enumKDChart::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 intentionally69 }

6.18.2.2 CartesianCoordinatePlane::∼CartesianCoordinatePlane()

Definition at line 71 of file KDChartCartesianCoordinatePlane.cpp.

72 {73 // this bloc left empty intentionally74 }

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 fromKDChart::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* ) ) );9091 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 (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

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

ImplementsKDChart::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::AxesCalcModeCartesianCoordinatePlane::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::AxesCalcModeCartesianCoordinatePlane::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->dataBoundaries: " << dataBoundariesPair.first << dataBoundariesPair.second;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 }183184 // if custom boundaries are set on the plane, use them185 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 }193194 QRectF dataBoundingRect;195 dataBoundingRect.setBottomLeft ( smallestPoint );196 dataBoundingRect.setTopRight ( largestPoint );197 //qDebug() << "CartesianCoordinatePlane::calculateRawDataBoundingRect() returns" << dataBoundingRect;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_STL132 qCopy( d->diagrams.begin(), d->diagrams.end(), std::back_inserter( list ) );133 #else134 Q_FOREACH( AbstractDiagram * a, d->diagrams )135 list.push_back( a );136 #endif137 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 inQLayoutItem

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 inQLayoutItem

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 DataDimensionsListCartesianCoordinatePlane::getDataDimensionsList () const[protected, virtual]

ImplementsKDChart::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 {203204 DataDimensionsList l;205 const AbstractCartesianDiagram* dgr206 = diagrams().isEmpty() ? 0 : dynamic_cast<const AbstractCartesianDiagram*> (diagrams().first() );207208 if( dgr ){209 const QRectF r( calculateRawDataBoundingRect() );210 // note:211 // We do *not* access d->gridAttributesHorizontal here, but212 // we use the getter function, to get the global attrs, if no213 // 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 axes217 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 axes225 if( dgr->percentMode() )226 l.append(227 DataDimension(228 // always return 0-100 when in percentMode229 0.0, 100.0,230 true,231 axesCalcModeY(),232 KDChartEnums::GranularitySequence_10_20,233 10.0 ) );234 else235 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 grid245 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:setGlobalGridAttributesCartesianCoordinatePlane::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::Orientationorientation) 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 foethis orientation the global attributes are returned, as returned byAbstractCoordinatePlane::globalGrid-Attributes.

See also:setGridAttributesresetGridAttributesAbstractCoordinatePlane::globalGridAttributeshasOwnGridAttributes

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 else496 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 owntasks - 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 datawas changed.

Note:Returned list will contain different numbers ofDataDimension, depending on the kind of coordinateplane used. ForCartesianCoordinatePlanetwo DataDimensionare returned: the first representinggrid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (orOrdinate 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::Orientationorientation) 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 byAbstractCoordinatePlane::globalGridAttributes(or thedefault attributes, resp.)

See also:setGridAttributesresetGridAttributesAbstractCoordinatePlane::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 return516 ( orientation == Qt::Horizontal )517 ? d->hasOwnGridAttributesHorizontal518 : 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 bothvalues 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(), andKDChart::AbstractArea::paintAll().

176 {177 Q_ASSERT_X ( d != 0, "AbstractAreaBase::innerRect()",178 "Private class was not initialized!" );179180 const int padding181 = d->frameAttributes.isVisible()182 ? qMax( d->frameAttributes.padding(), 0 ) : 0;183 return184 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 inQLayoutItem

Definition at line 193 of file KDChartAbstractCoordinatePlane.cpp.

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

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

6.18 KDChart::CartesianCoordinatePlane Class Reference 307

6.18.3.24 void CartesianCoordinatePlane::layoutDiagrams () [protected, virtual]

Distribute the available space among the diagrams and axes.

ImplementsKDChart::AbstractCoordinatePlane.

Definition at line 256 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::DataDimensionsList, KDChart::AbstractCoordinatePlane::diagrams(),KDChart::DataDimension::distance(), drawingArea(), KDChart::DataDimension::end,KDChart::AbstractCoordinatePlane::gridDimensionsList(), and KDChart::DataDimension::start.

Referenced by setHorizontalRange(), setIsometricScaling(), and setVerticalRange().

257 {258 //qDebug("KDChart::CartesianCoordinatePlane::layoutDiagrams() called");259 if ( diagrams().isEmpty() )260 { // FIXME evaluate what can still be prepared261 // 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, and265 // respect the way QPainter calculates the width of a painted rect (the266 // size is the rectangle size plus the pen width). This way, most clipping267 // for regular pens should be avoided. When pens with a penWidth or larger268 // than 1 are used, this may not be sufficient.269 const QRectF drawArea( drawingArea() );270 //qDebug() << "drawingArea() returns" << drawArea;271272 const DataDimensionsList dimensions( gridDimensionsList() );273 // test for programming errors: critical274 Q_ASSERT_X ( dimensions.count() == 2, "CartesianCoordinatePlane::layoutDiagrams",275 "Error: gridDimensionsList() did not return exactly two dimensions." );276 const DataDimension dimX = dimensions.first();277 const DataDimension dimY = dimensions.last();278 const qreal distX = dimX.distance();279 const qreal distY = dimY.distance();280 const QPointF pt(qMin(dimX.start, dimX.end), qMax(dimY.start, dimY.end));281 const QSizeF siz( qAbs(distX), -qAbs(distY) );282 const QRectF dataBoundingRect( pt, siz );283284 // calculate the remaining rectangle, and use it as the diagram area:285 QRectF diagramArea = drawArea;286 diagramArea.setTopLeft ( QPointF ( drawArea.left(), drawArea.top() ) );287 diagramArea.setBottomRight ( QPointF ( drawArea.right(), drawArea.bottom() ) );288289 // determine coordinate transformation:290 QPointF diagramTopLeft = dataBoundingRect.topLeft();291 double diagramWidth = dataBoundingRect.width();292 double diagramHeight = dataBoundingRect.height();293 double planeWidth = diagramArea.width();294 double planeHeight = diagramArea.height();295 double scaleX;296 double scaleY;297298 double diagramXUnitInCoordinatePlane;299 double diagramYUnitInCoordinatePlane;300301 diagramXUnitInCoordinatePlane = diagramWidth != 0 ? planeWidth / diagramWidth : 1;302 diagramYUnitInCoordinatePlane = diagramHeight != 0 ? planeHeight / diagramHeight : 1;303 // calculate diagram origin in plane coordinates:304 QPointF coordinateOrigin = QPointF (305 diagramTopLeft.x() * -diagramXUnitInCoordinatePlane,306 diagramTopLeft.y() * -diagramYUnitInCoordinatePlane );307 coordinateOrigin += diagramArea.topLeft();308 // calculate isometric scaling factor to maxscale the diagram into309 // the coordinate system:

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

308 KD Chart 2 Class Documentation

310 if ( d->isometricScaling )311 {312 double scale = qMin ( qAbs ( diagramXUnitInCoordinatePlane ),313 qAbs ( diagramYUnitInCoordinatePlane ) );314315 scaleX = qAbs( scale / diagramXUnitInCoordinatePlane );316 scaleY = qAbs( scale / diagramYUnitInCoordinatePlane );317 } else {318 scaleX = 1.0;319 scaleY = 1.0;320 }321 d->coordinateTransformation.diagramRect = dataBoundingRect;322 d->coordinateTransformation.originTranslation = coordinateOrigin;323 d->coordinateTransformation.unitVectorX = diagramXUnitInCoordinatePlane;324 d->coordinateTransformation.unitVectorY = diagramYUnitInCoordinatePlane;325 d->coordinateTransformation.isoScaleX = scaleX;326 d->coordinateTransformation.isoScaleY = scaleY;327 // adapt diagram area to effect of isometric scaling:328 diagramArea.setTopLeft( translate ( dataBoundingRect.topLeft() ) );329 diagramArea.setBottomRight ( translate ( dataBoundingRect.bottomRight() ) );330 //qDebug("KDChart::CartesianCoordinatePlane::layoutDiagrams() done,\ncalling update() now:");331 update();332 }

6.18.3.25 void KDChart::AbstractCoordinatePlane::layoutPlanes () [inherited]

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

Definition at line 254 of file KDChartAbstractCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::needLayoutPlanes().

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::CartesianAxis::layout-Planes(), KDChart::AbstractCartesianDiagram::layoutPlanes(), and KDChart::AbstractCoordinate-Plane::replaceDiagram().

255 {256 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");257 emit needLayoutPlanes();258 }

6.18.3.26 QSize KDChart::AbstractCoordinatePlane::maximumSize () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 205 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::sizeHint().

206 {207 if( d->parent )208 return d->parent->size();209 // Note: At external layut calculation time the coord.plane *will*210 // have a parent widget, so returning a default size here211 // will not affect its real drawing size.212 return QSize(1000, 1000);213 }

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

6.18 KDChart::CartesianCoordinatePlane Class Reference 309

6.18.3.27 QSize KDChart::AbstractCoordinatePlane::minimumSize () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 215 of file KDChartAbstractCoordinatePlane.cpp.

216 {217 return QSize(60, 60); // this default can be overwritten by derived classes218 }

6.18.3.28 QSize KDChart::AbstractCoordinatePlane::minimumSizeHint () const [virtual,inherited]

[reimplemented]

Definition at line 140 of file KDChartAbstractCoordinatePlane.cpp.

141 {142 return QSize( 200, 200 );143 }

6.18.3.29 void KDChart::AbstractCoordinatePlane::needLayoutPlanes () [inherited]

Emitted when plane needs to trigger the Chart’s layouting of the coord.

planes.

Referenced by KDChart::AbstractCoordinatePlane::layoutPlanes().

6.18.3.30 void KDChart::AbstractCoordinatePlane::needRelayout () [inherited]

Emitted when plane needs to trigger the Chart’s layouting.

Referenced by KDChart::AbstractCoordinatePlane::relayout().

6.18.3.31 void KDChart::AbstractCoordinatePlane::needUpdate () [inherited]

Emitted when plane needs to update its drawings.

6.18.3.32 void CartesianCoordinatePlane::paint (QPainter∗) [virtual]

reimpl

ImplementsKDChart::AbstractLayoutItem.

Definition at line 95 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractDiagramList, d, KDChart::AbstractCoordinatePlane::diagrams(),drawingArea(), KDChart::PaintContext::setCoordinatePlane(), KDChart::PaintContext::setPainter(),and KDChart::PaintContext::setRectangle().

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

310 KD Chart 2 Class Documentation

96 {97 // prevent recursive call:98 //qDebug("attempt plane::paint()");99 if( d->bPaintIsRunning ){100 d->bNextPaintPending = true;101 return;102 }103 d->bNextPaintPending = false;104 d->bPaintIsRunning = true;105106 //qDebug("start plane::paint()");107108 AbstractDiagramList diags = diagrams();109 //FIXME(khz): make this also work in no diagrams are there110 // (commenting out the following line should do it)111 if ( !diags.isEmpty() )112 {113 PaintContext ctx;114 ctx.setPainter ( painter );115 ctx.setCoordinatePlane ( this );116 const QRectF drawArea( drawingArea() );117 ctx.setRectangle ( drawArea );118119 // enabling clipping so that we’re not drawing outside120 QRect clipRect = drawArea.toRect().adjusted( -1, -1, 1, 1 );121 QRegion clipRegion( clipRect );122 painter->setClipRegion( clipRegion );123124 // paint the coordinate system rulers:125 d->grid->drawGrid( &ctx );126127 // paint the diagrams:128 for ( int i = 0; i < diags.size(); i++ )129 {130 //qDebug(" attempt diags[i]->paint ( &ctx );");131132 //if ( qApp->hasPendingEvents () )133 // continue;134135 //if( ! d->bNextPaintPending )136 // qApp->processEvents( QEventLoop::ExcludeSocketNotifiers );137 //if( ! d->bNextPaintPending ){138 //qDebug(" start diags[i]->paint ( &ctx );");139 PainterSaver painterSaver( painter );140 diags[i]->paint ( &ctx );141 //}142 //qDebug(" done: diags[i]->paint ( &ctx );");143 }144145 // and disable clipping afterwards146 painter->setClipping( false );147148 //for debugging:149 // painter->drawRect( drawArea.adjusted(4,4,4,4) );150 // painter->drawRect( drawArea.adjusted(2,2,2,2) );151 // painter->drawRect( drawArea );152 }153 d->bPaintIsRunning = false;154 //qDebug("done: plane::paint()");155 }

6.18.3.33 void AbstractArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

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

6.18 KDChart::CartesianCoordinatePlane Class Reference 311

Definition at line 83 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractAreaBase::innerRect(),KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::Chart::paint(), and KDChart::AbstractArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );

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

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 checked147 }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 attributes155 }

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 inKDChart::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(), andKDChart::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!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-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 constKDChart::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 fromKDChart::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: Thefirst 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 additionto this, planes can share an axis. In that case they will be layed out in relation to each other as suggestedby the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will resultin the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2’s reference plane, bothplanes are drawn over each other. The reference plane concept allows two planes to share the same spaceeven if neither has any axis, and in case there are shared axis, it is used to decided, whether the planesshould 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 else72 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 nodiagram 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, etc95 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::Orientationorientation)

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 byAbstractCoordinatePlane::setGlobal-GridAttributesbe used.

See also:setGridAttributes, gridAttributesAbstractCoordinatePlane::globalGridAttributeshasOwnGridAttributes

Definition at line 482 of file KDChartCartesianCoordinatePlane.cpp.

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

6.18.3.48 void CartesianCoordinatePlane::setAxesCalcModes (AxesCalcModemode)

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 (AxesCalcModemode)

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 (AxesCalcModemode)

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 (constBackgroundAttributes & 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 (constFrameAttributes & 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 inQLayoutItem

Note:Do not call this function directly, unless you know exactly what you are doing. Geometry managementis 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() here233 // because it would invoke KDChart::update() recursively.234 }235 }

6.18.3.54 void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes (constGridAttributes &) [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:globalGridAttributesCartesianCoordinatePlane::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::Orientationorientation, constGridAttributes &)

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 byAbstractCoordinatePlane::setGlobal-GridAttributes. To re-activate these global attributes you can call resetGridAttributes.

See also:resetGridAttributes, gridAttributesAbstractCoordinatePlane::setGlobalGridAttributeshasOwnGridAttributes

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 else476 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 anull 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 (boolonOff)

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 byKDChart::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 sizeof 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 anull 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 (QPointFcenter) [virtual]

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

Parameters:center The point to use.

Reimplemented fromKDChart::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 (doublefactor) [virtual]

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented fromKDChart::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 (doublefactor) [virtual]

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented fromKDChart::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 inQLayoutItem

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 smaller224 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 else81 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.

ImplementsKDChart::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’s337 // directly on the edge of the diagramRect. i guess it can be replaced by338 // manually comparing he coordinates, but be aware of the fact that the339 // 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 bothvalues 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 fromKDChart::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 fromKDChart::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 fromKDChart::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_SIGNALSKDChart::AbstractCoordinatePlane::__pad0__ [inherited]

Reimplemented fromKDChart::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 protectedKDChart::CartesianCoordinatePlane::Q_SLOTS [protected]

Reimplemented fromKDChart::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 Chartclass represents a drawing consisting of one or more diagrams and various optional elementssuch as legends, axes, text boxes, headers or footers. It takes ownership of all these elements when they areassigned to it. Each diagram is associated with a coordinate plane, of which the chart can have more thanone. The coordinate planes (and thus the associated diagrams) can be layed out in various ways.

TheChartclass makes heavy use of the Qt Interview framework for model/view programming, and thusrequires data to be presented to it in a QAbstractItemModel compatible way. For many simple charts,especially if the visualized data is static,KDChart::Widgetprovides an abstracted interface, that hides thecomplexity 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.

• CoordinatePlaneListcoordinatePlanes()

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.

• HeaderFooterListheaderFooters()

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.

• LegendListlegends()

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 thebottom.

• 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 callspaint().

• 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_EVAL555 EvalDialog::checkEvalLicense( "KD Chart" );556 #endif557558 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

6.19 KDChart::Chart Class Reference 329

Definition at line 584 of file KDChartChart.cpp.

References d, and KDChart::AbstractCoordinatePlane::setParent().

Referenced by Chart(), and replaceCoordinatePlane().

585 {586 connect( plane, SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ),587 d, SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) );588 connect( plane, SIGNAL( needUpdate() ), this, SLOT( update() ) );589 connect( plane, SIGNAL( needRelayout() ), d, SLOT( slotRelayout() ) ) ;590 connect( plane, SIGNAL( needLayoutPlanes() ), d, SLOT( slotLayoutPlanes() ) ) ;591 connect( plane, SIGNAL( propertiesChanged() ),this, SIGNAL( propertiesChanged() ) );592 d->coordinatePlanes.append( plane );593 plane->setParent( this );594 d->slotLayoutPlanes();595 }

6.19.3.2 void Chart::addHeaderFooter (HeaderFooter∗ headerFooter)

Adds a header or a footer to the chart.

The chart takes ownership.

Parameters:headerFooterThe header (or footer, resp.) to add.

See also:replaceHeaderFooter, takeHeaderFooter

Definition at line 761 of file KDChartChart.cpp.

References d, and KDChart::HeaderFooter::setParent().

Referenced by replaceHeaderFooter().

762 {763 d->headerFooters.append( headerFooter );764 headerFooter->setParent( this );765 connect( headerFooter, SIGNAL( destroyedHeaderFooter( HeaderFooter* ) ),766 d, SLOT( slotUnregisterDestroyedHeaderFooter( HeaderFooter* ) ) );767 connect( headerFooter, SIGNAL( positionChanged( HeaderFooter* ) ),768 d, SLOT( slotRelayout() ) );769 d->slotRelayout();770 }

6.19.3.3 void Chart::addLegend (Legend∗ legend)

Add the given legend to the chart.

The chart takes ownership.

Parameters:legend The legend to add.

See also:replaceLegend, takeLegend

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

330 KD Chart 2 Class Documentation

Definition at line 813 of file KDChartChart.cpp.

References d.

Referenced by replaceLegend().

814 {815 d->legends.append( legend );816 legend->setParent( this );817 connect( legend, SIGNAL( destroyedLegend( Legend* ) ),818 d, SLOT( slotUnregisterDestroyedLegend( Legend* ) ) );819 connect( legend, SIGNAL( positionChanged( AbstractAreaWidget* ) ),820 d, SLOT( slotLayoutPlanes() ) ); //slotRelayout() ) );821 connect( legend, SIGNAL( propertiesChanged() ),this, SIGNAL( propertiesChanged() ) );822 d->slotRelayout();823 }

6.19.3.4 AbstractCoordinatePlane∗ Chart::coordinatePlane ()

Each chart must have at least one coordinate plane.

Initially a defaultCartesianCoordinatePlaneis created. UsereplaceCoordinatePlane()to replace it with adifferent one, such as aPolarCoordinatePlane.

Returns:The first coordinate plane of the chart.

Definition at line 568 of file KDChartChart.cpp.

References d.

569 {570 if ( d->coordinatePlanes.isEmpty() )571 {572 qWarning() << "Chart::coordinatePlane: warning: no coordinate plane defined.";573 return 0;574 } else {575 return d->coordinatePlanes.first();576 }577 }

6.19.3.5 CoordinatePlaneListChart::coordinatePlanes ()

The list of coordinate planes.

Returns:The list of coordinate planes.

Definition at line 579 of file KDChartChart.cpp.

References KDChart::CoordinatePlaneList, and d.

580 {581 return d->coordinatePlanes;582 }

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

6.19 KDChart::Chart Class Reference 331

6.19.3.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.

Returns:The padding between the start of the widget and the start of the area that is used for drawing at thebottom.

See also:setGlobalLeading

Definition at line 673 of file KDChartChart.cpp.

References d.

674 {675 return d->globalLeadingBottom;676 }

6.19.3.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.

Returns:The padding between the start of the widget and the start of the area that is used for drawing on theleft.

See also:setGlobalLeading

Definition at line 640 of file KDChartChart.cpp.

References d.

641 {642 return d->globalLeadingLeft;643 }

6.19.3.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.

Returns:The padding between the start of the widget and the start of the area that is used for drawing on theright.

See also:setGlobalLeading

Definition at line 662 of file KDChartChart.cpp.

References d.

663 {664 return d->globalLeadingRight;665 }

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

332 KD Chart 2 Class Documentation

6.19.3.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.

Returns:The padding between the start of the widget and the start of the area that is used for drawing at the top.

See also:setGlobalLeading

Definition at line 651 of file KDChartChart.cpp.

References d.

652 {653 return d->globalLeadingTop;654 }

6.19.3.10 HeaderFooter∗ Chart::headerFooter ()

The first header or footer of the chart.

By default there is none.

Returns:The first header or footer of the chart or 0 if there was none added to the chart.

Definition at line 799 of file KDChartChart.cpp.

References d.

800 {801 if( d->headerFooters.isEmpty() ) {802 return 0;803 } else {804 return d->headerFooters.first();805 }806 }

6.19.3.11 HeaderFooterList Chart::headerFooters ()

The list of headers and footers associated with the chart.

Returns:The list of headers and footers associated with the chart.

Definition at line 808 of file KDChartChart.cpp.

References d, and KDChart::HeaderFooterList.

809 {810 return d->headerFooters;811 }

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

6.19 KDChart::Chart Class Reference 333

6.19.3.12 Legend∗ Chart::legend ()

The first legend of the chart or 0 if there was none added to the chart.

Returns:The first legend of the chart or 0 if none exists.

Definition at line 851 of file KDChartChart.cpp.

References d.

Referenced by paint().

852 {853 if ( d->legends.isEmpty() )854 {855 return 0;856 } else {857 return d->legends.first();858 }859 }

6.19.3.13 LegendList Chart::legends ()

The list of all legends associated with the chart.

Returns:The list of all legends associated with the chart.

Definition at line 861 of file KDChartChart.cpp.

References d, and KDChart::LegendList.

862 {863 return d->legends;864 }

6.19.3.14 void Chart::paint (QPainter∗ painter, const QRect & target)

Paints all the contents of the chart.

Use this method, to make KDChartdraw into your QPainter.

Note:Any global leading settings will be used by the paint method too, so make sure to set them to zero, ifyou want the drawing to have the exact size of the target rectangle.

Parameters:painter The painter to be drawn into.

target The rectangle to be filled by the Chart’s drawing.

See also:setGlobalLeading

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

334 KD Chart 2 Class Documentation

Definition at line 683 of file KDChartChart.cpp.

References d, legend(), KDChart::TextArea::paintAll(), KDChart::AbstractArea::paintAll(), andKDChart::AbstractAreaWidget::paintIntoRect().

Referenced by paintEvent().

684 {685 //qDebug() << "KDChart::Chart::paint() called, inPaint: " << d->inPaint;686 #ifdef debug_recursive_paint687 ++nPaint;688 if( 100<nPaint)689 qFatal("nPaint > 100");690 #endif691 if( d->inPaint || target_.isEmpty() || !painter ) return;692693 d->inPaint = true;694695 const QRect oldGeometry( geometry() );696 //painter->drawRect( oldGeometry );697 QRect target( target_ );698 QPoint translation(0,0);699700 if( target != oldGeometry ){701 //qDebug() << "KDChart::Chart::paint() calling new setGeometry(" << target << ")";702 setGeometry( target );703 painter->drawRect( target );704 d->slotLayoutPlanes();705 translation.setX( target_.left() );706 translation.setY( target_.left() );707 painter->translate( translation );708 }709710 KDAB_FOREACH( KDChart::AbstractArea* layoutItem, d->layoutItems ) {711 layoutItem->paintAll( *painter );712 }713 KDAB_FOREACH( KDChart::AbstractArea* planeLayoutItem, d->planeLayoutItems ) {714 planeLayoutItem->paintAll( *painter );715 }716 KDAB_FOREACH( KDChart::TextArea* textLayoutItem, d->textLayoutItems ) {717 textLayoutItem->paintAll( *painter );718 }719 //int i=0;720 KDAB_FOREACH( Legend *legend, d->legends ) {721 //qDebug("legend # %i",++i);722 if( ! legend->isHidden() ){723 //legend->forceRebuild();724 /*725 const QPoint translation( legend->geometry().topLeft() );726 painter->translate( translation );727 legend->paintAll( *painter );728 if( ! translation.isNull() )729 painter->translate( -translation.x(), -translation.y() );730 */731 legend->paintIntoRect( *painter, legend->geometry() );732 }733 }734735 if( target_ != oldGeometry ){736 //qDebug() << "KDChart::Chart::paint() calling new setGeometry(" << oldGeometry << ")";737 setGeometry( oldGeometry );738 if( ! translation.isNull() )739 painter->translate( -translation.x(), -translation.y() );740 }741742 d->inPaint = false;743 //qDebug() << "KDChart::Chart::paint() done.\n";

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

6.19 KDChart::Chart Class Reference 335

744 }

6.19.3.15 void Chart::paintEvent (QPaintEvent∗ event) [protected]

Draws the background and frame, then callspaint().

In most cases there is no need to override this method in a derived class, but if you do, do not forget to callpaint().

See also:paint

Definition at line 751 of file KDChartChart.cpp.

References paint().

752 {753 event->accept();754755 QPainter painter( this );756 //FIXME(khz): Paint the background/frame too!757 // (can we derive Chart from AreaWidget ??)758 paint( &painter, geometry() );759 }

6.19.3.16 void Chart::replaceCoordinatePlane (AbstractCoordinatePlane∗ plane,AbstractCoordinatePlane∗ oldPlane= 0)

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

Parameters:plane The coordinate plane to be used instead of the old plane. This parameter must not be zero, or

the method will do nothing.

oldPlane The coordinate plane to be removed by the new plane. This plane will be deleted automati-cally. If the parameter is omitted, the very first coordinate plane will be replaced. In case, therewas no plane yet, the new plane will just be added.

Note:If you want to re-use the old coordinate plane, call takeCoordinatePlane and addCoordinatePlane,instead of using replaceCoordinatePlane.

See also:addCoordinatePlane, takeCoordinatePlane

Definition at line 597 of file KDChartChart.cpp.

References addCoordinatePlane(), d, and takeCoordinatePlane().

599 {600 if( plane && oldPlane_ != plane ){601 AbstractCoordinatePlane* oldPlane = oldPlane_;602 if( d->coordinatePlanes.count() ){603 if( ! oldPlane )604 oldPlane = d->coordinatePlanes.first();

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

336 KD Chart 2 Class Documentation

605 takeCoordinatePlane( oldPlane );606 }607 delete oldPlane;608 addCoordinatePlane( plane );609 }610 }

6.19.3.17 void Chart::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.

Parameters:headerFooterThe header or footer to be used instead of the old one. This parameter must not be zero,

or the method will do nothing.

oldHeaderFooterThe header or footer to be removed by the new one. This header or footer will bedeleted automatically. If the parameter is omitted, the very first header or footer will be replaced.In case, there was no header and no footer yet, the new header or footer will just be added.

Note:If you want to re-use the old header or footer, call takeHeaderFooter and addHeaderFooter, instead ofusing replaceHeaderFooter.

See also:addHeaderFooter, takeHeaderFooter

Definition at line 772 of file KDChartChart.cpp.

References addHeaderFooter(), d, and takeHeaderFooter().

774 {775 if( headerFooter && oldHeaderFooter_ != headerFooter ){776 HeaderFooter* oldHeaderFooter = oldHeaderFooter_;777 if( d->headerFooters.count() ){778 if( ! oldHeaderFooter )779 oldHeaderFooter = d->headerFooters.first();780 takeHeaderFooter( oldHeaderFooter );781 }782 delete oldHeaderFooter;783 addHeaderFooter( headerFooter );784 }785 }

6.19.3.18 void Chart::replaceLegend (Legend∗ legend, Legend∗ oldLegend= 0)

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

Parameters:legend The legend to be used instead of the old one. This parameter must not be zero, or the method

will do nothing.

oldLegend The legend to be removed by the new one. This legend will be deleted automatically. Ifthe parameter is omitted, the very first legend will be replaced. In case, there was no legend yet,the new legend will just be added.

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

6.19 KDChart::Chart Class Reference 337

Note:If you want to re-use the old legend, call takeLegend and addLegend, instead of using replaceLegend.

See also:addLegend, takeLegend

Definition at line 825 of file KDChartChart.cpp.

References addLegend(), d, and takeLegend().

826 {827 if( legend && oldLegend_ != legend ){828 Legend* oldLegend = oldLegend_;829 if( d->legends.count() ){830 if( ! oldLegend )831 oldLegend = d->legends.first();832 takeLegend( oldLegend );833 }834 delete oldLegend;835 addLegend( legend );836 }837 }

6.19.3.19 void Chart::resizeEvent (QResizeEvent∗ event) [protected]

Adjusts the internal layout when the chart is resized.

Definition at line 746 of file KDChartChart.cpp.

References d.

747 {748 d->slotLayoutPlanes();749 }

6.19.3.20 void KDChart::Chart::setCoordinatePlaneLayout (QLayout∗ layout)

6.19.3.21 void Chart::setGlobalLeading (intleft, int top, int right, int bottom)

Set the padding between the margin of the widget and the area that the contents are drawn into.

Parameters:left The padding on the left side.

top The padding at the top.

right The padding on the left hand side.

bottom The padding on the bottom.

See also:setGlobalLeadingTop, setGlobalLeadingBottom, setGlobalLeadingLeft, setGlobalLeadingRightglobalLeadingTop, globalLeadingBottom, globalLeadingLeft, globalLeadingRight

Definition at line 625 of file KDChartChart.cpp.

References d, setGlobalLeadingBottom(), setGlobalLeadingLeft(), setGlobalLeadingRight(), and set-GlobalLeadingTop().

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 );628 setGlobalLeadingTop( top );629 setGlobalLeadingRight( right );630 setGlobalLeadingBottom( bottom );631 d->slotRelayout();632 }

6.19.3.22 void Chart::setGlobalLeadingBottom (intleading)

Set the padding between the start of the widget and the start of the area that is used for drawing on thebottom.

Parameters:leading The padding value.

See also:setGlobalLeading

Definition at line 667 of file KDChartChart.cpp.

References d.

Referenced by setGlobalLeading().

668 {669 d->globalLeadingBottom = leading;670 d->slotRelayout();671 }

6.19.3.23 void Chart::setGlobalLeadingLeft (intleading)

Set the padding between the start of the widget and the start of the area that is used for drawing on the left.

Parameters:leading The padding value.

See also:setGlobalLeading

Definition at line 634 of file KDChartChart.cpp.

References d.

Referenced by setGlobalLeading().

635 {636 d->globalLeadingLeft = leading;637 d->slotRelayout();638 }

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

6.19 KDChart::Chart Class Reference 339

6.19.3.24 void Chart::setGlobalLeadingRight (intleading)

Set the padding between the start of the widget and the start of the area that is used for drawing on the right.

Parameters:leading The padding value.

See also:setGlobalLeading

Definition at line 656 of file KDChartChart.cpp.

References d.

Referenced by setGlobalLeading().

657 {658 d->globalLeadingRight = leading;659 d->slotRelayout();660 }

6.19.3.25 void Chart::setGlobalLeadingTop (intleading)

Set the padding between the start of the widget and the start of the area that is used for drawing at the top.

Parameters:leading The padding value.

See also:setGlobalLeading

Definition at line 645 of file KDChartChart.cpp.

References d.

Referenced by setGlobalLeading().

646 {647 d->globalLeadingTop = leading;648 d->slotRelayout();649 }

6.19.3.26 void Chart::takeCoordinatePlane (AbstractCoordinatePlane∗ plane)

Removes the coordinate plane from the chart, without deleting it.

The chart no longer owns the plane, so it is the caller’s responsibility to delete the plane.

See also:addCoordinatePlane, takeCoordinatePlane

Definition at line 612 of file KDChartChart.cpp.

References d, KDChart::AbstractLayoutItem::removeFromParentLayout(), and KDChart::Abstract-CoordinatePlane::setParent().

Referenced by replaceCoordinatePlane().

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

340 KD Chart 2 Class Documentation

613 {614 const int idx = d->coordinatePlanes.indexOf( plane );615 if( idx != -1 ){616 d->coordinatePlanes.takeAt( idx );617 disconnect( plane, SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ),618 d, SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) );619 plane->removeFromParentLayout();620 plane->setParent( 0 );621 }622 d->slotLayoutPlanes();623 }

6.19.3.27 void Chart::takeHeaderFooter (HeaderFooter∗ headerFooter)

Removes the header (or footer, resp.) from the chart, without deleting it.

The chart no longer owns the header or footer, so it is the caller’s responsibility to delete the header orfooter.

See also:addHeaderFooter, replaceHeaderFooter

Definition at line 787 of file KDChartChart.cpp.

References d, and KDChart::HeaderFooter::setParent().

Referenced by replaceHeaderFooter().

788 {789 const int idx = d->headerFooters.indexOf( headerFooter );790 if( idx != -1 ){791 d->headerFooters.takeAt( idx );792 disconnect( headerFooter, SIGNAL( destroyedHeaderFooter( HeaderFooter* ) ),793 d, SLOT( slotUnregisterDestroyedHeaderFooter( HeaderFooter* ) ) );794 headerFooter->setParent( 0 );795 }796 d->slotRelayout();797 }

6.19.3.28 void Chart::takeLegend (Legend∗ legend)

Removes the legend from the chart, without deleting it.

The chart no longer owns the legend, so it is the caller’s responsibility to delete the legend.

See also:addLegend, takeLegend

Definition at line 839 of file KDChartChart.cpp.

References d.

Referenced by replaceLegend().

840 {841 const int idx = d->legends.indexOf( legend );842 if( idx != -1 ){843 d->legends.takeAt( idx );

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

6.19 KDChart::Chart Class Reference 341

844 disconnect( legend, SIGNAL( destroyedLegend( Legend* ) ),845 d, SLOT( slotUnregisterDestroyedLegend( Legend* ) ) );846 legend->setParent( 0 );847 }848 d->slotRelayout();849 }

6.19.4 Member Data Documentation

6.19.4.1 Q_SIGNALSKDChart::Chart::__pad0__

Definition at line 337 of file KDChartChart.h.

The documentation for this class was generated from the following files:

• KDChartChart.h• KDChartChart.cpp

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

342 KD Chart 2 Class Documentation

6.20 KDChart::DataDimension Class Reference

#include <KDChartAbstractCoordinatePlane.h >

Collaboration diagram for KDChart::DataDimension:

6.20.1 Detailed Description

Helper class for one dimension of data, e.g. for the rows in a data model, or for the labels of an axis, or forthe vertical lines in a grid.

isCalculated specifies whether this dimension’s values are calculated or counted. (counted == "Item 1","Item 2", "Item 3" ...)

sequence is the GranularitySequence, as specified at for the respective coordinate plane.

Step width is an optional parameter, to be omitted (or set to Zero, resp.) if the step width is unknown.

The default c’tor just gets you counted values from 1..10, using step width 1, used by the CartesianGrid,when showing an empty plane without any diagrams.

Definition at line 320 of file KDChartAbstractCoordinatePlane.h.

Public Member Functions

• DataDimension(qreal start_, qreal end_, bool isCalculated_,AbstractCoordinatePlane::AxesCalc-Mode calcMode_,KDChartEnums::GranularitySequencesequence_, qreal stepWidth_=0.0, qrealsubStepWidth_=0.0)

• DataDimension()• qrealdistance() const

Returns the size of the distance, equivalent to the width() (or height(), resp.) of a QRectF.

• booloperator!=(constDataDimension&other) const• booloperator==(constDataDimension&r) const

Public Attributes

• AbstractCoordinatePlane::AxesCalcModecalcMode• qrealend• bool isCalculated• KDChartEnums::GranularitySequencesequence• qrealstart• qrealstepWidth• qrealsubStepWidth

6.20.2 Constructor & Destructor Documentation

6.20.2.1 KDChart::DataDimension::DataDimension ()

Definition at line 322 of file KDChartAbstractCoordinatePlane.h.

References calcMode, sequence, stepWidth, and subStepWidth.

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

6.20 KDChart::DataDimension Class Reference 343

326 {}327 DataDimension( qreal start_,328 qreal end_,329 bool isCalculated_,330 AbstractCoordinatePlane::AxesCalcMode calcMode_,

6.20.2.2 KDChart::DataDimension::DataDimension (qrealstart_, qreal end_,bool isCalculated_, AbstractCoordinatePlane::AxesCalcModecalcMode_,KDChartEnums::GranularitySequence sequence_, qreal stepWidth_= 0.0, qrealsubStepWidth_= 0.0)

Definition at line 331 of file KDChartAbstractCoordinatePlane.h.

References calcMode, end, isCalculated, sequence, start, stepWidth, and subStepWidth.

334 : start( start_ )335 , end( end_ )336 , isCalculated( isCalculated_ )337 , calcMode( calcMode_ )338 , sequence( sequence_ )339 , stepWidth( stepWidth_ )340 , subStepWidth( subStepWidth_ )341 {}

6.20.3 Member Function Documentation

6.20.3.1 qreal KDChart::DataDimension::distance () const

Returns the size of the distance, equivalent to the width() (or height(), resp.) of a QRectF.

Note that this value can be negative, e.g. indicating axis labels going in reversed direction.

Definition at line 353 of file KDChartAbstractCoordinatePlane.h.

References start.

Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams(), and KDChart::Cartesian-Axis::paintCtx().

355 {356 return

6.20.3.2 bool KDChart::DataDimension::operator!= (constDataDimension& other) const

Definition at line 370 of file KDChartAbstractCoordinatePlane.h.

References calcMode, end, and isCalculated.

6.20.3.3 bool KDChart::DataDimension::operator== (constDataDimension& r) const

Definition at line 358 of file KDChartAbstractCoordinatePlane.h.

References calcMode, end, isCalculated, sequence, stepWidth, and subStepWidth.

367 { return !operator==( other ); }368

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

344 KD Chart 2 Class Documentation

6.20.4 Member Data Documentation

6.20.4.1 AbstractCoordinatePlane::AxesCalcModeKDChart::DataDimension::calcMode

Definition at line 376 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), operator!=(), operator==(), and KDChart::CartesianAxis::paintCtx().

6.20.4.2 qrealKDChart::DataDimension::end

Definition at line 374 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), KDChart::CartesianCoordinatePlane::layoutDiagrams(), operator!=(),operator==(), and KDChart::CartesianAxis::paintCtx().

6.20.4.3 boolKDChart::DataDimension::isCalculated

Definition at line 375 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), operator!=(), operator==(), and KDChart::CartesianAxis::paintCtx().

6.20.4.4 KDChartEnums::GranularitySequence KDChart::DataDimension::sequence

Definition at line 377 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), and operator==().

6.20.4.5 qrealKDChart::DataDimension::start

Definition at line 373 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), distance(), KDChart::CartesianCoordinatePlane::layoutDiagrams(), andKDChart::CartesianAxis::paintCtx().

6.20.4.6 qrealKDChart::DataDimension::stepWidth

Definition at line 378 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), operator==(), and KDChart::CartesianAxis::paintCtx().

6.20.4.7 qrealKDChart::DataDimension::subStepWidth

Definition at line 379 of file KDChartAbstractCoordinatePlane.h.

Referenced by DataDimension(), operator==(), and KDChart::CartesianAxis::paintCtx().

The documentation for this class was generated from the following file:

• KDChartAbstractCoordinatePlane.h

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

6.21 KDChart::DatasetProxyModel Class Reference 345

6.21 KDChart::DatasetProxyModel Class Reference

#include <KDChartDatasetProxyModel.h >

Inheritance diagram for KDChart::DatasetProxyModel:Collaboration diagram for KDChart::Dataset-ProxyModel:

6.21.1 Detailed Description

DatasetProxyModeltakes aKDChartdataset configuration and translates it into a filtering proxy model.

The resulting model will only contain the part of the model that is selected by the dataset, and the accordingrow and column header data.

Currently, this model is implemented for table models only. The way it would work with models represent-ing a tree is to be decided.

The column selection is configured by passing a dataset description vector to the model. This vector (ofintegers) is supposed to have one value for each column of the original model. If the value at position x is-1, column x of the original model is not included in the dataset. If it is between 0 and (columnCount() -1),it is the column the source column is mapped to in the resulting model. Any other value is an error.

Definition at line 58 of file KDChartDatasetProxyModel.h.

Public Member Functions

• QVariantdata(const QModelIndex &index, int role) const

Overloaded from base class.

• DatasetProxyModel(QObject∗parent=0)

Create aDatasetProxyModel.

• QVariantheaderData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const

Overloaded from base class.

• QModelIndexindex(int row, int column, const QModelIndex &parent=QModelIndex()) const• QModelIndexmapFromSource(const QModelIndex &sourceIndex) const

Implements the mapping from the source to the proxy indexes.

• QModelIndexmapToSource(const QModelIndex &proxyIndex) const

Implements the mapping from the proxy to the source indexes.

• QModelIndexparent(const QModelIndex &child) const• void setDatasetColumnDescriptionVector(constDatasetDescriptionVector&columnConfig)

Configure the dataset selection for the columns.

• void setDatasetDescriptionVectors(const DatasetDescriptionVector&rowConfig, constDataset-DescriptionVector&columnConfig)

Convenience method to configure rows and columns in one step.

• void setDatasetRowDescriptionVector(constDatasetDescriptionVector&rowConfig)

Configure the dataset selection for the rows.

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

346 KD Chart 2 Class Documentation

• void setSourceModel(QAbstractItemModel∗sourceModel)

Overloaded from base class.

• void setSourceRootIndex(const QModelIndex &rootIdx)

Set the root index of the table in the source model.

Public Attributes

• publicQ_SLOTS: void resetDatasetDescriptions()

Protected Member Functions

• bool filterAcceptsColumn(int sourceColumn, const QModelIndex &) const

Decide whether the column is accepted.

• bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const

Decide whether the row is accepted.

6.21.2 Constructor & Destructor Documentation

6.21.2.1 DatasetProxyModel::DatasetProxyModel (QObject ∗ parent= 0) [explicit]

Create aDatasetProxyModel.

Without further configuration, this model is invalid.

See also:setDatasetDescriptionVector

Definition at line 35 of file KDChartDatasetProxyModel.cpp.

36 : QSortFilterProxyModel ( parent )37 {38 }

6.21.3 Member Function Documentation

6.21.3.1 QVariant DatasetProxyModel::data (const QModelIndex &index, int role) const

Overloaded from base class.

Definition at line 209 of file KDChartDatasetProxyModel.cpp.

210 {211 return sourceModel()->data( mapToSource ( index ), role );212 }

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

6.21 KDChart::DatasetProxyModel Class Reference 347

6.21.3.2 bool DatasetProxyModel::filterAcceptsColumn (intsourceColumn, const QModelIndex&) const [protected]

Decide whether the column is accepted.

Definition at line 136 of file KDChartDatasetProxyModel.cpp.

138 {139 if ( mColSrcToProxyMap.isEmpty() )140 { // no column mapping set up yet, all columns are passed down:141 return true;142 } else {143 Q_ASSERT ( sourceModel() );144 Q_ASSERT ( mColSrcToProxyMap.size() == sourceModel()->columnCount(mRootIndex) );145 if ( mColSrcToProxyMap[sourceColumn] == -1 )146 { // this column is explicitly not accepted:147 return false;148 } else {149 Q_ASSERT ( mColSrcToProxyMap[sourceColumn] >= 0150 && mColSrcToProxyMap[sourceColumn] < mColSrcToProxyMap.size() );151 return true;152 }153 }154 }

6.21.3.3 bool DatasetProxyModel::filterAcceptsRow (intsource_row, const QModelIndex &source_parent) const [protected]

Decide whether the row is accepted.

Definition at line 116 of file KDChartDatasetProxyModel.cpp.

118 {119 if ( mRowSrcToProxyMap.isEmpty() )120 { // no row mapping set, all rows are passed down:121 return true;122 } else {123 Q_ASSERT ( sourceModel() );124 Q_ASSERT ( mRowSrcToProxyMap.size() == sourceModel()->rowCount(mRootIndex) );125 if ( mRowSrcToProxyMap[sourceRow] == -1 )126 { // this row is explicitly not accepted:127 return false;128 } else {129 Q_ASSERT ( mRowSrcToProxyMap[sourceRow] >= 0130 && mRowSrcToProxyMap[sourceRow] < mRowSrcToProxyMap.size() );131 return true;132 }133 }134 }

6.21.3.4 QVariant DatasetProxyModel::headerData (intsection, Qt::Orientation orientation, introle = Qt::DisplayRole) const

Overloaded from base class.

Definition at line 214 of file KDChartDatasetProxyModel.cpp.

215 {216 if ( orientation == Qt::Horizontal )

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

348 KD Chart 2 Class Documentation

217 {218 if ( mapProxyColumnToSource ( section ) == -1 )219 {220 return QVariant();221 } else {222 return sourceModel()->headerData ( mapProxyColumnToSource ( section ),223 orientation, role );224 }225 } else {226 if ( mapProxyRowToSource ( section ) == -1 )227 {228 return QVariant();229 } else {230 return sourceModel()->headerData ( mapProxyRowToSource ( section ),231 orientation, role );232 }233 }234 }

6.21.3.5 QModelIndex DatasetProxyModel::index (introw, int column, const QModelIndex &parent= QModelIndex()) const

Definition at line 68 of file KDChartDatasetProxyModel.cpp.

References mapFromSource().

70 {71 return mapFromSource( sourceModel()->index( mapProxyRowToSource(row),72 mapProxyColumnToSource(column),73 parent ) );74 }

6.21.3.6 QModelIndex DatasetProxyModel::mapFromSource (const QModelIndex &sourceIndex)const

Implements the mapping from the source to the proxy indexes.

Definition at line 81 of file KDChartDatasetProxyModel.cpp.

Referenced by index(), and parent().

82 {83 Q_ASSERT_X ( sourceModel(), "DatasetProxyModel::mapFromSource", "A source "84 "model must be set before the selection can be configured." );8586 if ( !sourceIndex.isValid() ) return sourceIndex;8788 if ( mRowSrcToProxyMap.isEmpty() && mColSrcToProxyMap.isEmpty() )89 {90 return createIndex ( sourceIndex.row(), sourceIndex.column(),91 sourceIndex.internalPointer() );92 } else {93 int row = mapSourceRowToProxy ( sourceIndex.row() );94 int column = mapSourceColumnToProxy ( sourceIndex.column() );95 return createIndex ( row, column, sourceIndex.internalPointer() );96 }97 }

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

6.21 KDChart::DatasetProxyModel Class Reference 349

6.21.3.7 QModelIndex DatasetProxyModel::mapToSource (const QModelIndex &proxyIndex)const

Implements the mapping from the proxy to the source indexes.

Definition at line 99 of file KDChartDatasetProxyModel.cpp.

100 {101 Q_ASSERT_X ( sourceModel(), "DatasetProxyModel::mapToSource", "A source "102 "model must be set before the selection can be configured." );103104 if ( !proxyIndex.isValid() ) return proxyIndex;105 if ( mRowSrcToProxyMap.isEmpty() && mColSrcToProxyMap.isEmpty() )106 {107 return createIndex ( proxyIndex.row(), proxyIndex.column(),108 proxyIndex.internalPointer() );109 } else {110 int row = mapProxyRowToSource ( proxyIndex.row() );111 int column = mapProxyColumnToSource ( proxyIndex.column() );112 return createIndex ( row, column, proxyIndex.internalPointer() );113 }114 }

6.21.3.8 QModelIndex DatasetProxyModel::parent (const QModelIndex &child) const

Definition at line 76 of file KDChartDatasetProxyModel.cpp.

References mapFromSource().

77 {78 return mapFromSource( sourceModel()->parent( child ) );79 }

6.21.3.9 void DatasetProxyModel::setDatasetColumnDescriptionVector (constDatasetDescriptionVector& columnConfig)

Configure the dataset selection for the columns.

Every call to this method resets the previous dataset description.

Definition at line 50 of file KDChartDatasetProxyModel.cpp.

References KDChart::DatasetDescriptionVector.

Referenced by setDatasetDescriptionVectors().

52 {53 Q_ASSERT_X ( sourceModel(), "DatasetProxyModel::setDatasetColumnDescriptionVector",54 "A source model must be set before the selection can be configured." );55 initializeDatasetDecriptors ( configuration, sourceModel()->columnCount(mRootIndex),56 mColSrcToProxyMap, mColProxyToSrcMap );57 clear(); // clear emits layoutChanged()58 }

6.21.3.10 void DatasetProxyModel::setDatasetDescriptionVectors (constDatasetDescriptionVector& rowConfig, constDatasetDescriptionVector& columnConfig)

Convenience method to configure rows and columns in one step.

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

350 KD Chart 2 Class Documentation

Definition at line 60 of file KDChartDatasetProxyModel.cpp.

References KDChart::DatasetDescriptionVector, setDatasetColumnDescriptionVector(), and setDataset-RowDescriptionVector().

63 {64 setDatasetRowDescriptionVector( rowConfig );65 setDatasetColumnDescriptionVector ( columnConfig );66 }

6.21.3.11 void DatasetProxyModel::setDatasetRowDescriptionVector (constDatasetDescriptionVector& rowConfig)

Configure the dataset selection for the rows.

Every call to this method resets the previous dataset description.

Definition at line 40 of file KDChartDatasetProxyModel.cpp.

References KDChart::DatasetDescriptionVector.

Referenced by setDatasetDescriptionVectors().

42 {43 Q_ASSERT_X ( sourceModel(), "DatasetProxyModel::setDatasetRowDescriptionVector",44 "A source model must be set before the selection can be configured." );45 initializeDatasetDecriptors ( configuration, sourceModel()->rowCount(mRootIndex),46 mRowSrcToProxyMap, mRowProxyToSrcMap );47 clear(); // clear emits layoutChanged()48 }

6.21.3.12 void DatasetProxyModel::setSourceModel (QAbstractItemModel∗ sourceModel)

Overloaded from base class.

Definition at line 261 of file KDChartDatasetProxyModel.cpp.

262 {263 QSortFilterProxyModel::setSourceModel ( sourceModel );264 mRootIndex = QModelIndex();265 connect ( sourceModel, SIGNAL ( layoutChanged() ),266 SLOT( resetDatasetDescriptions() ) );267268 resetDatasetDescriptions();269 }

6.21.3.13 void DatasetProxyModel::setSourceRootIndex (const QModelIndex &rootIdx)

Set the root index of the table in the source model.

Definition at line 271 of file KDChartDatasetProxyModel.cpp.

272 {273 mRootIndex = rootIdx;274 resetDatasetDescriptions();275 }

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

6.21 KDChart::DatasetProxyModel Class Reference 351

6.21.4 Member Data Documentation

6.21.4.1 publicKDChart::DatasetProxyModel::Q_SLOTS

Definition at line 97 of file KDChartDatasetProxyModel.h.

The documentation for this class was generated from the following files:

• KDChartDatasetProxyModel.h• KDChartDatasetProxyModel.cpp

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

352 KD Chart 2 Class Documentation

6.22 KDChart::DatasetSelectorWidget Class Reference

#include <KDChartDatasetSelector.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 ( constDatasetDescriptionVector& row-Config

• Q_SIGNALS constDatasetDescriptionVector& columnConfig

• privateQ_SLOTS: void on_sbStartColumn_valueChanged ( int )

• publicQ_SLOTS: void setSourceRowCount ( const int& rowCount )

6.22.1 Constructor & Destructor Documentation

6.22.1.1 DatasetSelectorWidget::DatasetSelectorWidget (QWidget ∗ parent= 0) [explicit]

Definition at line 36 of file KDChartDatasetSelector.cpp.

37 : QFrame ( parent )38 , mUi ( new Ui::DatasetSelector () )39 , mSourceRowCount ( 0 )40 , mSourceColumnCount ( 0 )41 {42 qWarning("For DatasetSelectorWidget to become useful, it has to be connected to the proxy model it configures!");4344 mUi->setupUi ( this );45 setMinimumSize ( minimumSizeHint() );46 }

6.22.2 Member Function Documentation

6.22.2.1 void KDChart::DatasetSelectorWidget::mappingDisabled ()

Referenced by on_groupBox_toggled().

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

6.22 KDChart::DatasetSelectorWidget Class Reference 353

6.22.2.2 void DatasetSelectorWidget::on_cbReverseColumns_stateChanged (int)

Definition at line 73 of file KDChartDatasetSelector.cpp.

74 {75 calculateMapping();76 }

6.22.2.3 void DatasetSelectorWidget::on_cbReverseRows_stateChanged (int)

Definition at line 68 of file KDChartDatasetSelector.cpp.

69 {70 calculateMapping();71 }

6.22.2.4 void DatasetSelectorWidget::on_groupBox_toggled (bool)

Definition at line 78 of file KDChartDatasetSelector.cpp.

References mappingDisabled().

79 {80 if ( state )81 {82 calculateMapping();83 } else {84 emit mappingDisabled();85 }86 }

6.22.2.5 void DatasetSelectorWidget::on_sbColumnCount_valueChanged (int)

Definition at line 58 of file KDChartDatasetSelector.cpp.

59 {60 calculateMapping();61 }

6.22.2.6 void DatasetSelectorWidget::on_sbRowCount_valueChanged (int)

Definition at line 63 of file KDChartDatasetSelector.cpp.

64 {65 calculateMapping();66 }

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

354 KD Chart 2 Class Documentation

6.22.2.7 void DatasetSelectorWidget::on_sbStartRow_valueChanged (int)

Definition at line 53 of file KDChartDatasetSelector.cpp.

54 {55 calculateMapping();56 }

6.22.2.8 void DatasetSelectorWidget::setSourceColumnCount (const int &columnCount)

Definition at line 98 of file KDChartDatasetSelector.cpp.

99 {100 if ( columnCount != mSourceColumnCount )101 {102 mSourceColumnCount = columnCount;103 resetDisplayValues();104 }105 }

6.22.3 Member Data Documentation

6.22.3.1 Q_SIGNALSKDChart::DatasetSelectorWidget::__pad0__

Definition at line 53 of file KDChartDatasetSelector.h.

6.22.3.2 Q_SIGNALS constDatasetDescriptionVector& KDChart::DatasetSelector-Widget::columnConfig

Definition at line 53 of file KDChartDatasetSelector.h.

6.22.3.3 privateKDChart::DatasetSelectorWidget::Q_SLOTS

Definition at line 59 of file KDChartDatasetSelector.h.

6.22.3.4 publicKDChart::DatasetSelectorWidget::Q_SLOTS

Definition at line 48 of file KDChartDatasetSelector.h.

The documentation for this class was generated from the following files:

• KDChartDatasetSelector.h• KDChartDatasetSelector.cpp

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

6.23 KDChart::DataValueAttributes Class Reference 355

6.23 KDChart::DataValueAttributes Class Reference

#include <KDChartDataValueAttributes.h >

6.23.1 Detailed Description

Diagram attributes dealing with data value labels.

The DataValueAttributesgroup all properties that can be set wrt data value labels and if and how theyare displayed. This includes things like the text attributes (font, color), what markers are used, howmanydecimal digits are displayed, etc.

Definition at line 51 of file KDChartDataValueAttributes.h.

Public Member Functions

• BackgroundAttributesbackgroundAttributes() const• QStringdataLabel() const• DataValueAttributes(constDataValueAttributes&)• DataValueAttributes()• int decimalDigits() const• FrameAttributesframeAttributes() const• bool isVisible () const• MarkerAttributesmarkerAttributes() const• RelativePositionnegativePosition() const• booloperator!=(constDataValueAttributes&other) const• DataValueAttributes& operator=(constDataValueAttributes&)• booloperator==(constDataValueAttributes&) const• RelativePositionpositivePosition() const• int powerOfTenDivisor() const• QStringprefix () const• void setBackgroundAttributes(constBackgroundAttributes&a)

Set the background attributes to use for the data value labels area.

• 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.

• void setFrameAttributes(constFrameAttributes&a)

Set the frame attributes to use for the data value labels area.

• void setMarkerAttributes(constMarkerAttributes&a)

Set the marker attributes to use for the data values.

• void setNegativePosition(constRelativePosition&relPosition)• void setPositivePosition(constRelativePosition&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

356 KD Chart 2 Class Documentation

Prepend a prefix to the data value text to be displayed.

• void setShowInfinite(bool infinite)• void setSuffix(const QString suffix)

Append a suffix to the data value text to be displayed.

• void setTextAttributes(constTextAttributes&a)

Set the text attributes to use for the data value labels.

• void setVisible(bool visible)

Set whether data value labels should be displayed.

• bool showInfinite() const• QStringsuffix () const• TextAttributestextAttributes() const• ∼DataValueAttributes()

Static Public Member Functions

• constDataValueAttributes& defaultAttributes()• const QVariant &defaultAttributesAsVariant()

6.23.2 Constructor & Destructor Documentation

6.23.2.1 KDChart::DataValueAttributes::DataValueAttributes ()

6.23.2.2 KDChart::DataValueAttributes::DataValueAttributes (const DataValueAttributes &)

6.23.2.3 KDChart::DataValueAttributes::∼DataValueAttributes ()

6.23.3 Member Function Documentation

6.23.3.1 BackgroundAttributes KDChart::DataValueAttributes::backgroundAttributes () const

Returns:The background attributes used for painting the data value labels area.

See also:BackgroundAttributes

Referenced by operator<<().

6.23.3.2 QString KDChart::DataValueAttributes::dataLabel () const

Returns:The string to be displayed instead of the data value text.

Referenced by KDChart::AbstractDiagram::paintDataValueText().

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

6.23 KDChart::DataValueAttributes Class Reference 357

6.23.3.3 int KDChart::DataValueAttributes::decimalDigits () const

Returns:The number of decimal digits displayed.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

6.23.3.4 constDataValueAttributes& KDChart::DataValueAttributes::defaultAttributes ()[static]

6.23.3.5 const QVariant& KDChart::DataValueAttributes::defaultAttributesAsVariant ()[static]

6.23.3.6 FrameAttributes KDChart::DataValueAttributes::frameAttributes () const

Returns:The frame attributes used for painting the data value labels area.

See also:FrameAttributes

Referenced by operator<<().

6.23.3.7 bool KDChart::DataValueAttributes::isVisible () const

Returns:Whether data value labels should be displayed.

Referenced by operator<<(), KDChart::AbstractDiagram::paintDataValueText(), and KDChart::Abstract-Diagram::paintMarker().

6.23.3.8 MarkerAttributes KDChart::DataValueAttributes::markerAttributes () const

Returns:The marker attributes used for decorating the data values.

See also:MarkerAttributes

Referenced by KDChart::AbstractDiagram::paintMarker().

6.23.3.9 RelativePositionKDChart::DataValueAttributes::negativePosition () const

Referenced by operator<<().

6.23.3.10 bool KDChart::DataValueAttributes::operator!= (const DataValueAttributes & other)const

Definition at line 58 of file KDChartDataValueAttributes.h.

58 { return !operator==(other); }

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

358 KD Chart 2 Class Documentation

6.23.3.11 DataValueAttributes& KDChart::DataValueAttributes::operator= (constDataValueAttributes &)

6.23.3.12 bool KDChart::DataValueAttributes::operator== (constDataValueAttributes &) const

6.23.3.13 RelativePositionKDChart::DataValueAttributes::positivePosition () const

Referenced by operator<<().

6.23.3.14 int KDChart::DataValueAttributes::powerOfTenDivisor () const

Referenced by operator<<().

6.23.3.15 QString KDChart::DataValueAttributes::prefix () const

Returns:The string used as a prefix to the data value text.

Referenced by KDChart::AbstractDiagram::paintDataValueText().

6.23.3.16 void KDChart::DataValueAttributes::setBackgroundAttributes (constBackgroundAttributes & a)

Set the background attributes to use for the data value labels area.

Parameters:a The background attributes to set.

See also:BackgroundAttributes

6.23.3.17 void KDChart::DataValueAttributes::setDataLabel (const QStringlabel)

a string label instead of the original data value label

Parameters:label: the string to be displayed.

6.23.3.18 void KDChart::DataValueAttributes::setDecimalDigits (int digits)

Set how many decimal digits to display when rendering the data value labels.

If there are no decimal digits it will not be displayed.

Parameters:digits The number of decimal digits to use.

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

6.23 KDChart::DataValueAttributes Class Reference 359

6.23.3.19 void KDChart::DataValueAttributes::setFrameAttributes (constFrameAttributes & a)

Set the frame attributes to use for the data value labels area.

Parameters:a The frame attributes to set.

See also:FrameAttributes

6.23.3.20 void KDChart::DataValueAttributes::setMarkerAttributes (const MarkerAttributes &a)

Set the marker attributes to use for the data values.

This includes the marker type.

Parameters:a The marker attributes to set.

See also:MarkerAttributes

6.23.3.21 void KDChart::DataValueAttributes::setNegativePosition (constRelativePosition&relPosition)

6.23.3.22 void KDChart::DataValueAttributes::setPositivePosition (constRelativePosition&relPosition)

6.23.3.23 void KDChart::DataValueAttributes::setPowerOfTenDivisor (int powerOfTenDivisor)

6.23.3.24 void KDChart::DataValueAttributes::setPrefix (const QStringprefix)

Prepend a prefix to the data value text to be displayed.

Parameters:prefix The string to prepend.

6.23.3.25 void KDChart::DataValueAttributes::setShowInfinite (bool infinite)

6.23.3.26 void KDChart::DataValueAttributes::setSuffix (const QStringsuffix)

Append a suffix to the data value text to be displayed.

Parameters:suffix The string to append.

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

360 KD Chart 2 Class Documentation

6.23.3.27 void KDChart::DataValueAttributes::setTextAttributes (const TextAttributes & a)

Set the text attributes to use for the data value labels.

Parameters:a The text attributes to set.

See also:TextAttributes

6.23.3.28 void KDChart::DataValueAttributes::setVisible (boolvisible)

Set whether data value labels should be displayed.

Parameters:visible Whether data value labels should be displayed.

6.23.3.29 bool KDChart::DataValueAttributes::showInfinite () const

Referenced by operator<<().

6.23.3.30 QString KDChart::DataValueAttributes::suffix () const

Returns:The string used as a suffix to the data value text.

Referenced by KDChart::AbstractDiagram::paintDataValueText().

6.23.3.31 TextAttributes KDChart::DataValueAttributes::textAttributes () const

Returns:The text attributes used for painting data value labels.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

The documentation for this class was generated from the following file:

• KDChartDataValueAttributes.h

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

6.24 KDChart::DiagramObserver Class Reference 361

6.24 KDChart::DiagramObserver Class Reference

#include <KDChartDiagramObserver.h >

Inheritance diagram for KDChart::DiagramObserver:Collaboration diagram for KDChart::Diagram-Observer:

6.24.1 Detailed Description

A DiagramObserverwatches the associated diagram for changes and deletion and emits corresponsingsignals.

Definition at line 43 of file KDChartDiagramObserver.h.

Public Member Functions

• AbstractDiagram∗ diagram()• constAbstractDiagram∗ diagram() const• void diagramAttributesChanged(AbstractDiagram∗diagram)

This signal is emitted whenever the attributes of the diagram change.

• void diagramDataChanged(AbstractDiagram∗diagram)

This signal is emitted whenever the data of the diagram changes.

• DiagramObserver(AbstractDiagram∗diagram,QObject∗parent=0)

Constructs a new observer observing the given diagram.

• void slotAttributesChanged()• void slotDataChanged()• void slotModelsChanged()• ∼DiagramObserver()

Public Attributes

• Q_SIGNALS__pad0__: void diagramDestroyed(AbstractDiagram∗ diagram )• privateQ_SLOTS: void slotDestroyed()

6.24.2 Constructor & Destructor Documentation

6.24.2.1 DiagramObserver::DiagramObserver (AbstractDiagram ∗ diagram, QObject ∗ parent=0) [explicit]

Constructs a new observer observing the given diagram.

Definition at line 40 of file KDChartDiagramObserver.cpp.

References slotModelsChanged().

41 : QObject( parent ), m_diagram( diagram )42 {43 if ( m_diagram ) {44 connect( m_diagram, SIGNAL(destroyed(QObject*)), SLOT(slotDestroyed()));

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

362 KD Chart 2 Class Documentation

45 connect( m_diagram, SIGNAL(modelsChanged()), SLOT(slotModelsChanged()));46 }47 }

6.24.2.2 DiagramObserver::∼DiagramObserver ()

Definition at line 49 of file KDChartDiagramObserver.cpp.

49 {}

6.24.3 Member Function Documentation

6.24.3.1 AbstractDiagram ∗ DiagramObserver::diagram ()

Definition at line 56 of file KDChartDiagramObserver.cpp.

57 {58 return m_diagram;59 }

6.24.3.2 constAbstractDiagram ∗ DiagramObserver::diagram () const

Definition at line 51 of file KDChartDiagramObserver.cpp.

Referenced by KDChart::Legend::datasetCount().

52 {53 return m_diagram;54 }

6.24.3.3 void KDChart::DiagramObserver::diagramAttributesChanged (AbstractDiagram ∗diagram)

This signal is emitted whenever the attributes of the diagram change.

Referenced by slotAttributesChanged().

6.24.3.4 void KDChart::DiagramObserver::diagramDataChanged (AbstractDiagram ∗ diagram)

This signal is emitted whenever the data of the diagram changes.

Referenced by slotDataChanged().

6.24.3.5 void DiagramObserver::slotAttributesChanged ()

Definition at line 99 of file KDChartDiagramObserver.cpp.

References diagramAttributesChanged().

Referenced by slotModelsChanged().

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

6.24 KDChart::DiagramObserver Class Reference 363

100 {101 emit diagramAttributesChanged( m_diagram );102 }

6.24.3.6 void DiagramObserver::slotDataChanged ()

Definition at line 94 of file KDChartDiagramObserver.cpp.

References diagramDataChanged().

Referenced by slotModelsChanged().

95 {96 emit diagramDataChanged( m_diagram );97 }

6.24.3.7 void DiagramObserver::slotModelsChanged ()

Definition at line 87 of file KDChartDiagramObserver.cpp.

References slotAttributesChanged(), and slotDataChanged().

Referenced by DiagramObserver().

88 {89 init();90 slotDataChanged();91 slotAttributesChanged();92 }

6.24.4 Member Data Documentation

6.24.4.1 Q_SIGNALSKDChart::DiagramObserver::__pad0__

Definition at line 59 of file KDChartDiagramObserver.h.

6.24.4.2 privateKDChart::DiagramObserver::Q_SLOTS

Definition at line 66 of file KDChartDiagramObserver.h.

The documentation for this class was generated from the following files:

• KDChartDiagramObserver.h• KDChartDiagramObserver.cpp

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

364 KD Chart 2 Class Documentation

6.25 KDChart::FrameAttributes Class Reference

#include <KDChartFrameAttributes.h >

Public Member Functions

• FrameAttributes(constFrameAttributes&)• FrameAttributes()• bool isVisible () const• booloperator!=(constFrameAttributes&other) const• FrameAttributes& operator=(constFrameAttributes&)• booloperator==(constFrameAttributes&) const• int padding() const• QPenpen() const• void setPadding(int padding)• void setPen(const QPen &pen)• void setVisible(bool visible)• ∼FrameAttributes()

6.25.1 Constructor & Destructor Documentation

6.25.1.1 KDChart::FrameAttributes::FrameAttributes ()

6.25.1.2 KDChart::FrameAttributes::FrameAttributes (const FrameAttributes &)

6.25.1.3 KDChart::FrameAttributes::∼FrameAttributes ()

6.25.2 Member Function Documentation

6.25.2.1 bool KDChart::FrameAttributes::isVisible () const

Referenced by operator<<().

6.25.2.2 bool KDChart::FrameAttributes::operator!= (const FrameAttributes & other) const

Definition at line 59 of file KDChartFrameAttributes.h.

59 { return !operator==(other); }

6.25.2.3 FrameAttributes& KDChart::FrameAttributes::operator= (const FrameAttributes &)

6.25.2.4 bool KDChart::FrameAttributes::operator== (const FrameAttributes &) const

6.25.2.5 int KDChart::FrameAttributes::padding () const

Referenced by operator<<().

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

6.25 KDChart::FrameAttributes Class Reference 365

6.25.2.6 QPen KDChart::FrameAttributes::pen () const

Referenced by operator<<().

6.25.2.7 void KDChart::FrameAttributes::setPadding (int padding)

6.25.2.8 void KDChart::FrameAttributes::setPen (const QPen &pen)

6.25.2.9 void KDChart::FrameAttributes::setVisible (bool visible)

The documentation for this class was generated from the following file:

• KDChartFrameAttributes.h

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

366 KD Chart 2 Class Documentation

6.26 KDChart::GridAttributes Class Reference

#include <KDChartGridAttributes.h >

Public Member Functions

• GridAttributes(constGridAttributes&)• GridAttributes()• KDChartEnums::GranularitySequencegridGranularitySequence() const• QPengridPen() const• qrealgridStepWidth() const• qrealgridSubStepWidth() const• bool isGridVisible() const• bool isSubGridVisible() const• booloperator!=(constGridAttributes&other) const• GridAttributes& operator=(constGridAttributes&)• booloperator==(constGridAttributes&) const• void setGridGranularitySequence(KDChartEnums::GranularitySequencesequence)• void setGridPen(const QPen &pen)• void setGridStepWidth(qreal stepWidth=0.0)• void setGridSubStepWidth(qreal subStepWidth=0.0)• void setGridVisible(bool visible)• void setSubGridPen(const QPen &pen)• void setSubGridVisible(bool visible)• void setZeroLinePen(const QPen &pen)• QPensubGridPen() const• QPenzeroLinePen() const• ∼GridAttributes()

6.26.1 Constructor & Destructor Documentation

6.26.1.1 KDChart::GridAttributes::GridAttributes ()

6.26.1.2 KDChart::GridAttributes::GridAttributes (const GridAttributes &)

6.26.1.3 KDChart::GridAttributes:: ∼GridAttributes ()

6.26.2 Member Function Documentation

6.26.2.1 KDChartEnums::GranularitySequence KDChart::GridAttributes::gridGranularity-Sequence () const

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

6.26.2.2 QPen KDChart::GridAttributes::gridPen () const

Referenced by operator<<().

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

6.26 KDChart::GridAttributes Class Reference 367

6.26.2.3 qreal KDChart::GridAttributes::gridStepWidth () const

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(), and operator<<().

6.26.2.4 qreal KDChart::GridAttributes::gridSubStepWidth () const

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(), and operator<<().

6.26.2.5 bool KDChart::GridAttributes::isGridVisible () const

Referenced by operator<<().

6.26.2.6 bool KDChart::GridAttributes::isSubGridVisible () const

Referenced by operator<<().

6.26.2.7 bool KDChart::GridAttributes::operator!= (const GridAttributes & other) const

Definition at line 79 of file KDChartGridAttributes.h.

79 { return !operator==(other); }

6.26.2.8 GridAttributes & KDChart::GridAttributes::operator= (const GridAttributes &)

6.26.2.9 bool KDChart::GridAttributes::operator== (const GridAttributes &) const

6.26.2.10 void KDChart::GridAttributes::setGridGranularitySequence(KDChartEnums::GranularitySequence sequence)

6.26.2.11 void KDChart::GridAttributes::setGridPen (const QPen & pen)

6.26.2.12 void KDChart::GridAttributes::setGridStepWidth (qreal stepWidth= 0.0)

6.26.2.13 void KDChart::GridAttributes::setGridSubStepWidth (qreal subStepWidth= 0.0)

6.26.2.14 void KDChart::GridAttributes::setGridVisible (bool visible)

6.26.2.15 void KDChart::GridAttributes::setSubGridPen (const QPen & pen)

6.26.2.16 void KDChart::GridAttributes::setSubGridVisible (bool visible)

6.26.2.17 void KDChart::GridAttributes::setZeroLinePen (const QPen & pen)

6.26.2.18 QPen KDChart::GridAttributes::subGridPen () const

Referenced by operator<<().

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

368 KD Chart 2 Class Documentation

6.26.2.19 QPen KDChart::GridAttributes::zeroLinePen () const

Referenced by operator<<().

The documentation for this class was generated from the following file:

• KDChartGridAttributes.h

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

6.27 KDChart::HeaderFooter Class Reference 369

6.27 KDChart::HeaderFooter Class Reference

#include <KDChartHeaderFooter.h >

Inheritance diagram for KDChart::HeaderFooter:Collaboration diagram for KDChart::HeaderFooter:

Public Types

• enumHeaderFooterType{

Header,

Footer}

Public Member Functions

• void alignToReferencePoint(constRelativePosition&position)• constQObject∗ autoReferenceArea() const• BackgroundAttributesbackgroundAttributes() const• virtual HeaderFooter∗ clone() const• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

• HeaderFooter(Chart∗parent=0)• virtual bool intersects(constTextLayoutItem&other, const QPoint &myPos, const QPoint &other-

Pos) const• virtual bool intersects(const TextLayoutItem&other, const QPointF &myPos, const QPointF

&otherPos) const• virtual boolisEmpty() const

pure virtual inQLayoutItem

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

• virtual voidpaint(QPainter∗)• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)

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

370 KD Chart 2 Class Documentation

• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• Positionposition() const• void positionChanged(HeaderFooter∗)• virtual QFontrealFont() const• virtual qrealrealFontSize() const• void removeFromParentLayout()• void setAutoReferenceArea(constQObject∗area)• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setParent(QObject∗parent)• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setPosition(Positionposition)• void setText(const QString &text)• void setTextAttributes(constTextAttributes&a)

Use this to specify the text attributes to be used for this item.

• void setType(HeaderFooterTypetype)• virtual QSizesizeHint() const

pure virtual inQLayoutItem

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• QStringtext () const• TextAttributestextAttributes() const

Returns the text attributes to be used for this item.

• HeaderFooterTypetype() const• virtual∼HeaderFooter()

Public Attributes

• Q_SIGNALS__pad0__: void destroyedHeaderFooter(HeaderFooter∗ )

Protected Member Functions

• virtual QRectareaGeometry() const• QRectinnerRect() const• virtual voidpositionHasChanged()

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

6.27 KDChart::HeaderFooter Class Reference 371

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout

6.27.1 Member Enumeration Documentation

6.27.1.1 enumKDChart::HeaderFooter::HeaderFooterType

Enumeration values:Header

Footer

Definition at line 54 of file KDChartHeaderFooter.h.

54 { Header,55 Footer };

6.27.2 Constructor & Destructor Documentation

6.27.2.1 HeaderFooter::HeaderFooter (Chart ∗ parent= 0)

Definition at line 55 of file KDChartHeaderFooter.cpp.

References setParent().

Referenced by clone().

55 :56 TextArea( new Private() )57 {58 setParent( parent );59 init();60 }

6.27.2.2 HeaderFooter::∼HeaderFooter() [virtual]

Definition at line 62 of file KDChartHeaderFooter.cpp.

63 {64 emit destroyedHeaderFooter( this );65 }

6.27.3 Member Function Documentation

6.27.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

372 KD Chart 2 Class Documentation

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

6.27.3.2 QRect TextArea::areaGeometry () const [protected, virtual, inherited]

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartTextArea.cpp.

References KDChart::TextLayoutItem::geometry().

Referenced by KDChart::TextArea::paintAll().

106 {107 return geometry();108 }

6.27.3.3 constQObject ∗ KDChart::TextLayoutItem::autoReferenceArea () const[inherited]

Definition at line 122 of file KDChartLayoutItems.cpp.

Referenced by setParent().

123 {124 return mAutoReferenceArea;125 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.27.3.5 HeaderFooter∗ HeaderFooter::clone () const [virtual]

Definition at line 91 of file KDChartHeaderFooter.cpp.

References d, HeaderFooter(), position(), setPosition(), KDChart::TextLayoutItem::setTextAttributes(),setType(), KDChart::TextLayoutItem::textAttributes(), and type().

92 {93 HeaderFooter* headerFooter = new HeaderFooter( new Private( *d ), 0 );94 headerFooter->setType( type() );95 headerFooter->setPosition( position() );96 headerFooter->setTextAttributes( textAttributes() );97 return headerFooter;98 }

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

6.27 KDChart::HeaderFooter Class Reference 373

6.27.3.6 Qt::Orientations KDChart::TextLayoutItem::expandingDirections () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 162 of file KDChartLayoutItems.cpp.

163 {164 return 0; // Grow neither vertically nor horizontally165 }

6.27.3.7 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.27.3.8 QRect KDChart::TextLayoutItem::geometry () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 167 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextArea::areaGeometry(), KDChart::TextLayoutItem::paint(), KDChart::Text-Area::paintAll(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextArea::paintIntoRect().

168 {169 return mRect;170 }

6.27.3.9 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(), andKDChart::AbstractArea::paintAll().

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

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

374 KD Chart 2 Class Documentation

6.27.3.10 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, constQPoint & myPos, const QPoint & otherPos) const [virtual, inherited]

Definition at line 248 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::mAttributes, PI, KDChart::TextLayoutItem::rotatedCorners(),KDChart::TextAttributes::rotation(), and KDChart::TextLayoutItem::unrotatedSizeHint().

249 {250 if ( mAttributes.rotation() != other.mAttributes.rotation() )251 {252 // that’s the code for the common case: the rotation angles don’t need to match here253 QPolygon myPolygon( rotatedCorners() );254 QPolygon otherPolygon( other.rotatedCorners() );255256 // move the polygons to their positions257 myPolygon.translate( myPos );258 otherPolygon.translate( otherPos );259260 // create regions out of it261 QRegion myRegion( myPolygon );262 QRegion otherRegion( otherPolygon );263264 // now the question - do they intersect or not?265 return ! myRegion.intersect( otherRegion ).isEmpty();266267 } else {268 // and that’s the code for the special case: the rotation angles match, which is less time consuming in calculation269 const qreal angle = mAttributes.rotation() * PI / 180.0;270 // both sizes271 const QSizeF mySize( unrotatedSizeHint() );272 const QSizeF otherSize( other.unrotatedSizeHint() );273274 // that’s myP1 relative to myPos275 QPointF myP1( mySize.height() * sin( angle ), 0.0 );276 // that’s otherP1 to myPos277 QPointF otherP1 = QPointF( otherSize.height() * sin( angle ), 0.0 ) + otherPos - myPos;278279 // now rotate both points the negative angle around myPos280 myP1 = QPointF( myP1.x() * cos( -angle ), myP1.x() * sin( -angle ) );281 qreal r = sqrt( otherP1.x() * otherP1.x() + otherP1.y() * otherP1.y() );282 otherP1 = QPointF( r * cos( -angle ), r * sin( -angle ) );283284 // finally we look, whether both rectangles intersect or even not285 return QRectF( myP1, mySize ).intersects( QRectF( otherP1, otherSize ) );286 }287 }

6.27.3.11 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, constQPointF & myPos, const QPointF & otherPos) const [virtual, inherited]

Definition at line 243 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

244 {245 return intersects( other, myPos.toPoint(), otherPos.toPoint() );246 }

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

6.27 KDChart::HeaderFooter Class Reference 375

6.27.3.12 bool KDChart::TextLayoutItem::isEmpty () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 172 of file KDChartLayoutItems.cpp.

173 {174 return false; // never empty, otherwise the layout item would not exist175 }

6.27.3.13 QSize KDChart::TextLayoutItem::maximumSize () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 177 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

178 {179 return sizeHint(); // PENDING(kalle) Review, quite inflexible180 }

6.27.3.14 QSize KDChart::TextLayoutItem::minimumSize () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 182 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

183 {184 return sizeHint(); // PENDING(kalle) Review, quite inflexible185 }

6.27.3.15 void KDChart::TextLayoutItem::paint (QPainter ∗) [virtual, inherited]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 325 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::geometry(), KDChart::TextAttributes::pen(), KDChart::Text-Attributes::rotation(), and KDChart::TextLayoutItem::sizeHint().

Referenced by KDChart::TextArea::paintAll(), and KDChart::CartesianAxis::paintCtx().

326 {327 // make sure, cached font is updated, if needed:328 sizeHint();329330 if( !mRect.isValid() )331 return;332333 PainterSaver painterSaver( painter );334 painter->setFont( cachedFont );335 painter->setPen( mAttributes.pen() );336 QRectF rect = geometry();337

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

376 KD Chart 2 Class Documentation

338 painter->translate( rect.center() );339 rect.moveTopLeft( QPointF( - rect.width() / 2, - rect.height() / 2 ) );340 painter->rotate( mAttributes.rotation() );341 painter->drawText( rect, Qt::AlignHCenter | Qt::AlignVCenter, mText );342 }

6.27.3.16 void TextArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartTextArea.cpp.

References KDChart::TextArea::areaGeometry(), KDChart::TextLayoutItem::geometry(),KDChart::AbstractAreaBase::innerRect(), KDChart::TextLayoutItem::paint(), KDChart::Abstract-AreaBase::paintBackground(), KDChart::AbstractAreaBase::paintFrame(), and KDChart::TextLayout-Item::setGeometry().

Referenced by KDChart::Chart::paint(), and KDChart::TextArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "TextAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/

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

6.27 KDChart::HeaderFooter Class Reference 377

113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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 }

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

378 KD Chart 2 Class Documentation

6.27.3.19 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(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteText-LayoutItem::paint()instead.

Definition at line 71 of file KDChartTextArea.cpp.

References KDChart::TextLayoutItem::geometry(), KDChart::TextArea::paintAll(), and KDChart::Text-LayoutItem::setGeometry().

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.27.3.21 PositionHeaderFooter::position () const

Definition at line 117 of file KDChartHeaderFooter.cpp.

References d.

Referenced by clone().

118 {119 return d->position;120 }

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

6.27 KDChart::HeaderFooter Class Reference 379

6.27.3.22 void KDChart::HeaderFooter::positionChanged (HeaderFooter∗)

Referenced by setPosition(), and setType().

6.27.3.23 void TextArea::positionHasChanged () [protected, virtual, inherited]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartTextArea.cpp.

111 {112 emit positionChanged( this );113 }

6.27.3.24 QFont KDChart::TextLayoutItem::realFont () const [virtual, inherited]

Definition at line 220 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

221 {222 realFontWasRecalculated(); // we can safely ignore the boolean return value223 return cachedFont;224 }

6.27.3.25 qreal KDChart::TextLayoutItem::realFontSize () const [virtual, inherited]

Definition at line 193 of file KDChartLayoutItems.cpp.

References KDChart::Measure::calculatedValue(), KDChart::TextAttributes::fontSize(), andKDChart::TextAttributes::minimalFontSize().

194 {195 return qMax(196 mAttributes.fontSize().calculatedValue(197 mAutoReferenceArea,198 mAutoReferenceOrientation ),199 mAttributes.minimalFontSize().calculatedValue(200 mAutoReferenceArea,201 mAutoReferenceOrientation ) );202 }

6.27.3.26 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 else72 mParentLayout->removeItem( this );73 }74 }

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

380 KD Chart 2 Class Documentation

6.27.3.27 void KDChart::TextLayoutItem::setAutoReferenceArea (constQObject ∗ area)[inherited]

Definition at line 115 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by setParent().

116 {117 mAutoReferenceArea = area;118 cachedSizeHint = QSize();119 sizeHint();120 }

6.27.3.28 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.27.3.29 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

6.27.3.30 void KDChart::TextLayoutItem::setGeometry (const QRect &r) [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 187 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextArea::paintAll(), KDChart::CartesianAxis::paintCtx(), and KDChart::Text-Area::paintIntoRect().

188 {189 mRect = r;190 }

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

6.27 KDChart::HeaderFooter Class Reference 381

6.27.3.31 void HeaderFooter::setParent (QObject ∗ parent)

Definition at line 67 of file KDChartHeaderFooter.cpp.

References KDChart::TextLayoutItem::autoReferenceArea(), and KDChart::TextLayoutItem::setAuto-ReferenceArea().

Referenced by KDChart::Widget::addHeaderFooter(), KDChart::Chart::addHeaderFooter(), Header-Footer(), KDChart::Widget::replaceHeaderFooter(), and KDChart::Chart::takeHeaderFooter().

68 {69 QObject::setParent( parent );70 if( parent && ! autoReferenceArea() )71 setAutoReferenceArea( parent );72 }

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.27.3.33 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 sizeof 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.27.3.34 void HeaderFooter::setPosition (Positionposition)

Definition at line 111 of file KDChartHeaderFooter.cpp.

References d, and positionChanged().

Referenced by KDChart::Widget::addHeaderFooter(), and clone().

112 {113 d->position = position;114 emit positionChanged( this );115 }

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

382 KD Chart 2 Class Documentation

6.27.3.35 void KDChart::TextLayoutItem::setText (const QString & text) [inherited]

Definition at line 127 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by KDChart::Widget::addHeaderFooter(), KDChart::CartesianAxis::maximumSize(), andKDChart::CartesianAxis::paintCtx().

128 {129 mText = text;130 cachedSizeHint = QSize();131 sizeHint();132 }

6.27.3.36 void KDChart::TextLayoutItem::setTextAttributes (const TextAttributes & a)[inherited]

Use this to specify the text attributes to be used for this item.

See also:textAttributes

Definition at line 144 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by clone().

145 {146 mAttributes = a;147 cachedSizeHint = QSize(); // invalidate size hint148 sizeHint();149 }

6.27.3.37 void HeaderFooter::setType (HeaderFooterTypetype)

Definition at line 100 of file KDChartHeaderFooter.cpp.

References d, and positionChanged().

Referenced by KDChart::Widget::addHeaderFooter(), and clone().

101 {102 d->type = type;103 emit positionChanged( this );104 }

6.27.3.38 QSize KDChart::TextLayoutItem::sizeHint () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 289 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::sizeHintChanged().

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

6.27 KDChart::HeaderFooter Class Reference 383

Referenced by KDChart::Legend::buildLegend(), KDChart::TextLayoutItem::maximumSize(),KDChart::CartesianAxis::maximumSize(), KDChart::TextLayoutItem::minimumSize(), KDChart::Text-LayoutItem::paint(), KDChart::CartesianAxis::paintCtx(), KDChart::TextLayoutItem::setAutoReference-Area(), KDChart::TextLayoutItem::setText(), and KDChart::TextLayoutItem::setTextAttributes().

290 {291 if( realFontWasRecalculated() )292 {293 cachedSizeHint = calcSizeHint( cachedFont );294 sizeHintChanged();295 }296 //qDebug("cachedSizeHint.width(): %i",cachedSizeHint.width());297 return cachedSizeHint;298 }

6.27.3.39 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.27.3.40 QString KDChart::TextLayoutItem::text () const [inherited]

Definition at line 134 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

135 {136 return mText;137 }

6.27.3.41 KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes () const[inherited]

Returns the text attributes to be used for this item.

See also:setTextAttributes

Definition at line 156 of file KDChartLayoutItems.cpp.

Referenced by clone().

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

384 KD Chart 2 Class Documentation

157 {158 return mAttributes;159 }

6.27.3.42 HeaderFooter::HeaderFooterTypeHeaderFooter::type () const

Definition at line 106 of file KDChartHeaderFooter.cpp.

References d.

Referenced by clone().

107 {108 return d->type;109 }

6.27.4 Member Data Documentation

6.27.4.1 Q_SIGNALSKDChart::HeaderFooter::__pad0__

Reimplemented fromKDChart::TextArea.

Definition at line 66 of file KDChartHeaderFooter.h.

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartHeaderFooter.h• KDChartHeaderFooter.cpp

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

6.28 KDChart::HorizontalLineLayoutItem Class Reference 385

6.28 KDChart::HorizontalLineLayoutItem Class Reference

#include <KDChartLayoutItems.h >

Inheritance diagram for KDChart::HorizontalLineLayoutItem:Collaboration diagram forKDChart::HorizontalLineLayoutItem:

Public Member Functions

• virtual Qt::OrientationsexpandingDirections() const

• virtual QRectgeometry() const

• HorizontalLineLayoutItem()

• virtual boolisEmpty() const

• virtual QSizemaximumSize() const

• virtual QSizeminimumSize() const

• virtual voidpaint(QPainter∗)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• void removeFromParentLayout()

• virtual voidsetGeometry(const QRect &r)

• void setParentLayout(QLayout∗lay)

• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• virtual QSizesizeHint() const

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

Protected Attributes

• QWidget∗ mParent

• QLayout∗ mParentLayout

6.28.1 Constructor & Destructor Documentation

6.28.1.1 KDChart::HorizontalLineLayoutItem::HorizontalLineLayoutItem ()

Definition at line 411 of file KDChartLayoutItems.cpp.

412 : AbstractLayoutItem( Qt::AlignCenter )413 {414 }

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

386 KD Chart 2 Class Documentation

6.28.2 Member Function Documentation

6.28.2.1 Qt::Orientations KDChart::HorizontalLineLayoutItem::expandingDirections () const[virtual]

Definition at line 416 of file KDChartLayoutItems.cpp.

417 {418 return Qt::Vertical|Qt::Horizontal; // Grow neither vertically nor horizontally419 }

6.28.2.2 QRect KDChart::HorizontalLineLayoutItem::geometry () const [virtual]

Definition at line 421 of file KDChartLayoutItems.cpp.

422 {423 return mRect;424 }

6.28.2.3 bool KDChart::HorizontalLineLayoutItem::isEmpty () const [virtual]

Definition at line 426 of file KDChartLayoutItems.cpp.

427 {428 return false; // never empty, otherwise the layout item would not exist429 }

6.28.2.4 QSize KDChart::HorizontalLineLayoutItem::maximumSize () const [virtual]

Definition at line 431 of file KDChartLayoutItems.cpp.

432 {433 return QSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );434 }

6.28.2.5 QSize KDChart::HorizontalLineLayoutItem::minimumSize () const [virtual]

Definition at line 436 of file KDChartLayoutItems.cpp.

437 {438 return QSize( 0, 0 );439 }

6.28.2.6 void KDChart::HorizontalLineLayoutItem::paint (QPainter ∗) [virtual]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 452 of file KDChartLayoutItems.cpp.

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

6.28 KDChart::HorizontalLineLayoutItem Class Reference 387

453 {454 if( !mRect.isValid() )455 return;456457 painter->drawLine( QPointF( mRect.left(), mRect.center().y() ),458 QPointF( mRect.right(), mRect.center().y() ) );459 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.28.2.8 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 else72 mParentLayout->removeItem( this );73 }74 }

6.28.2.9 void KDChart::HorizontalLineLayoutItem::setGeometry (const QRect & r)[virtual]

Definition at line 441 of file KDChartLayoutItems.cpp.

442 {443 mRect = r;444 }

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

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

388 KD Chart 2 Class Documentation

6.28.2.11 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 sizeof 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.28.2.12 QSize KDChart::HorizontalLineLayoutItem::sizeHint () const [virtual]

Definition at line 446 of file KDChartLayoutItems.cpp.

447 {448 return QSize( -1, 3 ); // see qframe.cpp449 }

6.28.2.13 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.28.3 Member Data Documentation

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

6.28 KDChart::HorizontalLineLayoutItem Class Reference 389

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

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartLayoutItems.h• KDChartLayoutItems.cpp

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

390 KD Chart 2 Class Documentation

6.29 KDChartEnums Class Reference

#include <KDChartEnums.h >

Inheritance diagram for KDChartEnums:Collaboration diagram for KDChartEnums:

6.29.1 Detailed Description

Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox.

Definition at line 46 of file KDChartEnums.h.

Public Types

• enumGranularitySequence{

GranularitySequence_10_20,

GranularitySequence_10_50,

GranularitySequence_25_50,

GranularitySequenceIrregular}

GranularitySequence specifies the values, that may be applied, to determine a step width within a givendata range.

• enumMeasureCalculationMode{

MeasureCalculationModeAbsolute,

MeasureCalculationModeRelative,

MeasureCalculationModeAuto,

MeasureCalculationModeAutoArea,

MeasureCalculationModeAutoOrientation}

Measure calculation mode: the way how the absolute value of aKDChart::Measureis determined duringKD Chart’s internal geometry calculation time.

• enumMeasureOrientation{

MeasureOrientationAuto,

MeasureOrientationHorizontal,

MeasureOrientationVertical,

MeasureOrientationMinimum,

MeasureOrientationMaximum}

Measure orientation mode: the way how the absolute value of aKDChart::Measureis determined duringKD Chart’s internal geometry calculation time.

• enumPositionValue{

PositionUnknown= 0,

PositionCenter= 1,

PositionNorthWest= 2,

PositionNorth= 3,

PositionNorthEast= 4,

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

6.29 KDChartEnums Class Reference 391

PositionEast= 5,

PositionSouthEast= 6,

PositionSouth= 7,

PositionSouthWest= 8,

PositionWest= 9 }

Numerical values of the staticKDChart::Positioninstances, for using aPosition::value()with a switch()statement.

• enumTextLayoutPolicy{

LayoutJustOverwrite,

LayoutPolicyRotate,

LayoutPolicyShiftVertically,

LayoutPolicyShiftHorizontally,

LayoutPolicyShrinkFontSize}

Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighboring areas.

Static Public Member Functions

• QStringgranularitySequenceToString(GranularitySequencesequence)

Converts the specified granularity sequence enum to a string representation.

• QStringlayoutPolicyToString(TextLayoutPolicytype)

Converts the specified text layout policy enum to a string representation.

• QStringmeasureCalculationModeToString(MeasureCalculationModemode)

Converts the specified measure calculation mode enum to a string representation.

• QStringMeasureOrientationToString(MeasureOrientationmode)

Converts the specified measure orientation enum to a string representation.

• GranularitySequencestringToGranularitySequence(const QString &string)

Converts the specified string to a granularity sequence enum value.

• TextLayoutPolicystringToLayoutPolicy(const QString &string)

Converts the specified string to a text layout policy enum value.

• MeasureCalculationModestringToMeasureCalculationMode(const QString &string)

Converts the specified string to a measure calculation mode enum value.

• MeasureOrientationstringToMeasureOrientation(const QString &string)

Converts the specified string to a measure orientation enum value.

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

392 KD Chart 2 Class Documentation

6.29.2 Member Enumeration Documentation

6.29.2.1 enumKDChartEnums::GranularitySequence

GranularitySequence specifies the values, that may be applied, to determine a step width within a givendata range.

Note:Granularity with can be set for Linear axis calculation mode only, there is no way to specify a stepwidth for Logarithmic axes.

Value occuring in the GranularitySequence names only are showing their respective relation ship. For realdata they will most times not be used directly, but be multiplied by positive (or negative, resp.) powers often.

A granularity sequence is a sequence of values from the following set: 1, 2, 2.5, 5.

The reason for using one of the following three pre-defined granularity sequences (instead of just using thebest matching step width) is to follow a simple rule: If scaling becomes finer (== smaller step width) novalue, that has been on a grid line before, shall loose its line and be NOT on a grid line anymore!

This means: Smaller step width may not remove any grid lines, but it may add additional lines in between.

• GranularitySequence_10_20 Step widths can be 1, or 2, but they never can be 2.5 nor 5.

• GranularitySequence_10_50 Step widths can be 1, or 5, but they never can be 2, nor 2.5.

• GranularitySequence_25_50 Step widths can be 2.5, or 5, but they never can be 1, nor 2.

• GranularitySequenceIrregular Step widths can be all of these values: 1, or 2, or 2.5, or5.

Note:When ever possible, try to avoid using GranularitySequenceIrregular! Allowing all possible step val-ues, using this granularity sequence involves a serious risk: Your users might be irritated due to ’jump-ing’ grid lines, when step size is changed from 2.5 to 2 (or vice versa, resp.).

Since you probably like having the value 1 as an allowed step width, the granularity sequence decisionboils down to a boolean question:

• To get ten divided by five you use GranularitySequence_10_20, while

• for having it divided by two GranularitySequence_10_50 is your choice.

Enumeration values:GranularitySequence_10_20

GranularitySequence_10_50

GranularitySequence_25_50

GranularitySequenceIrregular

Definition at line 94 of file KDChartEnums.h.

94 {95 GranularitySequence_10_20,96 GranularitySequence_10_50,97 GranularitySequence_25_50,98 GranularitySequenceIrregular };

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

6.29 KDChartEnums Class Reference 393

6.29.2.2 enumKDChartEnums::MeasureCalculationMode

Measure calculation mode: the way how the absolute value of aKDChart::Measureis determined duringKD Chart’s internal geometry calculation time.

KDChart::Measurevalues either are relative (calculated in relation to a given AbstractArea), or they areabsolute (used as fixed values).

Values stored in relative measure always are interpreted as per-mille of a reference area’s height (or width,resp.) depending on the orientation set for theKDChart::Measure.

• MeasureCalculationModeAbsolute Value set by setValue() is absolute, to be used un-changed.

• MeasureCalculationModeRelative Value is relative, the reference area is specified by set-ReferenceArea(), and orientation specified by setOrientation().

• MeasureCalculationModeAuto Value is relative, KD Chart will automatically determinewhich reference area to use, and it will determine the orientation too.

• MeasureCalculationModeAutoArea Value is relative, Orientation is specified by set-Orientation(), and KD Chart will automatically determine which reference area to use.

• MeasureCalculationModeAutoOrientation Value is relative, Area is specified by set-ReferenceArea(), and KD Chart will automatically determine which orientation to use.

See also:KDChart::Measure::setCalculationMode

Enumeration values:MeasureCalculationModeAbsolute

MeasureCalculationModeRelative

MeasureCalculationModeAuto

MeasureCalculationModeAutoArea

MeasureCalculationModeAutoOrientation

Definition at line 215 of file KDChartEnums.h.

215 { MeasureCalculationModeAbsolute,216 MeasureCalculationModeRelative,217 MeasureCalculationModeAuto,218 MeasureCalculationModeAutoArea,219 MeasureCalculationModeAutoOrientation };

6.29.2.3 enumKDChartEnums::MeasureOrientation

Measure orientation mode: the way how the absolute value of aKDChart::Measureis determined duringKD Chart’s internal geometry calculation time.

KDChart::Measurevalues either are relative (calculated in relation to a given AbstractArea), or they areabsolute (used as fixed values).

Values stored in relative measure take into account the width (and/or the height, resp.) of a so-calledreference area, that is either specified byKDChart::Measure::setReferenceArea, or determined by KDChart automatically, respectively.

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

394 KD Chart 2 Class Documentation

• MeasureOrientationAuto Value is calculated, based upon the width (or on the height, resp.)of the reference area: KD Chart will automatically determie an appropriate way.

• MeasureOrientationHorizontal Value is calculated, based upon the width of the referencearea.

• MeasureOrientationVertical Value is calculated, based upon the height of the referencearea.

• MeasureOrientationMinimum Value is calculated, based upon the width (or on the height,resp.) of the reference area - which ever is smaller.

• MeasureOrientationMaximum Value is calculated, based upon the width (or on the height,resp.) of the reference area - which ever is smaller.

See also:KDChart::Measure::setOrientationMode

Enumeration values:MeasureOrientationAuto

MeasureOrientationHorizontal

MeasureOrientationVertical

MeasureOrientationMinimum

MeasureOrientationMaximum

Definition at line 284 of file KDChartEnums.h.

284 { MeasureOrientationAuto,285 MeasureOrientationHorizontal,286 MeasureOrientationVertical,287 MeasureOrientationMinimum,288 MeasureOrientationMaximum };

6.29.2.4 enumKDChartEnums::PositionValue

Numerical values of the staticKDChart::Positioninstances, for using aPosition::value()with a switch()statement.

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

6.29 KDChartEnums Class Reference 395

PositionWest

Definition at line 187 of file KDChartEnums.h.

187 {188 PositionUnknown = 0,189 PositionCenter = 1,190 PositionNorthWest = 2,191 PositionNorth = 3,192 PositionNorthEast = 4,193 PositionEast = 5,194 PositionSouthEast = 6,195 PositionSouth = 7,196 PositionSouthWest = 8,197 PositionWest = 9 };

6.29.2.5 enumKDChartEnums::TextLayoutPolicy

Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighboring areas.

• LayoutJustOverwrite Just ignore the layout collision and write the text nevertheless.

• LayoutPolicyRotate Try counter-clockwise rotation to make the text fit into the space.

• LayoutPolicyShiftVertically Shift the text baseline upwards (or downwards, resp.) anddraw a connector line between the text and its anchor.

• LayoutPolicyShiftHorizontally Shift the text baseline to the left (or to the right, resp.)and draw a connector line between the text and its anchor.

• LayoutPolicyShrinkFontSize Reduce the text font size.

See also:KDChartParams::setPrintDataValues

Enumeration values:LayoutJustOverwrite

LayoutPolicyRotate

LayoutPolicyShiftVertically

LayoutPolicyShiftHorizontally

LayoutPolicyShrinkFontSize

Definition at line 156 of file KDChartEnums.h.

156 { LayoutJustOverwrite,157 LayoutPolicyRotate,158 LayoutPolicyShiftVertically,159 LayoutPolicyShiftHorizontally,160 LayoutPolicyShrinkFontSize };

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

396 KD Chart 2 Class Documentation

6.29.3 Member Function Documentation

6.29.3.1 QString KDChartEnums::granularitySequenceToString (GranularitySequencesequence)[static]

Converts the specified granularity sequence 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.

107 {108 switch( sequence ) {109 case GranularitySequence_10_20:110 return QString::fromLatin1("GranularitySequence_10_20");111 case GranularitySequence_10_50:112 return QString::fromLatin1("GranularitySequence_10_50");113 case GranularitySequence_25_50:114 return QString::fromLatin1("GranularitySequence_25_50");115 case GranularitySequenceIrregular:116 return QString::fromLatin1("GranularitySequenceIrregular");117 default: // should not happen118 qDebug( "Unknown granularity sequence" );119 return QString::fromLatin1("GranularitySequence_10_20");120 }121 }

6.29.3.2 QString KDChartEnums::layoutPolicyToString (TextLayoutPolicy type) [static]

Converts the specified text layout policy enum to a string representation.

Parameters:type the text layout policy to convert

Returns:the string representation of the text layout policy enum

6.29.3.3 QString KDChartEnums::measureCalculationModeToString (MeasureCalculationModemode) [static]

Converts the specified measure calculation mode enum to a string representation.

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.h.

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

6.29 KDChartEnums Class Reference 397

228 {229 switch( mode ) {230 case MeasureCalculationModeAbsolute:231 return QString::fromLatin1("MeasureCalculationModeAbsolute");232 case MeasureCalculationModeAuto:233 return QString::fromLatin1("MeasureCalculationModeAuto");234 case MeasureCalculationModeAutoArea:235 return QString::fromLatin1("MeasureCalculationModeAutoArea");236 case MeasureCalculationModeAutoOrientation:237 return QString::fromLatin1("MeasureCalculationModeAutoOrientation");238 case MeasureCalculationModeRelative:239 return QString::fromLatin1("MeasureCalculationModeRelative");240 default: // should not happen241 qDebug( "Unknown measure calculation mode" );242 return QString::fromLatin1("MeasureCalculationModeAuto");243 }244 }

6.29.3.4 QString KDChartEnums::MeasureOrientationToString (MeasureOrientation mode)[static]

Converts the specified measure orientation enum to a string representation.

Parameters:type the measure orientation to convert

Returns:the string representation of the measure orientation enum

Definition at line 297 of file KDChartEnums.h.

297 {298 switch( mode ) {299 case MeasureOrientationAuto:300 return QString::fromLatin1("MeasureOrientationAuto");301 case MeasureOrientationHorizontal:302 return QString::fromLatin1("MeasureOrientationHorizontal");303 case MeasureOrientationVertical:304 return QString::fromLatin1("MeasureOrientationVertical");305 case MeasureOrientationMinimum:306 return QString::fromLatin1("MeasureOrientationMinimum");307 case MeasureOrientationMaximum:308 return QString::fromLatin1("MeasureOrientationMaximum");309 default: // should not happen310 qDebug( "Unknown measure orientation mode" );311 return QString::fromLatin1("MeasureOrientationAuto");312 }313 }

6.29.3.5 GranularitySequenceKDChartEnums::stringToGranularitySequence (const QString &string) [static]

Converts the specified string to a granularity sequence enum value.

Parameters:string the string to convert

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

398 KD Chart 2 Class Documentation

Returns:the granularity sequence enum value

Definition at line 130 of file KDChartEnums.h.

130 {131 if( string == QString::fromLatin1("GranularitySequence_10_20") )132 return GranularitySequence_10_20;133 if( string == QString::fromLatin1("GranularitySequence_10_50") )134 return GranularitySequence_10_50;135 if( string == QString::fromLatin1("GranularitySequence_25_50") )136 return GranularitySequence_25_50;137 if( string == QString::fromLatin1("GranularitySequenceIrregular") )138 return GranularitySequenceIrregular;139 // default, should not happen140 return GranularitySequence_10_20;141 }

6.29.3.6 TextLayoutPolicy KDChartEnums::stringToLayoutPolicy (const QString & string)[static]

Converts the specified string to a text layout policy enum value.

Parameters:string the string to convert

Returns:the text layout policy enum value

6.29.3.7 MeasureCalculationModeKDChartEnums::stringToMeasureCalculationMode (constQString & string) [static]

Converts the specified string to a measure calculation mode enum value.

Parameters:string the string to convert

Returns:the measure calculation mode enum value

Definition at line 253 of file KDChartEnums.h.

253 {254 if( string == QString::fromLatin1("MeasureCalculationModeAbsolute") )255 return MeasureCalculationModeAbsolute;256 if( string == QString::fromLatin1("MeasureCalculationModeAuto") )257 return MeasureCalculationModeAuto;258 if( string == QString::fromLatin1("MeasureCalculationModeAutoArea") )259 return MeasureCalculationModeAutoArea;260 if( string == QString::fromLatin1("MeasureCalculationModeAutoOrientation") )261 return MeasureCalculationModeAutoOrientation;262 if( string == QString::fromLatin1("MeasureCalculationModeRelative") )263 return MeasureCalculationModeRelative;264 // default, should not happen265 return MeasureCalculationModeAuto;266 }

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

6.29 KDChartEnums Class Reference 399

6.29.3.8 MeasureOrientation KDChartEnums::stringToMeasureOrientation (const QString &string) [static]

Converts the specified string to a measure orientation enum value.

Parameters:string the string to convert

Returns:the measure orientation enum value

Definition at line 322 of file KDChartEnums.h.

322 {323 if( string == QString::fromLatin1("MeasureOrientationAuto") )324 return MeasureOrientationAuto;325 if( string == QString::fromLatin1("MeasureOrientationHorizontal") )326 return MeasureOrientationHorizontal;327 if( string == QString::fromLatin1("MeasureOrientationVertical") )328 return MeasureOrientationVertical;329 if( string == QString::fromLatin1("MeasureOrientationMinimum") )330 return MeasureOrientationMinimum;331 if( string == QString::fromLatin1("MeasureOrientationMaximum") )332 return MeasureOrientationMaximum;333 // default, should not happen334 return MeasureOrientationAuto;335 }

The documentation for this class was generated from the following file:

• KDChartEnums.h

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

400 KD Chart 2 Class Documentation

6.30 KDTextDocument Class Reference

#include <KDTextDocument.h >

Inheritance diagram for KDTextDocument:Collaboration diagram for KDTextDocument:

Public Member Functions

• KDTextDocument(const QString &text,QObject∗parent=0)

• KDTextDocument(QObject∗parent=0)

• QSizeminimumSizeHint()

• QSizesizeHint()

• ∼KDTextDocument()

6.30.1 Constructor & Destructor Documentation

6.30.1.1 KDTextDocument::KDTextDocument (QObject ∗ parent= 0) [explicit]

Definition at line 38 of file KDTextDocument.cpp.

39 : QTextDocument( p ),40 mHintValid( false ),41 mSizeHint(),42 mMinimumSizeHint()43 {4445 }

6.30.1.2 KDTextDocument::KDTextDocument (const QString &text, QObject ∗ parent= 0)[explicit]

Definition at line 47 of file KDTextDocument.cpp.

48 : QTextDocument( text, p ),49 mHintValid( false ),50 mSizeHint(),51 mMinimumSizeHint()52 {5354 }

6.30.1.3 KDTextDocument::∼KDTextDocument ()

Definition at line 56 of file KDTextDocument.cpp.

56 {}

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

6.30 KDTextDocument Class Reference 401

6.30.2 Member Function Documentation

6.30.2.1 QSize KDTextDocument::minimumSizeHint ()

Definition at line 66 of file KDTextDocument.cpp.

Referenced by sizeHint().

67 {68 /*69 QTextCursor cursor( this );70 if( ! cursor.atEnd() )71 cursor.movePosition( QTextCursor::NextBlock );72 qDebug() << "KDTextDocument::minimumSizeHint() found:" << cursor.block().text();73 QSizeF s( documentLayout()->blockBoundingRect( cursor.block() ).size() );74 qDebug() << "KDTextDocument::minimumSizeHint() found rect" << documentLayout()->blockBoundingRect( cursor.block());75 return QSize( static_cast<int>(s.width()),76 static_cast<int>(s.height()) );77 */7879 if( mHintValid )80 return mMinimumSizeHint;8182 mHintValid = true;83 mSizeHint = sizeForWidth( -1 );84 QSize sz(-1, -1);8586 // PENDING(kalle) Cache87 sz.rwidth() = sizeForWidth( 0 ).width();88 sz.rheight() = sizeForWidth( 32000 ).height();89 if( mSizeHint.height() < sz.height())90 sz.rheight() = mSizeHint.height();9192 mMinimumSizeHint = sz;93 return sz;94 }

6.30.2.2 QSize KDTextDocument::sizeHint ()

Definition at line 59 of file KDTextDocument.cpp.

References minimumSizeHint().

60 {61 if( !mHintValid )62 (void)minimumSizeHint();63 return mSizeHint;64 }

The documentation for this class was generated from the following files:

• KDTextDocument.h• KDTextDocument.cpp

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

402 KD Chart 2 Class Documentation

6.31 KDChart::Legend Class Reference

#include <KDChartLegend.h >

Inheritance diagram for KDChart::Legend:Collaboration diagram for KDChart::Legend:

6.31.1 Detailed Description

Legenddefines the interface for the legend drawing class.

Legendis the class for drawing legends for all kinds of diagrams ("chart types").

Legendis drawn on chart level, not per diagram, but you can have more than one legend per chart, usingKDChart::Chart::addLegend().

Note:Legendis different from all other classes ofd KDChart, since it can be displayed outside of the Chart’sarea. If you want to, you can embedd the legend into your own widget, or into another part of a biggergrid, into which you might have inserted theChart.

On the other hand, please note that you MUST callChart::addLegendto get your legend positioned intothe correct place of your chart - if you want to have the legend shown inside of the chart (that’s probablytrue for most cases).

Definition at line 61 of file KDChartLegend.h.

Public Member Functions

• void addDiagram(KDChart::AbstractDiagram∗newDiagram)

Add the given diagram to the legend.

• Qt::Alignmentalignment() const• void alignToReferencePoint(constRelativePosition&position)• BackgroundAttributesbackgroundAttributes() const• QBrushbrush(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.

• DiagramListdiagrams() const

The list of all diagrams associated with the legend.

• virtual void forceRebuild()• FrameAttributesframeAttributes() const• Legend(KDChart::AbstractDiagram∗diagram,QWidget∗parent)• Legend(QWidget∗parent=0)• MarkerAttributesmarkerAttributes(uint dataset) const• Qt::Orientationorientation() const• virtual voidpaint(QPainter∗painter)

Overwrite this to paint the inner contents of your widget.

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

6.31 KDChart::Legend Class Reference 403

• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintEvent(QPaintEvent∗event)

Draws the background and frame, then callspaint().

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• QPenpen(uint dataset) const• Positionposition() const• void propertiesChanged()

Emitted upon change of a property of theLegendor any of its components.

• constQWidget∗ referenceArea() const

Returns the reference area, that is used for font size of title text, and for font size of the item texts, IFautomatic area detection is set.

• void removeDiagram(KDChart::AbstractDiagram∗oldDiagram)

Removes the diagram from the legend’s list of diagrams.

• void removeDiagrams()

Removes all of the diagram from the legend’s list of diagrams.

• void replaceDiagram(KDChart::AbstractDiagram∗newDiagram,KDChart::AbstractDiagram∗old-Diagram=0)

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

• void resetDiagram(AbstractDiagram∗)• void resetTexts()

Removes all legend texts that might have been set by setText.

• virtual void resizeEvent(QResizeEvent∗event)• void setAlignment(Qt::Alignment)• void setBackgroundAttributes(constBackgroundAttributes&a)• void setBrush(uint dataset, const QBrush &brush)• void setBrushesFromDiagram(KDChart::AbstractDiagram∗diagram)• void setColor(uint dataset, const QColor &color)• void setDefaultColors()• void setDiagram(KDChart::AbstractDiagram∗newDiagram)

A convenience method doing the same as replaceDiagram( newDiagram, 0 );.

• void setFrameAttributes(constFrameAttributes&a)• void setMarkerAttributes(uint dataset, constMarkerAttributes&)• void setNeedRebuild()• void setOrientation(Qt::Orientation orientation)

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

404 KD Chart 2 Class Documentation

• void setPen(uint dataset, const QPen &pen)• void setPosition(Positionposition)• void setRainbowColors()• void setReferenceArea(constQWidget∗area)

Specifies the reference area for font size of title text, and for font size of the item texts, IF automatic areadetection is set.

• void setShowLines(bool legendShowLines)• void setSpacing(uint space)• void setSubduedColors(bool ordered=false)• void setText(uint dataset, const QString &text)• void setTextAttributes(constTextAttributes&a)• void setTitleText(const QString &text)• void setTitleTextAttributes(constTextAttributes&a)• virtual voidsetVisible(bool visible)• bool showLines() const• uint spacing() const• QStringtext (uint dataset) const• TextAttributestextAttributes() const• QStringtitleText () const• TextAttributestitleTextAttributes() const• virtual∼Legend()

Public Attributes

• Q_SIGNALS__pad0__: void destroyedLegend(Legend∗ )• privateQ_SLOTS: void emitPositionChanged()

Protected Member Functions

• virtual QRectareaGeometry() const• QRectinnerRect() const• virtual voidpositionHasChanged()

6.31.2 Constructor & Destructor Documentation

6.31.2.1 Legend::Legend (QWidget ∗ parent= 0) [explicit]

Definition at line 75 of file KDChartLegend.cpp.

References d.

Referenced by clone().

75 :76 AbstractAreaWidget( new Private(), parent )77 {78 d->referenceArea = parent;79 init();80 }

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

6.31 KDChart::Legend Class Reference 405

6.31.2.2 Legend::Legend (KDChart::AbstractDiagram ∗ diagram, QWidget ∗ parent)[explicit]

Definition at line 82 of file KDChartLegend.cpp.

References d, and setDiagram().

82 :83 AbstractAreaWidget( new Private(), parent )84 {85 d->referenceArea = parent;86 init();87 setDiagram( diagram );88 }

6.31.2.3 Legend::∼Legend() [virtual]

Definition at line 90 of file KDChartLegend.cpp.

91 {92 emit destroyedLegend( this );93 }

6.31.3 Member Function Documentation

6.31.3.1 void Legend::addDiagram (KDChart::AbstractDiagram ∗ newDiagram)

Add the given diagram to the legend.

Parameters:newDiagram The diagram to add.

See also:diagram, diagrams, removeDiagram, removeDiagrams, replaceDiagram, setDiagram

Definition at line 204 of file KDChartLegend.cpp.

References d, resetDiagram(), and setNeedRebuild().

Referenced by replaceDiagram().

205 {206 if ( newDiagram )207 {208 DiagramObserver* observer = new DiagramObserver( newDiagram, this );209210 DiagramObserver* oldObs = d->findObserverForDiagram( newDiagram );211 if( oldObs ){212 delete oldObs;213 d->observers[ d->observers.indexOf( oldObs ) ] = observer;214 }else{215 d->observers.append( observer );216 }217 connect( observer, SIGNAL( diagramDestroyed(AbstractDiagram*) ),218 SLOT( resetDiagram(AbstractDiagram*) ));219 connect( observer, SIGNAL( diagramDataChanged(AbstractDiagram*) ),

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

406 KD Chart 2 Class Documentation

220 SLOT( setNeedRebuild() ));221 connect( observer, SIGNAL( diagramAttributesChanged(AbstractDiagram*) ),222 SLOT( setNeedRebuild() ));223 setNeedRebuild();224 }225 }

6.31.3.2 Qt::Alignment Legend::alignment () const

Definition at line 302 of file KDChartLegend.cpp.

References d.

Referenced by clone().

303 {304 return d->alignment;305 }

6.31.3.3 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

6.31.3.4 QRect AbstractAreaWidget::areaGeometry () const [protected, virtual,inherited]

ImplementsKDChart::AbstractAreaBase.

Definition at line 116 of file KDChartAbstractAreaWidget.cpp.

Referenced by buildLegend(), paint(), and KDChart::AbstractAreaWidget::paintAll().

117 {118 return geometry();119 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

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

6.31 KDChart::Legend Class Reference 407

6.31.3.6 QBrush Legend::brush (uintdataset) const

Definition at line 377 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend(), and setRainbowColors().

378 {379 if( d->brushes.find( dataset ) != d->brushes.end() )380 return d->brushes[ dataset ];381 else382 return d->modelBrushes[ dataset ];383 }

6.31.3.7 void Legend::buildLegend ()

Definition at line 582 of file KDChartLegend.cpp.

References KDChart::AbstractAreaWidget::areaGeometry(), brush(), d, KDChart::Abstract-Diagram::datasetBrushes(), KDChart::AbstractDiagram::datasetLabels(), KDChart::Abstract-Diagram::datasetMarkers(), KDChart::AbstractDiagram::datasetPens(), diagram(), KDChart::Text-Attributes::isVisible(), markerAttributes(), orientation(), pen(), propertiesChanged(), referenceArea(),KDChart::AbstractLayoutItem::setParentWidget(), showLines(), KDChart::TextLayoutItem::sizeHint(),KDChart::MarkerLayoutItem::sizeHint(), spacing(), text(), textAttributes(), titleText(), and titleText-Attributes().

Referenced by forceRebuild(), and paint().

583 {584 #ifdef debug_legend_paint585 qDebug() << "entering Legend::buildLegend()";586 #endif587 if( d->cachedGeometry == areaGeometry() ) {588 #ifdef debug_legend_paint589 qDebug() << "leaving Legend::buildLegend() with NO action (was already build)";590 #endif591 // Note: We do *not* need to send positionChanged here,592 // because we send it in the resizeEvent, so layouting593 // is done at the right time.594 return;595 }596 d->cachedGeometry = areaGeometry();597598 #ifdef debug_legend_paint599 qDebug() << " Legend::buildLegend() areaGeometry: " << areaGeometry();600 #endif601602 Q_FOREACH( QLayoutItem* layoutItem, d->layoutItems ) {603 d->layout->removeItem( layoutItem );604 }605 qDeleteAll( d->layoutItems );606 d->layoutItems.clear();607608 if( orientation() == Qt::Vertical ) {609 d->layout->setColumnStretch( 4, 1 );610 } else {611 d->layout->setColumnStretch( 4, 0 );612 }613614 d->modelLabels.clear();615 d->modelBrushes.clear();

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

408 KD Chart 2 Class Documentation

616 d->modelPens.clear();617 d->modelMarkers.clear();618 for (int i = 0; i < d->observers.size(); ++i){619 const AbstractDiagram* diagram = d->observers.at(i)->diagram();620 //qDebug() << "Legend::buildLegend() adding to d->modelLabels :" << diagram->datasetLabels();621 d->modelLabels += diagram->datasetLabels();622 d->modelBrushes += diagram->datasetBrushes();623 d->modelPens += diagram->datasetPens();624 d->modelMarkers += diagram->datasetMarkers();625 }626 Q_ASSERT( d->modelLabels.count() == d->modelBrushes.count() );627628 // legend caption629 if( !titleText().isEmpty() && titleTextAttributes().isVisible() ) {630 // PENDING(kalle) Other properties!631 KDChart::TextLayoutItem* titleItem =632 new KDChart::TextLayoutItem( titleText(),633 titleTextAttributes(),634 referenceArea(),635 (orientation() == Qt::Vertical)636 ? KDChartEnums::MeasureOrientationMinimum637 : KDChartEnums::MeasureOrientationHorizontal,638 Qt::AlignCenter );639 titleItem->setParentWidget( this );640641 d->layoutItems << titleItem;642 if( orientation() == Qt::Vertical )643 d->layout->addItem( titleItem, 0, 0, 1, 5, Qt::AlignCenter );644 else645 d->layout->addItem( titleItem, 0, 0, 1, d->modelLabels.count()*4, Qt::AlignCenter );646647 // The line between the title and the legend items, if any.648 if( showLines() ) {649 KDChart::HorizontalLineLayoutItem* lineItem = new KDChart::HorizontalLineLayoutItem();650 d->layoutItems << lineItem;651 if( orientation() == Qt::Vertical )652 d->layout->addItem( lineItem, 1, 0, 1, 5, Qt::AlignCenter );653 else654 d->layout->addItem( lineItem, 1, 0, 1, d->modelLabels.count()*4, Qt::AlignCenter );655 }656 }657658 for ( int dataset = 0; dataset < d->modelLabels.count(); dataset++ ) {659 // Note: We may use diagram() for all of the MarkerLayoutItem instances,660 // since all they need the diagram for is to invoke mDiagram->paintMarker()661 KDChart::MarkerLayoutItem* markerItem = new KDChart::MarkerLayoutItem( diagram(),662 markerAttributes( dataset ),663 brush( dataset ),664 pen( dataset ),665 Qt::AlignLeft );666 d->layoutItems << markerItem;667 if( orientation() == Qt::Vertical )668 d->layout->addItem( markerItem,669 dataset*2+2, // first row is title, second is line670 1,671 1, 1, Qt::AlignCenter );672 else673 d->layout->addItem( markerItem,674 2, // all in row two675 dataset*4 );676677 // PENDING(kalle) Other properties!678 KDChart::TextLayoutItem* labelItem =679 new KDChart::TextLayoutItem( text( dataset ),680 textAttributes(),681 referenceArea(),682 (orientation() == Qt::Vertical)

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

6.31 KDChart::Legend Class Reference 409

683 ? KDChartEnums::MeasureOrientationMinimum684 : KDChartEnums::MeasureOrientationHorizontal,685 Qt::AlignLeft );686 labelItem->setParentWidget( this );687688 d->layoutItems << labelItem;689 if( orientation() == Qt::Vertical )690 d->layout->addItem( labelItem,691 dataset*2+2, // first row is title, second is line692 3 );693 else694 d->layout->addItem( labelItem,695 2, // all in row two696 dataset*4+1 );697698 // horizontal lines (only in vertical mode, and not after the last item)699 if( orientation() == Qt::Vertical && showLines() && dataset != ( d->modelLabels.count()-1 ) ) {700 KDChart::HorizontalLineLayoutItem* lineItem = new KDChart::HorizontalLineLayoutItem();701 d->layoutItems << lineItem;702 d->layout->addItem( lineItem,703 dataset*2+1+2,704 0,705 1, 5, Qt::AlignCenter );706 }707708 // vertical lines (only in horizontal mode, and not after the last item)709 if( orientation() == Qt::Horizontal && showLines() && dataset != ( d->modelLabels.count()-1 ) ) {710 KDChart::VerticalLineLayoutItem* lineItem = new KDChart::VerticalLineLayoutItem();711 d->layoutItems << lineItem;712 d->layout->addItem( lineItem,713 2, // all in row two714 dataset*4+2,715 1, 1, Qt::AlignCenter );716 }717718 if( orientation() != Qt::Vertical ) { // Horizontal needs a spacer719 d->layout->addItem( new QSpacerItem( spacing(), qMax( markerItem->sizeHint().height(),720 labelItem->sizeHint().height() ) ),721 2, // all in row two722 dataset*4+3 );723 }724 }725726 // vertical line (only in vertical mode)727 if( orientation() == Qt::Vertical && showLines() ) {728 KDChart::VerticalLineLayoutItem* lineItem = new KDChart::VerticalLineLayoutItem();729 d->layoutItems << lineItem;730 d->layout->addItem( lineItem, 2, 2, d->modelLabels.count()*2, 1 );731 }732733 // This line is absolutely necessary, otherwise: #2516.734 d->layout->activate();735736 // emit propertiesChanged();737 d->layout->activate();738 emit propertiesChanged();739 //emit positionChanged( this );740 //emitPositionChanged();741 #ifdef debug_legend_paint742 qDebug() << "leaving Legend::buildLegend()";743 #endif744 }

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

410 KD Chart 2 Class Documentation

6.31.3.8 Legend∗ Legend::clone () const [virtual]

Definition at line 125 of file KDChartLegend.cpp.

References alignment(), d, KDChart::AbstractAreaBase::frameAttributes(), Legend(), position(), set-Alignment(), KDChart::AbstractAreaBase::setFrameAttributes(), setPosition(), setTextAttributes(), set-TitleTextAttributes(), textAttributes(), and titleTextAttributes().

126 {127 Legend* legend = new Legend( new Private( *d ), 0 );128 legend->setTextAttributes( textAttributes() );129 legend->setTitleTextAttributes( titleTextAttributes() );130 legend->setFrameAttributes( frameAttributes() );131 legend->setPosition( position() );132 legend->setAlignment( alignment() );133 return legend;134 }

6.31.3.9 uint Legend::datasetCount () const

Definition at line 162 of file KDChartLegend.cpp.

References d, KDChart::AbstractDiagram::datasetBrushes(), KDChart::AbstractDiagram::datasetLabels(),and KDChart::DiagramObserver::diagram().

163 {164 int modelLabelsCount = 0;165 int modelBrushesCount = 0;166 for (int i = 0; i < d->observers.size(); ++i) {167 DiagramObserver * obs = d->observers.at(i);168 modelLabelsCount += obs->diagram()->datasetLabels().count();169 modelBrushesCount += obs->diagram()->datasetBrushes().count();170 }171 Q_ASSERT( modelLabelsCount == modelBrushesCount );172 return modelLabelsCount;173 }

6.31.3.10 AbstractDiagram ∗ Legend::diagram () const

The first diagram of the legend or 0 if there was none added to the legend.

Returns:The first diagram of the legend or 0.

See also:diagrams, addDiagram, removeDiagram, removeDiagrams, replaceDiagram, setDiagram

Definition at line 189 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend(), and paint().

190 {191 if( d->observers.isEmpty() )192 return 0;193 return d->observers.first()->diagram();194 }

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

6.31 KDChart::Legend Class Reference 411

6.31.3.11 DiagramList Legend::diagrams () const

The list of all diagrams associated with the legend.

Returns:The list of all diagrams associated with the legend.

See also:diagram, addDiagram, removeDiagram, removeDiagrams, replaceDiagram, setDiagram

Definition at line 196 of file KDChartLegend.cpp.

References d, and KDChart::DiagramList.

197 {198 DiagramList list;199 for (int i = 0; i < d->observers.size(); ++i)200 list << d->observers.at(i)->diagram();201 return list;202 }

6.31.3.12 void Legend::forceRebuild () [virtual]

Reimplemented fromKDChart::AbstractAreaWidget.

Definition at line 469 of file KDChartLegend.cpp.

References buildLegend(), and setNeedRebuild().

Referenced by resizeEvent().

470 {471 #ifdef debug_legend_paint472 qDebug() << "entering Legend::forceRebuild()";473 #endif474 //setSpacing(d->layout->spacing());475 setNeedRebuild();476 buildLegend();477 #ifdef debug_legend_paint478 qDebug() << "leaving Legend::forceRebuild()";479 #endif480 }

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

Definition at line 87 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by clone().

88 {89 return d->frameAttributes;90 }

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

412 KD Chart 2 Class Documentation

6.31.3.14 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(), andKDChart::AbstractArea::paintAll().

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

6.31.3.15 MarkerAttributes Legend::markerAttributes (uint dataset) const

Definition at line 424 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

425 {426 if( d->markerAttributes.find( dataset ) != d->markerAttributes.end() )427 return d->markerAttributes[ dataset ];428 else if ( static_cast<uint>( d->modelMarkers.count() ) > dataset )429 return d->modelMarkers[ dataset ];430 return MarkerAttributes();431 }

6.31.3.16 Qt::Orientation Legend::orientation () const

Definition at line 315 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

316 {317 return d->orientation;318 }

6.31.3.17 void Legend::paint (QPainter∗ painter) [virtual]

Overwrite this to paint the inner contents of your widget.

Note:When overriding this method, please let your widget draw itself at the top/left corner of the painter.You should call rect() (or width(), height(), resp.) to find the drawable area’s size: While thepaint()method is being executed the frame of the widget is outside of its rect(), so you can use all of rect() foryour custom drawing!

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

6.31 KDChart::Legend Class Reference 413

See also:paint, paintIntoRect

ImplementsKDChart::AbstractAreaWidget.

Definition at line 137 of file KDChartLegend.cpp.

References KDChart::AbstractAreaWidget::areaGeometry(), buildLegend(), d, diagram(), andKDChart::AbstractLayoutItem::paint().

138 {139 #ifdef debug_legend_paint140 qDebug() << "entering Legend::paint( QPainter* painter )";141 #endif142 // rule: We do not show a legend, if there is no diagram.143 if( ! diagram() ) return;144 #ifdef debug_legend_paint145 qDebug() << " Legend::paint() areaGeometry: " << areaGeometry();146 #endif147148 // re-calculate/adjust the Legend’s internal layout and contents, if needed:149 buildLegend();150151 // PENDING(kalle) Support palette152153 Q_FOREACH( KDChart::AbstractLayoutItem* layoutItem, d->layoutItems ) {154 layoutItem->paint( painter );155 }156 #ifdef debug_legend_paint157 qDebug() << "leaving Legend::paint( QPainter* painter )";158 #endif159 }

6.31.3.18 void AbstractAreaWidget::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 89 of file KDChartAbstractAreaWidget.cpp.

References KDChart::AbstractAreaWidget::areaGeometry(), KDChart::AbstractAreaBase::inner-Rect(), KDChart::AbstractAreaWidget::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::AbstractAreaWidget::paintEvent(), and KDChart::AbstractAreaWidget::paint-IntoRect().

90 {91 //qDebug() << "AbstractAreaWidget::paintAll() called";92 // Paint the background and frame93 paintBackground( painter, rect() );94 paintFrame( painter, rect().adjusted(0,0,-1,-1) );9596 // adjust the widget’s content margins,97 // to be sure all content gets calculated98 // to fit into the inner rectangle99 const QRect oldGeometry( areaGeometry() );100 const QRect inner( innerRect() );101 //qDebug() << "areaGeometry():" << oldGeometry102 // << " contentsRect():" << contentsRect() << " inner:" << inner;103 if( contentsRect() != inner ){104 //qDebug() << "old contentsRect():" << contentsRect() << " new innerRect:" << inner;

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

414 KD Chart 2 Class Documentation

105 setContentsMargins(106 inner.left(),107 inner.top(),108 oldGeometry.width() -inner.width()-1,109 oldGeometry.height()-inner.height()-1 );110 //forceRebuild();111 }112 paint( &painter );113 //qDebug() << "AbstractAreaWidget::paintAll() done.";114 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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

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

6.31 KDChart::Legend Class Reference 415

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 attributes155 }

6.31.3.20 void AbstractAreaWidget::paintEvent (QPaintEvent∗ event) [virtual,inherited]

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwritepaint()instead.

See also:paint

Definition at line 65 of file KDChartAbstractAreaWidget.cpp.

References KDChart::AbstractAreaWidget::paintAll().

66 {67 Q_UNUSED( event );68 QPainter painter( this );69 paintAll( painter );70 }

6.31.3.21 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(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

416 KD Chart 2 Class Documentation

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwritepaint()instead.

Definition at line 72 of file KDChartAbstractAreaWidget.cpp.

References KDChart::AbstractAreaWidget::paintAll().

Referenced by KDChart::Chart::paint().

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

6.31.3.23 QPen Legend::pen (uintdataset) const

Definition at line 408 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

409 {410 if( d->pens.find( dataset ) != d->pens.end() )411 return d->pens[dataset];412 else413 return d->modelPens[ dataset ];414 }

6.31.3.24 PositionLegend::position () const

Definition at line 291 of file KDChartLegend.cpp.

References d.

Referenced by clone().

292 {293 return d->position;294 }

6.31.3.25 void AbstractAreaWidget::positionHasChanged () [protected, virtual,inherited]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 121 of file KDChartAbstractAreaWidget.cpp.

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

6.31 KDChart::Legend Class Reference 417

122 {123 emit positionChanged( this );124 }

6.31.3.26 void KDChart::Legend::propertiesChanged ()

Emitted upon change of a property of theLegendor any of its components.

Referenced by buildLegend(), and setVisible().

6.31.3.27 constQWidget ∗ Legend::referenceArea () const

Returns the reference area, that is used for font size of title text, and for font size of the item texts, IFautomatic area detection is set.

See also:setReferenceArea

Definition at line 183 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

184 {185 return (d->referenceArea ? d->referenceArea : static_cast<const QWidget*>(parent()));186 }

6.31.3.28 void Legend::removeDiagram (KDChart::AbstractDiagram ∗ oldDiagram)

Removes the diagram from the legend’s list of diagrams.

See also:diagram, diagrams, addDiagram, removeDiagrams, replaceDiagram, setDiagram

Definition at line 227 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

Referenced by removeDiagrams(), replaceDiagram(), and resetDiagram().

228 {229 if( oldDiagram ){230 DiagramObserver* oldObs = d->findObserverForDiagram( oldDiagram );231 if( oldObs ){232 delete oldObs;233 d->observers.removeAt( d->observers.indexOf( oldObs ) );234 }235 setNeedRebuild();236 }237 }

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

418 KD Chart 2 Class Documentation

6.31.3.29 void Legend::removeDiagrams ()

Removes all of the diagram from the legend’s list of diagrams.

See also:diagram, diagrams, addDiagram, removeDiagram, replaceDiagram, setDiagram

Definition at line 239 of file KDChartLegend.cpp.

References d, and removeDiagram().

240 {241 for (int i = 0; i < d->observers.size(); ++i)242 removeDiagram( d->observers.at(i)->diagram() );243 }

6.31.3.30 void Legend::replaceDiagram (KDChart::AbstractDiagram ∗ newDiagram,KDChart::AbstractDiagram ∗ oldDiagram= 0)

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

Parameters:newDiagram The diagram to be used instead of the old one. If this parameter is zero, the first diagram

will just be removed.

oldDiagram The diagram to be removed by the new one. This diagram will be deleted automatically.If the parameter is omitted, the very first diagram will be replaced. In case, there was no diagramyet, the new diagram will just be added.

See also:diagram, diagrams, addDiagram, removeDiagram, removeDiagrams, setDiagram

Definition at line 245 of file KDChartLegend.cpp.

References addDiagram(), d, and removeDiagram().

Referenced by setDiagram().

247 {248 KDChart::AbstractDiagram* old = oldDiagram;249 if( ! d->observers.isEmpty() && ! old )250 old = d->observers.first()->diagram();251 if( old )252 removeDiagram( old );253 if( newDiagram )254 addDiagram( newDiagram );255 }

6.31.3.31 void Legend::resetDiagram (AbstractDiagram ∗)

Definition at line 262 of file KDChartLegend.cpp.

References removeDiagram().

Referenced by addDiagram().

263 {264 removeDiagram( oldDiagram );265 }

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

6.31 KDChart::Legend Class Reference 419

6.31.3.32 void Legend::resetTexts ()

Removes all legend texts that might have been set by setText.

This resets theLegendto default behaviour: Texts are created automatically.

Definition at line 338 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

339 {340 if( ! d->texts.count() ) return;341 d->texts.clear();342 setNeedRebuild();343 }

6.31.3.33 void Legend::resizeEvent (QResizeEvent∗ event) [virtual]

Definition at line 573 of file KDChartLegend.cpp.

References forceRebuild().

574 {575 #ifdef debug_legend_paint576 qDebug() << "Legend::resizeEvent() called";577 #endif578 forceRebuild();579 QTimer::singleShot(0, this, SLOT(emitPositionChanged()));580 }

6.31.3.34 void Legend::setAlignment (Qt::Alignment)

Definition at line 296 of file KDChartLegend.cpp.

References d.

Referenced by clone().

297 {298 d->alignment = alignment;299 emitPositionChanged();300 }

6.31.3.35 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

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

420 KD Chart 2 Class Documentation

6.31.3.36 void Legend::setBrush (uintdataset, const QBrush & brush)

Definition at line 370 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

371 {372 if( d->brushes[ dataset ] == brush ) return;373 d->brushes[ dataset ] = brush;374 setNeedRebuild();375 }

6.31.3.37 void Legend::setBrushesFromDiagram (KDChart::AbstractDiagram ∗ diagram)

Definition at line 386 of file KDChartLegend.cpp.

References d, KDChart::AbstractDiagram::datasetBrushes(), and setNeedRebuild().

387 {388 bool bChangesDone = false;389 QList<QBrush> datasetBrushes = diagram->datasetBrushes();390 for( int i = 0; i < datasetBrushes.count(); i++ ){391 if( d->brushes[ i ] != datasetBrushes[ i ] ){392 d->brushes[ i ] = datasetBrushes[ i ];393 bChangesDone = true;394 }395 }396 if( bChangesDone )397 setNeedRebuild();398 }

6.31.3.38 void Legend::setColor (uintdataset, const QColor & color)

Definition at line 363 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

Referenced by setDefaultColors(), setRainbowColors(), and setSubduedColors().

364 {365 if( d->brushes[ dataset ] == color ) return;366 d->brushes[ dataset ] = color;367 setNeedRebuild();368 }

6.31.3.39 void Legend::setDefaultColors ()

Definition at line 495 of file KDChartLegend.cpp.

References setColor().

496 {497 setColor( 0, Qt::red );498 setColor( 1, Qt::green );499 setColor( 2, Qt::blue );500 setColor( 3, Qt::cyan );501 setColor( 4, Qt::magenta );

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

6.31 KDChart::Legend Class Reference 421

502 setColor( 5, Qt::yellow );503 setColor( 6, Qt::darkRed );504 setColor( 7, Qt::darkGreen );505 setColor( 8, Qt::darkBlue );506 setColor( 9, Qt::darkCyan );507 setColor( 10, Qt::darkMagenta );508 setColor( 11, Qt::darkYellow );509 }

6.31.3.40 void Legend::setDiagram (KDChart::AbstractDiagram ∗ newDiagram)

A convenience method doing the same as replaceDiagram( newDiagram, 0 );.

Replaces the first diagram by the given diagram. If the legend’s list of diagram is empty the given diagramis added to the list.

See also:diagram, diagrams, addDiagram, removeDiagram, removeDiagrams, replaceDiagram

Definition at line 257 of file KDChartLegend.cpp.

References replaceDiagram().

Referenced by KDChart::Widget::addLegend(), Legend(), and KDChart::Widget::replaceLegend().

258 {259 replaceDiagram( newDiagram );260 }

6.31.3.41 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by clone().

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

6.31.3.42 void Legend::setMarkerAttributes (uintdataset, constMarkerAttributes &)

Definition at line 417 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

418 {419 if( d->markerAttributes[dataset] == markerAttributes ) return;420 d->markerAttributes[ dataset ] = markerAttributes;421 setNeedRebuild();422 }

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

422 KD Chart 2 Class Documentation

6.31.3.43 void Legend::setNeedRebuild ()

Definition at line 273 of file KDChartLegend.cpp.

References d.

Referenced by addDiagram(), forceRebuild(), removeDiagram(), resetTexts(), setBrush(), setBrushes-FromDiagram(), setColor(), setMarkerAttributes(), setOrientation(), setPen(), setReferenceArea(), set-ShowLines(), setSpacing(), setText(), setTextAttributes(), setTitleText(), and setTitleTextAttributes().

274 {275 d->cachedGeometry = QRectF();276 }

6.31.3.44 void Legend::setOrientation (Qt::Orientationorientation)

Definition at line 307 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

308 {309 if( d->orientation == orientation ) return;310 d->orientation = orientation;311 setNeedRebuild();312 emitPositionChanged();313 }

6.31.3.45 void Legend::setPen (uintdataset, const QPen &pen)

Definition at line 401 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

402 {403 if( d->pens[dataset] == pen ) return;404 d->pens[dataset] = pen;405 setNeedRebuild();406 }

6.31.3.46 void Legend::setPosition (Positionposition)

Definition at line 278 of file KDChartLegend.cpp.

References d.

Referenced by KDChart::Widget::addLegend(), and clone().

279 {280 d->position = position;281 emitPositionChanged();282 }

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

6.31 KDChart::Legend Class Reference 423

6.31.3.47 void Legend::setRainbowColors ()

Definition at line 511 of file KDChartLegend.cpp.

References brush(), and setColor().

512 {513 setColor( 0, QColor(255, 0,196) );514 setColor( 1, QColor(255, 0, 96) );515 setColor( 2, QColor(255, 128,64) );516 setColor( 3, Qt::yellow );517 setColor( 4, Qt::green );518 setColor( 5, Qt::cyan );519 setColor( 6, QColor( 96, 96,255) );520 setColor( 7, QColor(160, 0,255) );521 for( int i = 8; i < 16; ++i )522 setColor( i, brush( i - 8 ).color().light() );523 }

6.31.3.48 void Legend::setReferenceArea (constQWidget ∗ area)

Specifies the reference area for font size of title text, and for font size of the item texts, IF automatic areadetection is set.

Note:This parameter is ignored, if theMeasuregiven for setTitleTextAttributes (or setTextAttributes, resp.)is not specifying automatic area detection.

If no reference area is specified, but automatic area detection is set, then the size of the legend’s parentwidget will be used.

See also:KDChart::Measure, KDChartEnums::MeasureCalculationMode

Definition at line 176 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

177 {178 if( area == d->referenceArea ) return;179 d->referenceArea = area;180 setNeedRebuild();181 }

6.31.3.49 void Legend::setShowLines (boollegendShowLines)

Definition at line 320 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

321 {322 if( d->showLines == legendShowLines ) return;323 d->showLines = legendShowLines;324 setNeedRebuild();325 emitPositionChanged();326 }

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

424 KD Chart 2 Class Documentation

6.31.3.50 void Legend::setSpacing (uintspace)

Definition at line 482 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

483 {484 if( d->spacing == space && d->layout->spacing() == static_cast<int>(space) ) return;485 d->spacing = space;486 d->layout->setSpacing( space );487 setNeedRebuild();488 }

6.31.3.51 void Legend::setSubduedColors (boolordered= false)

Definition at line 525 of file KDChartLegend.cpp.

References setColor().

526 {527 static const int NUM_SUBDUEDCOLORS = 18;528 static const QColor SUBDUEDCOLORS[ NUM_SUBDUEDCOLORS ] = {529 QColor( 0xe0,0x7f,0x70 ),530 QColor( 0xe2,0xa5,0x6f ),531 QColor( 0xe0,0xc9,0x70 ),532 QColor( 0xd1,0xe0,0x70 ),533 QColor( 0xac,0xe0,0x70 ),534 QColor( 0x86,0xe0,0x70 ),535 QColor( 0x70,0xe0,0x7f ),536 QColor( 0x70,0xe0,0xa4 ),537 QColor( 0x70,0xe0,0xc9 ),538 QColor( 0x70,0xd1,0xe0 ),539 QColor( 0x70,0xac,0xe0 ),540 QColor( 0x70,0x86,0xe0 ),541 QColor( 0x7f,0x70,0xe0 ),542 QColor( 0xa4,0x70,0xe0 ),543 QColor( 0xc9,0x70,0xe0 ),544 QColor( 0xe0,0x70,0xd1 ),545 QColor( 0xe0,0x70,0xac ),546 QColor( 0xe0,0x70,0x86 ),547 };548 if( ordered )549 for(int i=0; i<NUM_SUBDUEDCOLORS; ++i)550 setColor( i, SUBDUEDCOLORS[i] );551 else{552 setColor( 0, SUBDUEDCOLORS[ 0] );553 setColor( 1, SUBDUEDCOLORS[ 5] );554 setColor( 2, SUBDUEDCOLORS[10] );555 setColor( 3, SUBDUEDCOLORS[15] );556 setColor( 4, SUBDUEDCOLORS[ 2] );557 setColor( 5, SUBDUEDCOLORS[ 7] );558 setColor( 6, SUBDUEDCOLORS[12] );559 setColor( 7, SUBDUEDCOLORS[17] );560 setColor( 8, SUBDUEDCOLORS[ 4] );561 setColor( 9, SUBDUEDCOLORS[ 9] );562 setColor(10, SUBDUEDCOLORS[14] );563 setColor(11, SUBDUEDCOLORS[ 1] );564 setColor(12, SUBDUEDCOLORS[ 6] );565 setColor(13, SUBDUEDCOLORS[11] );566 setColor(14, SUBDUEDCOLORS[16] );567 setColor(15, SUBDUEDCOLORS[ 3] );568 setColor(16, SUBDUEDCOLORS[ 8] );569 setColor(17, SUBDUEDCOLORS[13] );

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

6.31 KDChart::Legend Class Reference 425

570 }571 }

6.31.3.52 void Legend::setText (uintdataset, const QString & text)

Definition at line 345 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

346 {347 if( d->texts[ dataset ] == text ) return;348 d->texts[ dataset ] = text;349 setNeedRebuild();350 }

6.31.3.53 void Legend::setTextAttributes (constTextAttributes & a)

Definition at line 433 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

Referenced by clone().

434 {435 if( d->textAttributes == a ) return;436 d->textAttributes = a;437 setNeedRebuild();438 }

6.31.3.54 void Legend::setTitleText (const QString &text)

Definition at line 445 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

446 {447 if( d->titleText == text ) return;448 d->titleText = text;449 setNeedRebuild();450 }

6.31.3.55 void Legend::setTitleTextAttributes (constTextAttributes & a)

Definition at line 457 of file KDChartLegend.cpp.

References d, and setNeedRebuild().

Referenced by clone().

458 {459 if( d->titleTextAttributes == a ) return;460 d->titleTextAttributes = a;461 setNeedRebuild();462 }

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

426 KD Chart 2 Class Documentation

6.31.3.56 void Legend::setVisible (boolvisible) [virtual]

Definition at line 267 of file KDChartLegend.cpp.

References propertiesChanged().

268 {269 QWidget::setVisible( visible );270 emit propertiesChanged();271 }

6.31.3.57 bool Legend::showLines () const

Definition at line 328 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

329 {330 return d->showLines;331 }

6.31.3.58 uint Legend::spacing () const

Definition at line 490 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

491 {492 return d->spacing;493 }

6.31.3.59 QString Legend::text (uintdataset) const

Definition at line 352 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

353 {354 if( d->texts.find( dataset ) != d->texts.end() ){355 //qDebug() << "Legend::text(" << dataset << ") returning d->texts[" << dataset << "] :" << d->texts[ dataset ];356 return d->texts[ dataset ];357 }else{358 //qDebug() << "Legend::text(" << dataset << ") returning d->modelLabels[" << dataset << "] :" << d->modelLabels[ dataset ];359 return d->modelLabels[ dataset ];360 }361 }

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

6.31 KDChart::Legend Class Reference 427

6.31.3.60 TextAttributes Legend::textAttributes () const

Definition at line 440 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend(), and clone().

441 {442 return d->textAttributes;443 }

6.31.3.61 QString Legend::titleText () const

Definition at line 452 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend().

453 {454 return d->titleText;455 }

6.31.3.62 TextAttributes Legend::titleTextAttributes () const

Definition at line 464 of file KDChartLegend.cpp.

References d.

Referenced by buildLegend(), and clone().

465 {466 return d->titleTextAttributes;467 }

6.31.4 Member Data Documentation

6.31.4.1 Q_SIGNALSKDChart::Legend::__pad0__

Reimplemented fromKDChart::AbstractAreaWidget.

Definition at line 225 of file KDChartLegend.h.

6.31.4.2 privateKDChart::Legend::Q_SLOTS

Definition at line 230 of file KDChartLegend.h.

The documentation for this class was generated from the following files:

• KDChartLegend.h• KDChartLegend.cpp

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

428 KD Chart 2 Class Documentation

6.32 KDChart::LineAttributes Class Reference

#include <KDChartLineAttributes.h >

Public Types

• enumMissingValuesPolicy{

MissingValuesAreBridged,

MissingValuesHideSegments,

MissingValuesShownAsZero,

MissingValuesPolicyIgnored}

MissingValuesPolicy specifies how a missing value will be shown in a line diagram.

Public Member Functions

• booldisplayArea() const• LineAttributes(constLineAttributes&)• LineAttributes()• MissingValuesPolicymissingValuesPolicy() const• booloperator!=(constLineAttributes&other) const• LineAttributes& operator=(constLineAttributes&)• booloperator==(constLineAttributes&) const• void setDisplayArea(bool display)• void setMissingValuesPolicy(MissingValuesPolicypolicy)• void setTransparency(uint alpha)• uint transparency() const• ∼LineAttributes()

6.32.1 Member Enumeration Documentation

6.32.1.1 enumKDChart::LineAttributes::MissingValuesPolicy

MissingValuesPolicy specifies how a missing value will be shown in a line diagram.

Missing value is assumed if the data cell contains a QVariant that can not be interpreted as a double.

• MissingValuesAreBridged the default: No markers will be shown for missing values but theline will be bridged if there is at least one valid cell before and after the missing value(s), otherwisethe segment will be hidden.

• MissingValuesHideSegments Line segments starting with a missing value will not be shown,and no markers will be shown for missing values, so this will look like a piece of the line is missing.

• MissingValuesShownAsZero Missing value(s) will be treated like normal zero values, andmarkers will shown for them too, so there will be no visible difference between a zero value and amissing value.

• MissingValuesPolicyIgnored (internal value, do not use)

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

6.32 KDChart::LineAttributes Class Reference 429

Enumeration values:MissingValuesAreBridged

MissingValuesHideSegments

MissingValuesShownAsZero

MissingValuesPolicyIgnored

Definition at line 55 of file KDChartLineAttributes.h.

55 {56 MissingValuesAreBridged,57 MissingValuesHideSegments,58 MissingValuesShownAsZero,59 MissingValuesPolicyIgnored };

6.32.2 Constructor & Destructor Documentation

6.32.2.1 KDChart::LineAttributes::LineAttributes ()

6.32.2.2 KDChart::LineAttributes::LineAttributes (const LineAttributes &)

6.32.2.3 KDChart::LineAttributes:: ∼LineAttributes ()

6.32.3 Member Function Documentation

6.32.3.1 bool KDChart::LineAttributes::displayArea () const

Referenced by operator<<(), and KDChart::LineDiagram::paint().

6.32.3.2 MissingValuesPolicyKDChart::LineAttributes::missingValuesPolicy () const

Referenced by KDChart::LineDiagram::getCellValues().

6.32.3.3 bool KDChart::LineAttributes::operator!= (const LineAttributes & other) const

Definition at line 79 of file KDChartLineAttributes.h.

79 { return !operator==(other); }

6.32.3.4 LineAttributes & KDChart::LineAttributes::operator= (const LineAttributes &)

6.32.3.5 bool KDChart::LineAttributes::operator== (const LineAttributes &) const

6.32.3.6 void KDChart::LineAttributes::setDisplayArea (bool display)

6.32.3.7 void KDChart::LineAttributes::setMissingValuesPolicy (MissingValuesPolicypolicy)

6.32.3.8 void KDChart::LineAttributes::setTransparency (uint alpha)

6.32.3.9 uint KDChart::LineAttributes::transparency () const

Referenced by operator<<(), and KDChart::LineDiagram::paint().

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

430 KD Chart 2 Class Documentation

The documentation for this class was generated from the following file:

• KDChartLineAttributes.h

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

6.33 KDChart::LineDiagram Class Reference 431

6.33 KDChart::LineDiagram Class Reference

#include <KDChartLineDiagram.h >

Inheritance diagram for KDChart::LineDiagram:Collaboration diagram for KDChart::LineDiagram:

Public Types

• enumLineType{

Normal= 0,

Stacked= 1,

Percent= 2 }

Public Member Functions

• virtual voidaddAxis(CartesianAxis∗axis)

Add the axis to the diagram.

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• virtual KDChart::CartesianAxisListaxes() const• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• virtual LineDiagram∗ clone() const• 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 thesevalues).

• virtual voiddataChanged(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

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

432 KD Chart 2 Class Documentation

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

• QStringListdatasetLabels() const

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.

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual void layoutPlanes()• LineAttributeslineAttributes(const QModelIndex &index) const• LineAttributeslineAttributes(int column) const• LineAttributeslineAttributes() const• LineDiagram(QWidget∗parent=0,CartesianCoordinatePlane∗plane=0)• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• const intnumberOfAbscissaSegments() const• const intnumberOfOrdinateSegments() const• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, const

QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)• QPenpen(const QModelIndex &index) const

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

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

6.33 KDChart::LineDiagram Class Reference 433

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• virtual AbstractCartesianDiagram∗ referenceDiagram() const• virtual QPointFreferenceDiagramOffset() const• void resize(const QSizeF &area)

Called by the widget’s sizeEvent.

• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• void setLineAttributes(const QModelIndex &index, constLineAttributes&a)

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

434 KD Chart 2 Class Documentation

• void setLineAttributes(int column, constLineAttributes&a)• void setLineAttributes(constLineAttributes&a)• virtual voidsetModel(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 setReferenceDiagram(AbstractCartesianDiagram∗diagram, const QPointF

&offset=QPointF())• virtual voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setThreeDLineAttributes(const QModelIndex &index, constThreeDLineAttributes&a)• void setThreeDLineAttributes(int column, constThreeDLineAttributes&a)• void setThreeDLineAttributes(constThreeDLineAttributes&a)• void setType(constLineTypetype)• virtual void takeAxis(CartesianAxis∗axis)

Removes the axis from the diagram, without deleting it.

• ThreeDLineAttributesthreeDLineAttributes(const QModelIndex &index) const• ThreeDLineAttributesthreeDLineAttributes(int column) const• ThreeDLineAttributesthreeDLineAttributes() const• LineTypetype() const• 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 QRectvisualRect(const QModelIndex &index) const

[reimplemented]

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

6.33 KDChart::LineDiagram Class Reference 435

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼LineDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const

• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const

[reimplemented]

• virtual boolcheckInvariants(bool justReturnTheStatus=false) const

• QModelIndexcolumnToIndex(int column) const

• LineAttributes::MissingValuesPolicygetCellValues(int row, int column, double &valueX, double&valueY) const

• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• void paint(PaintContext∗paintContext)

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 voidpaintDataValueTexts(QPainter∗painter)

• void paintEvent(QPaintEvent∗)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)

• virtual voidpaintMarkers(QPainter∗painter)

• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void resizeEvent(QResizeEvent∗)• void setAttributesModelRootIndex(const QModelIndex &)

• void setDataBoundariesDirty() const

• virtual doublethreeDItemDepth(int column) const

• virtual doublethreeDItemDepth(const QModelIndex &index) const

• doublevalueForCell(int row, int column) const

Helper method, retrieving the data value (DisplayRole) for a given row and column.

• doublevalueForCellTesting(int row, int column, bool &bOK) const

Protected Attributes

• Q_SIGNALS__pad0__: void layoutChanged(AbstractDiagram∗ )

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

436 KD Chart 2 Class Documentation

6.33.1 Member Enumeration Documentation

6.33.1.1 enumKDChart::LineDiagram::LineType

Enumeration values:Normal

Stacked

Percent

Definition at line 57 of file KDChartLineDiagram.h.

57 {58 Normal = 0,59 Stacked = 1,60 Percent = 261 };

6.33.2 Constructor & Destructor Documentation

6.33.2.1 LineDiagram::LineDiagram (QWidget ∗ parent= 0, CartesianCoordinatePlane∗ plane=0)

Definition at line 59 of file KDChartLineDiagram.cpp.

Referenced by clone().

59 :60 AbstractCartesianDiagram( new Private(), parent, plane )61 {62 init();63 }

6.33.2.2 LineDiagram::∼LineDiagram () [virtual]

Definition at line 69 of file KDChartLineDiagram.cpp.

70 {71 }

6.33.3 Member Function Documentation

6.33.3.1 void AbstractCartesianDiagram::addAxis (CartesianAxis ∗ axis) [virtual,inherited]

Add the axis to the diagram.

The diagram takes ownership of the axis and will delete it.

To gain back ownership (e.g. for assigning the axis to another diagram) use the takeAxis method, beforecalling addAxis on the other diagram.

See also:takeAxis

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

6.33 KDChart::LineDiagram Class Reference 437

Definition at line 66 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractAxis::createObserver(), d, and KDChart::AbstractCartesian-Diagram::layoutPlanes().

67 {68 if ( !d->axesList.contains( axis ) ) {69 d->axesList.append( axis );70 axis->createObserver( this );71 layoutPlanes();72 }73 }

6.33.3.2 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.33.3.3 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by paint().

306 {

6.33.3.4 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated with the diagram.

See also:setAttributesModel

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

438 KD Chart 2 Class Documentation

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.33.3.5 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat corresponds to the root index of the diagram.

Definition at line 204 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), KDChart::BarDiagram::calculateDataBoundaries(),numberOfAbscissaSegments(), KDChart::BarDiagram::numberOfAbscissaSegments(), numberOf-OrdinateSegments(), KDChart::BarDiagram::numberOfOrdinateSegments(), paint(), KDChart::Bar-Diagram::paint(), and KDChart::AbstractDiagram::valueForCell().

210 {

6.33.3.6 KDChart::CartesianAxisList AbstractCartesianDiagram::axes () const [virtual,inherited]

Definition at line 85 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::CartesianAxisList, and d.

86 {87 return d->axesList;88 }

6.33.3.7 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

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

6.33 KDChart::LineDiagram Class Reference 439

6.33.3.8 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.33.3.9 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

6.33.3.10 const QPair< QPointF, QPointF > LineDiagram::calculateDataBoundaries () const[protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 229 of file KDChartLineDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), KDChart::AbstractDiagram::check-Invariants(), d, KDChart::AbstractDiagram::datasetDimension(), type(), and valueForCellTesting().

230 {231 if ( !checkInvariants( true ) ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );232233 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex());234 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex());235 double xMin = 0;236 double xMax = rowCount -1;237 double yMin = 0, yMax = 0;238 bool bStarting = true;239 bool bOK;240241 // calculate boundaries for different line types Normal - Stacked - Percent - Default Normal242 switch ( type() ){

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

440 KD Chart 2 Class Documentation

243 case LineDiagram::Normal:244 {245 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {246 for ( int j=0; j< rowCount; ++j ) {247 const double value = valueForCellTesting( j, i, bOK );248 double xvalue;249 if( datasetDimension() > 1 && bOK )250 xvalue = valueForCellTesting( j, i-1, bOK );251 if( bOK ){252 if( bStarting ){253 yMin = value;254 yMax = value;255 }else{256 yMin = qMin( yMin, value );257 yMax = qMax( yMax, value );258 }259 if ( datasetDimension() > 1 ) {260 if( bStarting ){261 xMin = xvalue;262 xMax = xvalue;263 }else{264 xMin = qMin( xMin, xvalue );265 xMax = qMax( xMax, xvalue );266 }267 }268 bStarting = false;269 }270 }271 }272273 if( yMin > 0 && yMax / yMin >= 2.0 )274 yMin = 0;275 else if( yMax < 0 && yMax / yMin <= 0.5 )276 yMax = 0;277 }278 break;279 case LineDiagram::Stacked:280 {281 double tmpValue = 0;282283 for ( int j=0; j< rowCount; ++j ) {284 // calculate sum of values per column - Find out stacked Min/Max285 double stackedValues = 0;286 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {287 const double value = valueForCellTesting( j, i, bOK );288 if( bOK )289 stackedValues += value;290 }291 if( bStarting ){292 yMin = stackedValues;293 yMax = stackedValues;294 }else{295 // Pending Michel:296 // I am taking in account all values negatives or positives297 // take in account all stacked values298 yMin = qMin( qMin( yMin, tmpValue ), stackedValues );299 yMax = qMax( yMax, stackedValues );300 }301 bStarting = false;302 }303 }304 break;305 case LineDiagram::Percent:306 {307 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {308 for ( int j=0; j< rowCount; ++j ) {309 // Ordinate should begin at 0 the max value being the 100% pos

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

6.33 KDChart::LineDiagram Class Reference 441

310 const double value = valueForCellTesting( j, i, bOK );311 if( bOK ){312 if( bStarting )313 yMax = value;314 else315 yMax = qMax( yMax, value );316 bStarting = false;317 }318 }319 }320 }321 break;322 default:323 Q_ASSERT_X ( false, "calculateDataBoundaries()",324 "Type item does not match a defined line chart Type." );325 }326327 QPointF bottomLeft ( QPointF( xMin, yMin ) );328 QPointF topRight ( QPointF( xMax, yMax ) );329330 //FIXME(khz): Verify, if this code is right: We are taking331 // ThreeDBarAttributes that might have been set332 // at a header (using the setter that takes a column as parameter),333 // but we are ignoring ’any’ ThreeDBarAttributes, that might have334 // been specified for an individual cell.335 // see: BarDiagram::calculateDataBoundaries ()336 //337 //Pending Michel: We don’t need that any more with the new Grid Painting338 //I am commenting the code temporarely - will clean up after testing more339 //accurately.340 /*341 bool threeDBoundaries = false;342 for ( int i=0; i<colCount; ++i ) {343 QModelIndex index = model()->index( 0, i, rootIndex() );344 const ThreeDLineAttributes tda( threeDLineAttributes( index ) );345 if ( tda.isEnabled() ) {346 threeDBoundaries = true;347 QPointF projLeft ( project(QPointF( xMin, 0.0 ), QPointF( xMin, 0.0 ), tda.depth()/10 , index ) );348 QPointF projRight( project(QPointF( xMax, yMax ), QPointF( xMax, yMax), tda.depth()/10, index ) );349 projRight.x() > topRight.x() ? topRightThreeD.setX( projRight.x() ):350 topRightThreeD.setX( topRight.x() );351 projRight.y() > topRight.y() ? topRightThreeD.setY( projRight.y() ):352 topRightThreeD.setY( topRight.y() );353 projLeft.x() > bottomLeft.x() ? bottomLeftThreeD.setX( bottomLeft.x() ):354 bottomLeftThreeD.setX( projLeft.x() );355 projLeft.y() > bottomLeft.y() ? bottomLeftThreeD.setY( bottomLeft.y() ):356 bottomLeftThreeD.setY( projLeft.y() );357 }358 }359360 return threeDBoundaries ? QPair<QPointF, QPointF> ( bottomLeftThreeD , topRightThreeD ):361 QPair<QPointF, QPointF> ( bottomLeft, topRight );362 */363 return QPair<QPointF, QPointF> ( bottomLeft, topRight );364 }

6.33.3.11 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::RingDiagram::calculateDataBoundaries(), KDChart::PolarDiagram::calculate-DataBoundaries(), KDChart::PieDiagram::calculateDataBoundaries(), calculateDataBoundaries(),

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

442 KD Chart 2 Class Documentation

KDChart::BarDiagram::calculateDataBoundaries(), KDChart::RingDiagram::paint(), KDChart::Polar-Diagram::paint(), KDChart::PieDiagram::paint(), paint(), KDChart::BarDiagram::paint(), andKDChart::AbstractDiagram::paintMarker().

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

6.33.3.12 LineDiagram ∗ LineDiagram::clone () const [virtual]

Definition at line 73 of file KDChartLineDiagram.cpp.

References d, and LineDiagram().

74 {75 return new LineDiagram( new Private( *d ) );76 }

6.33.3.13 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.33.3.14 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(),paint(), KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polarCoordinatePlane(), andKDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {127 return d->plane;128 }

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

6.33 KDChart::LineDiagram Class Reference 443

6.33.3.15 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::calculateDataBoundaries(), and d.

Referenced by KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(), KDChart::Polar-CoordinatePlane::layoutDiagrams(), 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.33.3.16 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.33.3.17 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese too, in order to find the brush, that is used for a single cell.

Returns:The current set of dataset brushes.

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

444 KD Chart 2 Class Documentation

Definition at line 710 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::datasetCount(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.33.3.18 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

Returns:The dataset dimension of the diagram.

Definition at line 758 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), getCellValues(), KDChart::CartesianCoordinatePlane::getData-DimensionsList(), paint(), and setType().

762 {

6.33.3.19 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();

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

6.33 KDChart::LineDiagram Class Reference 445

704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.33.3.20 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.33.3.21 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

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

446 KD Chart 2 Class Documentation

6.33.3.22 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.33.3.23 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.33.3.24 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

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

6.33 KDChart::LineDiagram Class Reference 447

6.33.3.25 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.33.3.26 LineAttributes::MissingValuesPolicy LineDiagram::getCellValues (int row, int column,double & valueX, double & valueY) const [protected]

Definition at line 392 of file KDChartLineDiagram.cpp.

References KDChart::AbstractDiagram::datasetDimension(), lineAttributes(), KDChart::Line-Attributes::missingValuesPolicy(), and valueForCellTesting().

Referenced by paint().

395 {396 LineAttributes::MissingValuesPolicy policy;397398 bool bOK = true;399 valueX = ( datasetDimension() > 1 && column > 0 )400 ? valueForCellTesting(row, column-1, bOK)401 : row;402 if( bOK )403 valueY = valueForCellTesting(row, column, bOK);404 if( bOK ){405 policy = LineAttributes::MissingValuesPolicyIgnored;406 }else{407 // missing value: find out the policy408 QModelIndex index = model()->index( row, column, rootIndex() );409 LineAttributes la = lineAttributes( index );410 policy = la.missingValuesPolicy();411 }412 return policy;413 }

6.33.3.27 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

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

448 KD Chart 2 Class Documentation

6.33.3.28 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.33.3.29 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.33.3.30 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.33.3.31 void KDChart::AbstractCartesianDiagram::layoutPlanes () [virtual,inherited]

Definition at line 90 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractCoordinate-Plane::layoutPlanes().

Referenced by KDChart::AbstractCartesianDiagram::addAxis(), and KDChart::AbstractCartesian-Diagram::takeAxis().

91 {92 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes()";93 AbstractCoordinatePlane* plane = coordinatePlane();94 if( plane ){95 plane->layoutPlanes();96 //qDebug() << "KDChart::AbstractCartesianDiagram::layoutPlanes() OK";97 }98 }

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

6.33 KDChart::LineDiagram Class Reference 449

6.33.3.32 LineAttributes LineDiagram::lineAttributes (const QModelIndex & index) const

Definition at line 144 of file KDChartLineDiagram.cpp.

References d.

146 {147 return qVariantValue<LineAttributes>(148 d->attributesModel->data(149 d->attributesModel->mapFromSource(index),150 KDChart::LineAttributesRole ) );151 }

6.33.3.33 LineAttributes LineDiagram::lineAttributes (int column) const

Definition at line 136 of file KDChartLineDiagram.cpp.

References d.

137 {138 return qVariantValue<LineAttributes>(139 d->attributesModel->data(140 d->attributesModel->mapFromSource( columnToIndex( column ) ),141 KDChart::LineAttributesRole ) );142 }

6.33.3.34 LineAttributes LineDiagram::lineAttributes () const

Definition at line 130 of file KDChartLineDiagram.cpp.

References d.

Referenced by getCellValues(), and paint().

131 {132 return qVariantValue<LineAttributes>(133 d->attributesModel->data( KDChart::LineAttributesRole ) );134 }

6.33.3.35 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.33.3.36 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

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

450 KD Chart 2 Class Documentation

6.33.3.37 const int LineDiagram::numberOfAbscissaSegments () const[virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 711 of file KDChartLineDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

712 {713 return d->attributesModel->rowCount(attributesModelRootIndex());714 }

6.33.3.38 const int LineDiagram::numberOfOrdinateSegments () const[virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 716 of file KDChartLineDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

717 {718 return d->attributesModel->columnCount(attributesModelRootIndex());719 }

6.33.3.39 void LineDiagram::paint (PaintContext ∗ paintContext) [protected, 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.

ImplementsKDChart::AbstractDiagram.

Definition at line 420 of file KDChartLineDiagram.cpp.

References KDChart::AbstractDiagram::antiAliasing(), KDChart::AbstractDiagram::attributes-ModelRootIndex(), KDChart::AbstractDiagram::checkInvariants(), KDChart::Abstract-Diagram::coordinatePlane(), d, KDChart::AbstractDiagram::dataBoundaries(), KDChart::Abstract-Diagram::datasetDimension(), KDChart::LineAttributes::displayArea(), getCellValues(), line-Attributes(), KDChart::AbstractDiagram::paintDataValueText(), KDChart::PaintContext::painter(),KDChart::AbstractDiagram::paintMarker(), KDChart::AbstractCoordinatePlane::translate(),KDChart::LineAttributes::transparency(), type(), and KDChart::AbstractDiagram::valueForCell().

Referenced by paintEvent().

421 {422 //qDebug() << " start diag::paint()";423 if ( !checkInvariants( true ) ) return;424 if ( !AbstractGrid::isBoundariesValid(dataBoundaries()) ) return;425426 //QTime t = QTime::currentTime();427428 //calculates and stores the values429 const int rowCount = d->attributesModel->rowCount(attributesModelRootIndex());430 const int colCount = d->attributesModel->columnCount(attributesModelRootIndex());431 DataValueTextInfoList list;432 LineAttributesInfoList lineList;

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

6.33 KDChart::LineDiagram Class Reference 451

433 LineAttributes::MissingValuesPolicy policy;434435 // paint different line types Normal - Stacked - Percent - Default Normal436 switch ( type() )437 {438 case LineDiagram::Normal:439 {440 for( int iColumn = datasetDimension()-1;441 iColumn < colCount; iColumn += datasetDimension() ) {442 QPolygonF area;443 bool bValuesFound = false;444 double lastValueX, lastValueY;445 double valueX, valueY;446 for ( int iRow = 0; iRow < rowCount; ++iRow ) {447 bool skipThisCell = false;448 // trying to find a fromPoint449 policy = getCellValues( iRow, iColumn, valueX, valueY );450 switch( policy ){451 case LineAttributes::MissingValuesAreBridged:452 if( bValuesFound ){453 valueX = lastValueX;454 valueY = lastValueY;455 }else{456 skipThisCell = true;457 }458 break;459 case LineAttributes::MissingValuesHideSegments:460 skipThisCell = true;461 break;462 case LineAttributes::MissingValuesShownAsZero:463 // fall through intended464 case LineAttributes::MissingValuesPolicyIgnored:465 lastValueX = valueX;466 lastValueY = valueY;467 bValuesFound = true;468 break;469 }470 if( ! skipThisCell ){471 // trying to find a toPoint472 double nextValueX, nextValueY;473 bool foundToPoint = false;474 int iNextRow = iRow+1;475 while ( ! (foundToPoint || skipThisCell || iNextRow >= rowCount) ) {476 policy = getCellValues( iNextRow, iColumn, nextValueX, nextValueY );477 switch( policy ){478 case LineAttributes::MissingValuesAreBridged:479 // The cell has no valid value, so we make sure that480 // this cell will not be processed by the next iteration481 // of the iRow loop:482 ++iRow;483 break;484 case LineAttributes::MissingValuesHideSegments:485 // The cell has no valid value, so we make sure that486 // this cell will not be processed by the next iteration487 // of the iRow loop:488 skipThisCell = true;489 ++iRow;490 break;491 case LineAttributes::MissingValuesShownAsZero:492 // fall through intended493 case LineAttributes::MissingValuesPolicyIgnored:494 foundToPoint = true;495 break;496 }497 ++iNextRow;498 }499 if( ! skipThisCell ){

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

452 KD Chart 2 Class Documentation

500 QModelIndex index = model()->index( iRow, iColumn, rootIndex() );501 QPointF fromPoint = coordinatePlane()->translate( QPointF( valueX, valueY ) );502 area.append( fromPoint );503 if( foundToPoint ){504 QPointF toPoint = coordinatePlane()->translate( QPointF( nextValueX, nextValueY ) );505 lineList.append( LineAttributesInfo( index, fromPoint, toPoint ) );506 }507 list.append( DataValueTextInfo( index, fromPoint, valueY ) );508 }509 }510 }511 //area can be set by column512 QModelIndex index = model()->index( 0, iColumn, rootIndex() );513 LineAttributes laa = lineAttributes( index );514 if ( laa.displayArea() )515 paintAreas( ctx, index, area, laa.transparency() );516 }517 }518 break;519 case LineDiagram::Stacked:520 {521 //FIXME(khz): add LineAttributes::MissingValuesPolicy support for LineDiagram::Stacked522 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {523 QPolygonF area;524 for ( int j = 0; j< rowCount; ++j ) {525 QModelIndex index = model()->index( j, i, rootIndex() );526 double stackedValues = 0, nextValues = 0;527 for ( int k = i; k >= datasetDimension()-1 ; k -= datasetDimension() ) {528 stackedValues += valueForCell( j, k );529 if ( j+1 < rowCount )530 nextValues += valueForCell( j+1, k );531 }532 QPointF nextPoint = coordinatePlane()->translate( QPointF( j, stackedValues ) );533 area.append( nextPoint );534 QPointF toPoint = coordinatePlane()->translate( QPointF( j+1, nextValues ) );535 if ( j+1 < rowCount )536 lineList.append( LineAttributesInfo( index, nextPoint, toPoint ) );537 list.append( DataValueTextInfo( index, nextPoint, valueForCell( j, i ) ) );538 }539 QModelIndex index = model()->index( 0, i, rootIndex() );540 LineAttributes laa = lineAttributes( index );541 if ( laa.displayArea() )542 paintAreas( ctx, index, area, laa.transparency() );543 }544 }545 break;546 case LineDiagram::Percent:547 {548 //FIXME(khz): add LineAttributes::MissingValuesPolicy support for LineDiagram::Percent549 double maxValue = 100; // always 100%550 double sumValues = 0;551 QVector <double > sumValuesVector;552553 //calculate sum of values for each column and store554 for ( int j=0; j<rowCount ; ++j ) {555 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {556 double tmpValue = valueForCell( j, i );557 if ( tmpValue > 0 )558 sumValues += tmpValue;559 if ( i == colCount-1 ) {560 sumValuesVector << sumValues ;561 sumValues = 0;562 }563 }564 }565 // calculate stacked percent value566 for( int i = datasetDimension()-1; i < colCount; i += datasetDimension() ) {

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

6.33 KDChart::LineDiagram Class Reference 453

567 QPolygonF area;568 for ( int j=0; j<rowCount ; ++j ) {569 double stackedValues = 0, nextValues = 0;570 QModelIndex index = model()->index( j, i, rootIndex() );571 //calculate stacked percent value- we only take in account positives values for now.572 for ( int k = i; k >= 0 ; --k ) {573 double val = valueForCell( j, k );574 if ( val > 0)575 stackedValues += val;576 if ( j+1 < rowCount ){577 val = valueForCell( j+1, k);578 if ( val > 0 )579 nextValues += val;580 }581 }582 double y = 0;583 if ( sumValuesVector.at(j) != 0 )584 y = stackedValues/sumValuesVector.at(j) * maxValue;585 QPointF nextPoint = coordinatePlane()->translate( QPointF( j, y ) );586 area.append( nextPoint );587 if ( j+1 < rowCount ) {588 double y = 0;589 if ( sumValuesVector.at(j+1) != 0 )590 y = nextValues/sumValuesVector.at(j+1) * maxValue;591 QPointF toPoint = coordinatePlane()->translate( QPointF( j+1, y ) );592 lineList.append( LineAttributesInfo( index, nextPoint, toPoint ) );593 }594 list.append( DataValueTextInfo( index, nextPoint, valueForCell( j, i ) ) );595 }596 QModelIndex index = model()->index( 0, i, rootIndex() );597 LineAttributes laa = lineAttributes( index );598 if ( laa.displayArea() )599 paintAreas( ctx, index, area, laa.transparency() );600 }601 break;602 }603 default:604 Q_ASSERT_X ( false, "paint()",605 "Type item does not match a defined line chart Type." );606 }607 // paint all lines and their attributes608 {609 PainterSaver painterSaver( ctx->painter() );610 if ( antiAliasing() )611 ctx->painter()->setRenderHint ( QPainter::Antialiasing );612 LineAttributesInfoListIterator itline ( lineList );613 //qDebug() << "Rendering 1 in: " << t.msecsTo( QTime::currentTime() ) << endl;614 while ( itline.hasNext() ) {615 const LineAttributesInfo& lineInfo = itline.next();616 paintLines( ctx,lineInfo.index, lineInfo.value, lineInfo.nextValue );617 }618 }619 // paint all data value texts and the point markers620 {621 PainterSaver painterSaver( ctx->painter() );622 DataValueTextInfoListIterator it( list );623 while ( it.hasNext() ) {624 const DataValueTextInfo& info = it.next();625 paintDataValueText( ctx->painter(), info.index, info.pos, info.value );626 paintMarker( ctx->painter(), info.index, info.pos );627 }628 }629 //qDebug() << "Rendering 2 in: " << t.msecsTo( QTime::currentTime() ) << endl;630 }

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

454 KD Chart 2 Class Documentation

6.33.3.40 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::prefix(), KDChart::TextAttributes::rotation(),KDChart::DataValueAttributes::suffix(), and KDChart::DataValueAttributes::textAttributes().

Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), paint(), andKDChart::BarDiagram::paint().

320 {321 // paint one data series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

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

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 );

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

6.33 KDChart::LineDiagram Class Reference 455

391 }392 }393 }394395

6.33.3.42 void LineDiagram::paintEvent (QPaintEvent∗) [protected]

Definition at line 367 of file KDChartLineDiagram.cpp.

References paint(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

368 {369 //qDebug() << "starting LineDiagram::paintEvent ( QPaintEvent*)";370 QPainter painter ( viewport() );371 PaintContext ctx;372 ctx.setPainter ( &painter );373 ctx.setRectangle ( QRectF ( 0, 0, width(), height() ) );374 paint ( &ctx );375 //qDebug() << " LineDiagram::paintEvent ( QPaintEvent*) ended.";376 }

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.33.3.44 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

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

456 KD Chart 2 Class Documentation

References KDChart::MarkerAttributes::markerStyle().

Referenced by paint(), KDChart::MarkerLayoutItem::paint(), and KDChart::AbstractDiagram::paint-Marker().

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 about456 // 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: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 }

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

6.33 KDChart::LineDiagram Class Reference 457

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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

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

458 KD Chart 2 Class Documentation

6.33.3.46 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.33.3.47 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.33.3.48 QPen AbstractDiagram::pen () const [inherited]

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 {

6.33.3.49 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

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

6.33 KDChart::LineDiagram Class Reference 459

6.33.3.50 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), setLineAttributes(), setThreeDLine-Attributes(), and setType().

6.33.3.51 AbstractCartesianDiagram ∗ AbstractCartesianDiagram::referenceDiagram () const[virtual, inherited]

Definition at line 123 of file KDChartAbstractCartesianDiagram.cpp.

References d.

124 {125 return d->referenceDiagram;126 }

6.33.3.52 QPointF AbstractCartesianDiagram::referenceDiagramOffset () const[virtual,inherited]

Definition at line 128 of file KDChartAbstractCartesianDiagram.cpp.

References d.

129 {130 return d->referenceDiagramOffset;131 }

6.33.3.53 void LineDiagram::resize (const QSizeF &area) [virtual]

Called by the widget’s sizeEvent.

Adjust all internal structures, that are calculated, dependending on the size of the widget.

Parameters:area

ImplementsKDChart::AbstractDiagram.

Definition at line 707 of file KDChartLineDiagram.cpp.

708 {709 }

6.33.3.54 void LineDiagram::resizeEvent (QResizeEvent∗) [protected]

Definition at line 225 of file KDChartLineDiagram.cpp.

226 {227 }

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

460 KD Chart 2 Class Documentation

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.33.3.56 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.33.3.57 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.33.3.58 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat is internal to another diagram is an error.

Correct:

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

Wrong:

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

6.33 KDChart::LineDiagram Class Reference 461

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

Parameters:model TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.33.3.59 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.33.3.60 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.33.3.61 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

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

462 KD Chart 2 Class Documentation

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.33.3.62 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

6.33.3.63 void KDChart::AbstractCartesianDiagram::setCoordinatePlane(AbstractCoordinatePlane∗ plane) [virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented fromKDChart::AbstractDiagram.

Definition at line 100 of file KDChartAbstractCartesianDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane(), and KDChart::AbstractDiagram::set-CoordinatePlane().

101 {102 if( coordinatePlane() ) disconnect( coordinatePlane() );103 AbstractDiagram::setCoordinatePlane(plane);104105 // show the axes, after all have been adjusted106 // (because they might be dependend on each other)107 /*108 if( plane )109 Q_FOREACH( CartesianAxis* axis, d->axesList )110 axis->show();111 else112 Q_FOREACH( CartesianAxis* axis, d->axesList )113 axis->hide();114 */115 }

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

6.33 KDChart::LineDiagram Class Reference 463

6.33.3.64 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), setThreeDLineAttributes(), setType(),and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.33.3.65 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.33.3.66 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.33.3.67 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

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

464 KD Chart 2 Class Documentation

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.33.3.68 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.33.3.69 void LineDiagram::setLineAttributes (const QModelIndex &index, constLineAttributes& a)

Definition at line 119 of file KDChartLineDiagram.cpp.

References d, KDChart::LineAttributesRole, and KDChart::AbstractDiagram::propertiesChanged().

122 {123 d->attributesModel->setData(124 d->attributesModel->mapFromSource(index),125 qVariantFromValue( ta ),126 LineAttributesRole );127 emit propertiesChanged();128 }

6.33.3.70 void LineDiagram::setLineAttributes (int column, constLineAttributes & a)

Definition at line 107 of file KDChartLineDiagram.cpp.

References d, KDChart::LineAttributesRole, and KDChart::AbstractDiagram::propertiesChanged().

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

6.33 KDChart::LineDiagram Class Reference 465

110 {111 d->attributesModel->setHeaderData(112 column,113 Qt::Vertical,114 qVariantFromValue( ta ),115 LineAttributesRole );116 emit propertiesChanged();117 }

6.33.3.71 void LineDiagram::setLineAttributes (constLineAttributes & a)

Definition at line 99 of file KDChartLineDiagram.cpp.

References d, KDChart::LineAttributesRole, and KDChart::AbstractDiagram::propertiesChanged().

100 {101 d->attributesModel->setModelData(102 qVariantFromValue( ta ),103 LineAttributesRole );104 emit propertiesChanged();105 }

6.33.3.72 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.33.3.73 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

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

466 KD Chart 2 Class Documentation

6.33.3.74 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.33.3.75 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.33.3.76 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by setType(), and KDChart::BarDiagram::setType().

312 {

6.33.3.77 void AbstractCartesianDiagram::setReferenceDiagram (AbstractCartesianDiagram ∗diagram, const QPointF & offset= QPointF()) [virtual, inherited]

Definition at line 117 of file KDChartAbstractCartesianDiagram.cpp.

References d.

118 {119 d->referenceDiagram = diagram;120 d->referenceDiagramOffset = offset;121 }

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

6.33 KDChart::LineDiagram Class Reference 467

6.33.3.78 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.33.3.79 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.33.3.80 void LineDiagram::setThreeDLineAttributes (const QModelIndex &index, constThreeDLineAttributes & a)

Definition at line 176 of file KDChartLineDiagram.cpp.

References d, KDChart::AbstractDiagram::propertiesChanged(), KDChart::AbstractDiagram::setData-BoundariesDirty(), and KDChart::ThreeDLineAttributesRole.

179 {180 setDataBoundariesDirty();181 d->attributesModel->setData(182 d->attributesModel->mapFromSource(index),183 qVariantFromValue( ta ),184 ThreeDLineAttributesRole );185 emit propertiesChanged();186 }

6.33.3.81 void LineDiagram::setThreeDLineAttributes (intcolumn, constThreeDLineAttributes& a)

Definition at line 163 of file KDChartLineDiagram.cpp.

References d, KDChart::AbstractDiagram::propertiesChanged(), KDChart::AbstractDiagram::setData-BoundariesDirty(), and KDChart::ThreeDLineAttributesRole.

166 {167 setDataBoundariesDirty();168 d->attributesModel->setHeaderData(169 column,170 Qt::Vertical,171 qVariantFromValue( ta ),172 ThreeDLineAttributesRole );173 emit propertiesChanged();174 }

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

468 KD Chart 2 Class Documentation

6.33.3.82 void LineDiagram::setThreeDLineAttributes (constThreeDLineAttributes & a)

Definition at line 153 of file KDChartLineDiagram.cpp.

References d, KDChart::AbstractDiagram::propertiesChanged(), KDChart::AbstractDiagram::setData-BoundariesDirty(), and KDChart::ThreeDLineAttributesRole.

155 {156 setDataBoundariesDirty();157 d->attributesModel->setModelData(158 qVariantFromValue( ta ),159 ThreeDLineAttributesRole );160 emit propertiesChanged();161 }

6.33.3.83 void LineDiagram::setType (constLineType type)

Definition at line 78 of file KDChartLineDiagram.cpp.

References d, KDChart::AbstractDiagram::datasetDimension(), KDChart::AbstractDiagram::properties-Changed(), KDChart::AbstractDiagram::setDataBoundariesDirty(), and KDChart::AbstractDiagram::set-PercentMode().

79 {80 if ( d->lineType == type ) return;81 if ( type != LineDiagram::Normal && datasetDimension() > 1 ) {82 Q_ASSERT_X ( false, "setType()",83 "This line chart type can’t be used with multi-dimensional data." );84 return;85 }86 d->lineType = type;87 // AbstractAxis settings - see AbstractDiagram and CartesianAxis88 setPercentMode( type == LineDiagram::Percent );89 setDataBoundariesDirty();90 emit layoutChanged( this );91 emit propertiesChanged();92 }

6.33.3.84 void AbstractCartesianDiagram::takeAxis (CartesianAxis ∗ axis) [virtual,inherited]

Removes the axis from the diagram, without deleting it.

The diagram no longer owns the axis, so it is the caller’s responsibility to delete the axis.

See also:addAxis

Definition at line 75 of file KDChartAbstractCartesianDiagram.cpp.

References d, KDChart::AbstractAxis::deleteObserver(), KDChart::AbstractCartesianDiagram::layout-Planes(), and KDChart::AbstractLayoutItem::setParentWidget().

Referenced by KDChart::CartesianAxis::∼CartesianAxis().

76 {77 const int idx = d->axesList.indexOf( axis );

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

6.33 KDChart::LineDiagram Class Reference 469

78 if( idx != -1 )79 d->axesList.takeAt( idx );80 axis->deleteObserver( this );81 axis->setParentWidget( 0 );82 layoutPlanes();83 }

6.33.3.85 double LineDiagram::threeDItemDepth (intcolumn) const [protected,virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 216 of file KDChartLineDiagram.cpp.

References d.

217 {218 return qVariantValue<ThreeDLineAttributes>(219 d->attributesModel->headerData (220 column,221 Qt::Vertical,222 KDChart::ThreeDLineAttributesRole ) ).validDepth();223 }

6.33.3.86 double LineDiagram::threeDItemDepth (const QModelIndex &index) const[protected, virtual]

ImplementsKDChart::AbstractCartesianDiagram.

Definition at line 211 of file KDChartLineDiagram.cpp.

References threeDLineAttributes(), and KDChart::AbstractThreeDAttributes::validDepth().

212 {213 return threeDLineAttributes( index ).validDepth();214 }

6.33.3.87 ThreeDLineAttributes LineDiagram::threeDLineAttributes (const QModelIndex &index) const

Definition at line 202 of file KDChartLineDiagram.cpp.

References d.

204 {205 return qVariantValue<ThreeDLineAttributes>(206 d->attributesModel->data(207 d->attributesModel->mapFromSource( index ),208 KDChart::ThreeDLineAttributesRole ) );209 }

6.33.3.88 ThreeDLineAttributes LineDiagram::threeDLineAttributes (int column) const

Definition at line 194 of file KDChartLineDiagram.cpp.

References d.

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

470 KD Chart 2 Class Documentation

195 {196 return qVariantValue<ThreeDLineAttributes>(197 d->attributesModel->data(198 d->attributesModel->mapFromSource( columnToIndex( column ) ),199 KDChart::ThreeDLineAttributesRole ) );200 }

6.33.3.89 ThreeDLineAttributes LineDiagram::threeDLineAttributes () const

Definition at line 188 of file KDChartLineDiagram.cpp.

References d.

Referenced by threeDItemDepth().

189 {190 return qVariantValue<ThreeDLineAttributes>(191 d->attributesModel->data( KDChart::ThreeDLineAttributesRole ) );192 }

6.33.3.90 LineDiagram::LineType LineDiagram::type () const

Definition at line 94 of file KDChartLineDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), and paint().

95 {96 return d->lineType;97 }

6.33.3.91 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.33.3.92 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

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

6.33 KDChart::LineDiagram Class Reference 471

6.33.3.93 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.33.3.94 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.33.3.95 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by paint().

776 {

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

472 KD Chart 2 Class Documentation

6.33.3.96 double LineDiagram::valueForCellTesting (introw, int column, bool & bOK) const[protected]

Definition at line 379 of file KDChartLineDiagram.cpp.

References d.

Referenced by calculateDataBoundaries(), and getCellValues().

380 {381 double value =382 d->attributesModel->data(383 d->attributesModel->index( row, column, attributesModelRootIndex() )384 ).toDouble( &bOK );385 if( ! bOK )386 value = 0.0;387388 return value;389 }

6.33.3.97 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

6.33.3.98 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.33.3.99 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.33.4 Member Data Documentation

6.33.4.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartLineDiagram.h• KDChartLineDiagram.cpp

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

6.34 KDChart::MarkerAttributes Class Reference 473

6.34 KDChart::MarkerAttributes Class Reference

#include <KDChartMarkerAttributes.h >

Public Types

• enumMarkerStyle{

MarkerCircle= 0,

MarkerSquare= 1,

MarkerDiamond= 2,

Marker1Pixel= 3,

Marker4Pixels= 4,

MarkerRing= 5,

MarkerCross= 6,

MarkerFastCross= 7 }

• typedef QMap< uint, MarkerStyle> MarkerStylesMap

Public Member Functions

• bool isVisible () const

• MarkerAttributes(constMarkerAttributes&)

• MarkerAttributes()

• QColormarkerColor() const

• QSizeFmarkerSize() const

• MarkerStylemarkerStyle() const

• MarkerStylesMapmarkerStylesMap() const

• booloperator!=(constMarkerAttributes&) const

• MarkerAttributes& operator=(constMarkerAttributes&)

• booloperator==(constMarkerAttributes&) const

• QPenpen() const

• void setMarkerColor(const QColor &color)

• void setMarkerSize(const QSizeF &size)

• void setMarkerStyle(MarkerStylestyle)

• void setMarkerStylesMap(constMarkerStylesMap&map)

• void setPen(const QPen &pen)

• void setVisible(bool visible)

• ∼MarkerAttributes()

6.34.1 Member Typedef Documentation

6.34.1.1 typedef QMap<uint, MarkerStyle> KDChart::MarkerAttributes::MarkerStylesMap

Definition at line 65 of file KDChartMarkerAttributes.h.

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

474 KD Chart 2 Class Documentation

6.34.2 Member Enumeration Documentation

6.34.2.1 enumKDChart::MarkerAttributes::MarkerStyle

Enumeration values:MarkerCircle

MarkerSquare

MarkerDiamond

Marker1Pixel

Marker4Pixels

MarkerRing

MarkerCross

MarkerFastCross

Definition at line 53 of file KDChartMarkerAttributes.h.

53 { MarkerCircle = 0,54 MarkerSquare = 1,55 MarkerDiamond = 2,56 Marker1Pixel = 3,57 Marker4Pixels = 4,58 MarkerRing = 5,59 MarkerCross = 6,60 MarkerFastCross = 7 };

6.34.3 Constructor & Destructor Documentation

6.34.3.1 KDChart::MarkerAttributes::MarkerAttributes ()

6.34.3.2 KDChart::MarkerAttributes::MarkerAttributes (const MarkerAttributes &)

6.34.3.3 KDChart::MarkerAttributes:: ∼MarkerAttributes ()

6.34.4 Member Function Documentation

6.34.4.1 bool KDChart::MarkerAttributes::isVisible () const

Referenced by operator<<(), and KDChart::AbstractDiagram::paintMarker().

6.34.4.2 QColor KDChart::MarkerAttributes::markerColor () const

Referenced by operator<<(), and KDChart::AbstractDiagram::paintMarker().

6.34.4.3 QSizeF KDChart::MarkerAttributes::markerSize () const

Referenced by KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerLayoutItem::sizeHint().

6.34.4.4 MarkerStyle KDChart::MarkerAttributes::markerStyle () const

Referenced by operator<<(), and KDChart::AbstractDiagram::paintMarker().

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

6.34 KDChart::MarkerAttributes Class Reference 475

6.34.4.5 MarkerStylesMap KDChart::MarkerAttributes::markerStylesMap () const

Referenced by operator<<().

6.34.4.6 bool KDChart::MarkerAttributes::operator!= (const MarkerAttributes &) const

Definition at line 89 of file KDChartMarkerAttributes.h.

References operator==().

89 { return !operator==( other ); }

6.34.4.7 MarkerAttributes & KDChart::MarkerAttributes::operator= (const MarkerAttributes&)

6.34.4.8 bool KDChart::MarkerAttributes::operator== (const MarkerAttributes &) const

Referenced by operator!=().

6.34.4.9 QPen KDChart::MarkerAttributes::pen () const

Referenced by operator<<(), and KDChart::AbstractDiagram::paintMarker().

6.34.4.10 void KDChart::MarkerAttributes::setMarkerColor (const QColor & color)

6.34.4.11 void KDChart::MarkerAttributes::setMarkerSize (const QSizeF & size)

6.34.4.12 void KDChart::MarkerAttributes::setMarkerStyle ( MarkerStyle style)

6.34.4.13 void KDChart::MarkerAttributes::setMarkerStylesMap (const MarkerStylesMap &map)

6.34.4.14 void KDChart::MarkerAttributes::setPen (const QPen & pen)

6.34.4.15 void KDChart::MarkerAttributes::setVisible (bool visible)

The documentation for this class was generated from the following file:

• KDChartMarkerAttributes.h

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

476 KD Chart 2 Class Documentation

6.35 KDChart::MarkerLayoutItem Class Reference

#include <KDChartLayoutItems.h >

Inheritance diagram for KDChart::MarkerLayoutItem:Collaboration diagram for KDChart::MarkerLayout-Item:

Public Member Functions

• virtual Qt::OrientationsexpandingDirections() const• virtual QRectgeometry() const• virtual boolisEmpty() const• MarkerLayoutItem(AbstractDiagram∗diagram, constMarkerAttributes&marker, const QBrush

&brush, const QPen &pen, Qt::Alignment alignment=0)• virtual QSizemaximumSize() const• virtual QSizeminimumSize() const• virtual voidpaint(QPainter∗)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• void removeFromParentLayout()• virtual voidsetGeometry(const QRect &r)• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• virtual QSizesizeHint() const• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout

6.35.1 Constructor & Destructor Documentation

6.35.1.1 KDChart::MarkerLayoutItem::MarkerLayoutItem ( AbstractDiagram ∗ diagram, constMarkerAttributes & marker, const QBrush & brush, const QPen &pen, Qt::Alignmentalignment= 0)

Definition at line 344 of file KDChartLayoutItems.cpp.

348 : AbstractLayoutItem( alignment )349 , mDiagram( diagram )350 , mMarker( marker )351 , mBrush( brush )352 , mPen( pen )353 {354 }

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

6.35 KDChart::MarkerLayoutItem Class Reference 477

6.35.2 Member Function Documentation

6.35.2.1 Qt::Orientations KDChart::MarkerLayoutItem::expandingDirections () const[virtual]

Definition at line 356 of file KDChartLayoutItems.cpp.

357 {358 return 0; // Grow neither vertically nor horizontally359 }

6.35.2.2 QRect KDChart::MarkerLayoutItem::geometry () const [virtual]

Definition at line 361 of file KDChartLayoutItems.cpp.

Referenced by paint().

362 {363 return mRect;364 }

6.35.2.3 bool KDChart::MarkerLayoutItem::isEmpty () const [virtual]

Definition at line 366 of file KDChartLayoutItems.cpp.

367 {368 return false; // never empty, otherwise the layout item would not exist369 }

6.35.2.4 QSize KDChart::MarkerLayoutItem::maximumSize () const [virtual]

Definition at line 371 of file KDChartLayoutItems.cpp.

References sizeHint().

372 {373 return sizeHint(); // PENDING(kalle) Review, quite inflexible374 }

6.35.2.5 QSize KDChart::MarkerLayoutItem::minimumSize () const [virtual]

Definition at line 376 of file KDChartLayoutItems.cpp.

References sizeHint().

377 {378 return sizeHint(); // PENDING(kalle) Review, quite inflexible379 }

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

478 KD Chart 2 Class Documentation

6.35.2.6 void KDChart::MarkerLayoutItem::paint (QPainter ∗) [virtual]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 391 of file KDChartLayoutItems.cpp.

References geometry(), KDChart::AbstractDiagram::paintMarker(), and sizeHint().

392 {393 if( !mRect.isValid() )394 return;395396 // The layout management may assign a larger rect than what we397 // wanted. We need to adjust the position.398 QPointF pos = geometry().topLeft();399 pos += QPointF( static_cast<qreal>(( geometry().width() - sizeHint().width()) / 2.0 ),400 static_cast<qreal>(( geometry().height() - sizeHint().height()) / 2.0 ) );401402 // And finally, drawMarker() assumes the position to be the center403 // of the marker, adjust again.404 pos += QPointF( static_cast<qreal>( sizeHint().width() ) / 2.0,405 static_cast<qreal>( sizeHint().height() )/ 2.0 );406407 mDiagram->paintMarker( painter, mMarker, mBrush, mPen, pos.toPoint(), sizeHint() );408 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.35.2.8 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 else72 mParentLayout->removeItem( this );73 }74 }

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

6.35 KDChart::MarkerLayoutItem Class Reference 479

6.35.2.9 void KDChart::MarkerLayoutItem::setGeometry (const QRect & r) [virtual]

Definition at line 381 of file KDChartLayoutItems.cpp.

382 {383 mRect = r;384 }

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.35.2.11 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 sizeof 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.35.2.12 QSize KDChart::MarkerLayoutItem::sizeHint () const [virtual]

Definition at line 386 of file KDChartLayoutItems.cpp.

References KDChart::MarkerAttributes::markerSize().

Referenced by KDChart::Legend::buildLegend(), maximumSize(), minimumSize(), and paint().

387 {388 return mMarker.markerSize().toSize();389 }

6.35.2.13 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().

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

480 KD Chart 2 Class Documentation

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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.35.3 Member Data Documentation

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartLayoutItems.h• KDChartLayoutItems.cpp

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

6.36 KDChart::Measure Class Reference 481

6.36 KDChart::Measure Class Reference

#include <KDChartMeasure.h >

Collaboration diagram for KDChart::Measure:

Public Member Functions

• qreal calculatedValue(const QObject ∗autoArea, KDChartEnums::MeasureOrientationauto-Orientation) const

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

• KDChartEnums::MeasureCalculationModecalculationMode() const• Measure(constMeasure&)• Measure(qreal value,KDChartEnums::MeasureCalculationModemode=KDChartEnums::Measure-

CalculationModeAuto, KDChartEnums::MeasureOrientation orientation=KDChart-Enums::MeasureOrientationAuto)

• Measure()• booloperator!=(constMeasure&other) const• Measure& operator=(constMeasure&)• booloperator==(constMeasure&) const• constQObject∗ referenceArea() const

The returned reference area will either be derived fromAbstractAreaor be derived fromQWidget.

• KDChartEnums::MeasureOrientationreferenceOrientation() const• void setCalculationMode(KDChartEnums::MeasureCalculationModemode)• void setReferenceArea(constQObject∗area)

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

• void setReferenceOrientation(KDChartEnums::MeasureOrientationorientation)• void setRelativeMode(constQObject∗area,KDChartEnums::MeasureOrientationorientation)

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

• void setValue(qreal val)• qrealvalue() const

6.36.1 Constructor & Destructor Documentation

6.36.1.1 KDChart::Measure::Measure ()

Definition at line 41 of file KDChartMeasure.cpp.

42 : mValue( 0.0 ),43 mMode( KDChartEnums::MeasureCalculationModeAuto ),44 mArea( 0 ),45 mOrientation( KDChartEnums::MeasureOrientationAuto )46 {47 // this bloc left empty intentionally48 }

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

482 KD Chart 2 Class Documentation

6.36.1.2 KDChart::Measure::Measure (qrealvalue, KDChartEnums::MeasureCalculationModemode= KDChartEnums::MeasureCalculationModeAuto, KDChartEnums::Measure-Orientation orientation= KDChartEnums::MeasureOrientationAuto)

Definition at line 50 of file KDChartMeasure.cpp.

53 : mValue( value ),54 mMode( mode ),55 mArea( 0 ),56 mOrientation( orientation )57 {58 // this bloc left empty intentionally59 }

6.36.1.3 KDChart::Measure::Measure (constMeasure&)

Definition at line 61 of file KDChartMeasure.cpp.

62 : mValue( r.value() ),63 mMode( r.calculationMode() ),64 mArea( r.referenceArea() ),65 mOrientation( r.referenceOrientation() )66 {67 // this bloc left empty intentionally68 }

6.36.2 Member Function Documentation

6.36.2.1 qreal KDChart::Measure::calculatedValue (constQObject ∗ autoArea,KDChartEnums::MeasureOrientation autoOrientation) const

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

it could be derived fromAbstractAreaWidgettoo.

Definition at line 83 of file KDChartMeasure.cpp.

References value().

Referenced by KDChart::TextLayoutItem::realFontSize().

85 {86 if( mMode == KDChartEnums::MeasureCalculationModeAbsolute ){87 return mValue;88 }else{89 qreal value = 0.0;90 const QObject* area = mArea ? mArea : autoArea;91 KDChartEnums::MeasureOrientation orientation = mOrientation;92 switch( mMode ){93 case KDChartEnums::MeasureCalculationModeAuto:94 area = autoArea;95 orientation = autoOrientation;96 break;97 case KDChartEnums::MeasureCalculationModeAutoArea:98 area = autoArea;99 break;100 case KDChartEnums::MeasureCalculationModeAutoOrientation:101 orientation = autoOrientation;102 break;

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

6.36 KDChart::Measure Class Reference 483

103 case KDChartEnums::MeasureCalculationModeAbsolute: // fall through intended104 case KDChartEnums::MeasureCalculationModeRelative:105 break;106 }107 if( area ){108 QSize size;109 const QWidget* widget = dynamic_cast<const QWidget*>(area);110 if( widget ){111 size = widget->geometry().size();112 }else{113 const AbstractArea* kdcArea = dynamic_cast<const AbstractArea*>(area);114 if( kdcArea ){115 size = kdcArea->geometry().size();116 }else if( mMode != KDChartEnums::MeasureCalculationModeAbsolute ){117 qDebug("Measure::calculatedValue() has no reference area.");118 return 1.0;119 }120 }121 qreal referenceValue;122 switch( orientation ){123 case KDChartEnums::MeasureOrientationAuto: // fall through intended124 case KDChartEnums::MeasureOrientationMinimum:125 referenceValue = qMin( size.width(), size.height() );126 break;127 case KDChartEnums::MeasureOrientationMaximum:128 referenceValue = qMax( size.width(), size.height() );129 break;130 case KDChartEnums::MeasureOrientationHorizontal:131 referenceValue = size.width();132 break;133 case KDChartEnums::MeasureOrientationVertical:134 referenceValue = size.height();135 break;136 }137 value = mValue / 1000.0 * referenceValue;138 }139 return value;140 }141 }

6.36.2.2 KDChartEnums::MeasureCalculationMode KDChart::Measure::calculationMode ()const

Definition at line 57 of file KDChartMeasure.h.

Referenced by operator<<(), operator=(), and operator==().

57 { return mMode; }

6.36.2.3 bool KDChart::Measure::operator!= (constMeasure& other) const

Definition at line 95 of file KDChartMeasure.h.

95 { return !operator==(other); }

6.36.2.4 Measure& KDChart::Measure::operator= (const Measure&)

Definition at line 70 of file KDChartMeasure.cpp.

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

484 KD Chart 2 Class Documentation

References calculationMode(), referenceArea(), referenceOrientation(), and value().

71 {72 if( this != &r ){73 mValue = r.value();74 mMode = r.calculationMode();75 mArea = r.referenceArea();76 mOrientation = r.referenceOrientation();77 }7879 return *this;80 }

6.36.2.5 bool KDChart::Measure::operator== (constMeasure&) const

Definition at line 144 of file KDChartMeasure.cpp.

References calculationMode(), referenceArea(), referenceOrientation(), and value().

145 {146 return( mValue == r.value() &&147 mMode == r.calculationMode() &&148 mArea == r.referenceArea() &&149 mOrientation == r.referenceOrientation() );150 }

6.36.2.6 constQObject∗ KDChart::Measure::referenceArea () const

The returned reference area will either be derived fromAbstractAreaor be derived fromQWidget.

Definition at line 82 of file KDChartMeasure.h.

Referenced by operator<<(), operator=(), and operator==().

82 { return mArea; }

6.36.2.7 KDChartEnums::MeasureOrientation KDChart::Measure::referenceOrientation () const

Definition at line 85 of file KDChartMeasure.h.

Referenced by operator<<(), operator=(), and operator==().

85 { return mOrientation; }

6.36.2.8 void KDChart::Measure::setCalculationMode (KDChartEnums::MeasureCalculation-Mode mode)

Definition at line 56 of file KDChartMeasure.h.

56 { mMode = mode; }

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

6.36 KDChart::Measure Class Reference 485

6.36.2.9 void KDChart::Measure::setReferenceArea (constQObject ∗ area)

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

it could be derived fromAbstractAreaWidgettoo.

Definition at line 77 of file KDChartMeasure.h.

77 { mArea = area; }

6.36.2.10 void KDChart::Measure::setReferenceOrientation (KDChartEnums::Measure-Orientation orientation)

Definition at line 84 of file KDChartMeasure.h.

84 { mOrientation = orientation; }

6.36.2.11 void KDChart::Measure::setRelativeMode (constQObject ∗ area,KDChartEnums::MeasureOrientation orientation)

The reference area must either be derived fromAbstractAreaor be derived fromQWidget, so e.g.

it could be derived fromAbstractAreaWidgettoo.

Definition at line 64 of file KDChartMeasure.h.

66 {67 mMode = KDChartEnums::MeasureCalculationModeRelative;68 mArea = area;69 mOrientation = orientation;70 }

6.36.2.12 void KDChart::Measure::setValue (qrealval)

Definition at line 53 of file KDChartMeasure.h.

Referenced by KDChart::CartesianAxis::titleTextAttributes().

53 { mValue = val; }

6.36.2.13 qreal KDChart::Measure::value () const

Definition at line 54 of file KDChartMeasure.h.

Referenced by calculatedValue(), operator<<(), operator=(), operator==(), and KDChart::Cartesian-Axis::titleTextAttributes().

54 { return mValue; }

The documentation for this class was generated from the following files:

• KDChartMeasure.h• KDChartMeasure.cpp

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

486 KD Chart 2 Class Documentation

6.37 KDChart::PaintContext Class Reference

#include <KDChartPaintContext.h >

Collaboration diagram for KDChart::PaintContext:

Public Member Functions

• AbstractCoordinatePlane∗ coordinatePlane() const• PaintContext()• QPainter∗ painter() const• const QRectFrectangle() const• void setCoordinatePlane(AbstractCoordinatePlane∗plane)• void setPainter(QPainter∗painter)• void setRectangle(const QRectF &rect)

6.37.1 Constructor & Destructor Documentation

6.37.1.1 KDChart::PaintContext::PaintContext ()

6.37.2 Member Function Documentation

6.37.2.1 AbstractCoordinatePlane∗ KDChart::PaintContext::coordinatePlane () const

Referenced by KDChart::CartesianAxis::paintCtx().

6.37.2.2 QPainter∗ KDChart::PaintContext::painter () const

Referenced by KDChart::RingDiagram::paint(), KDChart::PolarDiagram::paint(), KDChart::Pie-Diagram::paint(), KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), KDChart::Abstract-LayoutItem::paintCtx(), and KDChart::PolarDiagram::paintPolarMarkers().

6.37.2.3 const QRectF KDChart::PaintContext::rectangle () const

Referenced by KDChart::PolarDiagram::paint(), KDChart::PieDiagram::paint(), and KDChart::Bar-Diagram::paint().

6.37.2.4 void KDChart::PaintContext::setCoordinatePlane (AbstractCoordinatePlane∗ plane)

Referenced by KDChart::PolarCoordinatePlane::paint(), KDChart::CartesianCoordinatePlane::paint(), andKDChart::CartesianAxis::paint().

6.37.2.5 void KDChart::PaintContext::setPainter (QPainter∗ painter)

Referenced by KDChart::PolarCoordinatePlane::paint(), KDChart::CartesianCoordinatePlane::paint(),KDChart::CartesianAxis::paint(), KDChart::RingDiagram::paintEvent(), KDChart::PolarDiagram::paint-Event(), KDChart::PieDiagram::paintEvent(), and KDChart::LineDiagram::paintEvent().

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

6.37 KDChart::PaintContext Class Reference 487

6.37.2.6 void KDChart::PaintContext::setRectangle (const QRectF &rect)

Referenced by KDChart::PolarCoordinatePlane::paint(), KDChart::CartesianCoordinatePlane::paint(),KDChart::CartesianAxis::paint(), KDChart::RingDiagram::paintEvent(), KDChart::PolarDiagram::paint-Event(), KDChart::PieDiagram::paintEvent(), and KDChart::LineDiagram::paintEvent().

The documentation for this class was generated from the following file:

• KDChartPaintContext.h

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

488 KD Chart 2 Class Documentation

6.38 KDChart::Palette Class Reference

#include <KDChartPalette.h >

Inheritance diagram for KDChart::Palette:Collaboration diagram for KDChart::Palette:

6.38.1 Detailed Description

A Paletteis a set of brushes (or colors) to be used for painting data sets.

The palette class encapsulates a colletion of brushes, which in the simplest case are colors, to be used forpainting a series of data sets. When asked for the m-th color, a palette of size n will wrap around and thuscycle through the available colors.

Three builtin palettes are provided for convenience, one with a default set of colors, one with a subduedcolor selection, one with rainbow colors.

When a palette changes, it emits a changed() signal. Hook up to it, if you want to repaint when the colorselection changes.

Definition at line 55 of file KDChartPalette.h.

Public Member Functions

• void addBrush(const QBrush &brush, int position=-1)

Addsbrushto the palette.

• QBrushgetBrush(int position) const

Query the palette for a brush at the specified position.

• bool isValid () const

Returns wether this represents a valid palette.

• Palette& operator=(constPalette&)• Palette(constPalette&)• Palette(QObject∗parent=0)• void removeBrush(int position)

Remove the brush at position.

• int size() const

Return the number of brushed in the palette.

• ∼Palette()

Static Public Member Functions

• constPalette& defaultPalette()

Provide access to the three builtin palettes, one with standard bright colors, one with more subdued colors,and one with rainbow colors.

• constPalette& rainbowPalette()• constPalette& subduedPalette()

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

6.38 KDChart::Palette Class Reference 489

Public Attributes

• Q_SIGNALS__pad0__: void changed()

6.38.2 Constructor & Destructor Documentation

6.38.2.1 KDChart::Palette::Palette (QObject ∗ parent= 0) [explicit]

6.38.2.2 KDChart::Palette::Palette (constPalette&)

6.38.2.3 KDChart::Palette::∼Palette()

6.38.3 Member Function Documentation

6.38.3.1 void KDChart::Palette::addBrush (const QBrush &brush, int position= -1)

Addsbrushto the palette.

If no position is specified, the brush is appended.

Referenced by makeDefaultPalette(), makeRainbowPalette(), and makeSubduedPalette().

6.38.3.2 constPalette& KDChart::Palette::defaultPalette () [static]

Provide access to the three builtin palettes, one with standard bright colors, one with more subdued colors,and one with rainbow colors.

Referenced by KDChart::AttributesModel::headerData().

6.38.3.3 QBrush KDChart::Palette::getBrush (int position) const

Query the palette for a brush at the specified position.

If the position exceeds the size of the palette, it wraps around.

Referenced by KDChart::AttributesModel::headerData(), and makeRainbowPalette().

6.38.3.4 bool KDChart::Palette::isValid () const

Returns wether this represents a valid palette.

For a palette to be valid it needs to have at least one brush associated.

6.38.3.5 Palette& KDChart::Palette::operator= (const Palette&)

6.38.3.6 constPalette& KDChart::Palette::rainbowPalette () [static]

Referenced by KDChart::AttributesModel::headerData().

6.38.3.7 void KDChart::Palette::removeBrush (intposition)

Remove the brush at position.

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

490 KD Chart 2 Class Documentation

Parameters:position,if there is one.

6.38.3.8 int KDChart::Palette::size () const

Return the number of brushed in the palette.

6.38.3.9 constPalette& KDChart::Palette::subduedPalette () [static]

Referenced by KDChart::AttributesModel::headerData().

6.38.4 Member Data Documentation

6.38.4.1 Q_SIGNALSKDChart::Palette::__pad0__

Definition at line 94 of file KDChartPalette.h.

The documentation for this class was generated from the following file:

• KDChartPalette.h

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

6.39 KDChart::PieAttributes Class Reference 491

6.39 KDChart::PieAttributes Class Reference

#include <KDChartPieAttributes.h >

Public Member Functions

• boolexplode() const• qrealexplodeFactor() const• booloperator!=(constPieAttributes&other) const• PieAttributes& operator=(constPieAttributes&)• booloperator==(constPieAttributes&) const• PieAttributes(constPieAttributes&)• PieAttributes()• void setExplode(bool explode)

Enable or disable exploding the respective pie piece(s).

• void setExplodeFactor(qreal factor)

Set the explode factor.

• ∼PieAttributes()

6.39.1 Constructor & Destructor Documentation

6.39.1.1 PieAttributes::PieAttributes ()

Definition at line 45 of file KDChartPieAttributes.cpp.

46 : _d( new Private() )47 {48 }

6.39.1.2 PieAttributes::PieAttributes (constPieAttributes &)

Definition at line 50 of file KDChartPieAttributes.cpp.

References d.

51 : _d( new Private( *r.d ) )52 {53 }

6.39.1.3 PieAttributes::∼PieAttributes ()

Definition at line 65 of file KDChartPieAttributes.cpp.

66 {67 delete _d; _d = 0;68 }

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

492 KD Chart 2 Class Documentation

6.39.2 Member Function Documentation

6.39.2.1 bool PieAttributes::explode () const

Returns:whether the respective pie piece(s) will be exploded.

Definition at line 90 of file KDChartPieAttributes.cpp.

References d.

Referenced by KDChart::PieDiagram::calculateDataBoundaries().

91 {92 return (d->explodeFactor != 0.0);93 }

6.39.2.2 qreal PieAttributes::explodeFactor () const

Returns:the explode factor set by setExplode or by setExplodeFactor.

Definition at line 100 of file KDChartPieAttributes.cpp.

References d.

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), operator<<(), operator==(), andKDChart::PieDiagram::paint().

101 {102 return d->explodeFactor;103 }

6.39.2.3 bool KDChart::PieAttributes::operator!= (const PieAttributes & other) const

Definition at line 72 of file KDChartPieAttributes.h.

72 { return !operator==(other); }

6.39.2.4 PieAttributes & PieAttributes::operator= (const PieAttributes &)

Definition at line 55 of file KDChartPieAttributes.cpp.

References d.

56 {57 if( this == &r )58 return *this;5960 *d = *r.d;6162 return *this;63 }

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

6.39 KDChart::PieAttributes Class Reference 493

6.39.2.5 bool PieAttributes::operator== (constPieAttributes &) const

Definition at line 71 of file KDChartPieAttributes.cpp.

References explodeFactor().

72 {73 if( explodeFactor() == r.explodeFactor() )74 return true;75 else76 return false;77 }

6.39.2.6 void PieAttributes::setExplode (boolexplode)

Enable or disable exploding the respective pie piece(s).

The default explode factor is 10 percent; use setExplodeFactor to specify a different factor.

Note:This is a convenience function: Calling setExplode( true ) does the same as calling setExplodeFactor(0.1 ), and calling setExplode( false ) does the same as calling setExplodeFactor( 0.0 ).

See also:setExplodeFactor

Definition at line 85 of file KDChartPieAttributes.cpp.

References d.

86 {87 d->explodeFactor = (enabled ? 0.1 : 0.0);88 }

6.39.2.7 void PieAttributes::setExplodeFactor (qrealfactor)

Set the explode factor.

The explode factor is a qreal between 0 and 1, and is interpreted as a percentage of the total available radiusof the pie.

See also:setExplode

Definition at line 95 of file KDChartPieAttributes.cpp.

References d.

96 {97 d->explodeFactor = factor;98 }

The documentation for this class was generated from the following files:

• KDChartPieAttributes.h• KDChartPieAttributes.cpp

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

494 KD Chart 2 Class Documentation

6.40 KDChart::PieDiagram Class Reference

#include <KDChartPieDiagram.h >

Inheritance diagram for KDChart::PieDiagram:Collaboration diagram for KDChart::PieDiagram:

Public Member Functions

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• virtual PieDiagram∗ clone() const• int columnCount() const• 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() const

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.

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

6.40 KDChart::PieDiagram Class Reference 495

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• qrealgranularity() const• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual doublenumberOfGridRings() const

[reimplemented]

• virtual doublenumberOfValuesPerDataset() const

[reimplemented]

• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, constQBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)

• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• PieAttributespieAttributes(const QModelIndex &index) const• PieAttributespieAttributes(int column) const• PieAttributespieAttributes() const• PieDiagram(QWidget∗parent=0,PolarCoordinatePlane∗plane=0)

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

496 KD Chart 2 Class Documentation

• constPolarCoordinatePlane∗ polarCoordinatePlane() const• virtual void resize(const QSizeF &area)

[reimplemented]

• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• void setGranularity(qreal value)

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

• virtual voidsetModel(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.

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

6.40 KDChart::PieDiagram Class Reference 497

• 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)• void setPieAttributes(int column, constPieAttributes&a)• void setPieAttributes(constPieAttributes&a)• virtual voidsetRootIndex(const QModelIndex &idx)

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

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setStartPosition(qreal degrees)

Set the starting angle for the first dataset.

• void setThreeDPieAttributes(const QModelIndex &index, constThreeDPieAttributes&a)• void setThreeDPieAttributes(int column, constThreeDPieAttributes&a)• void setThreeDPieAttributes(constThreeDPieAttributes&a)• qrealstartPosition() const• ThreeDPieAttributesthreeDPieAttributes(const QModelIndex &index) const• ThreeDPieAttributesthreeDPieAttributes(int column) const• ThreeDPieAttributesthreeDPieAttributes() const• 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 doublevalueTotals() const

[reimplemented]

• virtual int verticalOffset() const

[reimplemented]

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼PieDiagram()

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

498 KD Chart 2 Class Documentation

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const

[reimplemented]

• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(PaintContext∗paintContext)

[reimplemented]

• void paintDataValueText(QPainter∗painter, const QModelIndex &index, const QPointF &pos, dou-ble value)

• virtual voidpaintDataValueTexts(QPainter∗painter)• void paintEvent(QPaintEvent∗)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void resizeEvent(QResizeEvent∗)• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• doublevalueForCell(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.40.1 Constructor & Destructor Documentation

6.40.1.1 PieDiagram::PieDiagram (QWidget ∗ parent= 0, PolarCoordinatePlane∗ plane= 0)[explicit]

Definition at line 52 of file KDChartPieDiagram.cpp.

Referenced by clone().

52 :53 AbstractPieDiagram( new Private(), parent, plane )54 {55 init();56 }

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

6.40 KDChart::PieDiagram Class Reference 499

6.40.1.2 PieDiagram::∼PieDiagram() [virtual]

Definition at line 58 of file KDChartPieDiagram.cpp.

59 {60 }

6.40.2 Member Function Documentation

6.40.2.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.40.2.2 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.40.2.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated 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().

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

500 KD Chart 2 Class Documentation

181 {182 return d->attributesModel;183 }

6.40.2.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat 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 KDChart::AbstractDiagram::valueForCell().

210 {

6.40.2.5 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

6.40.2.6 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

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

6.40 KDChart::PieDiagram Class Reference 501

6.40.2.7 QBrush AbstractDiagram::brush () const [inherited]

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 paint(), and KDChart::AbstractDiagram::paintMarker().

623 {

6.40.2.8 const QPair< QPointF, QPointF > PieDiagram::calculateDataBoundaries () const[protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 71 of file KDChartPieDiagram.cpp.

References KDChart::AbstractDiagram::checkInvariants(), KDChart::AbstractPolarDiagram::column-Count(), KDChart::PieAttributes::explode(), KDChart::PieAttributes::explodeFactor(), andKDChart::AbstractPieDiagram::pieAttributes().

72 {73 if ( !checkInvariants( true ) ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );7475 const PieAttributes attrs( pieAttributes( model()->index( 0, 0, rootIndex() ) ) );7677 QPointF bottomLeft ( QPointF( 0, 0 ) );78 QPointF topRight;79 // If we explode, we need extra space for the pie slice that has80 // the largest explosion distance.81 if ( attrs.explode() ) {82 const int colCount = columnCount();83 qreal maxExplode = 0.0;84 for( int j = 0; j < colCount; ++j ){85 const PieAttributes columnAttrs( pieAttributes( model()->index( 0, j, rootIndex() ) ) );86 maxExplode = qMax( maxExplode, columnAttrs.explodeFactor() );87 }88 topRight = QPointF( 1.0+maxExplode, 1.0+maxExplode );89 }else{90 topRight = QPointF( 1.0, 1.0 );91 }92 return QPair<QPointF, QPointF> ( bottomLeft, topRight );93 }

6.40.2.9 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

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

502 KD Chart 2 Class Documentation

Referenced by KDChart::RingDiagram::calculateDataBoundaries(), KDChart::PolarDiagram::calculate-DataBoundaries(), calculateDataBoundaries(), KDChart::LineDiagram::calculateDataBoundaries(),KDChart::BarDiagram::calculateDataBoundaries(), KDChart::RingDiagram::paint(), KDChart::Polar-Diagram::paint(), paint(), KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), andKDChart::AbstractDiagram::paintMarker().

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

6.40.2.10 PieDiagram∗ PieDiagram::clone () const [virtual]

Definition at line 66 of file KDChartPieDiagram.cpp.

References d, and PieDiagram().

67 {68 return new PieDiagram( new Private( *d ) );69 }

6.40.2.11 int AbstractPolarDiagram::columnCount () const [inherited]

Definition at line 58 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractPolarDiagram::numberOfValuesPerDataset().

Referenced by calculateDataBoundaries(), paint(), and valueTotals().

59 {60 return static_cast<int>( numberOfValuesPerDataset() );61 }

6.40.2.12 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.40.2.13 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

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

6.40 KDChart::PieDiagram Class Reference 503

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(),KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polar-CoordinatePlane(), and KDChart::AbstractCartesianDiagram::setCoordinatePlane().

126 {127 return d->plane;128 }

6.40.2.14 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.40.2.15 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

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

504 KD Chart 2 Class Documentation

6.40.2.16 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese 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(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.40.2.17 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.40.2.18 QStringList AbstractDiagram::datasetLabels () const [inherited]

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

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

6.40 KDChart::PieDiagram Class Reference 505

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(attributesModelRootIndex()) << "entries";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 ).toString();703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.40.2.19 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.40.2.20 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese too, in order to find the pens, that is used for a single cell.

Returns:The current set of dataset pens.

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

506 KD Chart 2 Class Documentation

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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

6.40.2.21 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.40.2.22 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

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

6.40 KDChart::PieDiagram Class Reference 507

6.40.2.23 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

6.40.2.24 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.40.2.25 qreal AbstractPieDiagram::granularity () const [inherited]

Returns:the granularity.

Definition at line 81 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by paint().

82 {83 return (d->granularity < 0.05 || d->granularity > 36.0)84 ? 1.085 : d->granularity;86 }

6.40.2.26 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

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

508 KD Chart 2 Class Documentation

6.40.2.27 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.40.2.28 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.40.2.29 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.40.2.30 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.40.2.31 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

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

6.40 KDChart::PieDiagram Class Reference 509

6.40.2.32 double PieDiagram::numberOfGridRings () const [virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 1105 of file KDChartPieDiagram.cpp.

1106 {1107 return 1;1108 }

6.40.2.33 double PieDiagram::numberOfValuesPerDataset () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 1099 of file KDChartPieDiagram.cpp.

1100 {1101 return model()->columnCount( rootIndex() );1102 }

6.40.2.34 void PieDiagram::paint (PaintContext ∗ paintContext) [protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 169 of file KDChartPieDiagram.cpp.

References KDChart::AbstractDiagram::brush(), buildReferenceRect(), KDChart::Abstract-Diagram::checkInvariants(), KDChart::AbstractPolarDiagram::columnCount(), d, KDChart::Abstract-ThreeDAttributes::depth(), KDChart::PieAttributes::explodeFactor(), KDChart::AbstractPie-Diagram::granularity(), KDChart::AbstractThreeDAttributes::isEnabled(), KDChart::Paint-Context::painter(), KDChart::AbstractDiagram::pen(), KDChart::AbstractPieDiagram::pieAttributes(),KDChart::AbstractPolarDiagram::polarCoordinatePlane(), KDChart::PaintContext::rectangle(),KDChart::AbstractPieDiagram::startPosition(), KDChart::AbstractPieDiagram::threeDPieAttributes(),and valueTotals().

Referenced by paintEvent().

170 {171 if ( !checkInvariants() )172 return;173174 const PieAttributes attrs( pieAttributes() );175 const ThreeDPieAttributes threeDAttrs( threeDPieAttributes( model()->index( 0, 0, rootIndex() ) ) );176177 const int colCount = columnCount();178179 QRectF contentsRect( buildReferenceRect( polarCoordinatePlane() ) );180 contentsRect = ctx->rectangle();181 // contentsRect = geometry();182 //qDebug() << contentsRect;183 if( contentsRect.isEmpty() )184 return;185

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

510 KD Chart 2 Class Documentation

186 DataValueTextInfoList list;187 const qreal sum = valueTotals();188189 if( sum == 0.0 ) //nothing to draw190 return;191192 d->startAngles.resize( colCount );193 d->angleLens.resize( colCount );194195 // compute position196 d->size = qMin( contentsRect.width(), contentsRect.height() ); // initial size197198 // if the pies explode, we need to give them additional space =>199 // make the basic size smaller200 qreal maxExplode = 0.0;201 for( int j = 0; j < colCount; ++j ){202 const PieAttributes columnAttrs( pieAttributes( model()->index( 0, j, rootIndex() ) ) );203 maxExplode = qMax( maxExplode, columnAttrs.explodeFactor() );204 }205 d->size /= ( 1.0 + 2.0 * maxExplode );206207208 qreal sizeFor3DEffect = 0.0;209 if ( ! threeDAttrs.isEnabled() ) {210211 qreal x = ( contentsRect.width() == d->size ) ? 0.0 : ( ( contentsRect.width() - d->size ) / 2.0 );212 qreal y = ( contentsRect.height() == d->size ) ? 0.0 : ( ( contentsRect.height() - d->size ) / 2.0 );213 d->position = QRectF( x, y, d->size, d->size );214 d->position.translate( contentsRect.left(), contentsRect.top() );215 } else {216 // threeD: width is the maximum possible width; height is 1/2 of that217 qreal x = ( contentsRect.width() == d->size ) ? 0.0 : ( ( contentsRect.width() - d->size ) / 2.0 );218 qreal height = d->size;219 // make sure that the height plus the threeDheight is not more than the220 // available size221 if ( threeDAttrs.depth() >= 0.0 ) {222 // positive pie height: absolute value223 sizeFor3DEffect = threeDAttrs.depth();224 height = d->size - sizeFor3DEffect;225 } else {226 // negative pie height: relative value227 sizeFor3DEffect = - threeDAttrs.depth() / 100.0 * height;228 height = d->size - sizeFor3DEffect;229 }230 qreal y = ( contentsRect.height() == height ) ? 0.0 : ( ( contentsRect.height() - height - sizeFor3DEffect ) / 2.0 );231232 d->position = QRectF( contentsRect.left() + x, contentsRect.top() + y,233 d->size, height );234 // d->position.moveBy( contentsRect.left(), contentsRect.top() );235 }236237 const qreal sectorsPerValue = 360.0 / sum;238 const qreal startAngle = startPosition();239 qreal currentValue = startAngle;240241 bool atLeastOneValue = false; // guard against completely empty tables242 QVariant vValY;243 for ( int iColumn = 0; iColumn < colCount; ++iColumn ) {244 // is there anything at all at this column?245 bool bOK;246 const double cellValue = qAbs( model()->data( model()->index( 0, iColumn, rootIndex() ) )247 .toDouble( &bOK ) );248249 if( bOK ){250 d->startAngles[ iColumn ] = currentValue;251 d->angleLens[ iColumn ] = cellValue * sectorsPerValue;252 atLeastOneValue = true;

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

6.40 KDChart::PieDiagram Class Reference 511

253 } else { // mark as non-existent254 d->angleLens[ iColumn ] = 0.0;255 if ( iColumn > 0.0 )256 d->startAngles[ iColumn ] = d->startAngles[ iColumn - 1 ];257 else258 d->startAngles[ iColumn ] = currentValue;259 }260 //qDebug() << "d->startAngles["<<iColumn<<"] == " << d->startAngles[ iColumn ]261 // << " + d->angleLens["<<iColumn<<"]" << d->angleLens[ iColumn ]262 // << " = " << d->startAngles[ iColumn ]+d->angleLens[ iColumn ];263264 currentValue = d->startAngles[ iColumn ] + d->angleLens[ iColumn ];265 }266267 // If there was no value at all, bail out, to avoid endless loops268 // later on (e.g. in findPieAt()).269 if( ! atLeastOneValue )270 return;271272273 // Find the backmost pie which is at +90Â r and needs to be drawn274 // first275 int backmostpie = findPieAt( 90, colCount );276 // Find the frontmost pie (at -90Â r/+270Â r) that should be drawn last277 int frontmostpie = findPieAt( 270, colCount );278 // the right- and the leftmost (only needed in some special cases...)279 int rightmostpie = findPieAt( 0, colCount );280 int leftmostpie = findPieAt( 180, colCount );281282283 int currentLeftPie = backmostpie;284 int currentRightPie = backmostpie;285286 drawOnePie( ctx->painter(), 0, backmostpie, granularity(), sizeFor3DEffect );287288 if( backmostpie == frontmostpie )289 {290 if( backmostpie == leftmostpie )291 currentLeftPie = findLeftPie( currentLeftPie, colCount );292 if( backmostpie == rightmostpie )293 currentRightPie = findRightPie( currentRightPie, colCount );294 }295 while( currentLeftPie != frontmostpie )296 {297 if( currentLeftPie != backmostpie )298 drawOnePie( ctx->painter(), 0, currentLeftPie, granularity(), sizeFor3DEffect );299 currentLeftPie = findLeftPie( currentLeftPie, colCount );300 }301 while( currentRightPie != frontmostpie )302 {303 if( currentRightPie != backmostpie )304 drawOnePie( ctx->painter(), 0, currentRightPie, granularity(), sizeFor3DEffect );305 currentRightPie = findRightPie( currentRightPie, colCount );306 }307308 // if the backmost pie is not the frontmost pie, we draw the frontmost at last309 if( backmostpie != frontmostpie || ! threeDPieAttributes().isEnabled() )310 {311 drawOnePie( ctx->painter(), 0, frontmostpie, granularity(), sizeFor3DEffect );312 // else, this gets a bit mor complicated...313 } else if( threeDPieAttributes().isEnabled() ) {314 drawPieSurface( ctx->painter(), 0, frontmostpie, granularity() );315 const QModelIndex index = model()->index( 0, frontmostpie, rootIndex() );316 QPen pen = this->pen( index );317 ctx->painter()->setRenderHint ( QPainter::Antialiasing );318 ctx->painter()->setBrush( brush( index ) );319 if ( threeDAttrs.isEnabled() )

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

512 KD Chart 2 Class Documentation

320 pen.setColor( QColor( 0, 0, 0 ) );321 ctx->painter()->setPen( pen );322323 qreal startAngle = d->startAngles[ frontmostpie ];324 if( startAngle > 360 )325 startAngle -= 360;326327 qreal endAngle = startAngle + d->angleLens[ frontmostpie ];328 startAngle = qMax( startAngle, 180.0 );329330 drawArcEffectSegment( ctx->painter(), piePosition( 0, frontmostpie),331 sizeFor3DEffect, startAngle, endAngle, granularity() );332 }333 }

6.40.2.35 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::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 series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }

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

6.40 KDChart::PieDiagram Class Reference 513

354355 QString AbstractDiagram::roundValues( double value,

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

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 }394395

6.40.2.37 void PieDiagram::paintEvent (QPaintEvent∗) [protected]

Definition at line 96 of file KDChartPieDiagram.cpp.

References paint(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

97 {98 QPainter painter ( viewport() );99 PaintContext ctx;100 ctx.setPainter ( &painter );101 ctx.setRectangle( QRectF ( 0, 0, width(), height() ) );102 paint ( &ctx );103 }

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 PainterSaver painterSaver( painter );408 QSizeF maSize( ma.markerSize() );409 QBrush indexBrush( brush( index ) );

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

514 KD Chart 2 Class Documentation

410 QPen indexPen( ma.pen() );411 if ( ma.markerColor().isValid() )412 indexBrush.setColor( ma.markerColor() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.40.2.39 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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 about456 // 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 }

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

6.40 KDChart::PieDiagram Class Reference 515

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: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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

516 KD Chart 2 Class Documentation

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

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 }543 }544545

6.40.2.41 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.40.2.42 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

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

6.40 KDChart::PieDiagram Class Reference 517

6.40.2.43 QPen AbstractDiagram::pen () const [inherited]

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 paint().

577 {

6.40.2.44 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.40.2.45 PieAttributes AbstractPieDiagram::pieAttributes (const QModelIndex & index) const[inherited]

Definition at line 122 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

123 {124 return qVariantValue<PieAttributes>(125 d->attributesModel->data(126 d->attributesModel->mapFromSource( index ),127 PieAttributesRole ) );128 }

6.40.2.46 PieAttributes AbstractPieDiagram::pieAttributes (int column) const [inherited]

Definition at line 114 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

115 {116 return qVariantValue<PieAttributes>(117 d->attributesModel->data(118 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),119 PieAttributesRole ) );120 }

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

518 KD Chart 2 Class Documentation

6.40.2.47 PieAttributes AbstractPieDiagram::pieAttributes () const [inherited]

Definition at line 105 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

Referenced by calculateDataBoundaries(), and paint().

106 {107 return qVariantValue<PieAttributes>(108 d->attributesModel->data( PieAttributesRole ) );109 }

6.40.2.48 constPolarCoordinatePlane∗ AbstractPolarDiagram::polarCoordinatePlane () const[inherited]

Definition at line 53 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by paint().

54 {55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() );56 }

6.40.2.49 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.40.2.50 void PieDiagram::resize (const QSizeF &area) [virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 109 of file KDChartPieDiagram.cpp.

110 {111 }

6.40.2.51 void PieDiagram::resizeEvent (QResizeEvent∗) [protected]

Definition at line 105 of file KDChartPieDiagram.cpp.

106 {107 }

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

6.40 KDChart::PieDiagram Class Reference 519

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.40.2.53 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.40.2.54 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.40.2.55 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat is internal to another diagram is an error.

Correct:

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

Wrong:

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

520 KD Chart 2 Class Documentation

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

Parameters:model TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.40.2.56 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.40.2.57 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.40.2.58 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

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

6.40 KDChart::PieDiagram Class Reference 521

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.40.2.59 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

6.40.2.60 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

6.40.2.61 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

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

522 KD Chart 2 Class Documentation

6.40.2.62 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.40.2.63 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.40.2.64 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

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

6.40 KDChart::PieDiagram Class Reference 523

6.40.2.65 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.40.2.66 void AbstractPieDiagram::setGranularity (qrealvalue) [inherited]

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

Parameters:value the granularity value between 0.05 (one twentieth of a degree) and 36.0 (one tenth of a full

circle), other values will be interpreted as 1.0.

Definition at line 76 of file KDChartAbstractPieDiagram.cpp.

References d.

77 {78 d->granularity = value;79 }

6.40.2.67 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);

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

524 KD Chart 2 Class Documentation

150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.40.2.68 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.40.2.69 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.40.2.70 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.40.2.71 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

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

6.40 KDChart::PieDiagram Class Reference 525

6.40.2.72 void AbstractPieDiagram::setPieAttributes (intcolumn, constPieAttributes & a)[inherited]

Definition at line 95 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

96 {97 d->attributesModel->setHeaderData(98 column, Qt::Vertical, qVariantFromValue( attrs ), PieAttributesRole );99 emit layoutChanged( this );100 }

6.40.2.73 void AbstractPieDiagram::setPieAttributes (constPieAttributes & a) [inherited]

Definition at line 89 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

90 {91 d->attributesModel->setModelData( qVariantFromValue( attrs ), PieAttributesRole );92 emit layoutChanged( this );93 }

6.40.2.74 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.40.2.75 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.40.2.76 void AbstractPieDiagram::setStartPosition (qrealdegrees) [inherited]

Set the starting angle for the first dataset.

Definition at line 65 of file KDChartAbstractPieDiagram.cpp.

References d.

66 {67 d->startPosition = degrees;68 }

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

526 KD Chart 2 Class Documentation

6.40.2.77 void AbstractPieDiagram::setThreeDPieAttributes (const QModelIndex &index, constThreeDPieAttributes & a) [inherited]

Definition at line 144 of file KDChartAbstractPieDiagram.cpp.

References KDChart::ThreeDPieAttributesRole.

145 {146 model()->setData( index, qVariantFromValue( tda ), ThreeDPieAttributesRole );147 emit layoutChanged( this );148 }

6.40.2.78 void AbstractPieDiagram::setThreeDPieAttributes (intcolumn, constThreeDPieAttributes & a) [inherited]

Definition at line 137 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

138 {139 d->attributesModel->setHeaderData(140 column, Qt::Vertical, qVariantFromValue( tda ), ThreeDPieAttributesRole );141 emit layoutChanged( this );142 }

6.40.2.79 void AbstractPieDiagram::setThreeDPieAttributes (constThreeDPieAttributes & a)[inherited]

Definition at line 131 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

132 {133 d->attributesModel->setModelData( qVariantFromValue( tda ), ThreeDPieAttributesRole );134 emit layoutChanged( this );135 }

6.40.2.80 qreal AbstractPieDiagram::startPosition () const [inherited]

Returns:the starting angle for the first dataset.

Definition at line 70 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by paint().

71 {72 return d->startPosition;73 }

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

6.40 KDChart::PieDiagram Class Reference 527

6.40.2.81 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (const QModelIndex &index) const [inherited]

Definition at line 170 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

171 {172 return qVariantValue<ThreeDPieAttributes>(173 d->attributesModel->data(174 d->attributesModel->mapFromSource( index ),175 ThreeDPieAttributesRole ) );176 }

6.40.2.82 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (int column) const[inherited]

Definition at line 162 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

163 {164 return qVariantValue<ThreeDPieAttributes>(165 d->attributesModel->data(166 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),167 ThreeDPieAttributesRole ) );168 }

6.40.2.83 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes () const[inherited]

Definition at line 153 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

Referenced by paint().

154 {155 return qVariantValue<ThreeDPieAttributes>(156 d->attributesModel->data( ThreeDPieAttributesRole ) );157 }

6.40.2.84 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.40.2.85 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

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

528 KD Chart 2 Class Documentation

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

6.40.2.86 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.40.2.87 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.40.2.88 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

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

6.40 KDChart::PieDiagram Class Reference 529

6.40.2.89 double PieDiagram::valueTotals () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 1087 of file KDChartPieDiagram.cpp.

References KDChart::AbstractPolarDiagram::columnCount().

Referenced by paint().

1088 {1089 const int colCount = columnCount();1090 double total = 0.0;1091 for ( int j = 0; j < colCount; ++j ) {1092 total += qAbs(model()->data( model()->index( 0, j, rootIndex() ) ).toDouble());1093 //qDebug() << model()->data( model()->index( 0, j, rootIndex() ) ).toDouble();1094 }1095 return total;1096 }

6.40.2.90 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

6.40.2.91 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.40.2.92 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.40.3 Member Data Documentation

6.40.3.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartPieDiagram.h• KDChartPieDiagram.cpp

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

530 KD Chart 2 Class Documentation

6.41 KDChart::PolarCoordinatePlane Class Reference

#include <KDChartPolarCoordinatePlane.h >

Inheritance diagram for KDChart::PolarCoordinatePlane:Collaboration diagram for KDChart::Polar-CoordinatePlane:

Public Types

• enumAxesCalcMode{

Linear,

Logarithmic}• typedef QList< CoordinateTransformation> CoordinateTransformationList

Public Member Functions

• void addDiagram(AbstractDiagram∗diagram)

Adds a diagram to this coordinate plane.

• void alignToReferencePoint(constRelativePosition&position)• qrealangleUnit() const• BackgroundAttributesbackgroundAttributes() const• AbstractDiagram∗ diagram()• ConstAbstractDiagramListdiagrams() const• AbstractDiagramListdiagrams()• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

• GridAttributesglobalGridAttributes() const• GridAttributesgridAttributes(bool circular) const• DataDimensionsListgridDimensionsList()

Returns the dimensions used for drawing the grid lines.

• boolhasOwnGridAttributes(bool circular) const• virtual boolisEmpty() const

pure virtual inQLayoutItem

• void layoutPlanes()

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

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

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

6.41 KDChart::PolarCoordinatePlane Class Reference 531

• virtual QSizeminimumSizeHint() 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 voidpaint(QPainter∗)reimpl

• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• constChart∗ parent() const• Chart∗ parent()• PolarCoordinatePlane(Chart∗parent=0)• 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: Thefirst 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(bool circular)

Reset the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.).

• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)

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

532 KD Chart 2 Class Documentation

• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setGlobalGridAttributes(constGridAttributes&)

Set the grid attributes to be used by this coordinate plane.

• void setGridAttributes(bool circular, constGridAttributes&)

Set the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.).

• void setParent(Chart∗parent)

Called internally byKDChart::Chart.

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setReferenceCoordinatePlane(AbstractCoordinatePlane∗plane)

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

• virtual voidsetZoomCenter(QPointF center)

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

• virtual voidsetZoomFactorX(double factor)

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

• virtual voidsetZoomFactorY(double factor)

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• virtual QSizePolicysizePolicy() const

[reimplemented]

• virtual void takeDiagram(AbstractDiagram∗diagram)

Removes the diagram from the plane, without deleting it.

• const QPointFtranslate(const QPointF &diagramPoint) const

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

• const QPointFtranslatePolar(const QPointF &diagramPoint) const• virtual QPointFzoomCenter() const• virtual doublezoomFactorX() const• virtual doublezoomFactorY() const• ∼PolarCoordinatePlane()

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

6.41 KDChart::PolarCoordinatePlane Class Reference 533

Public Attributes

• Q_SIGNALS__pad0__: void destroyedCoordinatePlane(AbstractCoordinatePlane∗ )

Protected Member Functions

• virtual QRectareaGeometry() const• virtual DataDimensionsListgetDataDimensionsList() const• QRectinnerRect() const• void layoutDiagrams()

Distribute the available space among the diagrams and axes.

• void paintEvent(QPaintEvent∗)• virtual voidpositionHasChanged()• void resizeEvent(QResizeEvent∗)

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout• protectedQ_SLOTS: void slotLayoutChanged(AbstractDiagram∗ diagram )

6.41.1 Member Typedef Documentation

6.41.1.1 typedef QList<CoordinateTransformation> KDChart::PolarCoordinate-Plane::CoordinateTransformationList

Definition at line 45 of file KDChartPolarCoordinatePlane.h.

6.41.2 Member Enumeration Documentation

6.41.2.1 enumKDChart::AbstractCoordinatePlane::AxesCalcMode [inherited]

Enumeration values:LinearLogarithmic

Definition at line 55 of file KDChartAbstractCoordinatePlane.h.

55 { Linear, Logarithmic };

6.41.3 Constructor & Destructor Documentation

6.41.3.1 PolarCoordinatePlane::PolarCoordinatePlane (Chart ∗ parent= 0) [explicit]

Definition at line 114 of file KDChartPolarCoordinatePlane.cpp.

115 : AbstractCoordinatePlane ( new Private(), parent )116 {117 // this bloc left empty intentionally118 }

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

534 KD Chart 2 Class Documentation

6.41.3.2 PolarCoordinatePlane::∼PolarCoordinatePlane()

Definition at line 120 of file KDChartPolarCoordinatePlane.cpp.

121 {122 // this bloc left empty intentionally123 }

6.41.4 Member Function Documentation

6.41.4.1 void PolarCoordinatePlane::addDiagram (AbstractDiagram ∗ diagram) [virtual]

Adds a diagram to this coordinate plane.

Parameters:diagram The diagram to add.

See also:replaceDiagram, takeDiagram

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 130 of file KDChartPolarCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::addDiagram().

131 {132 Q_ASSERT_X ( dynamic_cast<AbstractPolarDiagram*> ( diagram ),133 "PolarCoordinatePlane::addDiagram", "Only polar"134 "diagrams can be added to a polar coordinate plane!" );135 AbstractCoordinatePlane::addDiagram ( diagram );136 connect ( diagram, SIGNAL ( layoutChanged ( AbstractDiagram* ) ),137 SLOT ( slotLayoutChanged ( AbstractDiagram* ) ) );138139 }

6.41.4.2 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

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

6.41.4.3 qreal PolarCoordinatePlane::angleUnit () const

Definition at line 292 of file KDChartPolarCoordinatePlane.cpp.

References d.

Referenced by layoutDiagrams().

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

6.41 KDChart::PolarCoordinatePlane Class Reference 535

293 {294 Q_ASSERT_X ( d->currentTransformation != 0, "PolarCoordinatePlane::translate",295 "Only call translate() from within paint()." );296 return d->currentTransformation->angleUnit;297 }

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

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartAbstractArea.cpp.

Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), layoutDiagrams(),KDChart::CartesianAxis::paint(), KDChart::AbstractArea::paintAll(), and KDChart::Cartesian-Axis::paintCtx().

106 {107 return geometry();108 }

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

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.41.4.6 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 }

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

536 KD Chart 2 Class Documentation

6.41.4.7 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_STL132 qCopy( d->diagrams.begin(), d->diagrams.end(), std::back_inserter( list ) );133 #else134 Q_FOREACH( AbstractDiagram * a, d->diagrams )135 list.push_back( a );136 #endif137 return list;138 }

6.41.4.8 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 KDChart::CartesianCoordinatePlane::calculateRawDataBoundingRect(),KDChart::CartesianCoordinatePlane::getDataDimensionsList(), layoutDiagrams(), KDChart::Cartesian-CoordinatePlane::layoutDiagrams(), paint(), and KDChart::CartesianCoordinatePlane::paint().

124 {125 return d->diagrams;126 }

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

pure virtual inQLayoutItem

Definition at line 200 of file KDChartAbstractCoordinatePlane.cpp.

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

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

Definition at line 87 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

6.41 KDChart::PolarCoordinatePlane Class Reference 537

88 {89 return d->frameAttributes;90 }

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

pure virtual inQLayoutItem

Definition at line 237 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by paint().

238 {239 return d->geometry;240 }

6.41.4.12 DataDimensionsListPolarCoordinatePlane::getDataDimensionsList () const[protected, virtual]

ImplementsKDChart::AbstractCoordinatePlane.

Definition at line 335 of file KDChartPolarCoordinatePlane.cpp.

References KDChart::DataDimensionsList.

336 {337 DataDimensionsList l;338339 //FIXME(khz): do the real calculation340341 return l;342 }

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

Returns:The grid attributes used by this coordinate plane.

See also:setGlobalGridAttributesCartesianCoordinatePlane::gridAttributes

Definition at line 157 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by gridAttributes(), and KDChart::CartesianCoordinatePlane::gridAttributes().

158 {159 return d->gridAttributes;160 }

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

538 KD Chart 2 Class Documentation

6.41.4.14 GridAttributes KDChart::PolarCoordinatePlane::gridAttributes (bool circular) const

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

Note:This function always returns a valid set of grid attributes: If no special grid attributes were set forthis direction the global attributes are returned, as returned byAbstractCoordinatePlane::globalGrid-Attributes.

See also:setGridAttributesresetGridAttributesAbstractCoordinatePlane::globalGridAttributeshasOwnGridAttributes

Definition at line 364 of file KDChartPolarCoordinatePlane.cpp.

References d, KDChart::AbstractCoordinatePlane::globalGridAttributes(), and hasOwnGridAttributes().

366 {367 if( hasOwnGridAttributes( circular ) ){368 if( circular )369 return d->gridAttributesCircular;370 else371 return d->gridAttributesSagittal;372 }else{373 return globalGridAttributes();374 }375 }

6.41.4.15 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 owntasks - 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 datawas changed.

Note:Returned list will contain different numbers ofDataDimension, depending on the kind of coordinateplane used. ForCartesianCoordinatePlanetwo DataDimensionare returned: the first representinggrid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (orOrdinate axes, resp.).

Returns:The dimensions used for drawing the grid lines.

See also:DataDimension

Definition at line 162 of file KDChartAbstractCoordinatePlane.cpp.

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

6.41 KDChart::PolarCoordinatePlane Class Reference 539

References d, and KDChart::DataDimensionsList.

Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams(), KDChart::Cartesian-Axis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

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

6.41.4.16 bool KDChart::PolarCoordinatePlane::hasOwnGridAttributes (boolcircular) const

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

If false, the grid will use the global attributes set byAbstractCoordinatePlane::globalGridAttributes(or thedefault attributes, resp.)

See also:setGridAttributesresetGridAttributesAbstractCoordinatePlane::globalGridAttributes

Definition at line 387 of file KDChartPolarCoordinatePlane.cpp.

References d.

Referenced by gridAttributes().

389 {390 return391 ( circular )392 ? d->hasOwnGridAttributesCircular393 : d->hasOwnGridAttributesSagittal;394 }

6.41.4.17 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(), andKDChart::AbstractArea::paintAll().

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

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

540 KD Chart 2 Class Documentation

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

pure virtual inQLayoutItem

Definition at line 193 of file KDChartAbstractCoordinatePlane.cpp.

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

6.41.4.19 void PolarCoordinatePlane::layoutDiagrams () [protected, virtual]

Distribute the available space among the diagrams and axes.

ImplementsKDChart::AbstractCoordinatePlane.

Definition at line 238 of file KDChartPolarCoordinatePlane.cpp.

References angleUnit(), KDChart::AbstractArea::areaGeometry(), d, KDChart::AbstractDiagram::data-Boundaries(), KDChart::AbstractCoordinatePlane::diagrams(), and KDChart::AbstractPolar-Diagram::valueTotals().

Referenced by resizeEvent().

239 {240 // the rectangle the diagrams cover in the *plane*:241 // (Why -3? We save 1px on each side for the antialiased drawing, and242 // respect the way QPainter calculates the width of a painted rect (the243 // size is the rectangle size plus the pen width). This way, most clipping244 // for regular pens should be avoided. When pens with a penWidth or larger245 // than 1 are used, this may not b sufficient.246 const QRect rect( areaGeometry() );247 d->contentRect = QRectF ( 1, 1, rect.width() - 3, rect.height() - 3 );248249 // FIXME distribute space according to options:250 d->coordinateTransformations.clear();251 Q_FOREACH( AbstractDiagram* diagram, diagrams() )252 {253 AbstractPolarDiagram *polarDiagram = dynamic_cast<AbstractPolarDiagram*>( diagram );254 Q_ASSERT( polarDiagram );255 QPair<QPointF, QPointF> dataBoundariesPair = polarDiagram->dataBoundaries();256257 const double angleUnit = 360 / polarDiagram->valueTotals();258 //qDebug() << "--------------------------------------------------------";259 const double radius = dataBoundariesPair.second.y();260 //qDebug() << radius <<"="<<dataBoundariesPair.second.y();261 const double diagramWidth = radius * 2; // == height262 const double planeWidth = d->contentRect.width();263 const double planeHeight = d->contentRect.height();264 const double radiusUnit = qMin( planeWidth, planeHeight ) / diagramWidth;265 //qDebug() << radiusUnit <<"=" << "qMin( "<<planeWidth<<","<< planeHeight <<") / "<<diagramWidth;266 QPointF coordinateOrigin = QPointF ( planeWidth / 2, planeHeight / 2 );267 coordinateOrigin += d->contentRect.topLeft();268269 CoordinateTransformation diagramTransposition;270 diagramTransposition.originTranslation = coordinateOrigin;271 diagramTransposition.radiusUnit = radiusUnit;272 diagramTransposition.angleUnit = angleUnit;273 diagramTransposition.zoom = ZoomParameters();274 d->coordinateTransformations.append( diagramTransposition );

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

6.41 KDChart::PolarCoordinatePlane Class Reference 541

275 }276 }

6.41.4.20 void KDChart::AbstractCoordinatePlane::layoutPlanes () [inherited]

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

Definition at line 254 of file KDChartAbstractCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::needLayoutPlanes().

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::CartesianAxis::layout-Planes(), KDChart::AbstractCartesianDiagram::layoutPlanes(), and KDChart::AbstractCoordinate-Plane::replaceDiagram().

255 {256 //qDebug("KDChart::AbstractCoordinatePlane::relayout() called");257 emit needLayoutPlanes();258 }

6.41.4.21 QSize KDChart::AbstractCoordinatePlane::maximumSize () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 205 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::sizeHint().

206 {207 if( d->parent )208 return d->parent->size();209 // Note: At external layut calculation time the coord.plane *will*210 // have a parent widget, so returning a default size here211 // will not affect its real drawing size.212 return QSize(1000, 1000);213 }

6.41.4.22 QSize KDChart::AbstractCoordinatePlane::minimumSize () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 215 of file KDChartAbstractCoordinatePlane.cpp.

216 {217 return QSize(60, 60); // this default can be overwritten by derived classes218 }

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

542 KD Chart 2 Class Documentation

6.41.4.23 QSize KDChart::AbstractCoordinatePlane::minimumSizeHint () const [virtual,inherited]

[reimplemented]

Definition at line 140 of file KDChartAbstractCoordinatePlane.cpp.

141 {142 return QSize( 200, 200 );143 }

6.41.4.24 void KDChart::AbstractCoordinatePlane::needLayoutPlanes () [inherited]

Emitted when plane needs to trigger the Chart’s layouting of the coord.

planes.

Referenced by KDChart::AbstractCoordinatePlane::layoutPlanes().

6.41.4.25 void KDChart::AbstractCoordinatePlane::needRelayout () [inherited]

Emitted when plane needs to trigger the Chart’s layouting.

Referenced by KDChart::AbstractCoordinatePlane::relayout().

6.41.4.26 void KDChart::AbstractCoordinatePlane::needUpdate () [inherited]

Emitted when plane needs to update its drawings.

6.41.4.27 void PolarCoordinatePlane::paint (QPainter∗) [virtual]

reimpl

ImplementsKDChart::AbstractLayoutItem.

Definition at line 141 of file KDChartPolarCoordinatePlane.cpp.

References KDChart::AbstractDiagramList, d, KDChart::AbstractCoordinatePlane::diagrams(),KDChart::AbstractCoordinatePlane::geometry(), KDChart::PaintContext::setCoordinatePlane(),KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

142 {143 AbstractDiagramList diags = diagrams();144 if ( d->coordinateTransformations.size() == diags.size() )145 {146 PaintContext ctx;147 ctx.setPainter ( painter );148 ctx.setCoordinatePlane ( this );149 ctx.setRectangle ( geometry() /*d->contentRect*/ );150151 // paint the coordinate system rulers:152 d->currentTransformation = & ( d->coordinateTransformations[0] );153 d->grid->drawGrid( &ctx );154155 // paint the diagrams:156 for ( int i = 0; i < diags.size(); i++ )157 {

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

6.41 KDChart::PolarCoordinatePlane Class Reference 543

158 d->currentTransformation = & ( d->coordinateTransformations[i] );159 PainterSaver painterSaver( painter );160 diags[i]->paint ( &ctx );161 }162 d->currentTransformation = 0;163 } // else: diagrams have not been set up yet164 }

6.41.4.28 void AbstractArea::paintAll (QPainter & painter) [inherited]

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractAreaBase::innerRect(),KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), andKDChart::AbstractAreaBase::paintFrame().

Referenced by KDChart::Chart::paint(), and KDChart::AbstractArea::paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "AbstractAreaWidget::paintAll() done.";103 }

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

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), andKDChart::AbstractArea::paintAll().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111

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

544 KD Chart 2 Class Documentation

112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

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

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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 }

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

6.41 KDChart::PolarCoordinatePlane Class Reference 545

6.41.4.31 void KDChart::PolarCoordinatePlane::paintEvent (QPaintEvent∗) [protected]

6.41.4.32 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(), andKDChart::AbstractArea::paintAll().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

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

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteAbstract-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.41.4.34 constKDChart::Chart ∗ KDChart::AbstractCoordinatePlane::parent () const[inherited]

Definition at line 182 of file KDChartAbstractCoordinatePlane.cpp.

References d.

183 {184 return d->parent;185 }

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

546 KD Chart 2 Class Documentation

6.41.4.35 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 }

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

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartAbstractArea.cpp.

111 {112 emit positionChanged( this );113 }

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

Emitted upon change of a property of the Coordinate Plane or any of its components.

Referenced by KDChart::CartesianCoordinatePlane::addDiagram(), KDChart::Cartesian-CoordinatePlane::setAxesCalcModes(), KDChart::CartesianCoordinatePlane::setAxesCalcModeX(),KDChart::CartesianCoordinatePlane::setAxesCalcModeY(), setGridAttributes(), KDChart::Cartesian-CoordinatePlane::setGridAttributes(), KDChart::CartesianCoordinatePlane::setHorizontalRange(),KDChart::CartesianCoordinatePlane::setIsometricScaling(), KDChart::CartesianCoordinatePlane::set-VerticalRange(), KDChart::CartesianCoordinatePlane::setZoomCenter(), KDChart::CartesianCoordinate-Plane::setZoomFactorX(), and KDChart::CartesianCoordinatePlane::setZoomFactorY().

6.41.4.38 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: Thefirst 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 additionto this, planes can share an axis. In that case they will be layed out in relation to each other as suggestedby the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will resultin the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2’s reference plane, bothplanes are drawn over each other. The reference plane concept allows two planes to share the same spaceeven if neither has any axis, and in case there are shared axis, it is used to decided, whether the planesshould 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.

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

6.41 KDChart::PolarCoordinatePlane Class Reference 547

173 {174 return d->referenceCoordinatePlane;175 }

6.41.4.39 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 }

6.41.4.40 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 else72 mParentLayout->removeItem( this );73 }74 }

6.41.4.41 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 nodiagram 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

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

548 KD Chart 2 Class Documentation

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, etc95 update();96 }97 }

6.41.4.42 void KDChart::PolarCoordinatePlane::resetGridAttributes (bool circular)

Reset the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.).

By calling this method you specify that the global attributes set byAbstractCoordinatePlane::setGlobal-GridAttributesbe used.

See also:setGridAttributes, gridAttributesAbstractCoordinatePlane::globalGridAttributeshasOwnGridAttributes

Definition at line 357 of file KDChartPolarCoordinatePlane.cpp.

359 {360 setHasOwnGridAttributes( circular, false );361 update();362 }

6.41.4.43 void PolarCoordinatePlane::resizeEvent (QResizeEvent∗) [protected]

Definition at line 232 of file KDChartPolarCoordinatePlane.cpp.

References d, and layoutDiagrams().

233 {234 d->initialResizeEventReceived = true;235 layoutDiagrams();236 }

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

6.41 KDChart::PolarCoordinatePlane Class Reference 549

6.41.4.44 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

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

6.41.4.45 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

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

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

pure virtual inQLayoutItem

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

Definition at line 227 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

6.41.4.47 void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes (constGridAttributes &) [inherited]

Set the grid attributes to be used by this coordinate plane.

To disable grid painting, for example, your code should like this:

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

550 KD Chart 2 Class Documentation

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

See also:globalGridAttributesCartesianCoordinatePlane::setGridAttributes

Definition at line 151 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

6.41.4.48 void KDChart::PolarCoordinatePlane::setGridAttributes (bool circular, constGridAttributes &)

Set the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.).

To disable circular grid painting, for example, your code should like this:

GridAttributes ga = plane->gridAttributes( bool );ga.setGridVisible( false );plane-setGridAttributes( bool, ga );

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

See also:resetGridAttributes, gridAttributesAbstractCoordinatePlane::setGlobalGridAttributeshasOwnGridAttributes

Definition at line 344 of file KDChartPolarCoordinatePlane.cpp.

References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().

347 {348 if( circular )349 d->gridAttributesCircular = a;350 else351 d->gridAttributesSagittal = a;352 setHasOwnGridAttributes( circular, true );353 update();354 emit propertiesChanged();355 }

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

Called internally byKDChart::Chart.

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

6.41 KDChart::PolarCoordinatePlane Class Reference 551

Definition at line 177 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::addCoordinatePlane(), and KDChart::Chart::takeCoordinatePlane().

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

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

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.41.4.51 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 sizeof 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.41.4.52 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

552 KD Chart 2 Class Documentation

6.41.4.53 void PolarCoordinatePlane::setZoomCenter (QPointFcenter) [virtual]

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

Parameters:center The point to use.

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 329 of file KDChartPolarCoordinatePlane.cpp.

References d.

330 {331 d->coordinateTransformations[0].zoom.xCenter = center.x();332 d->coordinateTransformations[0].zoom.yCenter = center.y();333 }

6.41.4.54 void PolarCoordinatePlane::setZoomFactorX (doublefactor) [virtual]

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 314 of file KDChartPolarCoordinatePlane.cpp.

References d.

315 {316 d->coordinateTransformations[0].zoom.xFactor = factor;317 }

6.41.4.55 void PolarCoordinatePlane::setZoomFactorY (doublefactor) [virtual]

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 319 of file KDChartPolarCoordinatePlane.cpp.

References d.

320 {321 d->coordinateTransformations[0].zoom.yFactor = factor;322 }

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

pure virtual inQLayoutItem

Definition at line 220 of file KDChartAbstractCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::maximumSize().

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

6.41 KDChart::PolarCoordinatePlane Class Reference 553

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

6.41.4.57 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.41.4.58 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.41.4.59 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().

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

554 KD Chart 2 Class Documentation

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.41.4.60 const QPointF PolarCoordinatePlane::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.

ImplementsKDChart::AbstractCoordinatePlane.

Definition at line 278 of file KDChartPolarCoordinatePlane.cpp.

References d.

Referenced by buildReferenceRect().

279 {280 Q_ASSERT_X ( d->currentTransformation != 0, "PolarCoordinatePlane::translate",281 "Only call translate() from within paint()." );282 return d->currentTransformation->translate ( diagramPoint );283 }

6.41.4.61 const QPointF PolarCoordinatePlane::translatePolar (const QPointF &diagramPoint)const

Definition at line 285 of file KDChartPolarCoordinatePlane.cpp.

References d.

286 {287 Q_ASSERT_X ( d->currentTransformation != 0, "PolarCoordinatePlane::translate",288 "Only call translate() from within paint()." );289 return d->currentTransformation->translatePolar ( diagramPoint );290 }

6.41.4.62 QPointF PolarCoordinatePlane::zoomCenter () const[virtual]

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

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

6.41 KDChart::PolarCoordinatePlane Class Reference 555

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 324 of file KDChartPolarCoordinatePlane.cpp.

References d.

325 {326 return QPointF( d->coordinateTransformations[0].zoom.xCenter, d->coordinateTransformations[0].zoom.yCenter );327 }

6.41.4.63 double PolarCoordinatePlane::zoomFactorX () const[virtual]

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

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 304 of file KDChartPolarCoordinatePlane.cpp.

References d.

305 {306 return d->coordinateTransformations[0].zoom.xFactor;307 }

6.41.4.64 double PolarCoordinatePlane::zoomFactorY () const[virtual]

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

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 309 of file KDChartPolarCoordinatePlane.cpp.

References d.

310 {311 return d->coordinateTransformations[0].zoom.yFactor;312 }

6.41.5 Member Data Documentation

6.41.5.1 Q_SIGNALSKDChart::AbstractCoordinatePlane::__pad0__ [inherited]

Reimplemented fromKDChart::AbstractArea.

Definition at line 284 of file KDChartAbstractCoordinatePlane.h.

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

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

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

556 KD Chart 2 Class Documentation

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

Definition at line 77 of file KDChartLayoutItems.h.

6.41.5.4 protectedKDChart::PolarCoordinatePlane::Q_SLOTS [protected]

Reimplemented fromKDChart::AbstractCoordinatePlane.

Definition at line 141 of file KDChartPolarCoordinatePlane.h.

The documentation for this class was generated from the following files:

• KDChartPolarCoordinatePlane.h• KDChartPolarCoordinatePlane.cpp

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

6.42 KDChart::PolarDiagram Class Reference 557

6.42 KDChart::PolarDiagram Class Reference

#include <KDChartPolarDiagram.h >

Inheritance diagram for KDChart::PolarDiagram:Collaboration diagram for KDChart::PolarDiagram:

Public Member Functions

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

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

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• virtual PolarDiagram∗ clone() const• int columnCount() const• 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() const

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.

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

558 KD Chart 2 Class Documentation

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

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

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual doublenumberOfGridRings() const

[reimplemented]

• virtual doublenumberOfValuesPerDataset() const

[reimplemented]

• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, constQBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)

• QPenpen(const QModelIndex &index) const

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

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• constPolarCoordinatePlane∗ polarCoordinatePlane() const• PolarDiagram(QWidget∗parent=0,PolarCoordinatePlane∗plane=0)• virtual void resize(const QSizeF &area)

[reimplemented]

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

6.42 KDChart::PolarDiagram Class Reference 559

• bool rotateCircularLabels() const• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• virtual voidsetModel(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)

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

560 KD Chart 2 Class Documentation

• virtual voidsetRootIndex(const QModelIndex &idx)

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

• void setRotateCircularLabels(bool rotateCircularLabels)• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setShowDelimitersAtPosition(Positionposition, bool showDelimiters)• void setShowLabelsAtPosition(Positionposition, bool showLabels)• void setZeroDegreePosition(int degrees)• bool showDelimitersAtPosition(Positionposition) const• bool showLabelsAtPosition(Positionposition) const• 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 doublevalueTotals() const

[reimplemented]

• virtual int verticalOffset() const

[reimplemented]

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• int zeroDegreePosition() const• virtual∼PolarDiagram()

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const

[reimplemented]

• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(PaintContext∗paintContext)

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

6.42 KDChart::PolarDiagram Class Reference 561

[reimplemented]

• void paintDataValueText(QPainter∗painter, const QModelIndex &index, const QPointF &pos, dou-ble value)

• virtual voidpaintDataValueTexts(QPainter∗painter)• void paintEvent(QPaintEvent∗)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• virtual voidpaintPolarMarkers(PaintContext∗ctx, const QPolygonF &polygon)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void resizeEvent(QResizeEvent∗)• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• doublevalueForCell(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.42.1 Constructor & Destructor Documentation

6.42.1.1 PolarDiagram::PolarDiagram (QWidget ∗ parent= 0, PolarCoordinatePlane∗ plane= 0)[explicit]

Definition at line 49 of file KDChartPolarDiagram.cpp.

Referenced by clone().

49 :50 AbstractPolarDiagram( new Private( ), parent, plane )51 {52 }

6.42.1.2 PolarDiagram::∼PolarDiagram () [virtual]

Definition at line 54 of file KDChartPolarDiagram.cpp.

55 {56 }

6.42.2 Member Function Documentation

6.42.2.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

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

562 KD Chart 2 Class Documentation

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.42.2.2 bool AbstractDiagram::antiAliasing () const [inherited]

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

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.42.2.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated with the diagram.

See also:setAttributesModel

Definition at line 180 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::RingDiagram::paint(), paint(), and KDChart::BarDiagram::setBarAttributes().

181 {182 return d->attributesModel;183 }

6.42.2.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat 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 KDChart::AbstractDiagram::valueForCell().

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

6.42 KDChart::PolarDiagram Class Reference 563

210 {

6.42.2.5 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

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

6.42.2.6 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

6.42.2.7 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

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

564 KD Chart 2 Class Documentation

6.42.2.8 const QPair< QPointF, QPointF > PolarDiagram::calculateDataBoundaries () const[protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 91 of file KDChartPolarDiagram.cpp.

References KDChart::AbstractDiagram::checkInvariants().

92 {93 if ( !checkInvariants() ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );94 const int rowCount = model()->rowCount(rootIndex());95 const int colCount = model()->columnCount(rootIndex());96 double xMin = 0.0;97 double xMax = colCount;98 double yMin = 0, yMax = 0;99 for ( int j=0; j<colCount; ++j ) {100 for ( int i=0; i< rowCount; ++i ) {101 double value = model()->data( model()->index( i, j, rootIndex() ) ).toDouble();102 yMax = qMax( yMax, value );103 }104 }105 QPointF bottomLeft ( QPointF( xMin, yMin ) );106 QPointF topRight ( QPointF( xMax, yMax ) );107 return QPair<QPointF, QPointF> ( bottomLeft, topRight );108 }

6.42.2.9 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::RingDiagram::calculateDataBoundaries(), calculateDataBoundaries(),KDChart::PieDiagram::calculateDataBoundaries(), KDChart::LineDiagram::calculateDataBoundaries(),KDChart::BarDiagram::calculateDataBoundaries(), KDChart::RingDiagram::paint(), paint(),KDChart::PieDiagram::paint(), KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), andKDChart::AbstractDiagram::paintMarker().

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

6.42.2.10 PolarDiagram ∗ PolarDiagram::clone () const [virtual]

Definition at line 82 of file KDChartPolarDiagram.cpp.

References d, PolarDiagram(), showDelimitersAtPosition(), and showLabelsAtPosition().

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

6.42 KDChart::PolarDiagram Class Reference 565

83 {84 PolarDiagram* newDiagram = new PolarDiagram( new Private( *d ) );85 // This needs to be copied after the fact86 newDiagram->d->showDelimitersAtPosition = d->showDelimitersAtPosition;87 newDiagram->d->showLabelsAtPosition = d->showLabelsAtPosition;88 return newDiagram;89 }

6.42.2.11 int AbstractPolarDiagram::columnCount () const [inherited]

Definition at line 58 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractPolarDiagram::numberOfValuesPerDataset().

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), KDChart::PieDiagram::paint(), andKDChart::PieDiagram::valueTotals().

59 {60 return static_cast<int>( numberOfValuesPerDataset() );61 }

6.42.2.12 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.42.2.13 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), paint(), KDChart::Line-Diagram::paint(), KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polarCoordinate-Plane(), 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

566 KD Chart 2 Class Documentation

6.42.2.14 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.42.2.15 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.42.2.16 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese too, in order to find the brush, that is used for a single cell.

Returns:The current set of dataset brushes.

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

6.42 KDChart::PolarDiagram Class Reference 567

Definition at line 710 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::datasetCount(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.42.2.17 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.42.2.18 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();

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

568 KD Chart 2 Class Documentation

703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.42.2.19 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.42.2.20 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

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

6.42 KDChart::PolarDiagram Class Reference 569

6.42.2.21 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.42.2.22 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

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

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.42.2.23 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

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

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

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

570 KD Chart 2 Class Documentation

6.42.2.24 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

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

6.42.2.25 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.42.2.26 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

6.42.2.27 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.42.2.28 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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.

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

6.42 KDChart::PolarDiagram Class Reference 571

687 : " << attributesModel()->rowCount(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.42.2.29 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.42.2.30 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.42.2.31 double PolarDiagram::numberOfGridRings () const [virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 189 of file KDChartPolarDiagram.cpp.

190 {191 return 5; // FIXME192 }

6.42.2.32 double PolarDiagram::numberOfValuesPerDataset () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 183 of file KDChartPolarDiagram.cpp.

184 {185 return model()->rowCount(rootIndex());186 }

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

572 KD Chart 2 Class Documentation

6.42.2.33 void PolarDiagram::paint (PaintContext ∗ paintContext) [protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 136 of file KDChartPolarDiagram.cpp.

References KDChart::AbstractDiagram::attributesModel(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractDiagram::coordinatePlane(), KDChart::AttributesModel::headerData(),KDChart::AbstractDiagram::paintDataValueText(), KDChart::PaintContext::painter(), paintPolar-Markers(), KDChart::PaintContext::rectangle(), and KDChart::AbstractCoordinatePlane::translate().

Referenced by paintEvent().

137 {138 if ( !checkInvariants() )139 return;140 const int rowCount = model()->rowCount( rootIndex() );141 const int colCount = model()->columnCount( rootIndex() );142 DataValueTextInfoList list;143144 for ( int j=0; j < colCount; ++j ) {145 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( j, Qt::Vertical, KDChart::DatasetBrushRole ) );146 QPolygonF polygon;147 for ( int i=0; i < rowCount; ++i ) {148 QModelIndex index = model()->index( i, j, rootIndex() );149 const double value = model()->data( index ).toDouble();150 QPointF point = coordinatePlane()->translate( QPointF( value, i ) );151 polygon.append( point );152 list.append( DataValueTextInfo( index, point, value ) );153 }154 PainterSaver painterSaver( ctx->painter() );155 ctx->painter()->setRenderHint ( QPainter::Antialiasing );156 ctx->painter()->setBrush( brush );157 QPen p( ctx->painter()->pen() );158 p.setColor( brush.color() ); // FIXME use DatasetPenRole159 p.setWidth( 2 );// FIXME properties160 ctx->painter()->setPen( p );161 polygon.translate( ctx->rectangle().topLeft() );162 ctx->painter()->drawPolyline( polygon );163 paintPolarMarkers( ctx, polygon );164 }165 DataValueTextInfoListIterator it( list );166 while ( it.hasNext() ) {167 const DataValueTextInfo& info = it.next();168 paintDataValueText( ctx->painter(), info.index, info.pos, info.value );169 }170 }

6.42.2.34 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::prefix(), KDChart::TextAttributes::rotation(),KDChart::DataValueAttributes::suffix(), and KDChart::DataValueAttributes::textAttributes().

Referenced by KDChart::RingDiagram::paint(), paint(), KDChart::LineDiagram::paint(), andKDChart::BarDiagram::paint().

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

6.42 KDChart::PolarDiagram Class Reference 573

320 {321 // paint one data series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

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

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 }394395

6.42.2.36 void PolarDiagram::paintEvent (QPaintEvent∗) [protected]

Definition at line 112 of file KDChartPolarDiagram.cpp.

References paint(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

113 {

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

574 KD Chart 2 Class Documentation

114 QPainter painter ( viewport() );115 PaintContext ctx;116 ctx.setPainter ( &painter );117 ctx.setRectangle( QRectF ( 0, 0, width(), height() ) );118 paint ( &ctx );119 }

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

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.42.2.38 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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()) );

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

6.42 KDChart::PolarDiagram Class Reference 575

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 about456 // 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: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 );

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

576 KD Chart 2 Class Documentation

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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

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

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 }543 }544545

6.42.2.40 void PolarDiagram::paintPolarMarkers (PaintContext ∗ ctx, const QPolygonF &polygon) [protected, virtual]

Definition at line 125 of file KDChartPolarDiagram.cpp.

References KDChart::PaintContext::painter().

Referenced by paint().

126 {127 const double markerSize = 4; // FIXME use real markers128 for ( int i=0; i<polygon.size(); ++i ) {

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

6.42 KDChart::PolarDiagram Class Reference 577

129 QPointF p = polygon.at( i );130 p.setX( p.x() - markerSize/2 );131 p.setY( p.y() - markerSize/2 );132 ctx->painter()->drawRect( QRectF( p, QSizeF( markerSize, markerSize ) ) );133 }134 }

6.42.2.41 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.42.2.42 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.42.2.43 QPen AbstractDiagram::pen () const [inherited]

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

578 KD Chart 2 Class Documentation

6.42.2.44 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.42.2.45 constPolarCoordinatePlane∗ AbstractPolarDiagram::polarCoordinatePlane () const[inherited]

Definition at line 53 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::PieDiagram::paint().

54 {55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() );56 }

6.42.2.46 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

6.42.2.47 void PolarDiagram::resize (const QSizeF &area) [virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 172 of file KDChartPolarDiagram.cpp.

173 {174 }

6.42.2.48 void PolarDiagram::resizeEvent (QResizeEvent∗) [protected]

Definition at line 121 of file KDChartPolarDiagram.cpp.

122 {123 }

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

6.42 KDChart::PolarDiagram Class Reference 579

6.42.2.49 bool PolarDiagram::rotateCircularLabels () const

Definition at line 209 of file KDChartPolarDiagram.cpp.

References d.

210 {211 return d->rotateCircularLabels;212 }

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

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.42.2.51 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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 {

6.42.2.52 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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 {

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

580 KD Chart 2 Class Documentation

6.42.2.53 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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 }

6.42.2.54 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.42.2.55 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

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

6.42 KDChart::PolarDiagram Class Reference 581

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.42.2.56 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.42.2.57 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

6.42.2.58 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

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

582 KD Chart 2 Class Documentation

6.42.2.59 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.42.2.60 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

6.42.2.61 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.42.2.62 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

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

6.42 KDChart::PolarDiagram Class Reference 583

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.42.2.63 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

6.42.2.64 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

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

584 KD Chart 2 Class Documentation

6.42.2.65 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.42.2.66 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.42.2.67 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.42.2.68 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

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

6.42 KDChart::PolarDiagram Class Reference 585

6.42.2.69 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

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

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.42.2.70 void PolarDiagram::setRotateCircularLabels (boolrotateCircularLabels)

Definition at line 204 of file KDChartPolarDiagram.cpp.

References d.

205 {206 d->rotateCircularLabels = rotateCircularLabels;207 }

6.42.2.71 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.42.2.72 void PolarDiagram::setShowDelimitersAtPosition (Position position, boolshowDelimiters)

Definition at line 214 of file KDChartPolarDiagram.cpp.

References d, and KDChart::Position::value().

216 {217 d->showDelimitersAtPosition[position.value()] = showDelimiters;218 }

6.42.2.73 void PolarDiagram::setShowLabelsAtPosition (Positionposition, bool showLabels)

Definition at line 220 of file KDChartPolarDiagram.cpp.

References d, and KDChart::Position::value().

222 {223 d->showLabelsAtPosition[position.value()] = showLabels;224 }

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

586 KD Chart 2 Class Documentation

6.42.2.74 void PolarDiagram::setZeroDegreePosition (intdegrees)

Definition at line 194 of file KDChartPolarDiagram.cpp.

References d.

195 {196 d->zeroDegreePosition = degrees;197 }

6.42.2.75 bool PolarDiagram::showDelimitersAtPosition (Positionposition) const

Definition at line 226 of file KDChartPolarDiagram.cpp.

References d, and KDChart::Position::value().

Referenced by clone().

227 {228 return d->showDelimitersAtPosition[position.value()];229 }

6.42.2.76 bool PolarDiagram::showLabelsAtPosition (Positionposition) const

Definition at line 231 of file KDChartPolarDiagram.cpp.

References d, and KDChart::Position::value().

Referenced by clone().

232 {233 return d->showLabelsAtPosition[position.value()];234 }

6.42.2.77 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.42.2.78 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

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

6.42 KDChart::PolarDiagram Class Reference 587

6.42.2.79 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.42.2.80 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.42.2.81 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

588 KD Chart 2 Class Documentation

6.42.2.82 double PolarDiagram::valueTotals () const [virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 177 of file KDChartPolarDiagram.cpp.

178 {179 return model()->rowCount(rootIndex());180 }

6.42.2.83 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

6.42.2.84 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.42.2.85 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.42.2.86 int PolarDiagram::zeroDegreePosition () const

Definition at line 199 of file KDChartPolarDiagram.cpp.

References d.

200 {201 return d->zeroDegreePosition;202 }

6.42.3 Member Data Documentation

6.42.3.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.42 KDChart::PolarDiagram Class Reference 589

• KDChartPolarDiagram.h• KDChartPolarDiagram.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

590 KD Chart 2 Class Documentation

6.43 KDChart::Position Class Reference

#include <KDChartPosition.h >

Collaboration diagram for KDChart::Position:

6.43.1 Detailed Description

Defines a position, using compass terminology.

Using KDChartPosition you can specify one of nine pre-defined, logical points (see thestatic constgetter methods below), in a similar way, as you would use a compass to navigate on a map.

Often you will declare aPosition together with theRelativePositionclass, to specify a logical point,which then will be used to layout your chart at runtime, e.g. for specifying the location of a floatingLegendbox.

For comparing a Position’s value with a switch() statement, you can use numeric values defined inKDChartEnums, like this:

switch( yourPosition().value() ) {case KDChartEnums::PositionNorthWest:

// your code ...break;

case KDChartEnums::PositionNorth:// your code ...break;

}

See also:RelativePosition, KDChartEnums::PositionValue

Definition at line 75 of file KDChartPosition.h.

Public Types

• enumOption{

IncludeCenter= 0,

ExcludeCenter= 1 }

Public Member Functions

• bool isCorner() const• bool isEastSide() const• bool isNorthSide() const• bool isPole() const• bool isSouthSide() const• bool isWestSide() const• const char∗ name() const

Returns a non-translated string in English language, corresponding to thisPosition.

• booloperator!=(int) const• booloperator!=(constPosition&) const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.43 KDChart::Position Class Reference 591

• booloperator==(int) const• booloperator==(constPosition&) const• Position(KDChartEnums::PositionValuevalue)

Constructor.

• Position()

Default constructor.

• QStringprintableName() const

Returns a translated string, corresponding to thisPosition.

• KDChartEnums::PositionValuevalue() const

Returns an integer value corresponding to thisPosition.

Static Public Member Functions

• PositionfromName(const QByteArray &name)• PositionfromName(const char∗name)• QList< QByteArray> names(Options options=IncludeCenter)

Returns a list of all string, corresponding to the pre-defined positions.

• QStringListprintableNames(Options options=IncludeCenter)

Returns a list of all translated string, corresponding to the pre-defined positions.

Static Public Attributes

• constPosition& Center= staticPositionCenter• constPosition& East= staticPositionEast• constPosition& North= staticPositionNorth• constPosition& NorthEast= staticPositionNorthEast• constPosition& NorthWest= staticPositionNorthWest• constPosition& South= staticPositionSouth• constPosition& SouthEast= staticPositionSouthEast• constPosition& SouthWest= staticPositionSouthWest• constPosition& Unknown= staticPositionUnknown• constPosition& West= staticPositionWest

6.43.2 Member Enumeration Documentation

6.43.2.1 enumKDChart::Position::Option

Enumeration values:IncludeCenter

ExcludeCenter

Definition at line 107 of file KDChartPosition.h.

107 { IncludeCenter=0, ExcludeCenter=1 };

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

592 KD Chart 2 Class Documentation

6.43.3 Constructor & Destructor Documentation

6.43.3.1 Position::Position ()

Default constructor.

Creates a newPosition, defaulting it toPosition::Unknown.

Definition at line 97 of file KDChartPosition.cpp.

Referenced by fromName(), and printableNames().

98 : m_value( KDChartEnums::PositionUnknown )99 {100101 }

6.43.3.2 Position::Position (KDChartEnums::PositionValue value)

Constructor.

Creates a newPosition, defaulting it to the respective value.

Valid values ranging from zero (unknown value) to 10. If invalid value is passed, aPosition::Unknowniscreated.

Note:Normally there is no need to call this constructor, but you would rather use one of the nine pre-defined,static values, e.g. like this:

* const KDChart::Position myPosition = KDChart::Position::NorthEast;*

Definition at line 121 of file KDChartPosition.cpp.

122 : m_value( value )123 {124125 }

6.43.4 Member Function Documentation

6.43.4.1 PositionPosition::fromName (const QByteArray & name) [static]

Definition at line 230 of file KDChartPosition.cpp.

References fromName().

230 {231 return fromName( name.data() );232 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.43 KDChart::Position Class Reference 593

6.43.4.2 PositionPosition::fromName (const char∗ name) [static]

Definition at line 222 of file KDChartPosition.cpp.

References maxPositionValue, Position(), and staticPositionNames.

Referenced by fromName().

223 {224 for( int i=1; i<=maxPositionValue; ++i)225 if ( !qstricmp( name, staticPositionNames[i] ) )226 return Position(i);227 return Position(0);228 }

6.43.4.3 bool Position::isCorner () const

Definition at line 160 of file KDChartPosition.cpp.

References value().

161 {162 return m_value == Position::NorthWest.value() ||163 m_value == Position::NorthEast.value() ||164 m_value == Position::SouthEast.value() ||165 m_value == Position::SouthWest.value();166 }

6.43.4.4 bool Position::isEastSide () const

Definition at line 147 of file KDChartPosition.cpp.

References value().

148 {149 return m_value == Position::NorthEast.value() ||150 m_value == Position::East.value() ||151 m_value == Position::SouthEast.value();152 }

6.43.4.5 bool Position::isNorthSide () const

Definition at line 141 of file KDChartPosition.cpp.

References value().

142 {143 return m_value == Position::NorthWest.value() ||144 m_value == Position::North.value() ||145 m_value == Position::NorthEast.value();146 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

594 KD Chart 2 Class Documentation

6.43.4.6 bool Position::isPole () const

Definition at line 167 of file KDChartPosition.cpp.

References value().

168 {169 return m_value == Position::North.value() ||170 m_value == Position::South.value();171 }

6.43.4.7 bool Position::isSouthSide () const

Definition at line 153 of file KDChartPosition.cpp.

References value().

154 {155 return m_value == Position::SouthWest.value() ||156 m_value == Position::South.value() ||157 m_value == Position::SouthEast.value();158 }

6.43.4.8 bool Position::isWestSide () const

Definition at line 135 of file KDChartPosition.cpp.

References value().

136 {137 return m_value == Position::SouthWest.value() ||138 m_value == Position::West.value() ||139 m_value == Position::NorthWest.value();140 }

6.43.4.9 const char∗ Position::name () const

Returns a non-translated string in English language, corresponding to thisPosition.

Definition at line 176 of file KDChartPosition.cpp.

References staticPositionNames.

Referenced by operator<<().

177 {178 return staticPositionNames[m_value];179 }

6.43.4.10 QList< QByteArray > Position::names (Optionsoptions= IncludeCenter) [static]

Returns a list of all string, corresponding to the pre-defined positions.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.43 KDChart::Position Class Reference 595

Parameters:options if set toExcludeCenter , the returned list does not contain the Center position.

Definition at line 197 of file KDChartPosition.cpp.

References IncludeCenter, maxPositionValue, and staticPositionNames.

198 {199 QList<QByteArray> list;200 const int start = ( options & IncludeCenter ) ? 1 : 2;201 for( int i=start; i<=maxPositionValue; ++i)202 list.append( staticPositionNames[i] );203 return list;204 }

6.43.4.11 bool KDChart::Position::operator!= (int) const

Definition at line 126 of file KDChartPosition.h.

References operator==().

126 { return !operator==( other ); }

6.43.4.12 bool KDChart::Position::operator!= (constPosition&) const

Definition at line 125 of file KDChartPosition.h.

References operator==().

125 { return !operator==( other ); }

6.43.4.13 bool Position::operator== (int) const

Definition at line 240 of file KDChartPosition.cpp.

References value().

241 {242 return ( value() == value_ );243 }

6.43.4.14 bool Position::operator== (constPosition&) const

Definition at line 234 of file KDChartPosition.cpp.

References value().

Referenced by operator!=().

235 {236 return ( value() == r.value() );237 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

596 KD Chart 2 Class Documentation

6.43.4.15 QString Position::printableName () const

Returns a translated string, corresponding to thisPosition.

Definition at line 184 of file KDChartPosition.cpp.

References staticPositionNames.

Referenced by printableNames().

185 {186 return tr(staticPositionNames[m_value]);187 }

6.43.4.16 QStringList Position::printableNames (Optionsoptions= IncludeCenter) [static]

Returns a list of all translated string, corresponding to the pre-defined positions.

Parameters:options if set toExcludeCenter , the returned list does not contain the Center position.

Definition at line 213 of file KDChartPosition.cpp.

References IncludeCenter, maxPositionValue, Position(), and printableName().

214 {215 QStringList list;216 const int start = ( options & IncludeCenter ) ? 1 : 2;217 for( int i=start; i<=maxPositionValue; ++i)218 list.append( Position(i).printableName() );219 return list;220 }

6.43.4.17 KDChartEnums::PositionValue Position::value () const

Returns an integer value corresponding to thisPosition.

Definition at line 130 of file KDChartPosition.cpp.

Referenced by isCorner(), isEastSide(), isNorthSide(), isPole(), isSouthSide(), isWestSide(), operator==(),KDChart::PolarDiagram::setShowDelimitersAtPosition(), KDChart::PolarDiagram::setShowLabelsAt-Position(), KDChart::PolarDiagram::showDelimitersAtPosition(), and KDChart::PolarDiagram::show-LabelsAtPosition().

131 {132 return static_cast<KDChartEnums::PositionValue>( m_value );133 }

6.43.5 Member Data Documentation

6.43.5.1 constPosition& Position::Center = staticPositionCenter [static]

Definition at line 83 of file KDChartPosition.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.43 KDChart::Position Class Reference 597

6.43.5.2 constPosition& Position::East= staticPositionEast [static]

Definition at line 87 of file KDChartPosition.cpp.

6.43.5.3 constPosition& Position::North = staticPositionNorth [static]

Definition at line 85 of file KDChartPosition.cpp.

6.43.5.4 constPosition& Position::NorthEast = staticPositionNorthEast [static]

Definition at line 86 of file KDChartPosition.cpp.

6.43.5.5 constPosition& Position::NorthWest = staticPositionNorthWest [static]

Definition at line 84 of file KDChartPosition.cpp.

6.43.5.6 constPosition& Position::South= staticPositionSouth [static]

Definition at line 89 of file KDChartPosition.cpp.

6.43.5.7 constPosition& Position::SouthEast= staticPositionSouthEast [static]

Definition at line 88 of file KDChartPosition.cpp.

6.43.5.8 constPosition& Position::SouthWest= staticPositionSouthWest [static]

Definition at line 90 of file KDChartPosition.cpp.

6.43.5.9 constPosition& Position::Unknown = staticPositionUnknown [static]

Definition at line 82 of file KDChartPosition.cpp.

6.43.5.10 constPosition& Position::West= staticPositionWest [static]

Definition at line 91 of file KDChartPosition.cpp.

The documentation for this class was generated from the following files:

• KDChartPosition.h• KDChartPosition.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

598 KD Chart 2 Class Documentation

6.44 QAbstractItemView Class Reference

Inheritance diagram for QAbstractItemView:

The documentation for this class was generated from the following file:

• KDChartAbstractDiagram.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.45 QAbstractProxyModel Class Reference 599

6.45 QAbstractProxyModel Class Reference

Inheritance diagram for QAbstractProxyModel:

The documentation for this class was generated from the following file:

• KDChartAbstractProxyModel.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

600 KD Chart 2 Class Documentation

6.46 QFrame Class Reference

Inheritance diagram for QFrame:

The documentation for this class was generated from the following file:

• KDChartDatasetSelector.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.47 QLayoutItem Class Reference 601

6.47 QLayoutItem Class Reference

Inheritance diagram for QLayoutItem:

The documentation for this class was generated from the following file:

• KDChartLayoutItems.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

602 KD Chart 2 Class Documentation

6.48 QObject Class Reference

Inheritance diagram for QObject:

The documentation for this class was generated from the following file:

• KDChartAbstractArea.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.49 QSortFilterProxyModel Class Reference 603

6.49 QSortFilterProxyModel Class Reference

Inheritance diagram for QSortFilterProxyModel:

The documentation for this class was generated from the following file:

• KDChartDatasetProxyModel.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

604 KD Chart 2 Class Documentation

6.50 QTextDocument Class Reference

Inheritance diagram for QTextDocument:

The documentation for this class was generated from the following file:

• KDTextDocument.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.51 QWidget Class Reference 605

6.51 QWidget Class Reference

Inheritance diagram for QWidget:

The documentation for this class was generated from the following file:

• KDChartAbstractAreaWidget.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

606 KD Chart 2 Class Documentation

6.52 KDChart::RelativePosition Class Reference

#include <KDChartRelativePosition.h >

6.52.1 Detailed Description

Defines relative position information: reference area, position in this area, horizontal / vertical padding,and rotating.

UsingRelativePositionyou can specify the relative parts of some position information, and you can specifythe absolute parts: the reference area, and the position in this area. To get an absolute position, you willneed to declare both, the relative and the absolute parts, otherwise the specification is incomplete and KDChartwill ignore it.

Definition at line 56 of file KDChartRelativePosition.h.

Public Member Functions

• Qt::Alignmentalignment() const• MeasurehorizontalPadding() const• booloperator!=(constRelativePosition&other) const• RelativePosition& operator=(constRelativePosition&other)• booloperator==(constRelativePosition&) const• AbstractArea∗ referenceArea() const• PositionreferencePosition() const• RelativePosition(constRelativePosition&)• RelativePosition()• qrealrotation() const• void setAlignment(Qt::Alignment flags)• void setHorizontalPadding(constMeasure&padding)• void setReferenceArea(AbstractArea∗area)• void setReferencePosition(Positionposition)• void setRotation(qreal rot)• void setVerticalPadding(constMeasure&padding)• MeasureverticalPadding() const• ∼RelativePosition()

6.52.2 Constructor & Destructor Documentation

6.52.2.1 KDChart::RelativePosition::RelativePosition ()

6.52.2.2 KDChart::RelativePosition::RelativePosition (constRelativePosition&)

6.52.2.3 KDChart::RelativePosition::∼RelativePosition()

6.52.3 Member Function Documentation

6.52.3.1 Qt::Alignment KDChart::RelativePosition::alignment () const

Referenced by operator<<().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.52 KDChart::RelativePosition Class Reference 607

6.52.3.2 MeasureKDChart::RelativePosition::horizontalPadding () const

Referenced by operator<<().

6.52.3.3 bool KDChart::RelativePosition::operator!= (constRelativePosition& other) const

Definition at line 91 of file KDChartRelativePosition.h.

References operator==().

91 { return !operator==( other ); }

6.52.3.4 RelativePosition& KDChart::RelativePosition::operator= (const RelativePosition&other)

6.52.3.5 bool KDChart::RelativePosition::operator== (constRelativePosition&) const

Referenced by operator!=().

6.52.3.6 AbstractArea∗ KDChart::RelativePosition::referenceArea () const

Referenced by operator<<().

6.52.3.7 PositionKDChart::RelativePosition::referencePosition () const

Referenced by operator<<().

6.52.3.8 qreal KDChart::RelativePosition::rotation () const

Referenced by operator<<().

6.52.3.9 void KDChart::RelativePosition::setAlignment (Qt::Alignment flags)

6.52.3.10 void KDChart::RelativePosition::setHorizontalPadding (constMeasure& padding)

6.52.3.11 void KDChart::RelativePosition::setReferenceArea (AbstractArea ∗ area)

6.52.3.12 void KDChart::RelativePosition::setReferencePosition (Positionposition)

6.52.3.13 void KDChart::RelativePosition::setRotation (qrealrot)

6.52.3.14 void KDChart::RelativePosition::setVerticalPadding (constMeasure& padding)

6.52.3.15 MeasureKDChart::RelativePosition::verticalPadding () const

Referenced by operator<<().

The documentation for this class was generated from the following file:

• KDChartRelativePosition.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

608 KD Chart 2 Class Documentation

6.53 KDChart::RingDiagram Class Reference

#include <KDChartRingDiagram.h >

Inheritance diagram for KDChart::RingDiagram:Collaboration diagram for KDChart::RingDiagram:

Public Member Functions

• boolallowOverlappingDataValueTexts() const• boolantiAliasing() const• virtual AttributesModel∗ attributesModel() const

Returns theAttributesModel, that is used by this diagram.

• QBrushbrush(const QModelIndex &index) const

Retrieve the brush to be used, for painting the datapoint at the given index in the model.

• QBrushbrush(int dataset) const

Retrieve the brush to be used for the given dataset.

• QBrushbrush() const

Retrieve the brush to be used for painting datapoints globally.

• virtual RingDiagram∗ clone() const• int columnCount() const• 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 thesevalues).

• virtual voiddataChanged(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 tohave.

• QStringListdatasetLabels() const

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.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 609

• DataValueAttributesdataValueAttributes(const QModelIndex &index) const

Retrieve theDataValueAttributesfor the given index.

• DataValueAttributesdataValueAttributes(int column) const

Retrieve theDataValueAttributesfor the given dataset.

• DataValueAttributesdataValueAttributes() const

Retrieve theDataValueAttributesspeficied globally.

• virtual voiddoItemsLayout()

[reimplemented]

• qrealgranularity() const• virtual int horizontalOffset() const

[reimplemented]

• virtual QModelIndexindexAt (const QPoint &point) const

[reimplemented]

• virtual boolisIndexHidden(const QModelIndex &index) const

[reimplemented]

• QStringListitemRowLabels() const

The set of item row labels currently displayed, for use in Abscissa axes, etc.

• virtual QModelIndexmoveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

[reimplemented]

• virtual doublenumberOfGridRings() const

[reimplemented]

• virtual doublenumberOfValuesPerDataset() const

[reimplemented]

• virtual void paintMarker (QPainter∗painter, constMarkerAttributes&markerAttributes, constQBrush &brush, const QPen &, const QPointF &point, const QSizeF &size)

• QPenpen(const QModelIndex &index) const

Retrieve the pen to be used, for painting the datapoint at the given index in the model.

• QPenpen(int dataset) const

Retrieve the pen to be used for the given dataset.

• QPenpen() const

Retrieve the pen to be used for painting datapoints globally.

• boolpercentMode() const• PieAttributespieAttributes(const QModelIndex &index) const• PieAttributespieAttributes(int column) const• PieAttributespieAttributes() const• constPolarCoordinatePlane∗ polarCoordinatePlane() const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

610 KD Chart 2 Class Documentation

• bool relativeThickness() const• virtual void resize(const QSizeF &area)

[reimplemented]

• RingDiagram(QWidget∗parent=0,PolarCoordinatePlane∗plane=0)• virtual voidscrollTo(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 voidsetAttributesModel(AttributesModel∗model)

Associate anAttributesModelwith 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 voidsetCoordinatePlane(AbstractCoordinatePlane∗plane)

Set the coordinate plane associated with the diagram.

• void setDatasetDimension(int dimension)

Sets the dataset dimension of the diagram.

• void setDataValueAttributes(constDataValueAttributes&a)

Set theDataValueAttributesfor all datapoints in the model.

• void setDataValueAttributes(int dataset, constDataValueAttributes&a)

Set theDataValueAttributesfor the given dataset.

• void setDataValueAttributes(const QModelIndex &index, constDataValueAttributes&a)

Set theDataValueAttributesfor the given index.

• void setGranularity(qreal value)

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

• virtual voidsetModel(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.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 611

• 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)• void setPieAttributes(int column, constPieAttributes&a)• void setPieAttributes(constPieAttributes&a)• void setRelativeThickness(bool relativeThickness)• virtual voidsetRootIndex(const QModelIndex &idx)

Set the root index in the model, where the diagram starts referencing data for display.

• virtual voidsetSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)

[reimplemented]

• void setStartPosition(qreal degrees)

Set the starting angle for the first dataset.

• void setThreeDPieAttributes(const QModelIndex &index, constThreeDPieAttributes&a)• void setThreeDPieAttributes(int column, constThreeDPieAttributes&a)• void setThreeDPieAttributes(constThreeDPieAttributes&a)• qrealstartPosition() const• ThreeDPieAttributesthreeDPieAttributes(const QModelIndex &index) const• ThreeDPieAttributesthreeDPieAttributes(int column) const• ThreeDPieAttributesthreeDPieAttributes() const• 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 doublevalueTotals() const

[reimplemented]

• virtual int verticalOffset() const

[reimplemented]

• virtual QRectvisualRect(const QModelIndex &index) const

[reimplemented]

• virtual QRegionvisualRegionForSelection(const QItemSelection &selection) const

[reimplemented]

• virtual∼RingDiagram()

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

612 KD Chart 2 Class Documentation

Protected Member Functions

• QModelIndexattributesModelRootIndex() const• virtual const QPair< QPointF, QPointF> calculateDataBoundaries() const

[reimplemented]

• virtual boolcheckInvariants(bool justReturnTheStatus=false) const• QModelIndexcolumnToIndex(int column) const• void modelsChanged()

This signal is emitted, when either the model or theAttributesModelis replaced.

• virtual voidpaint(PaintContext∗paintContext)

[reimplemented]

• void paintDataValueText(QPainter∗painter, const QModelIndex &index, const QPointF &pos, dou-ble value)

• virtual voidpaintDataValueTexts(QPainter∗painter)• void paintEvent(QPaintEvent∗)• void paintMarker(QPainter∗painter, const QModelIndex &index, const QPointF &pos)• virtual voidpaintMarkers(QPainter∗painter)• void propertiesChanged()

Emitted upon change of a property of the Diagram.

• void resizeEvent(QResizeEvent∗)• void setAttributesModelRootIndex(const QModelIndex &)• void setDataBoundariesDirty() const• doublevalueForCell(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.53.1 Constructor & Destructor Documentation

6.53.1.1 RingDiagram::RingDiagram (QWidget ∗ parent= 0, PolarCoordinatePlane∗ plane= 0)[explicit]

Definition at line 50 of file KDChartRingDiagram.cpp.

Referenced by clone().

50 :51 AbstractPieDiagram( new Private(), parent, plane )52 {53 init();54 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 613

6.53.1.2 RingDiagram::∼RingDiagram () [virtual]

Definition at line 56 of file KDChartRingDiagram.cpp.

57 {58 }

6.53.2 Member Function Documentation

6.53.2.1 bool AbstractDiagram::allowOverlappingDataValueTexts () const [inherited]

Returns:Whether data value labels are allowed to overlap.

Definition at line 291 of file KDChartAbstractDiagram.cpp.

References d.

295 {

6.53.2.2 bool AbstractDiagram::antiAliasing () const [inherited]

Returns:Whether anti-aliasing is to be used for rendering this diagram.

Definition at line 302 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::paint().

306 {

6.53.2.3 AttributesModel ∗ AbstractDiagram::attributesModel () const [virtual,inherited]

Returns theAttributesModel, that is used by this diagram.

By default each diagram owns its ownAttributesModel, which should never be deleted. Only if a user-suppliedAttributesModelhas been set does the pointer returned here not belong to the diagram.

Returns:TheAttributesModelassociated with the diagram.

See also:setAttributesModel

Definition at line 180 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by paint(), KDChart::PolarDiagram::paint(), and KDChart::BarDiagram::setBarAttributes().

181 {182 return d->attributesModel;183 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

614 KD Chart 2 Class Documentation

6.53.2.4 QModelIndex AbstractDiagram::attributesModelRootIndex () const [protected,inherited]

returns a QModelIndex pointing into theAttributesModelthat 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 KDChart::AbstractDiagram::valueForCell().

210 {

6.53.2.5 QBrush AbstractDiagram::brush (const QModelIndex &index) const [inherited]

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.

Returns:The brush to use for painting.

Definition at line 632 of file KDChartAbstractDiagram.cpp.

638 :QRect AbstractDiagram::visualRect(const QModelIndex &) const

6.53.2.6 QBrush AbstractDiagram::brush (int dataset) const [inherited]

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:datasetThe dataset to retrieve the brush for.

Returns:The brush to use for painting.

Definition at line 624 of file KDChartAbstractDiagram.cpp.

631 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 615

6.53.2.7 QBrush AbstractDiagram::brush () const [inherited]

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 KDChart::AbstractDiagram::paintMarker().

623 {

6.53.2.8 const QPair< QPointF, QPointF > RingDiagram::calculateDataBoundaries () const[protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 79 of file KDChartRingDiagram.cpp.

References KDChart::AbstractDiagram::checkInvariants().

80 {81 if ( !checkInvariants() ) return QPair<QPointF, QPointF>( QPointF( 0, 0 ), QPointF( 0, 0 ) );8283 QPointF bottomLeft ( QPointF( 0, 0 ) );84 QPointF topRight ( QPointF( 1, 1 ) );85 return QPair<QPointF, QPointF> ( bottomLeft, topRight );86 }

6.53.2.9 bool AbstractDiagram::checkInvariants (booljustReturnTheStatus= false) const[protected, virtual, inherited]

Definition at line 746 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by calculateDataBoundaries(), KDChart::PolarDiagram::calculateDataBoundaries(),KDChart::PieDiagram::calculateDataBoundaries(), KDChart::LineDiagram::calculateDataBoundaries(),KDChart::BarDiagram::calculateDataBoundaries(), paint(), KDChart::PolarDiagram::paint(),KDChart::PieDiagram::paint(), KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), andKDChart::AbstractDiagram::paintMarker().

746 {747 Q_ASSERT_X ( model(), "AbstractDiagram::checkInvariants()",748 "There is no usable model set, for the diagram." );749750 Q_ASSERT_X ( coordinatePlane(), "AbstractDiagram::checkInvariants()",751 "There is no usable coordinate plane set, for the diagram." );752 }753 return model() && coordinatePlane();754 }755756 int AbstractDiagram::datasetDimension( ) const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

616 KD Chart 2 Class Documentation

6.53.2.10 RingDiagram ∗ RingDiagram::clone () const [virtual]

Definition at line 64 of file KDChartRingDiagram.cpp.

References d, and RingDiagram().

65 {66 return new RingDiagram( new Private( *d ) );67 }

6.53.2.11 int AbstractPolarDiagram::columnCount () const [inherited]

Definition at line 58 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractPolarDiagram::numberOfValuesPerDataset().

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), KDChart::PieDiagram::paint(), andKDChart::PieDiagram::valueTotals().

59 {60 return static_cast<int>( numberOfValuesPerDataset() );61 }

6.53.2.12 QModelIndex AbstractDiagram::columnToIndex (intcolumn) const [protected,inherited]

Definition at line 211 of file KDChartAbstractDiagram.cpp.

217 {

6.53.2.13 AbstractCoordinatePlane∗ AbstractDiagram::coordinatePlane () const[inherited]

The coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. By default this is aCartesian-CoordinatePlane.

Returns:The coordinate plane associated with the diagram.

Definition at line 125 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::calculateDataBoundaries(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::PolarDiagram::paint(),KDChart::LineDiagram::paint(), KDChart::BarDiagram::paint(), KDChart::AbstractPolarDiagram::polar-CoordinatePlane(), 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

6.53 KDChart::RingDiagram Class Reference 617

6.53.2.14 const QPair< QPointF, QPointF > AbstractDiagram::dataBoundaries () const[inherited]

Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts thesevalues).

This method returns a chached result of calculations done by calculateDataBoundaries. Classes derivedfrom AbstractDiagrammust implement the calculateDataBoundaries function, to specify their own way ofcalculating the data boundaries. If derived classes want to force recalculation of the data boundaries, theycan callsetDataBoundariesDirty()

Returned value is in diagram coordinates.

Definition at line 130 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::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.53.2.15 void AbstractDiagram::dataChanged (const QModelIndex &topLeft, constQModelIndex & bottomRight) [virtual, inherited]

[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 }237238 void AbstractDiagram::setDataValueAttributes( const QModelIndex & index,

6.53.2.16 QList< QBrush > AbstractDiagram::datasetBrushes () const [inherited]

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 checkthese too, in order to find the brush, that is used for a single cell.

Returns:The current set of dataset brushes.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

618 KD Chart 2 Class Documentation

Definition at line 710 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::Legend::buildLegend(), KDChart::Legend::datasetCount(), andKDChart::Legend::setBrushesFromDiagram().

712 {713 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( i, Qt::Vertical, DatasetBrushRole ) );714 ret << brush;715 }716717 return ret;718 }719720 QList<QPen> AbstractDiagram::datasetPens() const

6.53.2.17 int AbstractDiagram::datasetDimension () const [inherited]

The dataset dimension of a diagram determines, how many value dimensions it expects each datapoint tohave.

For each dimension it will expect one column of values in the model. If the dimensionality is 1, automaticvalues 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 thefirst, (and the third, fifth, etc) columns as X values, and the second, (and the fourth, sixth, etc) column as Yvalues.

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.53.2.18 QStringList AbstractDiagram::datasetLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 619

703 ret << attributesModel()->headerData( i, Qt::Horizontal, Qt::DisplayRole ).toString();704 }705 return ret;706 }707708 QList<QBrush> AbstractDiagram::datasetBrushes() const

6.53.2.19 QList< MarkerAttributes > AbstractDiagram::datasetMarkers () const[inherited]

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 checkthese 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, DataValueLabelAttributesRole ) );738 const MarkerAttributes &ma = a.markerAttributes();739 ret << ma;740 }741 return ret;742 }743744 bool AbstractDiagram::checkInvariants( bool justReturnTheStatus ) const

6.53.2.20 QList< QPen> AbstractDiagram::datasetPens () const [inherited]

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 checkthese 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 }730731 QList<MarkerAttributes> AbstractDiagram::datasetMarkers() const

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

620 KD Chart 2 Class Documentation

6.53.2.21 DataValueAttributes AbstractDiagram::dataValueAttributes (const QModelIndex &index) const [inherited]

Retrieve theDataValueAttributesfor the given index.

This will fall back automatically to what was set at dataset or model level, if there are no datapoint specificsettings.

Parameters:index The datapoint to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given index.

Definition at line 272 of file KDChartAbstractDiagram.cpp.

278 {

6.53.2.22 DataValueAttributes AbstractDiagram::dataValueAttributes (int column) const[inherited]

Retrieve theDataValueAttributesfor the given dataset.

This will fall back automatically to what was set at model level, if there are no dataset specific settings.

Parameters:datasetThe dataset to retrieve the attributes for.

Returns:TheDataValueAttributesfor the given dataset.

Definition at line 265 of file KDChartAbstractDiagram.cpp.

271 {

6.53.2.23 DataValueAttributes AbstractDiagram::dataValueAttributes () const [inherited]

Retrieve theDataValueAttributesspeficied globally.

This will fall back automatically to the default settings, if there are no specific settings.

Returns:The globalDataValueAttributes.

Definition at line 260 of file KDChartAbstractDiagram.cpp.

Referenced by KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paint-Marker().

264 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 621

6.53.2.24 void AbstractDiagram::doItemsLayout () [virtual, inherited]

[reimplemented]

Definition at line 223 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::update().

223 {224 d->plane->layoutDiagrams();225 update();226 }227 QAbstractItemView::doItemsLayout();228 }229230 void AbstractDiagram::dataChanged( const QModelIndex &topLeft,

6.53.2.25 qreal AbstractPieDiagram::granularity () const [inherited]

Returns:the granularity.

Definition at line 81 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by KDChart::PieDiagram::paint().

82 {83 return (d->granularity < 0.05 || d->granularity > 36.0)84 ? 1.085 : d->granularity;86 }

6.53.2.26 int AbstractDiagram::horizontalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 655 of file KDChartAbstractDiagram.cpp.

657 { return 0; }

6.53.2.27 QModelIndex AbstractDiagram::indexAt (const QPoint &point) const [virtual,inherited]

[reimplemented]

Definition at line 649 of file KDChartAbstractDiagram.cpp.

651 { return QModelIndex(); }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

622 KD Chart 2 Class Documentation

6.53.2.28 bool AbstractDiagram::isIndexHidden (const QModelIndex &index) const[virtual, inherited]

[reimplemented]

Definition at line 661 of file KDChartAbstractDiagram.cpp.

663 {}

6.53.2.29 QStringList AbstractDiagram::itemRowLabels () const [inherited]

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(attributesModelRootIndex()) << "entries";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 ).toString();691 ret << attributesModel()->headerData( i, Qt::Vertical, Qt::DisplayRole ).toString();692 }693 return ret;694 }695696 QStringList AbstractDiagram::datasetLabels() const

6.53.2.30 void KDChart::AbstractDiagram::modelsChanged () [protected, inherited]

This signal is emitted, when either the model or theAttributesModelis replaced.

Referenced by KDChart::AbstractDiagram::setAttributesModel(), and KDChart::AbstractDiagram::set-Model().

6.53.2.31 QModelIndex AbstractDiagram::moveCursor (CursorActioncursorAction,Qt::KeyboardModifiers modifiers) [virtual, inherited]

[reimplemented]

Definition at line 652 of file KDChartAbstractDiagram.cpp.

654 { return 0; }

6.53.2.32 double RingDiagram::numberOfGridRings () const [virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 146 of file KDChartRingDiagram.cpp.

147 {148 return 1;149 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 623

6.53.2.33 double RingDiagram::numberOfValuesPerDataset () const[virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 140 of file KDChartRingDiagram.cpp.

141 {142 return model()->columnCount(rootIndex());143 }

6.53.2.34 void RingDiagram::paint (PaintContext ∗ paintContext) [protected, virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 101 of file KDChartRingDiagram.cpp.

References KDChart::AbstractDiagram::attributesModel(), KDChart::AbstractDiagram::check-Invariants(), KDChart::AttributesModel::headerData(), KDChart::AbstractDiagram::paintDataValue-Text(), and KDChart::PaintContext::painter().

Referenced by paintEvent().

102 {103 if ( !checkInvariants() ) return;104 const int colCount = model()->columnCount(rootIndex());105 DataValueTextInfoList list;106 for ( int j=0; j<colCount; ++j ) {107 QBrush brush = qVariantValue<QBrush>( attributesModel()->headerData( j, Qt::Vertical, KDChart::DatasetBrushRole ) );108 PainterSaver painterSaver( ctx->painter() );109 ctx->painter()->setRenderHint ( QPainter::Antialiasing );110 ctx->painter()->setBrush( brush );111 QPen p( ctx->painter()->pen() );112 p.setColor( brush.color() );113 p.setWidth( 2 );// FIXME properties, use DatasetPenRole114 ctx->painter()->setPen( p );115 //ctx->painter()->drawPolyline( polygon );116 }117 DataValueTextInfoListIterator it( list );118 while ( it.hasNext() ) {119 const DataValueTextInfo& info = it.next();120 paintDataValueText( ctx->painter(), info.index, info.pos, info.value );121 }122 }

6.53.2.35 void AbstractDiagram::paintDataValueText (QPainter∗ painter, const QModelIndex &index, const QPointF & pos, doublevalue) [protected, inherited]

Definition at line 318 of file KDChartAbstractDiagram.cpp.

References KDChart::DataValueAttributes::dataLabel(), KDChart::AbstractDiagram::dataValue-Attributes(), KDChart::DataValueAttributes::decimalDigits(), KDChart::TextAttributes::font(),KDChart::TextAttributes::isVisible(), KDChart::DataValueAttributes::isVisible(), KDChart::Text-Attributes::pen(), KDChart::DataValueAttributes::prefix(), KDChart::TextAttributes::rotation(),KDChart::DataValueAttributes::suffix(), and KDChart::DataValueAttributes::textAttributes().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

624 KD Chart 2 Class Documentation

Referenced by paint(), KDChart::PolarDiagram::paint(), KDChart::LineDiagram::paint(), andKDChart::BarDiagram::paint().

320 {321 // paint one data series322 DataValueAttributes a = dataValueAttributes(index);323 if ( !a.isVisible() ) return;324325 // handle decimal digits326 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 else333 roundedValue = QString::number( value );334 } else335 roundedValue = a.dataLabel();336 // handle prefix and suffix337 if ( !a.prefix().isNull() )338 roundedValue.prepend( a.prefix() );339340 if ( !a.suffix().isNull() )341 roundedValue.append( a.suffix() );342343 PainterSaver painterSaver( painter );344 // FIXME draw the non-text bits, background, etc345 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 }354355 QString AbstractDiagram::roundValues( double value,

6.53.2.36 void AbstractDiagram::paintDataValueTexts (QPainter∗ painter) [protected,virtual, inherited]

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 }394395

6.53.2.37 void RingDiagram::paintEvent (QPaintEvent∗) [protected]

Definition at line 88 of file KDChartRingDiagram.cpp.

References paint(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 625

89 {90 QPainter painter ( viewport() );91 PaintContext ctx;92 ctx.setPainter ( &painter );93 ctx.setRectangle( QRectF ( 0, 0, width(), height() ) );94 paint ( &ctx );95 }

6.53.2.38 void AbstractDiagram::paintMarker (QPainter ∗ painter, const QModelIndex & index,const QPointF & pos) [protected, inherited]

Definition at line 398 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::brush(), KDChart::AbstractDiagram::checkInvariants(),KDChart::AbstractDiagram::dataValueAttributes(), KDChart::MarkerAttributes::isVisible(),KDChart::DataValueAttributes::isVisible(), KDChart::DataValueAttributes::markerAttributes(),KDChart::MarkerAttributes::markerColor(), KDChart::MarkerAttributes::markerSize(),KDChart::AbstractDiagram::paintMarker(), and KDChart::MarkerAttributes::pen().

399 {400401 if ( !checkInvariants() ) return;402 DataValueAttributes a = dataValueAttributes(index);403 if ( !a.isVisible() ) return;404 const MarkerAttributes &ma = a.markerAttributes();405 if ( !ma.isVisible() ) return;406407 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() );413414 paintMarker( painter, ma, indexBrush, indexPen, pos, maSize );415 }416417

6.53.2.39 void AbstractDiagram::paintMarker (QPainter ∗ painter, constMarkerAttributes &markerAttributes, const QBrush & brush, const QPen &, const QPointF &point, constQSizeF & size) [virtual, inherited]

Definition at line 420 of file KDChartAbstractDiagram.cpp.

References KDChart::MarkerAttributes::markerStyle().

Referenced by KDChart::LineDiagram::paint(), KDChart::MarkerLayoutItem::paint(), andKDChart::AbstractDiagram::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,

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

626 KD Chart 2 Class Documentation

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 about456 // 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: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 );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 627

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 );504505 crossPoints << leftTop << leftBottom << centerBottomLeft506 << bottomLeft << bottomRight << centerBottomRight507 << rightBottom << rightTop << centerTopRight508 << topRight << topLeft << centerTopLeft;509510 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 }529530 void AbstractDiagram::paintMarkers( QPainter* painter )

6.53.2.40 void AbstractDiagram::paintMarkers (QPainter ∗ painter) [protected,virtual, inherited]

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 }543 }544545

6.53.2.41 QPen AbstractDiagram::pen (const QModelIndex &index) const [inherited]

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.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

628 KD Chart 2 Class Documentation

Definition at line 586 of file KDChartAbstractDiagram.cpp.

593 {

6.53.2.42 QPen AbstractDiagram::pen (intdataset) const [inherited]

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:datasetThe dataset to retrieve the pen for.

Returns:The pen to use for painting.

Definition at line 578 of file KDChartAbstractDiagram.cpp.

585 {

6.53.2.43 QPen AbstractDiagram::pen () const [inherited]

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 {

6.53.2.44 bool AbstractDiagram::percentMode () const [inherited]

Definition at line 313 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList().

320 {

6.53.2.45 PieAttributes AbstractPieDiagram::pieAttributes (const QModelIndex & index) const[inherited]

Definition at line 122 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 629

123 {124 return qVariantValue<PieAttributes>(125 d->attributesModel->data(126 d->attributesModel->mapFromSource( index ),127 PieAttributesRole ) );128 }

6.53.2.46 PieAttributes AbstractPieDiagram::pieAttributes (int column) const [inherited]

Definition at line 114 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

115 {116 return qVariantValue<PieAttributes>(117 d->attributesModel->data(118 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),119 PieAttributesRole ) );120 }

6.53.2.47 PieAttributes AbstractPieDiagram::pieAttributes () const [inherited]

Definition at line 105 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), and KDChart::PieDiagram::paint().

106 {107 return qVariantValue<PieAttributes>(108 d->attributesModel->data( PieAttributesRole ) );109 }

6.53.2.48 constPolarCoordinatePlane∗ AbstractPolarDiagram::polarCoordinatePlane () const[inherited]

Definition at line 53 of file KDChartAbstractPolarDiagram.cpp.

References KDChart::AbstractDiagram::coordinatePlane().

Referenced by KDChart::PieDiagram::paint().

54 {55 return dynamic_cast<const PolarCoordinatePlane*>( coordinatePlane() );56 }

6.53.2.49 void KDChart::AbstractDiagram::propertiesChanged () [protected,inherited]

Emitted upon change of a property of the Diagram.

Referenced by KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::LineDiagram::setLine-Attributes(), KDChart::LineDiagram::setThreeDLineAttributes(), and KDChart::LineDiagram::setType().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

630 KD Chart 2 Class Documentation

6.53.2.50 bool RingDiagram::relativeThickness () const

Definition at line 74 of file KDChartRingDiagram.cpp.

References d.

75 {76 return d->relativeThickness;77 }

6.53.2.51 void RingDiagram::resize (const QSizeF &area) [virtual]

[reimplemented]

ImplementsKDChart::AbstractDiagram.

Definition at line 124 of file KDChartRingDiagram.cpp.

125 {126 }

6.53.2.52 void RingDiagram::resizeEvent (QResizeEvent∗) [protected]

Definition at line 97 of file KDChartRingDiagram.cpp.

98 {99 }

6.53.2.53 void AbstractDiagram::scrollTo (const QModelIndex &index, ScrollHint hint =EnsureVisible) [virtual, inherited]

[reimplemented]

Definition at line 646 of file KDChartAbstractDiagram.cpp.

648 { return QModelIndex(); }

6.53.2.54 void AbstractDiagram::setAllowOverlappingDataValueTexts (boolallow)[inherited]

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.53 KDChart::RingDiagram Class Reference 631

6.53.2.55 void AbstractDiagram::setAntiAliasing (boolenabled) [inherited]

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.53.2.56 void AbstractDiagram::setAttributesModel (AttributesModel ∗ model) [virtual,inherited]

Associate anAttributesModelwith this diagram.

Note that the diagram does _not_ take ownership of theAttributesModel. This should thus only be usedwith AttributesModels that have been explicitely created by the user, and are owned by her. Setting anAttributesModelthat 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 TheAttributesModelto use for this diagram.

See also:AttributesModel

Definition at line 160 of file KDChartAbstractDiagram.cpp.

References d, and KDChart::AbstractDiagram::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

632 KD Chart 2 Class Documentation

6.53.2.57 void AbstractDiagram::setAttributesModelRootIndex (const QModelIndex &idx)[protected, inherited]

Definition at line 195 of file KDChartAbstractDiagram.cpp.

References d.

6.53.2.58 void AbstractDiagram::setBrush (const QBrush &brush) [inherited]

Set the brush to be used, for painting all datasets in the model.

Parameters:brush The brush to use.

Definition at line 602 of file KDChartAbstractDiagram.cpp.

608 {

6.53.2.59 void AbstractDiagram::setBrush (intdataset, const QBrush & brush) [inherited]

Set the brush to be used, for painting the given dataset.

Parameters:datasetThe dataset’s column in the model.

pen The brush to use.

Definition at line 609 of file KDChartAbstractDiagram.cpp.

617 {

6.53.2.60 void AbstractDiagram::setBrush (const QModelIndex &index, const QBrush & brush)[inherited]

Set the brush to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

brush The brush to use.

Definition at line 594 of file KDChartAbstractDiagram.cpp.

601 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 633

6.53.2.61 void AbstractDiagram::setCoordinatePlane (AbstractCoordinatePlane∗ plane)[virtual, inherited]

Set the coordinate plane associated with the diagram.

This determines how coordinates in value space are mapped into pixel space. The chart takes ownership.

Returns:The coordinate plane associated with the diagram.

Reimplemented inKDChart::AbstractCartesianDiagram.

Definition at line 218 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCartesian-Diagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::takeDiagram().

222 {

6.53.2.62 void AbstractDiagram::setDataBoundariesDirty () const [protected,inherited]

Definition at line 139 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::LineDiagram::setThree-DLineAttributes(), KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

140 {141 d->databoundariesDirty = true;142 }

6.53.2.63 void AbstractDiagram::setDatasetDimension (intdimension) [inherited]

Sets the dataset dimension of the diagram.

See also:datasetDimension.

Parameters:dimension

Definition at line 763 of file KDChartAbstractDiagram.cpp.

References d.

770 {

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

634 KD Chart 2 Class Documentation

6.53.2.64 void AbstractDiagram::setDataValueAttributes (constDataValueAttributes & a)[inherited]

Set theDataValueAttributesfor all datapoints in the model.

Parameters:a The attributes to set.

Definition at line 279 of file KDChartAbstractDiagram.cpp.

References d.

284 {

6.53.2.65 void AbstractDiagram::setDataValueAttributes (intdataset, constDataValueAttributes& a) [inherited]

Set theDataValueAttributesfor the given dataset.

Parameters:datasetThe dataset to set the attributes for.

a The attributes to set.

Definition at line 251 of file KDChartAbstractDiagram.cpp.

References d.

259 {

6.53.2.66 void AbstractDiagram::setDataValueAttributes (const QModelIndex &index, constDataValueAttributes & a) [inherited]

Set theDataValueAttributesfor the given index.

Parameters:index The datapoint to set the attributes for.

a The attributes to set.

Definition at line 240 of file KDChartAbstractDiagram.cpp.

References d, KDChart::DataValueLabelAttributesRole, and KDChart::AbstractDiagram::properties-Changed().

240 {241 d->attributesModel->setData(242 d->attributesModel->mapFromSource( index ),243 qVariantFromValue( a ),244 DataValueLabelAttributesRole );245 emit propertiesChanged();246 }247248

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 635

6.53.2.67 void AbstractPieDiagram::setGranularity (qrealvalue) [inherited]

Set the granularity: the smaller the granularity the more your diagram segments will show facettes insteadof rounded segments.

Parameters:value the granularity value between 0.05 (one twentieth of a degree) and 36.0 (one tenth of a full

circle), other values will be interpreted as 1.0.

Definition at line 76 of file KDChartAbstractPieDiagram.cpp.

References d.

77 {78 d->granularity = value;79 }

6.53.2.68 void AbstractDiagram::setModel (QAbstractItemModel∗ model) [virtual,inherited]

Associate a model with the diagram.

Definition at line 144 of file KDChartAbstractDiagram.cpp.

References d, KDChart::AttributesModel::initFrom(), and KDChart::AbstractDiagram::modelsChanged().

145 {146 QAbstractItemView::setModel( newModel );147 AttributesModel* amodel = new PrivateAttributesModel( newModel, this );148 amodel->initFrom( d->attributesModel );149 d->setAttributesModel(amodel);150 scheduleDelayedItemsLayout();151 d->databoundariesDirty = true;152 emit modelsChanged();153 }

6.53.2.69 void AbstractDiagram::setPen (const QPen &pen) [inherited]

Set the pen to be used, for painting all datasets in the model.

Parameters:pen The pen to use.

Definition at line 556 of file KDChartAbstractDiagram.cpp.

562 {

6.53.2.70 void AbstractDiagram::setPen (intdataset, const QPen &pen) [inherited]

Set the pen to be used, for painting the given dataset.

Parameters:datasetThe dataset’s row in the model.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

636 KD Chart 2 Class Documentation

pen The pen to use.

Definition at line 563 of file KDChartAbstractDiagram.cpp.

571 {

6.53.2.71 void AbstractDiagram::setPen (const QModelIndex &index, const QPen &pen)[inherited]

Set the pen to be used, for painting the datapoint at the given index.

Parameters:index The datapoint’s index in the model.

pen The pen to use.

Definition at line 548 of file KDChartAbstractDiagram.cpp.

555 {

6.53.2.72 void AbstractDiagram::setPercentMode (boolpercent) [inherited]

Definition at line 307 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::LineDiagram::setType(), and KDChart::BarDiagram::setType().

312 {

6.53.2.73 void AbstractPieDiagram::setPieAttributes (intcolumn, constPieAttributes & a)[inherited]

Definition at line 95 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

96 {97 d->attributesModel->setHeaderData(98 column, Qt::Vertical, qVariantFromValue( attrs ), PieAttributesRole );99 emit layoutChanged( this );100 }

6.53.2.74 void AbstractPieDiagram::setPieAttributes (constPieAttributes & a) [inherited]

Definition at line 89 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::PieAttributesRole.

90 {91 d->attributesModel->setModelData( qVariantFromValue( attrs ), PieAttributesRole );92 emit layoutChanged( this );93 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 637

6.53.2.75 void RingDiagram::setRelativeThickness (boolrelativeThickness)

Definition at line 69 of file KDChartRingDiagram.cpp.

References d.

70 {71 d->relativeThickness = relativeThickness;72 }

6.53.2.76 void AbstractDiagram::setRootIndex (const QModelIndex &idx) [virtual,inherited]

Set the root index in the model, where the diagram starts referencing data for display.

[reimplemented]

Definition at line 188 of file KDChartAbstractDiagram.cpp.

References d.

6.53.2.77 void AbstractDiagram::setSelection (const QRect &rect,QItemSelectionModel::SelectionFlagscommand) [virtual, inherited]

[reimplemented]

Definition at line 664 of file KDChartAbstractDiagram.cpp.

666 { return QRegion(); }

6.53.2.78 void AbstractPieDiagram::setStartPosition (qrealdegrees) [inherited]

Set the starting angle for the first dataset.

Definition at line 65 of file KDChartAbstractPieDiagram.cpp.

References d.

66 {67 d->startPosition = degrees;68 }

6.53.2.79 void AbstractPieDiagram::setThreeDPieAttributes (const QModelIndex &index, constThreeDPieAttributes & a) [inherited]

Definition at line 144 of file KDChartAbstractPieDiagram.cpp.

References KDChart::ThreeDPieAttributesRole.

145 {146 model()->setData( index, qVariantFromValue( tda ), ThreeDPieAttributesRole );147 emit layoutChanged( this );148 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

638 KD Chart 2 Class Documentation

6.53.2.80 void AbstractPieDiagram::setThreeDPieAttributes (intcolumn, constThreeDPieAttributes & a) [inherited]

Definition at line 137 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

138 {139 d->attributesModel->setHeaderData(140 column, Qt::Vertical, qVariantFromValue( tda ), ThreeDPieAttributesRole );141 emit layoutChanged( this );142 }

6.53.2.81 void AbstractPieDiagram::setThreeDPieAttributes (constThreeDPieAttributes & a)[inherited]

Definition at line 131 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

132 {133 d->attributesModel->setModelData( qVariantFromValue( tda ), ThreeDPieAttributesRole );134 emit layoutChanged( this );135 }

6.53.2.82 qreal AbstractPieDiagram::startPosition () const [inherited]

Returns:the starting angle for the first dataset.

Definition at line 70 of file KDChartAbstractPieDiagram.cpp.

References d.

Referenced by KDChart::PieDiagram::paint().

71 {72 return d->startPosition;73 }

6.53.2.83 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (const QModelIndex &index) const [inherited]

Definition at line 170 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

171 {172 return qVariantValue<ThreeDPieAttributes>(173 d->attributesModel->data(174 d->attributesModel->mapFromSource( index ),175 ThreeDPieAttributesRole ) );176 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 639

6.53.2.84 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes (int column) const[inherited]

Definition at line 162 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

163 {164 return qVariantValue<ThreeDPieAttributes>(165 d->attributesModel->data(166 d->attributesModel->mapFromSource( columnToIndex( column ) ).column(),167 ThreeDPieAttributesRole ) );168 }

6.53.2.85 ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes () const[inherited]

Definition at line 153 of file KDChartAbstractPieDiagram.cpp.

References d, and KDChart::ThreeDPieAttributesRole.

Referenced by KDChart::PieDiagram::paint().

154 {155 return qVariantValue<ThreeDPieAttributes>(156 d->attributesModel->data( ThreeDPieAttributesRole ) );157 }

6.53.2.86 void AbstractDiagram::update () const [inherited]

Definition at line 777 of file KDChartAbstractDiagram.cpp.

References d.

Referenced by KDChart::AbstractDiagram::doItemsLayout().

6.53.2.87 void KDChart::AbstractDiagram::useDefaultColors () [inherited]

Set the palette to be used, for painting datasets to the default palette.

See also:KDChart::Palette. FIXME: fold into one usePalette (KDChart::Palette&) method

Definition at line 671 of file KDChartAbstractDiagram.cpp.

References d.

675 {

6.53.2.88 void KDChart::AbstractDiagram::useRainbowColors () [inherited]

Set the palette to be used, for painting datasets to the rainbow palette.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

640 KD Chart 2 Class Documentation

See also:KDChart::Palette.

Definition at line 681 of file KDChartAbstractDiagram.cpp.

References d.

685 {

6.53.2.89 void KDChart::AbstractDiagram::useSubduedColors () [inherited]

Set the palette to be used, for painting datasets to the subdued palette.

See also:KDChart::Palette.

Definition at line 676 of file KDChartAbstractDiagram.cpp.

References d.

680 {

6.53.2.90 double AbstractDiagram::valueForCell (introw, int column) const [protected,inherited]

Helper method, retrieving the data value (DisplayRole) for a given row and column.

Parameters:row The row to query.

column The column to query.

Returns:The value of the display role at the given row and column as a double.

Definition at line 771 of file KDChartAbstractDiagram.cpp.

References KDChart::AbstractDiagram::attributesModelRootIndex(), and d.

Referenced by KDChart::LineDiagram::paint().

776 {

6.53.2.91 double RingDiagram::valueTotals () const [virtual]

[reimplemented]

ImplementsKDChart::AbstractPolarDiagram.

Definition at line 129 of file KDChartRingDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.53 KDChart::RingDiagram Class Reference 641

130 {131 double total = 0;132 const int colCount = model()->columnCount(rootIndex());133 for ( int j=0; j<colCount; ++j ) {134 total += model()->data( model()->index( 0, j, rootIndex() ) ).toDouble();135 }136 return total;137 }

6.53.2.92 int AbstractDiagram::verticalOffset () const [virtual, inherited]

[reimplemented]

Definition at line 658 of file KDChartAbstractDiagram.cpp.

660 { return true; }

6.53.2.93 QRect AbstractDiagram::visualRect (const QModelIndex &index) const [virtual,inherited]

[reimplemented]

Definition at line 641 of file KDChartAbstractDiagram.cpp.

645 {}

6.53.2.94 QRegion AbstractDiagram::visualRegionForSelection (const QItemSelection &selection) const [virtual, inherited]

[reimplemented]

Definition at line 667 of file KDChartAbstractDiagram.cpp.

6.53.3 Member Data Documentation

6.53.3.1 Q_SIGNALSKDChart::AbstractDiagram::__pad0__ [protected, inherited]

Definition at line 506 of file KDChartAbstractDiagram.h.

The documentation for this class was generated from the following files:

• KDChartRingDiagram.h• KDChartRingDiagram.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

642 KD Chart 2 Class Documentation

6.54 KDChart::TextArea Class Reference

#include <KDChartTextArea.h >

Inheritance diagram for KDChart::TextArea:Collaboration diagram for KDChart::TextArea:

6.54.1 Detailed Description

A text area in the chart with a background, a frame, etc.

TextAreais the base class for all text containing non-widget chart elements that have a set of backgroundattributes and frame attributes, such as headers or footers.

Note:This class inherits fromAbstractAreaBase, TextLayoutItem, QObject. The reason for this trippleinheritance is that neitherAbstractAreaBasenorTextLayoutItemareQObject.

Definition at line 54 of file KDChartTextArea.h.

Public Member Functions

• void alignToReferencePoint(constRelativePosition&position)• constQObject∗ autoReferenceArea() const• BackgroundAttributesbackgroundAttributes() const• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• FrameAttributesframeAttributes() const• virtual QRectgeometry() const

pure virtual inQLayoutItem

• virtual bool intersects(constTextLayoutItem&other, const QPoint &myPos, const QPoint &other-Pos) const

• virtual bool intersects(const TextLayoutItem&other, const QPointF &myPos, const QPointF&otherPos) const

• virtual boolisEmpty() const

pure virtual inQLayoutItem

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

• virtual voidpaint(QPainter∗)• void paintAll (QPainter &painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

• virtual voidpaintBackground(QPainter &painter, const QRect &rectangle)• virtual voidpaintCtx(PaintContext∗context)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 643

Default impl: Paint the complete item using its layouted position and size.

• virtual voidpaintFrame(QPainter &painter, const QRect &rectangle)• virtual voidpaintIntoRect(QPainter &painter, const QRect &rect)

Draws the background and frame, then callspaint().

• virtual QFontrealFont() const• virtual qrealrealFontSize() const• void removeFromParentLayout()• void setAutoReferenceArea(constQObject∗area)• void setBackgroundAttributes(constBackgroundAttributes&a)• void setFrameAttributes(constFrameAttributes&a)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setText(const QString &text)• void setTextAttributes(constTextAttributes&a)

Use this to specify the text attributes to be used for this item.

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• QStringtext () const• TextAttributestextAttributes() const

Returns the text attributes to be used for this item.

• virtual∼TextArea()

Protected Member Functions

• virtual QRectareaGeometry() const• QRectinnerRect() const• virtual voidpositionHasChanged()• TextArea()

Protected Attributes

• Q_SIGNALS__pad0__: void positionChanged(TextArea∗ )• QWidget∗ mParent• QLayout∗ mParentLayout

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

644 KD Chart 2 Class Documentation

6.54.2 Constructor & Destructor Documentation

6.54.2.1 TextArea::∼TextArea () [virtual]

Definition at line 60 of file KDChartTextArea.cpp.

61 {62 // this bloc left empty intentionally63 }

6.54.2.2 TextArea::TextArea () [protected]

Definition at line 52 of file KDChartTextArea.cpp.

53 : QObject()54 , KDChart::AbstractAreaBase()55 , KDChart::TextLayoutItem()56 {57 // this bloc left empty intentionally58 }

6.54.3 Member Function Documentation

6.54.3.1 void AbstractAreaBase::alignToReferencePoint (constRelativePosition& position)[inherited]

Definition at line 75 of file KDChartAbstractAreaBase.cpp.

76 {77 Q_UNUSED( position );78 // PENDING(kalle) FIXME79 qWarning( "Sorry, not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosition& position )" );80 }

6.54.3.2 QRect TextArea::areaGeometry () const [protected, virtual]

ImplementsKDChart::AbstractAreaBase.

Definition at line 105 of file KDChartTextArea.cpp.

References KDChart::TextLayoutItem::geometry().

Referenced by paintAll().

106 {107 return geometry();108 }

6.54.3.3 constQObject ∗ KDChart::TextLayoutItem::autoReferenceArea () const[inherited]

Definition at line 122 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::setParent().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 645

123 {124 return mAutoReferenceArea;125 }

6.54.3.4 BackgroundAttributes AbstractAreaBase::backgroundAttributes () const[inherited]

Definition at line 97 of file KDChartAbstractAreaBase.cpp.

References d.

98 {99 return d->backgroundAttributes;100 }

6.54.3.5 Qt::Orientations KDChart::TextLayoutItem::expandingDirections () const [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 162 of file KDChartLayoutItems.cpp.

163 {164 return 0; // Grow neither vertically nor horizontally165 }

6.54.3.6 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.54.3.7 QRect KDChart::TextLayoutItem::geometry () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 167 of file KDChartLayoutItems.cpp.

Referenced by areaGeometry(), KDChart::TextLayoutItem::paint(), paintAll(), KDChart::Cartesian-Axis::paintCtx(), and paintIntoRect().

168 {169 return mRect;170 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

646 KD Chart 2 Class Documentation

6.54.3.8 QRect AbstractAreaBase::innerRect () const[protected, inherited]

Definition at line 175 of file KDChartAbstractAreaBase.cpp.

References KDChart::AbstractAreaBase::areaGeometry(), and d.

Referenced by paintAll(), KDChart::AbstractAreaWidget::paintAll(), and KDChart::AbstractArea::paint-All().

176 {177 Q_ASSERT_X ( d != 0, "AbstractAreaBase::innerRect()",178 "Private class was not initialized!" );179180 const int padding181 = d->frameAttributes.isVisible()182 ? qMax( d->frameAttributes.padding(), 0 ) : 0;183 return184 QRect( QPoint(0,0), areaGeometry().size() )185 .adjusted( padding, padding, -padding, -padding );186 }

6.54.3.9 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, const QPoint& myPos, const QPoint & otherPos) const [virtual, inherited]

Definition at line 248 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::mAttributes, PI, KDChart::TextLayoutItem::rotatedCorners(),KDChart::TextAttributes::rotation(), and KDChart::TextLayoutItem::unrotatedSizeHint().

249 {250 if ( mAttributes.rotation() != other.mAttributes.rotation() )251 {252 // that’s the code for the common case: the rotation angles don’t need to match here253 QPolygon myPolygon( rotatedCorners() );254 QPolygon otherPolygon( other.rotatedCorners() );255256 // move the polygons to their positions257 myPolygon.translate( myPos );258 otherPolygon.translate( otherPos );259260 // create regions out of it261 QRegion myRegion( myPolygon );262 QRegion otherRegion( otherPolygon );263264 // now the question - do they intersect or not?265 return ! myRegion.intersect( otherRegion ).isEmpty();266267 } else {268 // and that’s the code for the special case: the rotation angles match, which is less time consuming in calculation269 const qreal angle = mAttributes.rotation() * PI / 180.0;270 // both sizes271 const QSizeF mySize( unrotatedSizeHint() );272 const QSizeF otherSize( other.unrotatedSizeHint() );273274 // that’s myP1 relative to myPos275 QPointF myP1( mySize.height() * sin( angle ), 0.0 );276 // that’s otherP1 to myPos277 QPointF otherP1 = QPointF( otherSize.height() * sin( angle ), 0.0 ) + otherPos - myPos;278279 // now rotate both points the negative angle around myPos280 myP1 = QPointF( myP1.x() * cos( -angle ), myP1.x() * sin( -angle ) );281 qreal r = sqrt( otherP1.x() * otherP1.x() + otherP1.y() * otherP1.y() );282 otherP1 = QPointF( r * cos( -angle ), r * sin( -angle ) );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 647

283284 // finally we look, whether both rectangles intersect or even not285 return QRectF( myP1, mySize ).intersects( QRectF( otherP1, otherSize ) );286 }287 }

6.54.3.10 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, constQPointF & myPos, const QPointF & otherPos) const [virtual, inherited]

Definition at line 243 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

244 {245 return intersects( other, myPos.toPoint(), otherPos.toPoint() );246 }

6.54.3.11 bool KDChart::TextLayoutItem::isEmpty () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 172 of file KDChartLayoutItems.cpp.

173 {174 return false; // never empty, otherwise the layout item would not exist175 }

6.54.3.12 QSize KDChart::TextLayoutItem::maximumSize () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 177 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

178 {179 return sizeHint(); // PENDING(kalle) Review, quite inflexible180 }

6.54.3.13 QSize KDChart::TextLayoutItem::minimumSize () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 182 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

183 {184 return sizeHint(); // PENDING(kalle) Review, quite inflexible185 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

648 KD Chart 2 Class Documentation

6.54.3.14 void KDChart::TextLayoutItem::paint (QPainter ∗) [virtual, inherited]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 325 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::geometry(), KDChart::TextAttributes::pen(), KDChart::Text-Attributes::rotation(), and KDChart::TextLayoutItem::sizeHint().

Referenced by paintAll(), and KDChart::CartesianAxis::paintCtx().

326 {327 // make sure, cached font is updated, if needed:328 sizeHint();329330 if( !mRect.isValid() )331 return;332333 PainterSaver painterSaver( painter );334 painter->setFont( cachedFont );335 painter->setPen( mAttributes.pen() );336 QRectF rect = geometry();337338 painter->translate( rect.center() );339 rect.moveTopLeft( QPointF( - rect.width() / 2, - rect.height() / 2 ) );340 painter->rotate( mAttributes.rotation() );341 painter->drawText( rect, Qt::AlignHCenter | Qt::AlignVCenter, mText );342 }

6.54.3.15 void TextArea::paintAll (QPainter & painter)

Call paintAll, if you want the background and the frame to be drawn before the normalpaint() is invokedautomatically.

Definition at line 83 of file KDChartTextArea.cpp.

References areaGeometry(), KDChart::TextLayoutItem::geometry(), KDChart::AbstractArea-Base::innerRect(), KDChart::TextLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(),KDChart::AbstractAreaBase::paintFrame(), and KDChart::TextLayoutItem::setGeometry().

Referenced by KDChart::Chart::paint(), and paintIntoRect().

84 {85 // Paint the background and frame86 paintBackground( painter, geometry() );87 paintFrame( painter, geometry() );8889 // temporarily adjust the widget size, to be sure all content gets calculated90 // to fit into the inner rectangle91 const QRect oldGeometry( areaGeometry() );92 QRect inner( innerRect() );93 inner.moveTo(94 oldGeometry.left() + inner.left(),95 oldGeometry.top() + inner.top() );96 const bool needAdjustGeometry = oldGeometry != inner;97 if( needAdjustGeometry )98 setGeometry( inner );99 paint( &painter );100 if( needAdjustGeometry )101 setGeometry( oldGeometry );102 //qDebug() << "TextAreaWidget::paintAll() done.";103 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 649

6.54.3.16 void AbstractAreaBase::paintBackground (QPainter &painter, const QRect &rectangle) [virtual, inherited]

Definition at line 103 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by paintAll(), KDChart::AbstractAreaWidget::paintAll(), and KDChart::AbstractArea::paint-All().

104 {105 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintBackground()",106 "Private class was not initialized!" );107108 #define attributes d->backgroundAttributes109110 if( !attributes.isVisible() ) return;111112 /* first draw the brush (may contain a pixmap)*/113 if( Qt::NoBrush != attributes.brush().style() ) {114 KDChart::PainterSaver painterSaver( &painter );115 painter.setPen( Qt::NoPen );116 const QPointF newTopLeft( painter.deviceMatrix().map( rect.topLeft() ) );117 painter.setBrushOrigin( newTopLeft );118 painter.setBrush( attributes.brush() );119 painter.drawRect( rect );120 }121 /* next draw the backPixmap over the brush */122 if( !attributes.pixmap().isNull() &&123 attributes.pixmapMode() != BackgroundAttributes::BackgroundPixmapModeNone ) {124 QPointF ol = rect.topLeft();125 if( BackgroundAttributes::BackgroundPixmapModeCentered == attributes.pixmapMode() )126 {127 ol.setX( rect.center().x() - attributes.pixmap().width() / 2 );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 checked147 }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 attributes155 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

650 KD Chart 2 Class Documentation

6.54.3.17 void KDChart::AbstractLayoutItem::paintCtx ( PaintContext ∗ context) [virtual,inherited]

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.54.3.18 void AbstractAreaBase::paintFrame (QPainter &painter, const QRect & rectangle)[virtual, inherited]

Definition at line 158 of file KDChartAbstractAreaBase.cpp.

References attributes, and d.

Referenced by paintAll(), KDChart::AbstractAreaWidget::paintAll(), and KDChart::AbstractArea::paint-All().

159 {160 Q_ASSERT_X ( d != 0, "AbstractAreaBase::paintFrame()",161 "Private class was not initialized!" );162163 #define attributes d->frameAttributes164165 if( !attributes.isVisible() ) return;166167 const QPen oldPen( painter.pen() );168 painter.setPen( attributes.pen() );169 painter.drawRect( rect );170 painter.setPen( oldPen );171 #undef attributes172 }

6.54.3.19 void TextArea::paintIntoRect (QPainter & painter, const QRect & rect) [virtual]

Draws the background and frame, then callspaint().

In most cases there is no need to overwrite this method in a derived class, but you would overwriteText-LayoutItem::paint()instead.

Definition at line 71 of file KDChartTextArea.cpp.

References KDChart::TextLayoutItem::geometry(), paintAll(), and KDChart::TextLayoutItem::set-Geometry().

72 {73 const QRect oldGeometry( geometry() );74 if( oldGeometry != rect )75 setGeometry( rect );76 painter.translate( rect.left(), rect.top() );77 paintAll( painter );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 651

78 painter.translate( -rect.left(), -rect.top() );79 if( oldGeometry != rect )80 setGeometry( oldGeometry );81 }

6.54.3.20 void TextArea::positionHasChanged () [protected, virtual]

Reimplemented fromKDChart::AbstractAreaBase.

Definition at line 110 of file KDChartTextArea.cpp.

111 {112 emit positionChanged( this );113 }

6.54.3.21 QFont KDChart::TextLayoutItem::realFont () const [virtual, inherited]

Definition at line 220 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

221 {222 realFontWasRecalculated(); // we can safely ignore the boolean return value223 return cachedFont;224 }

6.54.3.22 qreal KDChart::TextLayoutItem::realFontSize () const [virtual, inherited]

Definition at line 193 of file KDChartLayoutItems.cpp.

References KDChart::Measure::calculatedValue(), KDChart::TextAttributes::fontSize(), andKDChart::TextAttributes::minimalFontSize().

194 {195 return qMax(196 mAttributes.fontSize().calculatedValue(197 mAutoReferenceArea,198 mAutoReferenceOrientation ),199 mAttributes.minimalFontSize().calculatedValue(200 mAutoReferenceArea,201 mAutoReferenceOrientation ) );202 }

6.54.3.23 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 else72 mParentLayout->removeItem( this );73 }74 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

652 KD Chart 2 Class Documentation

6.54.3.24 void KDChart::TextLayoutItem::setAutoReferenceArea (constQObject ∗ area)[inherited]

Definition at line 115 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by KDChart::HeaderFooter::setParent().

116 {117 mAutoReferenceArea = area;118 cachedSizeHint = QSize();119 sizeHint();120 }

6.54.3.25 void AbstractAreaBase::setBackgroundAttributes (constBackgroundAttributes & a)[inherited]

Definition at line 92 of file KDChartAbstractAreaBase.cpp.

References d.

93 {94 d->backgroundAttributes = a;95 }

6.54.3.26 void AbstractAreaBase::setFrameAttributes (constFrameAttributes & a)[inherited]

Definition at line 82 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::Legend::clone().

83 {84 d->frameAttributes = a;85 }

6.54.3.27 void KDChart::TextLayoutItem::setGeometry (const QRect &r) [virtual,inherited]

pure virtual inQLayoutItem

Definition at line 187 of file KDChartLayoutItems.cpp.

Referenced by paintAll(), KDChart::CartesianAxis::paintCtx(), and paintIntoRect().

188 {189 mRect = r;190 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 653

6.54.3.28 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited]

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.54.3.29 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 sizeof 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.54.3.30 void KDChart::TextLayoutItem::setText (const QString & text) [inherited]

Definition at line 127 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by KDChart::Widget::addHeaderFooter(), KDChart::CartesianAxis::maximumSize(), andKDChart::CartesianAxis::paintCtx().

128 {129 mText = text;130 cachedSizeHint = QSize();131 sizeHint();132 }

6.54.3.31 void KDChart::TextLayoutItem::setTextAttributes (const TextAttributes & a)[inherited]

Use this to specify the text attributes to be used for this item.

See also:textAttributes

Definition at line 144 of file KDChartLayoutItems.cpp.

References KDChart::TextLayoutItem::sizeHint().

Referenced by KDChart::HeaderFooter::clone().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

654 KD Chart 2 Class Documentation

145 {146 mAttributes = a;147 cachedSizeHint = QSize(); // invalidate size hint148 sizeHint();149 }

6.54.3.32 QSize KDChart::TextLayoutItem::sizeHint () const [virtual, inherited]

pure virtual inQLayoutItem

Definition at line 289 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::sizeHintChanged().

Referenced by KDChart::Legend::buildLegend(), KDChart::TextLayoutItem::maximumSize(),KDChart::CartesianAxis::maximumSize(), KDChart::TextLayoutItem::minimumSize(), KDChart::Text-LayoutItem::paint(), KDChart::CartesianAxis::paintCtx(), KDChart::TextLayoutItem::setAutoReference-Area(), KDChart::TextLayoutItem::setText(), and KDChart::TextLayoutItem::setTextAttributes().

290 {291 if( realFontWasRecalculated() )292 {293 cachedSizeHint = calcSizeHint( cachedFont );294 sizeHintChanged();295 }296 //qDebug("cachedSizeHint.width(): %i",cachedSizeHint.width());297 return cachedSizeHint;298 }

6.54.3.33 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.54.3.34 QString KDChart::TextLayoutItem::text () const [inherited]

Definition at line 134 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

135 {136 return mText;137 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.54 KDChart::TextArea Class Reference 655

6.54.3.35 KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes () const[inherited]

Returns the text attributes to be used for this item.

See also:setTextAttributes

Definition at line 156 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::clone().

157 {158 return mAttributes;159 }

6.54.4 Member Data Documentation

6.54.4.1 Q_SIGNALSKDChart::TextArea::__pad0__ [protected]

Reimplemented inKDChart::HeaderFooter.

Definition at line 86 of file KDChartTextArea.h.

6.54.4.2 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

6.54.4.3 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,inherited]

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartTextArea.h• KDChartTextArea.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

656 KD Chart 2 Class Documentation

6.55 KDChart::TextAttributes Class Reference

#include <KDChartTextAttributes.h >

6.55.1 Detailed Description

A set of text attributes.

TextAttributesencapsulates settings that have to do with text. This includes font, fontsize, color, whetherthe text is rotated, etc

Definition at line 50 of file KDChartTextAttributes.h.

Public Member Functions

• boolautoRotate() const• boolautoShrink() const• QFontfont () const• MeasurefontSize() const• boolhasAbsoluteFontSize() const• bool isVisible () const• MeasureminimalFontSize() const• booloperator!=(constTextAttributes&other) const• TextAttributes& operator=(constTextAttributes&)• booloperator==(constTextAttributes&) const• QPenpen() const• int rotation() const• void setAutoRotate(bool autoRotate)

Set whether the text should be automatically rotated as needed when space is constraint.

• void setAutoShrink(bool autoShrink)

Set whether the text should automatically be shrunk, if space is constraint.

• void setFont(const QFont &font)

Set the font to be used for rendering the text.

• void setFontSize(constMeasure&measure)

Set the size of the font used for rendering text.

• void setMinimalFontSize(constMeasure&measure)

Set the minimal size of the font used for rendering text.

• void setPen(const QPen &pen)

Set the pen to use for rendering the text.

• void setRotation(int rotation)

Set the rotation angle to use for the text.

• void setVisible(bool visible)

Set whether the text is to be rendered at all.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.55 KDChart::TextAttributes Class Reference 657

• TextAttributes(constTextAttributes&)• TextAttributes()• ∼TextAttributes()

6.55.2 Constructor & Destructor Documentation

6.55.2.1 KDChart::TextAttributes::TextAttributes ()

6.55.2.2 KDChart::TextAttributes::TextAttributes (const TextAttributes &)

6.55.2.3 KDChart::TextAttributes:: ∼TextAttributes ()

6.55.3 Member Function Documentation

6.55.3.1 bool KDChart::TextAttributes::autoRotate () const

Returns:Whether text is automatically rotated when space is constrained.

Referenced by operator<<().

6.55.3.2 bool KDChart::TextAttributes::autoShrink () const

Returns:Whether text is automatically shrunk if space is constraint.

Referenced by operator<<().

6.55.3.3 QFont KDChart::TextAttributes::font () const

Returns:The font that is used for rendering text.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

6.55.3.4 MeasureKDChart::TextAttributes::fontSize () const

Returns:The measure used for the font size.

Referenced by operator<<(), KDChart::TextLayoutItem::realFontSize(), and KDChart::Cartesian-Axis::titleTextAttributes().

6.55.3.5 bool KDChart::TextAttributes::hasAbsoluteFontSize () const

Returns:Whether the text has an absolute font size set.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

658 KD Chart 2 Class Documentation

6.55.3.6 bool KDChart::TextAttributes::isVisible () const

Returns:Whether the text is visible.

Referenced by KDChart::Legend::buildLegend(), KDChart::CartesianAxis::maximumSize(),operator<<(), KDChart::CartesianAxis::paintCtx(), and KDChart::AbstractDiagram::paintDataValue-Text().

6.55.3.7 MeasureKDChart::TextAttributes::minimalFontSize () const

Returns:The measure used for the minimal font size.

Referenced by operator<<(), and KDChart::TextLayoutItem::realFontSize().

6.55.3.8 bool KDChart::TextAttributes::operator!= (const TextAttributes & other) const

Definition at line 57 of file KDChartTextAttributes.h.

58 { return !operator==(other); }

6.55.3.9 TextAttributes & KDChart::TextAttributes::operator= (const TextAttributes &)

6.55.3.10 bool KDChart::TextAttributes::operator== (const TextAttributes &) const

6.55.3.11 QPen KDChart::TextAttributes::pen () const

Returns:The pen used for rendering the text.

Referenced by operator<<(), KDChart::TextLayoutItem::paint(), and KDChart::AbstractDiagram::paint-DataValueText().

6.55.3.12 int KDChart::TextAttributes::rotation () const

Returns:The rotation angle used for rendering the text.

Referenced by KDChart::TextLayoutItem::intersects(), operator<<(), KDChart::TextLayoutItem::paint(),and KDChart::AbstractDiagram::paintDataValueText().

6.55.3.13 void KDChart::TextAttributes::setAutoRotate (bool autoRotate)

Set whether the text should be automatically rotated as needed when space is constraint.

Parameters:autoRotateWhether text should be automatically rotated.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.55 KDChart::TextAttributes Class Reference 659

6.55.3.14 void KDChart::TextAttributes::setAutoShrink (bool autoShrink)

Set whether the text should automatically be shrunk, if space is constraint.

Parameters:autoShrink Whether text should be auto-shrunk.

6.55.3.15 void KDChart::TextAttributes::setFont (const QFont & font)

Set the font to be used for rendering the text.

Parameters:font The font to use.

6.55.3.16 void KDChart::TextAttributes::setFontSize (constMeasure& measure)

Set the size of the font used for rendering text.

Parameters:measureThe measure to use.

See also:Measure

Referenced by KDChart::CartesianAxis::titleTextAttributes().

6.55.3.17 void KDChart::TextAttributes::setMinimalFontSize (constMeasure& measure)

Set the minimal size of the font used for rendering text.

Parameters:measureThe measure to use.

See also:Measure

6.55.3.18 void KDChart::TextAttributes::setPen (const QPen &pen)

Set the pen to use for rendering the text.

Parameters:rotation The pen to use.

6.55.3.19 void KDChart::TextAttributes::setRotation (int rotation)

Set the rotation angle to use for the text.

Parameters:rotation The rotation angle.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

660 KD Chart 2 Class Documentation

6.55.3.20 void KDChart::TextAttributes::setVisible (bool visible)

Set whether the text is to be rendered at all.

Parameters:visible Whether the text is visible.

The documentation for this class was generated from the following file:

• KDChartTextAttributes.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.56 KDChart::TextLayoutItem Class Reference 661

6.56 KDChart::TextLayoutItem Class Reference

#include <KDChartLayoutItems.h >

Inheritance diagram for KDChart::TextLayoutItem:Collaboration diagram for KDChart::TextLayoutItem:

Public Member Functions

• constQObject∗ autoReferenceArea() const• virtual Qt::OrientationsexpandingDirections() const

pure virtual inQLayoutItem

• virtual QRectgeometry() const

pure virtual inQLayoutItem

• virtual bool intersects(constTextLayoutItem&other, const QPoint &myPos, const QPoint &other-Pos) const

• virtual bool intersects(const TextLayoutItem&other, const QPointF &myPos, const QPointF&otherPos) const

• virtual boolisEmpty() const

pure virtual inQLayoutItem

• virtual QSizemaximumSize() const

pure virtual inQLayoutItem

• virtual QSizeminimumSize() const

pure virtual inQLayoutItem

• virtual voidpaint(QPainter∗)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• virtual QFontrealFont() const• virtual qrealrealFontSize() const• void removeFromParentLayout()• void setAutoReferenceArea(constQObject∗area)• virtual voidsetGeometry(const QRect &r)

pure virtual inQLayoutItem

• void setParentLayout(QLayout∗lay)• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• void setText(const QString &text)• void setTextAttributes(constTextAttributes&a)

Use this to specify the text attributes to be used for this item.

• virtual QSizesizeHint() const

pure virtual inQLayoutItem

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

662 KD Chart 2 Class Documentation

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• QStringtext () const• TextAttributestextAttributes() const

Returns the text attributes to be used for this item.

• TextLayoutItem(const QString &text, constTextAttributes &attributes, constQObject ∗auto-ReferenceArea,KDChartEnums::MeasureOrientationautoReferenceOrientation, Qt::Alignmentalignment=0)

• TextLayoutItem()

Protected Attributes

• QWidget∗ mParent• QLayout∗ mParentLayout

6.56.1 Constructor & Destructor Documentation

6.56.1.1 KDChart::TextLayoutItem::TextLayoutItem ()

Definition at line 102 of file KDChartLayoutItems.cpp.

103 : AbstractLayoutItem( Qt::AlignLeft )104 , mText()105 , mAttributes()106 , mAutoReferenceArea( 0 )107 , mAutoReferenceOrientation( KDChartEnums::MeasureOrientationHorizontal )108 , cachedSizeHint() // default this to invalid to force just-in-time calculation before first use of sizeHint()109 , cachedFontSize( 0.0 )110 , cachedFont( mAttributes.font() )111 {112113 }

6.56.1.2 KDChart::TextLayoutItem::TextLayoutItem (const QString & text, constTextAttributes& attributes, constQObject ∗ autoReferenceArea, KDChartEnums::MeasureOrientationautoReferenceOrientation, Qt::Alignment alignment= 0)

Definition at line 86 of file KDChartLayoutItems.cpp.

References attributes.

91 : AbstractLayoutItem( alignment )92 , mText( text )93 , mAttributes( attributes )94 , mAutoReferenceArea( area )95 , mAutoReferenceOrientation( orientation )96 , cachedSizeHint() // default this to invalid to force just-in-time calculation before first use of sizeHint()97 , cachedFontSize( 0.0 )98 , cachedFont( mAttributes.font() )99 {100 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.56 KDChart::TextLayoutItem Class Reference 663

6.56.2 Member Function Documentation

6.56.2.1 constQObject ∗ KDChart::TextLayoutItem::autoReferenceArea () const

Definition at line 122 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::setParent().

123 {124 return mAutoReferenceArea;125 }

6.56.2.2 Qt::Orientations KDChart::TextLayoutItem::expandingDirections () const [virtual]

pure virtual inQLayoutItem

Definition at line 162 of file KDChartLayoutItems.cpp.

163 {164 return 0; // Grow neither vertically nor horizontally165 }

6.56.2.3 QRect KDChart::TextLayoutItem::geometry () const [virtual]

pure virtual inQLayoutItem

Definition at line 167 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextArea::areaGeometry(), paint(), KDChart::TextArea::paintAll(),KDChart::CartesianAxis::paintCtx(), and KDChart::TextArea::paintIntoRect().

168 {169 return mRect;170 }

6.56.2.4 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, const QPoint& myPos, const QPoint & otherPos) const [virtual]

Definition at line 248 of file KDChartLayoutItems.cpp.

References mAttributes, PI, rotatedCorners(), KDChart::TextAttributes::rotation(), and unrotatedSize-Hint().

249 {250 if ( mAttributes.rotation() != other.mAttributes.rotation() )251 {252 // that’s the code for the common case: the rotation angles don’t need to match here253 QPolygon myPolygon( rotatedCorners() );254 QPolygon otherPolygon( other.rotatedCorners() );255256 // move the polygons to their positions257 myPolygon.translate( myPos );258 otherPolygon.translate( otherPos );259260 // create regions out of it

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

664 KD Chart 2 Class Documentation

261 QRegion myRegion( myPolygon );262 QRegion otherRegion( otherPolygon );263264 // now the question - do they intersect or not?265 return ! myRegion.intersect( otherRegion ).isEmpty();266267 } else {268 // and that’s the code for the special case: the rotation angles match, which is less time consuming in calculation269 const qreal angle = mAttributes.rotation() * PI / 180.0;270 // both sizes271 const QSizeF mySize( unrotatedSizeHint() );272 const QSizeF otherSize( other.unrotatedSizeHint() );273274 // that’s myP1 relative to myPos275 QPointF myP1( mySize.height() * sin( angle ), 0.0 );276 // that’s otherP1 to myPos277 QPointF otherP1 = QPointF( otherSize.height() * sin( angle ), 0.0 ) + otherPos - myPos;278279 // now rotate both points the negative angle around myPos280 myP1 = QPointF( myP1.x() * cos( -angle ), myP1.x() * sin( -angle ) );281 qreal r = sqrt( otherP1.x() * otherP1.x() + otherP1.y() * otherP1.y() );282 otherP1 = QPointF( r * cos( -angle ), r * sin( -angle ) );283284 // finally we look, whether both rectangles intersect or even not285 return QRectF( myP1, mySize ).intersects( QRectF( otherP1, otherSize ) );286 }287 }

6.56.2.5 bool KDChart::TextLayoutItem::intersects (constTextLayoutItem & other, constQPointF & myPos, const QPointF & otherPos) const [virtual]

Definition at line 243 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

244 {245 return intersects( other, myPos.toPoint(), otherPos.toPoint() );246 }

6.56.2.6 bool KDChart::TextLayoutItem::isEmpty () const [virtual]

pure virtual inQLayoutItem

Definition at line 172 of file KDChartLayoutItems.cpp.

173 {174 return false; // never empty, otherwise the layout item would not exist175 }

6.56.2.7 QSize KDChart::TextLayoutItem::maximumSize () const [virtual]

pure virtual inQLayoutItem

Definition at line 177 of file KDChartLayoutItems.cpp.

References sizeHint().

178 {179 return sizeHint(); // PENDING(kalle) Review, quite inflexible180 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.56 KDChart::TextLayoutItem Class Reference 665

6.56.2.8 QSize KDChart::TextLayoutItem::minimumSize () const [virtual]

pure virtual inQLayoutItem

Definition at line 182 of file KDChartLayoutItems.cpp.

References sizeHint().

183 {184 return sizeHint(); // PENDING(kalle) Review, quite inflexible185 }

6.56.2.9 void KDChart::TextLayoutItem::paint (QPainter ∗) [virtual]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 325 of file KDChartLayoutItems.cpp.

References geometry(), KDChart::TextAttributes::pen(), KDChart::TextAttributes::rotation(), and size-Hint().

Referenced by KDChart::TextArea::paintAll(), and KDChart::CartesianAxis::paintCtx().

326 {327 // make sure, cached font is updated, if needed:328 sizeHint();329330 if( !mRect.isValid() )331 return;332333 PainterSaver painterSaver( painter );334 painter->setFont( cachedFont );335 painter->setPen( mAttributes.pen() );336 QRectF rect = geometry();337338 painter->translate( rect.center() );339 rect.moveTopLeft( QPointF( - rect.width() / 2, - rect.height() / 2 ) );340 painter->rotate( mAttributes.rotation() );341 painter->drawText( rect, Qt::AlignHCenter | Qt::AlignVCenter, mText );342 }

6.56.2.10 void KDChart::AbstractLayoutItem::paintCtx ( PaintContext ∗ context) [virtual,inherited]

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

666 KD Chart 2 Class Documentation

6.56.2.11 QFont KDChart::TextLayoutItem::realFont () const [virtual]

Definition at line 220 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::maximumSize(), and KDChart::CartesianAxis::paintCtx().

221 {222 realFontWasRecalculated(); // we can safely ignore the boolean return value223 return cachedFont;224 }

6.56.2.12 qreal KDChart::TextLayoutItem::realFontSize () const [virtual]

Definition at line 193 of file KDChartLayoutItems.cpp.

References KDChart::Measure::calculatedValue(), KDChart::TextAttributes::fontSize(), andKDChart::TextAttributes::minimalFontSize().

194 {195 return qMax(196 mAttributes.fontSize().calculatedValue(197 mAutoReferenceArea,198 mAutoReferenceOrientation ),199 mAttributes.minimalFontSize().calculatedValue(200 mAutoReferenceArea,201 mAutoReferenceOrientation ) );202 }

6.56.2.13 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 else72 mParentLayout->removeItem( this );73 }74 }

6.56.2.14 void KDChart::TextLayoutItem::setAutoReferenceArea (constQObject ∗ area)

Definition at line 115 of file KDChartLayoutItems.cpp.

References sizeHint().

Referenced by KDChart::HeaderFooter::setParent().

116 {117 mAutoReferenceArea = area;118 cachedSizeHint = QSize();119 sizeHint();120 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.56 KDChart::TextLayoutItem Class Reference 667

6.56.2.15 void KDChart::TextLayoutItem::setGeometry (const QRect &r) [virtual]

pure virtual inQLayoutItem

Definition at line 187 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextArea::paintAll(), KDChart::CartesianAxis::paintCtx(), and KDChart::Text-Area::paintIntoRect().

188 {189 mRect = r;190 }

6.56.2.16 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited]

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

6.56.2.17 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 sizeof 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.56.2.18 void KDChart::TextLayoutItem::setText (const QString & text)

Definition at line 127 of file KDChartLayoutItems.cpp.

References sizeHint().

Referenced by KDChart::Widget::addHeaderFooter(), KDChart::CartesianAxis::maximumSize(), andKDChart::CartesianAxis::paintCtx().

128 {129 mText = text;130 cachedSizeHint = QSize();131 sizeHint();132 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

668 KD Chart 2 Class Documentation

6.56.2.19 void KDChart::TextLayoutItem::setTextAttributes (const TextAttributes & a)

Use this to specify the text attributes to be used for this item.

See also:textAttributes

Definition at line 144 of file KDChartLayoutItems.cpp.

References sizeHint().

Referenced by KDChart::HeaderFooter::clone().

145 {146 mAttributes = a;147 cachedSizeHint = QSize(); // invalidate size hint148 sizeHint();149 }

6.56.2.20 QSize KDChart::TextLayoutItem::sizeHint () const [virtual]

pure virtual inQLayoutItem

Definition at line 289 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::sizeHintChanged().

Referenced by KDChart::Legend::buildLegend(), maximumSize(), KDChart::CartesianAxis::maximum-Size(), minimumSize(), paint(), KDChart::CartesianAxis::paintCtx(), setAutoReferenceArea(), setText(),and setTextAttributes().

290 {291 if( realFontWasRecalculated() )292 {293 cachedSizeHint = calcSizeHint( cachedFont );294 sizeHintChanged();295 }296 //qDebug("cachedSizeHint.width(): %i",cachedSizeHint.width());297 return cachedSizeHint;298 }

6.56.2.21 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 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 else81 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.56 KDChart::TextLayoutItem Class Reference 669

6.56.2.22 QString KDChart::TextLayoutItem::text () const

Definition at line 134 of file KDChartLayoutItems.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

135 {136 return mText;137 }

6.56.2.23 KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes () const

Returns the text attributes to be used for this item.

See also:setTextAttributes

Definition at line 156 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::clone().

157 {158 return mAttributes;159 }

6.56.3 Member Data Documentation

6.56.3.1 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

6.56.3.2 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,inherited]

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartLayoutItems.h• KDChartLayoutItems.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

670 KD Chart 2 Class Documentation

6.57 KDChart::ThreeDBarAttributes Class Reference

#include <KDChartThreeDBarAttributes.h >

Inheritance diagram for KDChart::ThreeDBarAttributes:Collaboration diagram for KDChart::ThreeDBar-Attributes:

Public Member Functions

• uint angle() const

• doubledepth() const

• bool isEnabled() const

• booloperator!=(constAbstractThreeDAttributes&other) const

• booloperator!=(constThreeDBarAttributes&other) const

• ThreeDBarAttributes& operator=(constThreeDBarAttributes&)

• booloperator==(constAbstractThreeDAttributes&) const

• booloperator==(constThreeDBarAttributes&) const

• void setAngle(uint threeDAngle)

• void setDepth(double depth)

• void setEnabled(bool enabled)

• void setUseShadowColors(bool useShadowColors)

• ThreeDBarAttributes(constThreeDBarAttributes&)

• ThreeDBarAttributes()

• booluseShadowColors() const

• doublevalidDepth() const

• ∼ThreeDBarAttributes()

6.57.1 Constructor & Destructor Documentation

6.57.1.1 ThreeDBarAttributes::ThreeDBarAttributes ()

Definition at line 44 of file KDChartThreeDBarAttributes.cpp.

45 : AbstractThreeDAttributes( new Private() )46 {4748 }

6.57.1.2 ThreeDBarAttributes::ThreeDBarAttributes (const ThreeDBarAttributes &)

Definition at line 50 of file KDChartThreeDBarAttributes.cpp.

References d.

51 : AbstractThreeDAttributes( new Private( *r.d) )52 {53 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.57 KDChart::ThreeDBarAttributes Class Reference 671

6.57.1.3 ThreeDBarAttributes::∼ThreeDBarAttributes ()

Definition at line 65 of file KDChartThreeDBarAttributes.cpp.

66 {67 }

6.57.2 Member Function Documentation

6.57.2.1 uint ThreeDBarAttributes::angle () const

Definition at line 98 of file KDChartThreeDBarAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

99 {100 return d->angle;101 }

6.57.2.2 double AbstractThreeDAttributes::depth () const [inherited]

Definition at line 103 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), and KDChart::BarDiagram::paint().

104 {105 return d->depth;106 }

6.57.2.3 bool AbstractThreeDAttributes::isEnabled () const [inherited]

Definition at line 92 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), KDChart::BarDiagram::paint(), and KDChart::AbstractThreeDAttributes::validDepth().

93 {94 return d->enabled;95 }

6.57.2.4 bool KDChart::AbstractThreeDAttributes::operator!= (const AbstractThreeDAttributes& other) const [inherited]

Definition at line 57 of file KDChartAbstractThreeDAttributes.h.

57 { return !operator==(other); }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

672 KD Chart 2 Class Documentation

6.57.2.5 bool KDChart::ThreeDBarAttributes::operator!= (const ThreeDBarAttributes & other)const

Definition at line 53 of file KDChartThreeDBarAttributes.h.

53 { return !operator==(other); }

6.57.2.6 ThreeDBarAttributes & ThreeDBarAttributes::operator= (const ThreeDBarAttributes&)

Definition at line 55 of file KDChartThreeDBarAttributes.cpp.

References d.

56 {57 if( this == &r )58 return *this;5960 *d = *r.d;6162 return *this;63 }

6.57.2.7 bool AbstractThreeDAttributes::operator== (constAbstractThreeDAttributes &) const[inherited]

Definition at line 72 of file KDChartAbstractThreeDAttributes.cpp.

References KDChart::AbstractThreeDAttributes::depth(), and KDChart::AbstractThreeDAttributes::is-Enabled().

Referenced by KDChart::ThreeDPieAttributes::operator==(), KDChart::ThreeDLine-Attributes::operator==(), and operator==().

73 {74 if( isEnabled() == r.isEnabled() &&75 depth() == r.depth() )76 return true;77 else78 return false;79 }

6.57.2.8 bool ThreeDBarAttributes::operator== (constThreeDBarAttributes &) const

Definition at line 74 of file KDChartThreeDBarAttributes.cpp.

References angle(), KDChart::AbstractThreeDAttributes::operator==(), and useShadowColors().

75 {76 return ( useShadowColors() == r.useShadowColors() &&77 angle() == r.angle() &&78 AbstractThreeDAttributes::operator==(r));79 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.57 KDChart::ThreeDBarAttributes Class Reference 673

6.57.2.9 void ThreeDBarAttributes::setAngle (uintthreeDAngle)

Definition at line 93 of file KDChartThreeDBarAttributes.cpp.

References d.

94 {95 d->angle = threeDAngle;96 }

6.57.2.10 void AbstractThreeDAttributes::setDepth (doubledepth) [inherited]

Definition at line 97 of file KDChartAbstractThreeDAttributes.cpp.

References d.

98 {99 d->depth = depth;100 }

6.57.2.11 void AbstractThreeDAttributes::setEnabled (boolenabled) [inherited]

Definition at line 87 of file KDChartAbstractThreeDAttributes.cpp.

References d.

88 {89 d->enabled = enabled;90 }

6.57.2.12 void ThreeDBarAttributes::setUseShadowColors (booluseShadowColors)

Definition at line 83 of file KDChartThreeDBarAttributes.cpp.

References d.

84 {85 d->useShadowColors = shadowColors;86 }

6.57.2.13 bool ThreeDBarAttributes::useShadowColors () const

Definition at line 88 of file KDChartThreeDBarAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

89 {90 return d->useShadowColors;91 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

674 KD Chart 2 Class Documentation

6.57.2.14 double AbstractThreeDAttributes::validDepth () const [inherited]

Definition at line 109 of file KDChartAbstractThreeDAttributes.cpp.

References d, and KDChart::AbstractThreeDAttributes::isEnabled().

Referenced by KDChart::LineDiagram::threeDItemDepth(), and KDChart::BarDiagram::threeDItem-Depth().

110 {111 return isEnabled() ? d->depth : 0.0;112 }

The documentation for this class was generated from the following files:

• KDChartThreeDBarAttributes.h• KDChartThreeDBarAttributes.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.58 KDChart::ThreeDLineAttributes Class Reference 675

6.58 KDChart::ThreeDLineAttributes Class Reference

#include <KDChartThreeDLineAttributes.h >

Inheritance diagram for KDChart::ThreeDLineAttributes:Collaboration diagram for KDChart::Three-DLineAttributes:

Public Member Functions

• doubledepth() const

• bool isEnabled() const

• uint lineXRotation() const

• uint lineYRotation() const

• booloperator!=(constAbstractThreeDAttributes&other) const

• booloperator!=(constThreeDLineAttributes&other) const

• ThreeDLineAttributes& operator=(constThreeDLineAttributes&)

• booloperator==(constAbstractThreeDAttributes&) const

• booloperator==(constThreeDLineAttributes&) const

• void setDepth(double depth)

• void setEnabled(bool enabled)

• void setLineXRotation(const uint degrees)

• void setLineYRotation(const uint degrees)

• ThreeDLineAttributes(constThreeDLineAttributes&)

• ThreeDLineAttributes()

• doublevalidDepth() const

• ∼ThreeDLineAttributes()

6.58.1 Constructor & Destructor Documentation

6.58.1.1 ThreeDLineAttributes::ThreeDLineAttributes ()

Definition at line 44 of file KDChartThreeDLineAttributes.cpp.

45 : AbstractThreeDAttributes( new Private() )46 {4748 }

6.58.1.2 ThreeDLineAttributes::ThreeDLineAttributes (const ThreeDLineAttributes &)

Definition at line 50 of file KDChartThreeDLineAttributes.cpp.

References d.

51 : AbstractThreeDAttributes( new Private( *r.d) )52 {53 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

676 KD Chart 2 Class Documentation

6.58.1.3 ThreeDLineAttributes::∼ThreeDLineAttributes ()

Definition at line 65 of file KDChartThreeDLineAttributes.cpp.

66 {67 }

6.58.2 Member Function Documentation

6.58.2.1 double AbstractThreeDAttributes::depth () const [inherited]

Definition at line 103 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), and KDChart::BarDiagram::paint().

104 {105 return d->depth;106 }

6.58.2.2 bool AbstractThreeDAttributes::isEnabled () const [inherited]

Definition at line 92 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), KDChart::BarDiagram::paint(), and KDChart::AbstractThreeDAttributes::validDepth().

93 {94 return d->enabled;95 }

6.58.2.3 uint ThreeDLineAttributes::lineXRotation () const

Definition at line 88 of file KDChartThreeDLineAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

89 {90 return d->lineXRotation;91 }

6.58.2.4 uint ThreeDLineAttributes::lineYRotation () const

Definition at line 98 of file KDChartThreeDLineAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.58 KDChart::ThreeDLineAttributes Class Reference 677

99 {100 return d->lineYRotation;101 }

6.58.2.5 bool KDChart::AbstractThreeDAttributes::operator!= (const AbstractThreeDAttributes& other) const [inherited]

Definition at line 57 of file KDChartAbstractThreeDAttributes.h.

57 { return !operator==(other); }

6.58.2.6 bool KDChart::ThreeDLineAttributes::operator!= (const ThreeDLineAttributes & other)const

Definition at line 51 of file KDChartThreeDLineAttributes.h.

51 { return !operator==(other); }

6.58.2.7 ThreeDLineAttributes & ThreeDLineAttributes::operator= (const ThreeDLineAttributes&)

Definition at line 55 of file KDChartThreeDLineAttributes.cpp.

References d.

56 {57 if( this == &r )58 return *this;5960 *d = *r.d;6162 return *this;63 }

6.58.2.8 bool AbstractThreeDAttributes::operator== (constAbstractThreeDAttributes &) const[inherited]

Definition at line 72 of file KDChartAbstractThreeDAttributes.cpp.

References KDChart::AbstractThreeDAttributes::depth(), and KDChart::AbstractThreeDAttributes::is-Enabled().

Referenced by KDChart::ThreeDPieAttributes::operator==(), operator==(), and KDChart::ThreeDBar-Attributes::operator==().

73 {74 if( isEnabled() == r.isEnabled() &&75 depth() == r.depth() )76 return true;77 else78 return false;79 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

678 KD Chart 2 Class Documentation

6.58.2.9 bool ThreeDLineAttributes::operator== (constThreeDLineAttributes &) const

Definition at line 74 of file KDChartThreeDLineAttributes.cpp.

References lineXRotation(), lineYRotation(), and KDChart::AbstractThreeDAttributes::operator==().

75 {76 return ( lineXRotation() == r.lineXRotation() &&77 lineYRotation() == r.lineYRotation() &&78 AbstractThreeDAttributes::operator==(r));79 }

6.58.2.10 void AbstractThreeDAttributes::setDepth (doubledepth) [inherited]

Definition at line 97 of file KDChartAbstractThreeDAttributes.cpp.

References d.

98 {99 d->depth = depth;100 }

6.58.2.11 void AbstractThreeDAttributes::setEnabled (boolenabled) [inherited]

Definition at line 87 of file KDChartAbstractThreeDAttributes.cpp.

References d.

88 {89 d->enabled = enabled;90 }

6.58.2.12 void ThreeDLineAttributes::setLineXRotation (const uintdegrees)

Definition at line 83 of file KDChartThreeDLineAttributes.cpp.

References d.

84 {85 d->lineXRotation = degrees;86 }

6.58.2.13 void ThreeDLineAttributes::setLineYRotation (const uintdegrees)

Definition at line 93 of file KDChartThreeDLineAttributes.cpp.

References d.

94 {95 d->lineYRotation = degrees;96 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.58 KDChart::ThreeDLineAttributes Class Reference 679

6.58.2.14 double AbstractThreeDAttributes::validDepth () const [inherited]

Definition at line 109 of file KDChartAbstractThreeDAttributes.cpp.

References d, and KDChart::AbstractThreeDAttributes::isEnabled().

Referenced by KDChart::LineDiagram::threeDItemDepth(), and KDChart::BarDiagram::threeDItem-Depth().

110 {111 return isEnabled() ? d->depth : 0.0;112 }

The documentation for this class was generated from the following files:

• KDChartThreeDLineAttributes.h• KDChartThreeDLineAttributes.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

680 KD Chart 2 Class Documentation

6.59 KDChart::ThreeDPieAttributes Class Reference

#include <KDChartThreeDPieAttributes.h >

Inheritance diagram for KDChart::ThreeDPieAttributes:Collaboration diagram for KDChart::ThreeDPie-Attributes:

Public Member Functions

• doubledepth() const• bool isEnabled() const• booloperator!=(constAbstractThreeDAttributes&other) const• booloperator!=(constThreeDPieAttributes&other) const• ThreeDPieAttributes& operator=(constThreeDPieAttributes&)• booloperator==(constAbstractThreeDAttributes&) const• booloperator==(constThreeDPieAttributes&) const• void setDepth(double depth)• void setEnabled(bool enabled)• void setUseShadowColors(bool useShadowColors)• ThreeDPieAttributes(constThreeDPieAttributes&)• ThreeDPieAttributes()• booluseShadowColors() const• doublevalidDepth() const• ∼ThreeDPieAttributes()

6.59.1 Constructor & Destructor Documentation

6.59.1.1 ThreeDPieAttributes::ThreeDPieAttributes ()

Definition at line 43 of file KDChartThreeDPieAttributes.cpp.

44 : AbstractThreeDAttributes( new Private() )45 {4647 }

6.59.1.2 ThreeDPieAttributes::ThreeDPieAttributes (constThreeDPieAttributes &)

Definition at line 49 of file KDChartThreeDPieAttributes.cpp.

References d.

50 : AbstractThreeDAttributes( new Private( *r.d) )51 {52 }

6.59.1.3 ThreeDPieAttributes::∼ThreeDPieAttributes ()

Definition at line 64 of file KDChartThreeDPieAttributes.cpp.

65 {66 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.59 KDChart::ThreeDPieAttributes Class Reference 681

6.59.2 Member Function Documentation

6.59.2.1 double AbstractThreeDAttributes::depth () const [inherited]

Definition at line 103 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), and KDChart::BarDiagram::paint().

104 {105 return d->depth;106 }

6.59.2.2 bool AbstractThreeDAttributes::isEnabled () const [inherited]

Definition at line 92 of file KDChartAbstractThreeDAttributes.cpp.

References d.

Referenced by operator<<(), KDChart::AbstractThreeDAttributes::operator==(), KDChart::Pie-Diagram::paint(), KDChart::BarDiagram::paint(), and KDChart::AbstractThreeDAttributes::validDepth().

93 {94 return d->enabled;95 }

6.59.2.3 bool KDChart::AbstractThreeDAttributes::operator!= (const AbstractThreeDAttributes& other) const [inherited]

Definition at line 57 of file KDChartAbstractThreeDAttributes.h.

57 { return !operator==(other); }

6.59.2.4 bool KDChart::ThreeDPieAttributes::operator!= (const ThreeDPieAttributes & other)const

Definition at line 49 of file KDChartThreeDPieAttributes.h.

49 { return !operator==(other); }

6.59.2.5 ThreeDPieAttributes & ThreeDPieAttributes::operator= (const ThreeDPieAttributes &)

Definition at line 54 of file KDChartThreeDPieAttributes.cpp.

References d.

55 {56 if( this == &r )57 return *this;

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

682 KD Chart 2 Class Documentation

5859 *d = *r.d;6061 return *this;62 }

6.59.2.6 bool AbstractThreeDAttributes::operator== (constAbstractThreeDAttributes &) const[inherited]

Definition at line 72 of file KDChartAbstractThreeDAttributes.cpp.

References KDChart::AbstractThreeDAttributes::depth(), and KDChart::AbstractThreeDAttributes::is-Enabled().

Referenced by operator==(), KDChart::ThreeDLineAttributes::operator==(), and KDChart::ThreeDBar-Attributes::operator==().

73 {74 if( isEnabled() == r.isEnabled() &&75 depth() == r.depth() )76 return true;77 else78 return false;79 }

6.59.2.7 bool ThreeDPieAttributes::operator== (constThreeDPieAttributes &) const

Definition at line 73 of file KDChartThreeDPieAttributes.cpp.

References KDChart::AbstractThreeDAttributes::operator==(), and useShadowColors().

74 {75 return ( useShadowColors() == r.useShadowColors() &&76 AbstractThreeDAttributes::operator==(r));77 }

6.59.2.8 void AbstractThreeDAttributes::setDepth (doubledepth) [inherited]

Definition at line 97 of file KDChartAbstractThreeDAttributes.cpp.

References d.

98 {99 d->depth = depth;100 }

6.59.2.9 void AbstractThreeDAttributes::setEnabled (boolenabled) [inherited]

Definition at line 87 of file KDChartAbstractThreeDAttributes.cpp.

References d.

88 {89 d->enabled = enabled;90 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.59 KDChart::ThreeDPieAttributes Class Reference 683

6.59.2.10 void ThreeDPieAttributes::setUseShadowColors (booluseShadowColors)

Definition at line 81 of file KDChartThreeDPieAttributes.cpp.

References d.

82 {83 d->useShadowColors = shadowColors;84 }

6.59.2.11 bool ThreeDPieAttributes::useShadowColors () const

Definition at line 86 of file KDChartThreeDPieAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

87 {88 return d->useShadowColors;89 }

6.59.2.12 double AbstractThreeDAttributes::validDepth () const [inherited]

Definition at line 109 of file KDChartAbstractThreeDAttributes.cpp.

References d, and KDChart::AbstractThreeDAttributes::isEnabled().

Referenced by KDChart::LineDiagram::threeDItemDepth(), and KDChart::BarDiagram::threeDItem-Depth().

110 {111 return isEnabled() ? d->depth : 0.0;112 }

The documentation for this class was generated from the following files:

• KDChartThreeDPieAttributes.h• KDChartThreeDPieAttributes.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

684 KD Chart 2 Class Documentation

6.60 KDChart::VerticalLineLayoutItem Class Reference

#include <KDChartLayoutItems.h >

Inheritance diagram for KDChart::VerticalLineLayoutItem:Collaboration diagram for KDChart::Vertical-LineLayoutItem:

Public Member Functions

• virtual Qt::OrientationsexpandingDirections() const

• virtual QRectgeometry() const

• virtual boolisEmpty() const

• virtual QSizemaximumSize() const

• virtual QSizeminimumSize() const

• virtual voidpaint(QPainter∗)• virtual voidpaintCtx(PaintContext∗context)

Default impl: Paint the complete item using its layouted position and size.

• void removeFromParentLayout()

• virtual voidsetGeometry(const QRect &r)

• void setParentLayout(QLayout∗lay)

• virtual voidsetParentWidget(QWidget∗widget)

Inform the item about its widget: This enables the item, to trigger that widget’s update, whenever the sizeof the item’s contents has changed.

• virtual QSizesizeHint() const

• virtual voidsizeHintChanged() const

Report changed size hint: ask the parent widget to recalculate the layout.

• VerticalLineLayoutItem()

Protected Attributes

• QWidget∗ mParent

• QLayout∗ mParentLayout

6.60.1 Constructor & Destructor Documentation

6.60.1.1 KDChart::VerticalLineLayoutItem::VerticalLineLayoutItem ()

Definition at line 462 of file KDChartLayoutItems.cpp.

463 : AbstractLayoutItem( Qt::AlignCenter )464 {465 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.60 KDChart::VerticalLineLayoutItem Class Reference 685

6.60.2 Member Function Documentation

6.60.2.1 Qt::Orientations KDChart::VerticalLineLayoutItem::expandingDirections () const[virtual]

Definition at line 467 of file KDChartLayoutItems.cpp.

468 {469 return Qt::Vertical|Qt::Vertical; // Grow neither vertically nor horizontally470 }

6.60.2.2 QRect KDChart::VerticalLineLayoutItem::geometry () const [virtual]

Definition at line 472 of file KDChartLayoutItems.cpp.

473 {474 return mRect;475 }

6.60.2.3 bool KDChart::VerticalLineLayoutItem::isEmpty () const [virtual]

Definition at line 477 of file KDChartLayoutItems.cpp.

478 {479 return false; // never empty, otherwise the layout item would not exist480 }

6.60.2.4 QSize KDChart::VerticalLineLayoutItem::maximumSize () const [virtual]

Definition at line 482 of file KDChartLayoutItems.cpp.

483 {484 return QSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );485 }

6.60.2.5 QSize KDChart::VerticalLineLayoutItem::minimumSize () const [virtual]

Definition at line 487 of file KDChartLayoutItems.cpp.

488 {489 return QSize( 0, 0 );490 }

6.60.2.6 void KDChart::VerticalLineLayoutItem::paint (QPainter ∗) [virtual]

ImplementsKDChart::AbstractLayoutItem.

Definition at line 503 of file KDChartLayoutItems.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

686 KD Chart 2 Class Documentation

504 {505 if( !mRect.isValid() )506 return;507508 painter->drawLine( QPointF( mRect.center().x(), mRect.top() ),509 QPointF( mRect.center().x(), mRect.bottom() ) );510 }

6.60.2.7 void KDChart::AbstractLayoutItem::paintCtx ( PaintContext ∗ context) [virtual,inherited]

Default impl: Paint the complete item using its layouted position and size.

Reimplemented inKDChart::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.60.2.8 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 else72 mParentLayout->removeItem( this );73 }74 }

6.60.2.9 void KDChart::VerticalLineLayoutItem::setGeometry (const QRect & r) [virtual]

Definition at line 492 of file KDChartLayoutItems.cpp.

493 {494 mRect = r;495 }

6.60.2.10 void KDChart::AbstractLayoutItem::setParentLayout (QLayout ∗ lay) [inherited]

Definition at line 62 of file KDChartLayoutItems.h.

63 {64 mParentLayout = lay;65 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.60 KDChart::VerticalLineLayoutItem Class Reference 687

6.60.2.11 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 sizeof 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.60.2.12 QSize KDChart::VerticalLineLayoutItem::sizeHint () const [virtual]

Definition at line 497 of file KDChartLayoutItems.cpp.

498 {499 return QSize( 3, -1 ); // see qframe.cpp500 }

6.60.2.13 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 else81 QApplication::postEvent( mParent, new QEvent( QEvent::LayoutRequest ) );82 }83 }

6.60.3 Member Data Documentation

6.60.3.1 QWidget∗ KDChart::AbstractLayoutItem::mParent [protected, inherited]

Definition at line 76 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

688 KD Chart 2 Class Documentation

6.60.3.2 QLayout∗ KDChart::AbstractLayoutItem::mParentLayout [protected,inherited]

Definition at line 77 of file KDChartLayoutItems.h.

The documentation for this class was generated from the following files:

• KDChartLayoutItems.h• KDChartLayoutItems.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 689

6.61 KDChart::Widget Class Reference

#include <KDChartWidget.h >

Inheritance diagram for KDChart::Widget:Collaboration diagram for KDChart::Widget:

6.61.1 Detailed Description

The KDChartwidget for usage without Model/View.

If you want to use KDChartwith Model/View, useKDChart::Chartinstead.

Definition at line 63 of file KDChartWidget.h.

Public Types

• enumChartType{

NoType,

Bar,

Line,

Pie,

Ring,

Polar}• enumSubType{

Normal,

Stacked,

Percent,

Rows}

Sub type values, matching the values defines for the respective Diagram classes.

Public Member Functions

• void addHeaderFooter(HeaderFooter∗header)

Adds an existing header / footer object.

• void addHeaderFooter(const QString &text,HeaderFooter::HeaderFooterTypetype,Positionposi-tion)

Adds a new header/footer with the given text to the position.

• void addLegend(Legend∗legend)

Adds a new, already existing, legend.

• void addLegend(Positionposition)

Adds an empty legend on the given position.

• QList< HeaderFooter∗ > allHeadersFooters()

Returns a list with all headers.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

690 KD Chart 2 Class Documentation

• QList< Legend∗ > allLegends()

Returns a list with all legends.

• BarDiagram∗ barDiagram()

If the current diagram is aBarDiagram, it is returnd; otherwise 0 is returned.

• AbstractCoordinatePlane∗ coordinatePlane()

Returns a pointer to the current coordinate plane.

• AbstractDiagram∗ diagram()

Returns a pointer to the current diagram.

• HeaderFooter∗ firstHeaderFooter()

Returns the first of all headers.

• int globalLeadingBottom() const

Returns the bottom leading (border).

• int globalLeadingLeft() const

Returns the left leading (border).

• int globalLeadingRight() const

Returns the right leading (border).

• int globalLeadingTop() const

Returns the top leading (border).

• Legend∗ legend()

Returns the first of all legends.

• LineDiagram∗ lineDiagram()

If the current diagram is aLineDiagram, it is returnd; otherwise 0 is returned.

• PieDiagram∗ pieDiagram()

If the current diagram is aPieDiagram, it is returnd; otherwise 0 is returned.

• PolarDiagram∗ polarDiagram()

If the current diagram is aPolarDiagram, it is returnd; otherwise 0 is returned.

• void replaceHeaderFooter(HeaderFooter∗header,HeaderFooter∗oldHeader=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)• void resetData()

Resets all data.

• RingDiagram∗ ringDiagram()

If the current diagram is aRingDiagram, it is returnd; otherwise 0 is returned.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 691

• void setDataset(int column, const QVector< QPair< double, double> > &data, const QString&title=QString())

Sets the data in the given column using a QVector of QPairs of double.

• void setDataset(int column, const QVector< double> &data, const QString &title=QString())

Sets the data in the given column using a QVector of double.

• void setGlobalLeadingBottom(int leading)

Sets the bottom leading (border).

• void setGlobalLeadingLeft(int leading)

Sets the left leading (border).

• void setGlobalLeadingRight(int leading)

Sets the right leading (border).

• void setGlobalLeadingTop(int leading)

Sets the top leading (border).

• void setSubType(SubTypesubType)

Sets the type of the chart without changing the main type.

• SubTypesubType() const

Returns the sub-type of the chart.

• void takeHeaderFooter(HeaderFooter∗header)

Remove the header (or footer, resp.) from the widget, without deleting it.

• void takeLegend(Legend∗legend)

• ChartTypetype() const

Returns the type of the chart.

• Widget(QWidget∗parent=0)

Standard Qt-style Constructor.

• ∼Widget()

Destructor.

Public Attributes

• public int int int bottom

• publicQ_SLOTS: void setGlobalLeading( int left

• public int int right

• publicSubTypesubType= Normal )

• public int top

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

692 KD Chart 2 Class Documentation

6.61.2 Member Enumeration Documentation

6.61.2.1 enumKDChart::Widget::ChartType

Enumeration values:NoType

Bar

Line

Pie

Ring

Polar

Definition at line 199 of file KDChartWidget.h.

199 { NoType, Bar, Line, Pie, Ring, Polar };

6.61.2.2 enumKDChart::Widget::SubType

Sub type values, matching the values defines for the respective Diagram classes.

Enumeration values:Normal

Stacked

Percent

Rows

Definition at line 205 of file KDChartWidget.h.

205 { Normal, Stacked, Percent, Rows };

6.61.3 Constructor & Destructor Documentation

6.61.3.1 Widget::Widget (QWidget ∗ parent= 0) [explicit]

Standard Qt-style Constructor.

Creates a new widget with all data initialized empty.

Parameters:parent the widget parent; passed on toQWidget

Definition at line 82 of file KDChartWidget.cpp.

References Line.

82 :83 QWidget(parent), _d( new Private( this ) )84 {85 // as default we have a cartesian coordinate plane ...86 // ... and a line diagram87 setType( Line );88 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 693

6.61.3.2 Widget::∼Widget ()

Destructor.

Definition at line 93 of file KDChartWidget.cpp.

94 {95 delete _d; _d = 0;96 }

6.61.4 Member Function Documentation

6.61.4.1 void Widget::addHeaderFooter (HeaderFooter∗ header)

Adds an existing header / footer object.

See also:replaceHeaderFooter, takeHeaderFooter

Definition at line 262 of file KDChartWidget.cpp.

References d, and KDChart::HeaderFooter::setParent().

263 {264 header->setParent( &d->m_chart );265 d->m_chart.addHeaderFooter( header ); // we need this explicit call !266 }

6.61.4.2 void Widget::addHeaderFooter (const QString &text, HeaderFooter::HeaderFooterTypetype, Positionposition)

Adds a new header/footer with the given text to the position.

Definition at line 248 of file KDChartWidget.cpp.

References d, KDChart::HeaderFooter::setPosition(), KDChart::TextLayoutItem::setText(), andKDChart::HeaderFooter::setType().

251 {252 HeaderFooter* newHeader = new HeaderFooter( &d->m_chart );253 newHeader->setType( type );254 newHeader->setPosition( position );255 newHeader->setText( text );256 d->m_chart.addHeaderFooter( newHeader ); // we need this explicit call !257 }

6.61.4.3 void Widget::addLegend (Legend∗ legend)

Adds a new, already existing, legend.

Definition at line 308 of file KDChartWidget.cpp.

References d, diagram(), and KDChart::Legend::setDiagram().

309 {310 legend->setDiagram( diagram() );311 legend->setParent( &d->m_chart );312 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

694 KD Chart 2 Class Documentation

6.61.4.4 void Widget::addLegend (Positionposition)

Adds an empty legend on the given position.

Definition at line 298 of file KDChartWidget.cpp.

References d, diagram(), and KDChart::Legend::setPosition().

299 {300 Legend* legend = new Legend( diagram(), &d->m_chart );301 legend->setPosition( position );302 d->m_chart.addLegend( legend );303 }

6.61.4.5 QList< KDChart::HeaderFooter ∗ > Widget::allHeadersFooters ()

Returns a list with all headers.

Definition at line 240 of file KDChartWidget.cpp.

References d.

241 {242 return d->m_chart.headerFooters();243 }

6.61.4.6 QList< KDChart::Legend ∗ > Widget::allLegends ()

Returns a list with all legends.

Definition at line 290 of file KDChartWidget.cpp.

References d.

291 {292 return d->m_chart.legends();293 }

6.61.4.7 BarDiagram ∗Widget::barDiagram ()

If the current diagram is aBarDiagram, it is returnd; otherwise 0 is returned.

This function provides type-safe casting.

Definition at line 334 of file KDChartWidget.cpp.

References diagram().

335 {336 return dynamic_cast<BarDiagram*>( diagram() );337 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 695

6.61.4.8 AbstractCoordinatePlane∗Widget::coordinatePlane ()

Returns a pointer to the current coordinate plane.

Definition at line 355 of file KDChartWidget.cpp.

References d.

Referenced by diagram().

356 {357 return d->m_chart.coordinatePlane();358 }

6.61.4.9 AbstractDiagram ∗Widget::diagram ()

Returns a pointer to the current diagram.

Definition at line 326 of file KDChartWidget.cpp.

References coordinatePlane(), and KDChart::AbstractCoordinatePlane::diagram().

Referenced by addLegend(), barDiagram(), lineDiagram(), pieDiagram(), polarDiagram(), replace-Legend(), ringDiagram(), and setSubType().

327 {328 if ( coordinatePlane() == 0 )329 qDebug() << "diagram(): coordinatePlane() was NULL";330331 return coordinatePlane()->diagram();332 }

6.61.4.10 KDChart::HeaderFooter ∗Widget::firstHeaderFooter ()

Returns the first of all headers.

Definition at line 232 of file KDChartWidget.cpp.

References d.

233 {234 return d->m_chart.headerFooter();235 }

6.61.4.11 int Widget::globalLeadingBottom () const

Returns the bottom leading (border).

Definition at line 224 of file KDChartWidget.cpp.

References d.

225 {226 return d->m_chart.globalLeadingBottom();227 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

696 KD Chart 2 Class Documentation

6.61.4.12 int Widget::globalLeadingLeft () const

Returns the left leading (border).

Definition at line 176 of file KDChartWidget.cpp.

References d.

177 {178 return d->m_chart.globalLeadingLeft();179 }

6.61.4.13 int Widget::globalLeadingRight () const

Returns the right leading (border).

Definition at line 208 of file KDChartWidget.cpp.

References d.

209 {210 return d->m_chart.globalLeadingRight();211 }

6.61.4.14 int Widget::globalLeadingTop () const

Returns the top leading (border).

Definition at line 192 of file KDChartWidget.cpp.

References d.

193 {194 return d->m_chart.globalLeadingTop();195 }

6.61.4.15 KDChart::Legend ∗Widget::legend ()

Returns the first of all legends.

Definition at line 282 of file KDChartWidget.cpp.

References d.

283 {284 return d->m_chart.legend();285 }

6.61.4.16 LineDiagram ∗Widget::lineDiagram ()

If the current diagram is aLineDiagram, it is returnd; otherwise 0 is returned.

This function provides type-safe casting.

Definition at line 338 of file KDChartWidget.cpp.

References diagram().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 697

339 {340 return dynamic_cast<LineDiagram*>( diagram() );341 }

6.61.4.17 PieDiagram∗Widget::pieDiagram ()

If the current diagram is aPieDiagram, it is returnd; otherwise 0 is returned.

This function provides type-safe casting.

Definition at line 342 of file KDChartWidget.cpp.

References diagram().

343 {344 return dynamic_cast<PieDiagram*>( diagram() );345 }

6.61.4.18 PolarDiagram ∗Widget::polarDiagram ()

If the current diagram is aPolarDiagram, it is returnd; otherwise 0 is returned.

This function provides type-safe casting.

Definition at line 350 of file KDChartWidget.cpp.

References diagram().

351 {352 return dynamic_cast<PolarDiagram*>( diagram() );353 }

6.61.4.19 void Widget::replaceHeaderFooter (HeaderFooter∗ header, HeaderFooter∗ oldHeader= 0)

Replaces the old header (or footer, resp.), or appends the new header or footer, it there is none yet.

Parameters:headerFooterThe header or footer to be used instead of the old one. This parameter must not be zero,

or the method will do nothing.

oldHeaderFooterThe header or footer to be removed by the new one. This header or footer will bedeleted automatically. If the parameter is omitted, the very first header or footer will be replaced.In case, there was no header and no footer yet, the new header or footer will just be added.

Note:If you want to re-use the old header or footer, call takeHeaderFooter and addHeaderFooter, instead ofusing replaceHeaderFooter.

See also:addHeaderFooter, takeHeaderFooter

Definition at line 268 of file KDChartWidget.cpp.

References d, and KDChart::HeaderFooter::setParent().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

698 KD Chart 2 Class Documentation

269 {270 header->setParent( &d->m_chart );271 d->m_chart.replaceHeaderFooter( header, oldHeader );272 }

6.61.4.20 void Widget::replaceLegend (Legend∗ legend, Legend∗ oldLegend= 0)

Definition at line 314 of file KDChartWidget.cpp.

References d, diagram(), and KDChart::Legend::setDiagram().

315 {316 legend->setDiagram( diagram() );317 legend->setParent( &d->m_chart );318 d->m_chart.replaceLegend( legend, oldLegend );319 }

6.61.4.21 void Widget::resetData ()

Resets all data.

Definition at line 151 of file KDChartWidget.cpp.

References d.

152 {153 d->m_model.clear();154 d->usedDatasetWidth = 0;155 }

6.61.4.22 RingDiagram ∗Widget::ringDiagram ()

If the current diagram is aRingDiagram, it is returnd; otherwise 0 is returned.

This function provides type-safe casting.

Definition at line 346 of file KDChartWidget.cpp.

References diagram().

347 {348 return dynamic_cast<RingDiagram*>( diagram() );349 }

6.61.4.23 void Widget::setDataset (intcolumn, const QVector< QPair< double, double> > &data, const QString & title = QString())

Sets the data in the given column using a QVector of QPairs of double.

Definition at line 127 of file KDChartWidget.cpp.

References d.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 699

128 {129 if ( ! checkDatasetWidth( 2 ))130 return;131132 QStandardItemModel & model = d->m_model;133134 justifyModelSize( data.size(), (column + 1) * 2 );135136 for( int i = 0; i < data.size(); ++i )137 {138 QModelIndex index = model.index( i, column * 2 );139 model.setData( index, QVariant( data[i].first ), Qt::DisplayRole );140141 index = model.index( i, column * 2 + 1 );142 model.setData( index, QVariant( data[i].second ), Qt::DisplayRole );143 }144 if ( ! title.isEmpty() )145 model.setHeaderData( column * 2, Qt::Horizontal, QVariant( title ) );146 }

6.61.4.24 void Widget::setDataset (intcolumn, const QVector< double> & data, const QString &title = QString())

Sets the data in the given column using a QVector of double.

Definition at line 105 of file KDChartWidget.cpp.

References d.

106 {107 if ( ! checkDatasetWidth( 1 ) )108 return;109110 QStandardItemModel & model = d->m_model;111112 justifyModelSize( data.size(), column + 1 );113114 for( int i = 0; i < data.size(); ++i )115 {116 const QModelIndex index = model.index( i, column );117 model.setData( index, QVariant( data[i] ), Qt::DisplayRole );118 }119 if ( ! title.isEmpty() )120 model.setHeaderData( column, Qt::Horizontal, QVariant( title ) );121 }

6.61.4.25 void Widget::setGlobalLeadingBottom (intleading)

Sets the bottom leading (border).

Definition at line 216 of file KDChartWidget.cpp.

References d.

217 {218 d->m_chart.setGlobalLeadingBottom( leading );219 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

700 KD Chart 2 Class Documentation

6.61.4.26 void Widget::setGlobalLeadingLeft (intleading)

Sets the left leading (border).

Definition at line 168 of file KDChartWidget.cpp.

References d.

169 {170 d->m_chart.setGlobalLeadingLeft( leading );171 }

6.61.4.27 void Widget::setGlobalLeadingRight (intleading)

Sets the right leading (border).

Definition at line 200 of file KDChartWidget.cpp.

References d.

201 {202 d->m_chart.setGlobalLeadingRight( leading );203 }

6.61.4.28 void Widget::setGlobalLeadingTop (intleading)

Sets the top leading (border).

Definition at line 184 of file KDChartWidget.cpp.

References d.

185 {186 d->m_chart.setGlobalLeadingTop( leading );187 }

6.61.4.29 void Widget::setSubType (SubTypesubType)

Sets the type of the chart without changing the main type.

Make sure to use a sub-type that matches the main type, so e.g. setting sub-type Rows makes sense for Barcharts only, and it will be ignored for all other chart types.

See also:KDChartBarDiagram::BarType, KDChartLineDiagram::LineTypeKDChartPieDiagram::PieType, KDChartRingDiagram::RingTypeKDChartPolarDiagram::PolarType

Definition at line 435 of file KDChartWidget.cpp.

References diagram(), and SET_SUB_TYPE.

436 {437 BarDiagram* barDia = qobject_cast< BarDiagram* >( diagram() );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 701

438 LineDiagram* lineDia = qobject_cast< LineDiagram* >( diagram() );439440 //FIXME(khz): Add the impl for these chart types - or remove them from here:441 // PieDiagram* pieDia = qobject_cast< PieDiagram* >( diagram() );442 // PolarDiagram* polarDia = qobject_cast< PolarDiagram* >( diagram() );443 // RingDiagram* ringDia = qobject_cast< RingDiagram* >( diagram() );444445 #define SET_SUB_TYPE(DIAGRAM, SUBTYPE) \446 { \447 if( DIAGRAM ) \448 DIAGRAM->setType( SUBTYPE ); \449 }450 switch ( subType )451 {452 case Normal:453 SET_SUB_TYPE( barDia, BarDiagram::Normal );454 SET_SUB_TYPE( lineDia, LineDiagram::Normal );455 break;456 case Stacked:457 SET_SUB_TYPE( barDia, BarDiagram::Stacked );458 SET_SUB_TYPE( lineDia, LineDiagram::Stacked );459 break;460 case Percent:461 SET_SUB_TYPE( barDia, BarDiagram::Percent );462 SET_SUB_TYPE( lineDia, LineDiagram::Percent );463 break;464 case Rows:465 SET_SUB_TYPE( barDia, BarDiagram::Rows );466 break;467 default:468 Q_ASSERT_X ( false,469 "Widget::setSubType", "Sub-type not supported!" );470 break;471 }472 // coordinatePlane()->show();473 }

6.61.4.30 SubTypeKDChart::Widget::subType () const

Returns the sub-type of the chart.

6.61.4.31 void Widget::takeHeaderFooter (HeaderFooter∗ header)

Remove the header (or footer, resp.) from the widget, without deleting it.

The chart no longer owns the header or footer, so it is the caller’s responsibility to delete the header orfooter.

See also:addHeaderFooter, replaceHeaderFooter

Definition at line 274 of file KDChartWidget.cpp.

References d.

275 {276 d->m_chart.takeHeaderFooter( header );277 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

702 KD Chart 2 Class Documentation

6.61.4.32 void Widget::takeLegend (Legend∗ legend)

Definition at line 321 of file KDChartWidget.cpp.

References d.

322 {323 d->m_chart.takeLegend( legend );324 }

6.61.4.33 Widget::ChartType Widget::type () const

Returns the type of the chart.

Definition at line 478 of file KDChartWidget.cpp.

References Bar, Line, NoType, Pie, Polar, and Ring.

479 {480 // PENDING(christoph) save the type out-of-band:481 AbstractDiagram * const dia = const_cast<Widget*>( this )->diagram();482 if ( qobject_cast< BarDiagram* >( dia ) )483 return Bar;484 else if ( qobject_cast< LineDiagram* >( dia ) )485 return Line;486 else if( qobject_cast< PieDiagram* >( dia ) )487 return Pie;488 else if( qobject_cast< PolarDiagram* >( dia ) )489 return Polar;490 else if( qobject_cast< RingDiagram* >( dia ) )491 return Ring;492 else493 return NoType;494 }

6.61.5 Member Data Documentation

6.61.5.1 public int int int KDChart::Widget::bottom

Definition at line 92 of file KDChartWidget.h.

6.61.5.2 publicKDChart::Widget::Q_SLOTS

Definition at line 212 of file KDChartWidget.h.

6.61.5.3 public int int KDChart::Widget::right

Definition at line 92 of file KDChartWidget.h.

6.61.5.4 Widget::SubType Widget::subType = Normal )

Definition at line 496 of file KDChartWidget.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.61 KDChart::Widget Class Reference 703

497 {498 // PENDING(christoph) save the type out-of-band:499 Widget::SubType retVal = Normal;500501 AbstractDiagram * const dia = const_cast<Widget*>( this )->diagram();502 BarDiagram* barDia = qobject_cast< BarDiagram* >( dia );503 LineDiagram* lineDia = qobject_cast< LineDiagram* >( dia );504505 //FIXME(khz): Add the impl for these chart types - or remove them from here:506 // PieDiagram* pieDia = qobject_cast< PieDiagram* >( diagram() );507 // PolarDiagram* polarDia = qobject_cast< PolarDiagram* >( diagram() );508 // RingDiagram* ringDia = qobject_cast< RingDiagram* >( diagram() );509510 #define TEST_SUB_TYPE(DIAGRAM, INTERNALSUBTYPE, SUBTYPE) \511 { \512 if( DIAGRAM && DIAGRAM->type() == INTERNALSUBTYPE ) \513 retVal = SUBTYPE; \514 }515 const Widget::ChartType mainType = type();516 switch ( mainType )517 {518 case Bar:519 TEST_SUB_TYPE( barDia, BarDiagram::Normal, Normal );520 TEST_SUB_TYPE( barDia, BarDiagram::Stacked, Stacked );521 TEST_SUB_TYPE( barDia, BarDiagram::Percent, Percent );522 TEST_SUB_TYPE( barDia, BarDiagram::Rows, Rows );523 break;524 case Line:525 TEST_SUB_TYPE( lineDia, LineDiagram::Normal, Normal );526 TEST_SUB_TYPE( lineDia, LineDiagram::Stacked, Stacked );527 TEST_SUB_TYPE( lineDia, LineDiagram::Percent, Percent );528 break;529 case Pie:530 // no impl. yet531 break;532 case Polar:533 // no impl. yet534 break;535 case Ring:536 // no impl. yet537 break;538 default:539 Q_ASSERT_X ( false,540 "Widget::subType", "Chart type not supported!" );541 break;542 }543 return retVal;544 }

6.61.5.5 public intKDChart::Widget::top

Definition at line 92 of file KDChartWidget.h.

The documentation for this class was generated from the following files:

• KDChartWidget.h• KDChartWidget.cpp

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

704 KD Chart 2 Class Documentation

6.62 KDChart::ZoomParameters Class Reference

#include <KDChartZoomParameters.h >

Collaboration diagram for KDChart::ZoomParameters:

Public Member Functions

• ZoomParameters()

Public Attributes

• doublexCenter• doublexFactor• doubleyCenter• doubleyFactor

6.62.1 Constructor & Destructor Documentation

6.62.1.1 KDChart::ZoomParameters::ZoomParameters ()

Definition at line 7 of file KDChartZoomParameters.h.

References xCenter, xFactor, yCenter, and yFactor.

8 : xFactor( 1.0 ),9 yFactor( 1.0 ),10 xCenter( 0.5 ),11 yCenter( 0.5)12 {13 }

6.62.2 Member Data Documentation

6.62.2.1 doubleKDChart::ZoomParameters::xCenter

Definition at line 18 of file KDChartZoomParameters.h.

Referenced by ZoomParameters().

6.62.2.2 doubleKDChart::ZoomParameters::xFactor

Definition at line 15 of file KDChartZoomParameters.h.

Referenced by ZoomParameters().

6.62.2.3 doubleKDChart::ZoomParameters::yCenter

Definition at line 19 of file KDChartZoomParameters.h.

Referenced by ZoomParameters().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

6.62 KDChart::ZoomParameters Class Reference 705

6.62.2.4 doubleKDChart::ZoomParameters::yFactor

Definition at line 16 of file KDChartZoomParameters.h.

Referenced by ZoomParameters().

The documentation for this class was generated from the following file:

• KDChartZoomParameters.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

706 KD Chart 2 Class Documentation

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Chapter 7

KD Chart 2 File Documentation

7.1 KDChartAbstractArea.cpp File Reference

#include "KDChartAbstractArea.h"

#include "KDChartAbstractArea_p.h"

#include <qglobal.h >

#include <QPainter >

#include <QRect >

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractArea.cpp:

708 KD Chart 2 File Documentation

7.2 KDChartAbstractArea.h File Reference

#include <QObject >

#include "KDChartGlobal.h"

#include "KDChartAbstractAreaBase.h"

#include "KDChartLayoutItems.h"

Include dependency graph for KDChartAbstractArea.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.3 KDChartAbstractAreaBase.cpp File Reference 709

7.3 KDChartAbstractAreaBase.cpp File Reference

#include "KDChartAbstractAreaBase.h"

#include "KDChartAbstractAreaBase_p.h"

#include <KDChartBackgroundAttributes.h >

#include <KDChartFrameAttributes.h >

#include <KDChartTextAttributes.h >

#include "KDChartPainterSaver_p.h"

#include <QPainter >

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractAreaBase.cpp:

Defines

• #defineattributesd→ frameAttributes• #defineattributesd→ backgroundAttributes• #defined d_func()

7.3.1 Define Documentation

7.3.1.1 #define attributes d→ frameAttributes

7.3.1.2 #define attributes d→ backgroundAttributes

Referenced by KDChart::AbstractAreaBase::paintBackground(), KDChart::AbstractAreaBase::paint-Frame(), and KDChart::TextLayoutItem::TextLayoutItem().

7.3.1.3 #define d d_func()

Definition at line 73 of file KDChartAbstractAreaBase.cpp.

Referenced by KDChart::AbstractCoordinatePlane::AbstractCoordinatePlane(), KDChart::Abstract-ThreeDAttributes::AbstractThreeDAttributes(), KDChart::AbstractCartesianDiagram::addAxis(),KDChart::Chart::addCoordinatePlane(), KDChart::Legend::addDiagram(), KDChart::Abstract-CoordinatePlane::addDiagram(), KDChart::Widget::addHeaderFooter(), KDChart::Chart::add-HeaderFooter(), KDChart::Widget::addLegend(), KDChart::Chart::addLegend(), KD-Chart::Legend::alignment(), KDChart::Widget::allHeadersFooters(), KDChart::Widget::all-Legends(), KDChart::AbstractDiagram::allowOverlappingDataValueTexts(), KDChart::ThreeDBar-Attributes::angle(), KDChart::PolarCoordinatePlane::angleUnit(), KDChart::AbstractDiagram::anti-Aliasing(), KDChart::AbstractDiagram::attributesModel(), KDChart::AbstractDiagram::attributes-ModelRootIndex(), KDChart::AbstractCartesianDiagram::axes(), KDChart::CartesianCoordinate-Plane::axesCalcModeX(), KDChart::CartesianCoordinatePlane::axesCalcModeY(), KDChart::Abstract-AreaBase::backgroundAttributes(), KDChart::BarDiagram::barAttributes(), KDChart::Legend::brush(),KDChart::Legend::buildLegend(), KDChart::LineDiagram::calculateDataBoundaries(), KDChart::Bar-Diagram::calculateDataBoundaries(), KDChart::CartesianCoordinatePlane::calculateRawData-BoundingRect(), KDChart::RingDiagram::clone(), KDChart::PolarDiagram::clone(), KDChart::Pie-Diagram::clone(), KDChart::LineDiagram::clone(), KDChart::Legend::clone(), KDChart::Header-Footer::clone(), KDChart::BarDiagram::clone(), KDChart::AbstractAxis::connectSignals(),

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

710 KD Chart 2 File Documentation

KDChart::Widget::coordinatePlane(), KDChart::Chart::coordinatePlane(), KDChart::Abstract-Diagram::coordinatePlane(), KDChart::AbstractAxis::coordinatePlane(), KDChart::Chart::coordinate-Planes(), KDChart::AbstractAxis::createObserver(), KDChart::AbstractDiagram::dataBoundaries(),KDChart::AbstractDiagram::dataChanged(), KDChart::Legend::datasetCount(), KDChart::Abstract-Diagram::datasetDimension(), KDChart::AbstractAxis::deleteObserver(), KDChart::Abstract-ThreeDAttributes::depth(), KDChart::Legend::diagram(), KDChart::AbstractCoordinate-Plane::diagram(), KDChart::AbstractAxis::diagram(), KDChart::Legend::diagrams(), KDChart::Abstract-CoordinatePlane::diagrams(), KDChart::CartesianCoordinatePlane::doesIsometricScaling(),KDChart::AbstractDiagram::doItemsLayout(), KDChart::PieAttributes::explode(), KDChart::Pie-Attributes::explodeFactor(), KDChart::Widget::firstHeaderFooter(), KDChart::AbstractAreaBase::frame-Attributes(), KDChart::CartesianAxis::geometry(), KDChart::AbstractCoordinatePlane::geometry(),KDChart::AbstractCoordinatePlane::globalGridAttributes(), KDChart::Widget::globalLeading-Bottom(), KDChart::Chart::globalLeadingBottom(), KDChart::Widget::globalLeadingLeft(),KDChart::Chart::globalLeadingLeft(), KDChart::Widget::globalLeadingRight(), KDChart::Chart::global-LeadingRight(), KDChart::Widget::globalLeadingTop(), KDChart::Chart::globalLeadingTop(),KDChart::AbstractPieDiagram::granularity(), KDChart::PolarCoordinatePlane::gridAttributes(),KDChart::CartesianCoordinatePlane::gridAttributes(), KDChart::AbstractCoordinatePlane::grid-DimensionsList(), KDChart::CartesianAxis::hasDefaultTitleTextAttributes(), KDChart::PolarCoordinate-Plane::hasOwnGridAttributes(), KDChart::CartesianCoordinatePlane::hasOwnGridAttributes(),KDChart::Chart::headerFooter(), KDChart::Chart::headerFooters(), KDChart::CartesianCoordinate-Plane::horizontalRange(), KDChart::AbstractAreaBase::innerRect(), KDChart::AbstractThree-DAttributes::isEnabled(), KDChart::AbstractAxis::labels(), KDChart::PolarCoordinatePlane::layout-Diagrams(), KDChart::CartesianCoordinatePlane::layoutDiagrams(), KDChart::CartesianAxis::layout-Planes(), KDChart::Widget::legend(), KDChart::Legend::Legend(), KDChart::Chart::legend(), KD-Chart::Chart::legends(), KDChart::LineDiagram::lineAttributes(), KDChart::ThreeDLineAttributes::line-XRotation(), KDChart::ThreeDLineAttributes::lineYRotation(), KDChart::Legend::marker-Attributes(), KDChart::CartesianAxis::maximumSize(), KDChart::AbstractCoordinatePlane::maximum-Size(), KDChart::LineDiagram::numberOfAbscissaSegments(), KDChart::BarDiagram::number-OfAbscissaSegments(), KDChart::LineDiagram::numberOfOrdinateSegments(), KDChart::Bar-Diagram::numberOfOrdinateSegments(), KDChart::AbstractAxis::observedBy(), KDChart::Three-DPieAttributes::operator=(), KDChart::ThreeDLineAttributes::operator=(), KDChart::Three-DBarAttributes::operator=(), KDChart::PieAttributes::operator=(), KDChart::AbstractThree-DAttributes::operator=(), KDChart::Legend::orientation(), KDChart::PolarCoordinatePlane::paint(),KDChart::PieDiagram::paint(), KDChart::LineDiagram::paint(), KDChart::Legend::paint(),KDChart::Chart::paint(), KDChart::CartesianCoordinatePlane::paint(), KDChart::Cartesian-Axis::paint(), KDChart::BarDiagram::paint(), KDChart::AbstractAreaBase::paintBackground(),KDChart::CartesianAxis::paintCtx(), KDChart::AbstractAreaBase::paintFrame(), KDChart::Abstract-CoordinatePlane::parent(), KDChart::Legend::pen(), KDChart::AbstractDiagram::percentMode(),KDChart::PieAttributes::PieAttributes(), KDChart::AbstractPieDiagram::pieAttributes(), KD-Chart::Legend::position(), KDChart::HeaderFooter::position(), KDChart::CartesianAxis::position(),KDChart::Legend::referenceArea(), KDChart::AbstractCoordinatePlane::referenceCoordinate-Plane(), KDChart::AbstractCartesianDiagram::referenceDiagram(), KDChart::Abstract-CartesianDiagram::referenceDiagramOffset(), KDChart::RingDiagram::relativeThickness(),KDChart::Legend::removeDiagram(), KDChart::Legend::removeDiagrams(), KDChart::Chart::replace-CoordinatePlane(), KDChart::Legend::replaceDiagram(), KDChart::AbstractCoordinatePlane::replace-Diagram(), KDChart::Widget::replaceHeaderFooter(), KDChart::Chart::replaceHeaderFooter(),KDChart::Widget::replaceLegend(), KDChart::Chart::replaceLegend(), KDChart::Widget::resetData(),KDChart::Legend::resetTexts(), KDChart::CartesianAxis::resetTitleTextAttributes(), KDChart::Polar-CoordinatePlane::resizeEvent(), KDChart::Chart::resizeEvent(), KDChart::PolarDiagram::rotate-CircularLabels(), KDChart::Legend::setAlignment(), KDChart::AbstractDiagram::setAllowOverlapping-DataValueTexts(), KDChart::ThreeDBarAttributes::setAngle(), KDChart::AbstractDiagram::setAnti-Aliasing(), KDChart::AbstractDiagram::setAttributesModel(), KDChart::AbstractDiagram::setAttributes-ModelRootIndex(), KDChart::CartesianCoordinatePlane::setAxesCalcModes(), KDChart::Cartesian-CoordinatePlane::setAxesCalcModeX(), KDChart::CartesianCoordinatePlane::setAxesCalcModeY(),

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.3 KDChartAbstractAreaBase.cpp File Reference 711

KDChart::AbstractAreaBase::setBackgroundAttributes(), KDChart::BarDiagram::setBarAttributes(),KDChart::Legend::setBrush(), KDChart::Legend::setBrushesFromDiagram(), KDChart::Legend::set-Color(), KDChart::AbstractDiagram::setCoordinatePlane(), KDChart::AbstractDiagram::set-DataBoundariesDirty(), KDChart::Widget::setDataset(), KDChart::AbstractDiagram::setDataset-Dimension(), KDChart::AbstractDiagram::setDataValueAttributes(), KDChart::AbstractThree-DAttributes::setDepth(), KDChart::AbstractThreeDAttributes::setEnabled(), KDChart::PieAttributes::set-Explode(), KDChart::PieAttributes::setExplodeFactor(), KDChart::AbstractAreaBase::setFrame-Attributes(), KDChart::CartesianAxis::setGeometry(), KDChart::AbstractCoordinatePlane::set-Geometry(), KDChart::AbstractCoordinatePlane::setGlobalGridAttributes(), KDChart::Chart::set-GlobalLeading(), KDChart::Widget::setGlobalLeadingBottom(), KDChart::Chart::setGlobal-LeadingBottom(), KDChart::Widget::setGlobalLeadingLeft(), KDChart::Chart::setGlobalLeading-Left(), KDChart::Widget::setGlobalLeadingRight(), KDChart::Chart::setGlobalLeadingRight(),KDChart::Widget::setGlobalLeadingTop(), KDChart::Chart::setGlobalLeadingTop(), KDChart::Abstract-PieDiagram::setGranularity(), KDChart::PolarCoordinatePlane::setGridAttributes(), KDChart::Cartesian-CoordinatePlane::setGridAttributes(), KDChart::CartesianCoordinatePlane::setHorizontalRange(),KDChart::CartesianCoordinatePlane::setIsometricScaling(), KDChart::AbstractAxis::setLabels(),KDChart::LineDiagram::setLineAttributes(), KDChart::ThreeDLineAttributes::setLineXRotation(),KDChart::ThreeDLineAttributes::setLineYRotation(), KDChart::Legend::setMarkerAttributes(),KDChart::AbstractDiagram::setModel(), KDChart::Legend::setNeedRebuild(), KDChart::Legend::set-Orientation(), KDChart::AbstractCoordinatePlane::setParent(), KDChart::Legend::setPen(),KDChart::AbstractDiagram::setPercentMode(), KDChart::AbstractPieDiagram::setPieAttributes(),KDChart::Legend::setPosition(), KDChart::HeaderFooter::setPosition(), KDChart::CartesianAxis::set-Position(), KDChart::Legend::setReferenceArea(), KDChart::AbstractCoordinatePlane::setReference-CoordinatePlane(), KDChart::AbstractCartesianDiagram::setReferenceDiagram(), KDChart::Ring-Diagram::setRelativeThickness(), KDChart::AbstractDiagram::setRootIndex(), KDChart::Polar-Diagram::setRotateCircularLabels(), KDChart::AbstractAxis::setShortLabels(), KDChart::Polar-Diagram::setShowDelimitersAtPosition(), KDChart::PolarDiagram::setShowLabelsAtPosition(),KDChart::Legend::setShowLines(), KDChart::Legend::setSpacing(), KDChart::AbstractPieDiagram::set-StartPosition(), KDChart::Legend::setText(), KDChart::Legend::setTextAttributes(), KDChart::Abstract-Axis::setTextAttributes(), KDChart::BarDiagram::setThreeDBarAttributes(), KDChart::Line-Diagram::setThreeDLineAttributes(), KDChart::AbstractPieDiagram::setThreeDPieAttributes(),KDChart::Legend::setTitleText(), KDChart::CartesianAxis::setTitleText(), KDChart::Legend::set-TitleTextAttributes(), KDChart::CartesianAxis::setTitleTextAttributes(), KDChart::LineDiagram::set-Type(), KDChart::HeaderFooter::setType(), KDChart::BarDiagram::setType(), KDChart::Three-DPieAttributes::setUseShadowColors(), KDChart::ThreeDBarAttributes::setUseShadowColors(),KDChart::CartesianCoordinatePlane::setVerticalRange(), KDChart::PolarDiagram::setZeroDegree-Position(), KDChart::PolarCoordinatePlane::setZoomCenter(), KDChart::CartesianCoordinate-Plane::setZoomCenter(), KDChart::PolarCoordinatePlane::setZoomFactorX(), KDChart::Cartesian-CoordinatePlane::setZoomFactorX(), KDChart::PolarCoordinatePlane::setZoomFactorY(),KDChart::CartesianCoordinatePlane::setZoomFactorY(), KDChart::AbstractAxis::shortLabels(),KDChart::PolarDiagram::showDelimitersAtPosition(), KDChart::PolarDiagram::showLabelsAt-Position(), KDChart::Legend::showLines(), KDChart::Legend::spacing(), KDChart::AbstractPie-Diagram::startPosition(), KDChart::AbstractCartesianDiagram::takeAxis(), KDChart::Chart::take-CoordinatePlane(), KDChart::AbstractCoordinatePlane::takeDiagram(), KDChart::Widget::takeHeader-Footer(), KDChart::Chart::takeHeaderFooter(), KDChart::Widget::takeLegend(), KDChart::Chart::take-Legend(), KDChart::Legend::text(), KDChart::Legend::textAttributes(), KDChart::AbstractAxis::text-Attributes(), KDChart::ThreeDBarAttributes::ThreeDBarAttributes(), KDChart::BarDiagram::three-DBarAttributes(), KDChart::LineDiagram::threeDItemDepth(), KDChart::BarDiagram::threeDItem-Depth(), KDChart::ThreeDLineAttributes::ThreeDLineAttributes(), KDChart::LineDiagram::three-DLineAttributes(), KDChart::ThreeDPieAttributes::ThreeDPieAttributes(), KDChart::AbstractPie-Diagram::threeDPieAttributes(), KDChart::Legend::titleText(), KDChart::CartesianAxis::titleText(),KDChart::Legend::titleTextAttributes(), KDChart::CartesianAxis::titleTextAttributes(), KDChart::Polar-CoordinatePlane::translate(), KDChart::CartesianCoordinatePlane::translate(), KDChart::Polar-CoordinatePlane::translatePolar(), KDChart::LineDiagram::type(), KDChart::HeaderFooter::type(),

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

712 KD Chart 2 File Documentation

KDChart::BarDiagram::type(), KDChart::AbstractDiagram::update(), KDChart::AbstractDiagram::use-DefaultColors(), KDChart::AbstractDiagram::useRainbowColors(), KDChart::ThreeDPieAttributes::use-ShadowColors(), KDChart::ThreeDBarAttributes::useShadowColors(), KDChart::AbstractDiagram::use-SubduedColors(), KDChart::AbstractThreeDAttributes::validDepth(), KDChart::AbstractDiagram::value-ForCell(), KDChart::LineDiagram::valueForCellTesting(), KDChart::CartesianCoordinatePlane::vertical-Range(), KDChart::PolarDiagram::zeroDegreePosition(), KDChart::PolarCoordinatePlane::zoomCenter(),KDChart::CartesianCoordinatePlane::zoomCenter(), KDChart::PolarCoordinatePlane::zoomFactor-X(), KDChart::CartesianCoordinatePlane::zoomFactorX(), KDChart::PolarCoordinatePlane::zoom-FactorY(), KDChart::CartesianCoordinatePlane::zoomFactorY(), KDChart::AbstractAxis::∼Abstract-Axis(), KDChart::AbstractCartesianDiagram::∼AbstractCartesianDiagram(), and KDChart::Cartesian-Axis::∼CartesianAxis().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.4 KDChartAbstractAreaBase.h File Reference 713

7.4 KDChartAbstractAreaBase.h File Reference

#include <QPointF >

#include <QSizeF >

#include <QRectF >

#include "KDChartGlobal.h"

#include "KDChartLayoutItems.h"

#include "KDChartRelativePosition.h"

Include dependency graph for KDChartAbstractAreaBase.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

714 KD Chart 2 File Documentation

7.5 KDChartAbstractAreaWidget.cpp File Reference

#include "KDChartAbstractAreaWidget.h"

#include "KDChartAbstractAreaWidget_p.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractAreaWidget.cpp:

Defines

• #defined d_func()

7.5.1 Define Documentation

7.5.1.1 #define d d_func()

Definition at line 63 of file KDChartAbstractAreaWidget.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.6 KDChartAbstractAreaWidget.h File Reference 715

7.6 KDChartAbstractAreaWidget.h File Reference

#include <QWidget >

#include <QPaintEvent >

#include <QPainter >

#include <QRect >

#include "KDChartAbstractAreaBase.h"

Include dependency graph for KDChartAbstractAreaWidget.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

716 KD Chart 2 File Documentation

7.7 KDChartAbstractAxis.cpp File Reference

#include "KDChartAbstractAxis.h"

#include "KDChartAbstractAxis_p.h"

#include <QDebug>

#include <KDChartAbstractDiagram.h >

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartEnums.h"

#include "KDChartMeasure.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractAxis.cpp:

Defines

• #defined d_func()

7.7.1 Define Documentation

7.7.1.1 #define d d_func()

Definition at line 39 of file KDChartAbstractAxis.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.8 KDChartAbstractAxis.h File Reference 717

7.8 KDChartAbstractAxis.h File Reference

#include <QRectF >

#include "kdchart_export.h"

#include "KDChartGlobal.h"

#include "KDChartAbstractArea.h"

#include "KDChartTextAttributes.h"

Include dependency graph for KDChartAbstractAxis.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

718 KD Chart 2 File Documentation

7.9 KDChartAbstractCartesianDiagram.cpp File Reference

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartAbstractCartesianDiagram_p.h"

#include "KDChartPaintContext.h"

#include <QDebug>

#include <QPainter >

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractCartesianDiagram.cpp:

Defines

• #defined d_func()

7.9.1 Define Documentation

7.9.1.1 #define d d_func()

Definition at line 51 of file KDChartAbstractCartesianDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.10 KDChartAbstractCartesianDiagram.h File Reference 719

7.10 KDChartAbstractCartesianDiagram.h File Reference

#include "KDChartCartesianCoordinatePlane.h"

#include "KDChartAbstractDiagram.h"

#include "KDChartCartesianAxis.h"

Include dependency graph for KDChartAbstractCartesianDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

720 KD Chart 2 File Documentation

7.11 KDChartAbstractCoordinatePlane.cpp File Reference

#include <QGridLayout >

#include "KDChartChart.h"

#include "KDChartAbstractCoordinatePlane.h"

#include "KDChartAbstractCoordinatePlane_p.h"

#include "KDChartGridAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractCoordinatePlane.cpp:

Defines

• #defined d_func()

7.11.1 Define Documentation

7.11.1.1 #define d d_func()

Definition at line 39 of file KDChartAbstractCoordinatePlane.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.12 KDChartAbstractCoordinatePlane.h File Reference 721

7.12 KDChartAbstractCoordinatePlane.h File Reference

#include <QObject >

#include <QList >

#include "KDChartAbstractArea.h"

#include "KDChartAbstractDiagram.h"

#include "KDChartEnums.h"

Include dependency graph for KDChartAbstractCoordinatePlane.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

722 KD Chart 2 File Documentation

7.13 KDChartAbstractDiagram.cpp File Reference

#include <QPainter >

#include <QDebug>

#include <QAbstractProxyModel >

#include <QStandardItemModel >

#include <QSizeF >

#include "KDChartAbstractCoordinatePlane.h"

#include "KDChartChart.h"

#include "KDChartDataValueAttributes.h"

#include "KDChartTextAttributes.h"

#include "KDChartMarkerAttributes.h"

#include "KDChartAbstractDiagram.h"

#include "KDChartAbstractDiagram_p.h"

#include "KDChartAttributesModel.h"

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartThreeDLineAttributes.h"

#include "KDChartPainterSaver_p.h"

#include <KDABLibFakes >

#include "KDChartAbstractDiagram.moc"

Include dependency graph for KDChartAbstractDiagram.cpp:

Namespaces

• namespaceKDChart

Defines

• #defined d_func()

7.13.1 Define Documentation

7.13.1.1 #define d d_func()

Definition at line 107 of file KDChartAbstractDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.14 KDChartAbstractDiagram.h File Reference 723

7.14 KDChartAbstractDiagram.h File Reference

#include <QList >

#include <QRectF >

#include <QAbstractItemView >

#include "KDChartGlobal.h"

#include "KDChartMarkerAttributes.h"

Include dependency graph for KDChartAbstractDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

724 KD Chart 2 File Documentation

7.15 KDChartAbstractPieDiagram.cpp File Reference

#include <QMap>

#include "KDChartAbstractPieDiagram.h"

#include "KDChartAbstractPieDiagram_p.h"

#include "KDChartAttributesModel.h"

#include "KDChartPieAttributes.h"

#include "KDChartThreeDPieAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractPieDiagram.cpp:

Defines

• #defined d_func()

7.15.1 Define Documentation

7.15.1.1 #define d d_func()

Definition at line 63 of file KDChartAbstractPieDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.16 KDChartAbstractPieDiagram.h File Reference 725

7.16 KDChartAbstractPieDiagram.h File Reference

#include "KDChartAbstractPolarDiagram.h"

Include dependency graph for KDChartAbstractPieDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

726 KD Chart 2 File Documentation

7.17 KDChartAbstractPolarDiagram.cpp File Reference

#include "KDChartAbstractPolarDiagram.h"

#include "KDChartAbstractPolarDiagram_p.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractPolarDiagram.cpp:

Defines

• #defined d_func()

7.17.1 Define Documentation

7.17.1.1 #define d d_func()

Definition at line 44 of file KDChartAbstractPolarDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.18 KDChartAbstractPolarDiagram.h File Reference 727

7.18 KDChartAbstractPolarDiagram.h File Reference

#include "KDChartPolarCoordinatePlane.h"

#include "KDChartAbstractDiagram.h"

Include dependency graph for KDChartAbstractPolarDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

728 KD Chart 2 File Documentation

7.19 KDChartAbstractProxyModel.cpp File Reference

#include "KDChartAbstractProxyModel.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractProxyModel.cpp:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.20 KDChartAbstractProxyModel.h File Reference 729

7.20 KDChartAbstractProxyModel.h File Reference

#include <QAbstractProxyModel >

#include "KDChartGlobal.h"

Include dependency graph for KDChartAbstractProxyModel.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

730 KD Chart 2 File Documentation

7.21 KDChartAbstractThreeDAttributes.cpp File Reference

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartAbstractThreeDAttributes_p.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartAbstractThreeDAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::AbstractThreeDAttributes&a)

7.21.1 Define Documentation

7.21.1.1 #define d d_func()

Definition at line 33 of file KDChartAbstractThreeDAttributes.cpp.

7.21.2 Function Documentation

7.21.2.1 QDebug operator<< (QDebugdbg, constKDChart::AbstractThreeDAttributes & a)

Definition at line 116 of file KDChartAbstractThreeDAttributes.cpp.

117 {118 dbg << "enabled="<<a.isEnabled()119 << "depth="<<a.depth();120 return dbg;121 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.22 KDChartAbstractThreeDAttributes.h File Reference 731

7.22 KDChartAbstractThreeDAttributes.h File Reference

#include <QMetaType >

#include "KDChartGlobal.h"

Include dependency graph for KDChartAbstractThreeDAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::AbstractThreeDAttributes&)

7.22.1 Function Documentation

7.22.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::AbstractThreeDAttributes &)

Definition at line 116 of file KDChartAbstractThreeDAttributes.cpp.

References KDChart::AbstractThreeDAttributes::depth(), and KDChart::AbstractThreeDAttributes::is-Enabled().

117 {118 dbg << "enabled="<<a.isEnabled()119 << "depth="<<a.depth();120 return dbg;121 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

732 KD Chart 2 File Documentation

7.23 KDChartAttributesModel.cpp File Reference

#include <QDebug>

#include <QPen>

#include <QPointer >

#include "KDChartAttributesModel.h"

#include "KDChartPalette.h"

#include "KDChartDataValueAttributes.h"

#include "KDChartGlobal.h"

#include <KDABLibFakes >

Include dependency graph for KDChartAttributesModel.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.24 KDChartAttributesModel.h File Reference 733

7.24 KDChartAttributesModel.h File Reference

#include "KDChartAbstractProxyModel.h"

#include <QMap>

#include <QVariant >

#include "KDChartGlobal.h"

Include dependency graph for KDChartAttributesModel.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

734 KD Chart 2 File Documentation

7.25 KDChartBackgroundAttributes.cpp File Reference

#include "KDChartBackgroundAttributes.h"

#include <QPixmap>

#include <KDABLibFakes >

Include dependency graph for KDChartBackgroundAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::BackgroundAttributes&ba)

7.25.1 Define Documentation

7.25.1.1 #define d d_func()

Definition at line 31 of file KDChartBackgroundAttributes.cpp.

7.25.2 Function Documentation

7.25.2.1 QDebug operator<< (QDebugdbg, constKDChart::BackgroundAttributes & ba)

Definition at line 134 of file KDChartBackgroundAttributes.cpp.

135 {136 dbg << "KDChart::BackgroundAttributes("137 << "visible="<<ba.isVisible()138 << "brush="<<ba.brush()139 << "pixmapmode="<<ba.pixmapMode()140 << "pixmap="<<ba.pixmap()141 << ")";142 return dbg;143 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.26 KDChartBackgroundAttributes.h File Reference 735

7.26 KDChartBackgroundAttributes.h File Reference

#include <QDebug>

#include <QMetaType >

#include <QBrush >

#include "KDChartGlobal.h"

Include dependency graph for KDChartBackgroundAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::BackgroundAttributes&)• Q_DECLARE_TYPEINFO(KDChart::BackgroundAttributes, Q_MOVABLE_TYPE)

7.26.1 Function Documentation

7.26.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::BackgroundAttributes &)

Definition at line 134 of file KDChartBackgroundAttributes.cpp.

References KDChart::BackgroundAttributes::brush(), KDChart::BackgroundAttributes::isVisible(),KDChart::BackgroundAttributes::pixmap(), and KDChart::BackgroundAttributes::pixmapMode().

135 {136 dbg << "KDChart::BackgroundAttributes("137 << "visible="<<ba.isVisible()138 << "brush="<<ba.brush()139 << "pixmapmode="<<ba.pixmapMode()140 << "pixmap="<<ba.pixmap()141 << ")";142 return dbg;143 }

7.26.1.2 Q_DECLARE_TYPEINFO (KDChart::BackgroundAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

736 KD Chart 2 File Documentation

7.27 KDChartBarAttributes.cpp File Reference

#include "KDChartBarAttributes.h"

#include <qglobal.h >

#include <KDABLibFakes >

Include dependency graph for KDChartBarAttributes.cpp:

Defines

• #defined d_func()

7.27.1 Define Documentation

7.27.1.1 #define d d_func()

Definition at line 31 of file KDChartBarAttributes.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.28 KDChartBarAttributes.h File Reference 737

7.28 KDChartBarAttributes.h File Reference

#include <QMetaType >

#include "KDChartGlobal.h"

Include dependency graph for KDChartBarAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

738 KD Chart 2 File Documentation

7.29 KDChartBarDiagram.cpp File Reference

#include <QPainter >

#include <QDebug>

#include "KDChartBarDiagram.h"

#include "KDChartBarDiagram_p.h"

#include "KDChartThreeDBarAttributes.h"

#include "KDChartAttributesModel.h"

#include "KDChartPaintContext.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartAbstractGrid.h"

#include <KDABLibFakes >

Include dependency graph for KDChartBarDiagram.cpp:

Defines

• #defined d_func()

7.29.1 Define Documentation

7.29.1.1 #define d d_func()

Definition at line 50 of file KDChartBarDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.30 KDChartBarDiagram.h File Reference 739

7.30 KDChartBarDiagram.h File Reference

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartBarAttributes.h"

#include "KDChartThreeDBarAttributes.h"

Include dependency graph for KDChartBarDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

740 KD Chart 2 File Documentation

7.31 KDChartCartesianAxis.cpp File Reference

#include <cmath >

#include <QtDebug >

#include <QPainter >

#include <QPen>

#include <QBrush >

#include <QApplication >

#include "KDChartPaintContext.h"

#include "KDChartChart.h"

#include "KDChartCartesianAxis.h"

#include "KDChartCartesianAxis_p.h"

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartLayoutItems.h"

#include <KDABLibFakes >

Include dependency graph for KDChartCartesianAxis.cpp:

Defines

• #defined (d_func())• #defineptr (context→ painter())

7.31.1 Define Documentation

7.31.1.1 #define d (d_func())

Definition at line 47 of file KDChartCartesianAxis.cpp.

7.31.1.2 #define ptr (context→ painter())

Definition at line 192 of file KDChartCartesianAxis.cpp.

Referenced by KDChart::CartesianAxis::paintCtx().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.32 KDChartCartesianAxis.h File Reference 741

7.32 KDChartCartesianAxis.h File Reference

#include <QList >

#include "KDChartAbstractAxis.h"

Include dependency graph for KDChartCartesianAxis.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

742 KD Chart 2 File Documentation

7.33 KDChartCartesianCoordinatePlane.cpp File Reference

#include <QFont >

#include <QList >

#include <QtDebug >

#include <QPainter >

#include <QApplication >

#include "KDChartAbstractDiagram.h"

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartCartesianCoordinatePlane.h"

#include "KDChartCartesianCoordinatePlane_p.h"

#include "CartesianCoordinateTransformation.h"

#include "KDChartGridAttributes.h"

#include "KDChartPaintContext.h"

#include "KDChartPainterSaver_p.h"

#include <KDABLibFakes >

Include dependency graph for KDChartCartesianCoordinatePlane.cpp:

Defines

• #defined d_func()

7.33.1 Define Documentation

7.33.1.1 #define d d_func()

Definition at line 46 of file KDChartCartesianCoordinatePlane.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.34 KDChartCartesianCoordinatePlane.h File Reference 743

7.34 KDChartCartesianCoordinatePlane.h File Reference

#include "KDChartAbstractCoordinatePlane.h"

Include dependency graph for KDChartCartesianCoordinatePlane.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

744 KD Chart 2 File Documentation

7.35 KDChartChart.cpp File Reference

#include <QList >

#include <QtDebug >

#include <QGridLayout >

#include <QLabel >

#include <QHash>

#include <QPainter >

#include <QPaintEvent >

#include <QLayoutItem >

#include <QPushButton >

#include "KDChartChart.h"

#include "KDChartChart_p.h"

#include "KDChartCartesianCoordinatePlane.h"

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartHeaderFooter.h"

#include "KDChartEnums.h"

#include "KDChartLegend.h"

#include "KDChartLayoutItems.h"

#include <KDABLibFakes >

Include dependency graph for KDChartChart.cpp:

Defines

• #defineADD_VBOX_WITH_LEGENDS(row, column, align)

• #defined d_func()

Functions

• QHBoxLayout ∗ findOrCreateHBoxLayoutByObjectName(QLayout ∗parentLayout, const char∗name)

• template<typename T> T ∗ findOrCreateLayoutByObjectName(QLayout ∗parentLayout, constchar∗name)

• QVBoxLayout ∗ findOrCreateVBoxLayoutByObjectName(QLayout ∗parentLayout, const char∗name)

7.35.1 Define Documentation

7.35.1.1 #define ADD_VBOX_WITH_LEGENDS(row, column, align)

Value:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.35 KDChartChart.cpp File Reference 745

{ \QVBoxLayout* innerLayout = new QVBoxLayout(); \for (int i = 0; i < count; ++i) { \

legend = list.at(i); \if( legend->alignment() == ( align ) ) \

innerLayout->addWidget( legend, 0, Qt::AlignLeft ); \} \gridLayout->addLayout( innerLayout, row, column, ( align ) ); \

}

7.35.1.2 #define d d_func()

Definition at line 566 of file KDChartChart.cpp.

7.35.2 Function Documentation

7.35.2.1 QHBoxLayout∗ findOrCreateHBoxLayoutByObjectName (QLayout ∗ parentLayout,const char∗ name) [static]

Definition at line 359 of file KDChartChart.cpp.

360 {361 return findOrCreateLayoutByObjectName<QHBoxLayout>( parentLayout, name );362 }

7.35.2.2 template<typename T> T∗ findOrCreateLayoutByObjectName (QLayout ∗parentLayout, const char∗ name) [static]

Definition at line 344 of file KDChartChart.cpp.

345 {346 T *box = qFindChild<T*>( parentLayout, QString::fromLatin1( name ) );347 if ( !box ) {348 box = new T();349 box->setObjectName( QString::fromLatin1( name ) );350 }351 return box;352 }

7.35.2.3 QVBoxLayout∗ findOrCreateVBoxLayoutByObjectName (QLayout ∗ parentLayout,const char∗ name) [static]

Definition at line 354 of file KDChartChart.cpp.

355 {356 return findOrCreateLayoutByObjectName<QVBoxLayout>( parentLayout, name );357 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

746 KD Chart 2 File Documentation

7.36 KDChartChart.h File Reference

#include <QWidget >

#include "kdchart_export.h"

#include "KDChartGlobal.h"

Include dependency graph for KDChartChart.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.37 KDChartDatasetProxyModel.cpp File Reference 747

7.37 KDChartDatasetProxyModel.cpp File Reference

#include <QtDebug >

#include "KDChartDatasetProxyModel.h"

#include <KDABLibFakes >

Include dependency graph for KDChartDatasetProxyModel.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

748 KD Chart 2 File Documentation

7.38 KDChartDatasetProxyModel.h File Reference

#include <QVector >

#include <QSortFilterProxyModel >

#include "kdchart_export.h"

Include dependency graph for KDChartDatasetProxyModel.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.39 KDChartDatasetSelector.cpp File Reference 749

7.39 KDChartDatasetSelector.cpp File Reference

#include <QtDebug >

#include "KDChartDatasetSelector.h"

#include "ui_KDChartDatasetSelector.h"

#include <KDABLibFakes >

Include dependency graph for KDChartDatasetSelector.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

750 KD Chart 2 File Documentation

7.40 KDChartDatasetSelector.h File Reference

#include <QFrame>

#include "KDChartDatasetProxyModel.h"

Include dependency graph for KDChartDatasetSelector.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart• namespaceUi

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.41 KDChartDataValueAttributes.cpp File Reference 751

7.41 KDChartDataValueAttributes.cpp File Reference

#include <QVariant >

#include <QDebug>

#include "KDChartDataValueAttributes.h"

#include "KDChartRelativePosition.h"

#include <KDChartTextAttributes.h >

#include <KDChartFrameAttributes.h >

#include <KDChartBackgroundAttributes.h >

#include <KDChartMarkerAttributes.h >

#include <KDABLibFakes >

Include dependency graph for KDChartDataValueAttributes.cpp:

Defines

• #defined d_func()• #defineKDCHART_DATA_VALUE_AUTO_DIGITS 4

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::DataValueAttributes&val)

7.41.1 Define Documentation

7.41.1.1 #define d d_func()

Definition at line 42 of file KDChartDataValueAttributes.cpp.

7.41.1.2 #define KDCHART_DATA_VALUE_AUTO_DIGITS 4

Definition at line 39 of file KDChartDataValueAttributes.cpp.

7.41.2 Function Documentation

7.41.2.1 QDebug operator<< (QDebugdbg, constKDChart::DataValueAttributes & val)

Definition at line 269 of file KDChartDataValueAttributes.cpp.

270 {271 dbg << "RelativePosition DataValueAttributes("272 << "visible="<<val.isVisible()273 << "textattributes="<<val.textAttributes()274 << "frameattributes="<<val.frameAttributes()275 << "backgroundattributes="<<val.backgroundAttributes()276 << "decimaldigits="<<val.decimalDigits()277 << "poweroftendivisor="<<val.powerOfTenDivisor()278 << "showinfinite="<<val.showInfinite()

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

752 KD Chart 2 File Documentation

279 << "negativerelativeposition="<<val.negativePosition()280 << "positiverelativeposition="<<val.positivePosition()281 <<")";282 return dbg;283 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.42 KDChartDataValueAttributes.h File Reference 753

7.42 KDChartDataValueAttributes.h File Reference

#include <Qt>

#include <QMetaType >

#include "KDChartGlobal.h"

#include "KDChartEnums.h"

#include "KDChartRelativePosition.h"

Include dependency graph for KDChartDataValueAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::DataValueAttributes&)• Q_DECLARE_TYPEINFO(KDChart::DataValueAttributes, Q_MOVABLE_TYPE)

7.42.1 Function Documentation

7.42.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::DataValueAttributes &)

Definition at line 269 of file KDChartDataValueAttributes.cpp.

References KDChart::DataValueAttributes::backgroundAttributes(), KDChart::DataValue-Attributes::decimalDigits(), KDChart::DataValueAttributes::frameAttributes(), KDChart::DataValue-Attributes::isVisible(), KDChart::DataValueAttributes::negativePosition(), KDChart::DataValue-Attributes::positivePosition(), KDChart::DataValueAttributes::powerOfTenDivisor(), KDChart::Data-ValueAttributes::showInfinite(), and KDChart::DataValueAttributes::textAttributes().

270 {271 dbg << "RelativePosition DataValueAttributes("272 << "visible="<<val.isVisible()273 << "textattributes="<<val.textAttributes()274 << "frameattributes="<<val.frameAttributes()275 << "backgroundattributes="<<val.backgroundAttributes()276 << "decimaldigits="<<val.decimalDigits()277 << "poweroftendivisor="<<val.powerOfTenDivisor()278 << "showinfinite="<<val.showInfinite()279 << "negativerelativeposition="<<val.negativePosition()280 << "positiverelativeposition="<<val.positivePosition()281 <<")";282 return dbg;283 }

7.42.1.2 Q_DECLARE_TYPEINFO (KDChart::DataValueAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

754 KD Chart 2 File Documentation

7.43 KDChartDiagramObserver.cpp File Reference

#include <KDChartAbstractDiagram.h >

#include <KDChartDiagramObserver.h >

#include <KDChartAttributesModel.h >

#include <KDABLibFakes >

#include <QDebug>

Include dependency graph for KDChartDiagramObserver.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.44 KDChartDiagramObserver.h File Reference 755

7.44 KDChartDiagramObserver.h File Reference

#include "KDChartGlobal.h"

#include <QObject >

#include <QPointer >

Include dependency graph for KDChartDiagramObserver.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

756 KD Chart 2 File Documentation

7.45 KDChartEnums.h File Reference

7.45.1 Detailed Description

Definition of global enums.

Definition in fileKDChartEnums.h.

#include "KDChartGlobal.h"

#include <QRectF >

#include <QObject >

#include <QVector >

Include dependency graph for KDChartEnums.h:

This graph shows which files directly or indirectly include this file:

Classes

• classKDChartEnums

Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.46 KDChartFrameAttributes.cpp File Reference 757

7.46 KDChartFrameAttributes.cpp File Reference

#include "KDChartFrameAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartFrameAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::FrameAttributes&fa)

7.46.1 Define Documentation

7.46.1.1 #define d d_func()

Definition at line 30 of file KDChartFrameAttributes.cpp.

7.46.2 Function Documentation

7.46.2.1 QDebug operator<< (QDebugdbg, constKDChart::FrameAttributes & fa)

Definition at line 119 of file KDChartFrameAttributes.cpp.

120 {121 dbg << "KDChart::FrameAttributes("122 << "visible="<<fa.isVisible()123 << "pen="<<fa.pen()124 << "padding="<<fa.padding()125 << ")";126 return dbg;127 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

758 KD Chart 2 File Documentation

7.47 KDChartFrameAttributes.h File Reference

#include <QDebug>

#include <QMetaType >

#include <QPen>

#include "KDChartGlobal.h"

Include dependency graph for KDChartFrameAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::FrameAttributes&)• Q_DECLARE_TYPEINFO(KDChart::FrameAttributes, Q_MOVABLE_TYPE)

7.47.1 Function Documentation

7.47.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::FrameAttributes&)

Definition at line 119 of file KDChartFrameAttributes.cpp.

References KDChart::FrameAttributes::isVisible(), KDChart::FrameAttributes::padding(), andKDChart::FrameAttributes::pen().

120 {121 dbg << "KDChart::FrameAttributes("122 << "visible="<<fa.isVisible()123 << "pen="<<fa.pen()124 << "padding="<<fa.padding()125 << ")";126 return dbg;127 }

7.47.1.2 Q_DECLARE_TYPEINFO (KDChart::FrameAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.48 KDChartGlobal.h File Reference 759

7.48 KDChartGlobal.h File Reference

#include <qglobal.h >

#include "kdchart_export.h"

#include <QtAlgorithms >

#include <algorithm >

#include <Qt>

Include dependency graph for KDChartGlobal.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Defines

• #define KDAB_SET_OBJECT_NAME(x) __kdab__dereference_for_methodcall( x ).setObject-Name( QLatin1String( #x ) )

• #defineKDCHART_DECLARE_DERIVED_DIAGRAM(X, PLANE)• #defineKDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)• #defineKDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET(X)• #defineKDCHART_DECLARE_PRIVATE_BASE_VALUE(X)• #defineKDCHART_DECLARE_PRIVATE_DERIVED(X)• #defineKDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)• #defineKDCHART_DECLARE_PRIVATE_DERIVED_QWIDGET(X) KDCHART_DECLARE_-

PRIVATE_DERIVED_PARENT( X,QWidget∗ )• #defineKDCHART_DECLARE_SWAP_BASE(X)• #defineKDCHART_DECLARE_SWAP_DERIVED(X) void swap( X& other ) { doSwap( other ); }• #defineKDCHART_DECLARE_SWAP_SPECIALISATION(X)• #define KDCHART_DECLARE_SWAP_SPECIALISATION_DERIVED(X) KDCHART_-

DECLARE_SWAP_SPECIALISATION( X )• #defineKDCHART_DERIVED_PRIVATE_FOOTER(CLASS, PARENT)• #defineKDCHART_IMPL_DERIVED_DIAGRAM(CLASS, PARENT, PLANE)• #defineKDCHART_IMPL_DERIVED_PLANE(CLASS, BASEPLANE)

Functions

• template<typename T> T & __kdab__dereference_for_methodcall(T ∗o)• template<typename T> T & __kdab__dereference_for_methodcall(T &o)

7.48.1 Define Documentation

7.48.1.1 #define KDAB_SET_OBJECT_NAME(x) __kdab__dereference_for_methodcall( x).setObjectName( QLatin1String( #x ) )

Definition at line 46 of file KDChartGlobal.h.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

760 KD Chart 2 File Documentation

7.48.1.2 #define KDCHART_DECLARE_DERIVED_DIAGRAM(X, PLANE)

Value:

protected: \class Private; \inline Private * d_func(); \inline const Private * d_func() const; \explicit inline X( Private * ); \explicit inline X( Private *, QWidget *, PLANE * ); \

private: \void init();

Definition at line 172 of file KDChartGlobal.h.

7.48.1.3 #define KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)

Value:

protected: \class Private; \Private * d_func() { return _d; } \const Private * d_func() const { return _d; } \explicit inline X( Private * ); \

private: \void init(); \Private * _d;

Definition at line 116 of file KDChartGlobal.h.

7.48.1.4 #define KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET(X)

Value:

protected: \class Private; \Private * d_func() { return _d; } \const Private * d_func() const { return _d; } \explicit inline X( Private *, QWidget* ); \

private: \void init(); \Private * _d;

Definition at line 139 of file KDChartGlobal.h.

7.48.1.5 #define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)

Value:

public: \inline void swap( X & other ) { qSwap( _d, other._d ); } \

protected: \class Private; \Private * d_func() { return _d; } \const Private * d_func() const { return _d; } \

private: \void init(); \Private * _d;

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.48 KDChartGlobal.h File Reference 761

Definition at line 93 of file KDChartGlobal.h.

7.48.1.6 #define KDCHART_DECLARE_PRIVATE_DERIVED(X)

Value:

protected: \class Private; \inline Private * d_func(); \inline const Private * d_func() const; \explicit inline X( Private * ); \

private: \void init();

Definition at line 59 of file KDChartGlobal.h.

7.48.1.7 #define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)

Value:

protected: \class Private; \inline Private * d_func(); \inline const Private * d_func() const; \explicit inline X( Private *, ParentType ); \

private: \void init();

Definition at line 80 of file KDChartGlobal.h.

7.48.1.8 #define KDCHART_DECLARE_PRIVATE_DERIVED_QWIDGET(X)KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( X, QWidget∗ )

Definition at line 90 of file KDChartGlobal.h.

7.48.1.9 #define KDCHART_DECLARE_SWAP_BASE(X)

Value:

protected: \void doSwap( X& other ) \{ qSwap( _d, other._d); }

Definition at line 223 of file KDChartGlobal.h.

7.48.1.10 #define KDCHART_DECLARE_SWAP_DERIVED(X) void swap( X& other ) {doSwap( other ); }

Definition at line 228 of file KDChartGlobal.h.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

762 KD Chart 2 File Documentation

7.48.1.11 #define KDCHART_DECLARE_SWAP_SPECIALISATION(X)

Value:

template <> inline void qSwap<X>( X & lhs, X & rhs ) \{ lhs.swap( rhs ); } \namespace std { \

template <> inline void swap<X>( X & lhs, X & rhs ) \{ lhs.swap( rhs ); } \

}

Definition at line 207 of file KDChartGlobal.h.

7.48.1.12 #define KDCHART_DECLARE_SWAP_SPECIALISATION_DERIVED(X)KDCHART_DECLARE_SWAP_SPECIALISATION( X )

Definition at line 220 of file KDChartGlobal.h.

7.48.1.13 #define KDCHART_DERIVED_PRIVATE_FOOTER(CLASS, PARENT)

Value:

inline CLASS::CLASS( Private * p ) \: PARENT( p ) { init(); } \

inline CLASS::Private * CLASS::d_func() \{ return static_cast<Private*>( PARENT::d_func() ); } \inline const CLASS::Private * CLASS::d_func() const \{ return static_cast<const Private*>( PARENT::d_func() ); }

Definition at line 151 of file KDChartGlobal.h.

7.48.1.14 #define KDCHART_IMPL_DERIVED_DIAGRAM(CLASS, PARENT, PLANE)

Value:

inline CLASS::CLASS( Private * p ) \: PARENT( p ) { init(); } \

inline CLASS::CLASS( \Private * p, QWidget* parent, PLANE * plane ) \: PARENT( p, parent, plane ) { init(); } \

inline CLASS::Private * CLASS::d_func() \{ return static_cast<Private *>( PARENT::d_func() ); } \

inline const CLASS::Private * CLASS::d_func() const \{ return static_cast<const Private *>( PARENT::d_func() ); }

Definition at line 183 of file KDChartGlobal.h.

7.48.1.15 #define KDCHART_IMPL_DERIVED_PLANE(CLASS, BASEPLANE)

Value:

inline CLASS::CLASS( Private * p, Chart* parent ) \: BASEPLANE( p, parent ) { init(); } \

inline CLASS::Private * CLASS::d_func() \{ return static_cast<Private *>( BASEPLANE::d_func() ); } \

inline const CLASS::Private * CLASS::d_func() const \{ return static_cast<const Private *>( BASEPLANE::d_func() ); }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.48 KDChartGlobal.h File Reference 763

Definition at line 195 of file KDChartGlobal.h.

7.48.2 Function Documentation

7.48.2.1 template<typename T> T& __kdab__dereference_for_methodcall (T∗ o)

Definition at line 42 of file KDChartGlobal.h.

42 {43 return *o;44 }

7.48.2.2 template<typename T> T& __kdab__dereference_for_methodcall (T &o)

Definition at line 37 of file KDChartGlobal.h.

37 {38 return o;39 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

764 KD Chart 2 File Documentation

7.49 KDChartGridAttributes.cpp File Reference

#include "KDChartGridAttributes.h"

#include <QPen>

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartGridAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::GridAttributes&a)

7.49.1 Define Documentation

7.49.1.1 #define d d_func()

Definition at line 33 of file KDChartGridAttributes.cpp.

7.49.2 Function Documentation

7.49.2.1 QDebug operator<< (QDebugdbg, constKDChart::GridAttributes & a)

Definition at line 260 of file KDChartGridAttributes.cpp.

261 {262 dbg << "KDChart::GridAttributes("263 << "visible="<<a.isGridVisible()264 << "subVisible="<<a.isSubGridVisible()265 // KDChartEnums::GranularitySequence sequence;266 << "stepWidth=" << a.gridStepWidth()267 << "subStepWidth=" << a.gridSubStepWidth()268 << "pen="<<a.gridPen()269 << "subPen="<<a.subGridPen()270 << "zeroPen="<<a.zeroLinePen()271 << ")";272 return dbg;273 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.50 KDChartGridAttributes.h File Reference 765

7.50 KDChartGridAttributes.h File Reference

#include <QMetaType >

#include "KDChartGlobal.h"

#include "KDChartEnums.h"

Include dependency graph for KDChartGridAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::GridAttributes&)• Q_DECLARE_TYPEINFO(KDChart::GridAttributes, Q_MOVABLE_TYPE)

7.50.1 Function Documentation

7.50.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::GridAttributes&)

Definition at line 260 of file KDChartGridAttributes.cpp.

References KDChart::GridAttributes::gridPen(), KDChart::GridAttributes::gridStepWidth(),KDChart::GridAttributes::gridSubStepWidth(), KDChart::GridAttributes::isGridVisible(),KDChart::GridAttributes::isSubGridVisible(), KDChart::GridAttributes::subGridPen(), andKDChart::GridAttributes::zeroLinePen().

261 {262 dbg << "KDChart::GridAttributes("263 << "visible="<<a.isGridVisible()264 << "subVisible="<<a.isSubGridVisible()265 // KDChartEnums::GranularitySequence sequence;266 << "stepWidth=" << a.gridStepWidth()267 << "subStepWidth=" << a.gridSubStepWidth()268 << "pen="<<a.gridPen()269 << "subPen="<<a.subGridPen()270 << "zeroPen="<<a.zeroLinePen()271 << ")";272 return dbg;273 }

7.50.1.2 Q_DECLARE_TYPEINFO (KDChart::GridAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

766 KD Chart 2 File Documentation

7.51 KDChartHeaderFooter.cpp File Reference

#include "KDChartChart.h"

#include "KDChartHeaderFooter.h"

#include "KDChartHeaderFooter_p.h"

#include <KDChartTextAttributes.h >

#include <QFont >

#include <QPainter >

#include <QAbstractTextDocumentLayout >

#include <QTextDocumentFragment >

#include <QTextBlock >

#include <QtDebug >

#include <QLabel >

#include "KDTextDocument.h"

#include <KDABLibFakes >

Include dependency graph for KDChartHeaderFooter.cpp:

Defines

• #defined d_func()

7.51.1 Define Documentation

7.51.1.1 #define d d_func()

Definition at line 53 of file KDChartHeaderFooter.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.52 KDChartHeaderFooter.h File Reference 767

7.52 KDChartHeaderFooter.h File Reference

#include "KDChartTextArea.h"

#include "KDChartPosition.h"

Include dependency graph for KDChartHeaderFooter.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

768 KD Chart 2 File Documentation

7.53 KDChartLayoutItems.cpp File Reference

#include "KDChartLayoutItems.h"

#include "KDTextDocument.h"

#include "KDChartAbstractDiagram.h"

#include "KDChartPaintContext.h"

#include "KDChartPainterSaver_p.h"

#include <QTextCursor >

#include <QTextBlockFormat >

#include <QTextDocumentFragment >

#include <QAbstractTextDocumentLayout >

#include <QLayout >

#include <QPainter >

#include <QDebug>

#include <QCoreApplication >

#include <QApplication >

#include <QStyle >

#include <KDABLibFakes >

#include <math.h >

Include dependency graph for KDChartLayoutItems.cpp:

Defines

• #definePI 3.141592653589793

7.53.1 Define Documentation

7.53.1.1 #define PI 3.141592653589793

Definition at line 46 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextLayoutItem::intersects().

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.54 KDChartLayoutItems.h File Reference 769

7.54 KDChartLayoutItems.h File Reference

#include <QBrush >

#include <QFont >

#include <QFontMetricsF >

#include <QLayout >

#include <QLayoutItem >

#include <QPen>

#include "KDChartTextAttributes.h"

#include "KDChartMarkerAttributes.h"

Include dependency graph for KDChartLayoutItems.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

770 KD Chart 2 File Documentation

7.55 KDChartLegend.cpp File Reference

#include "KDChartLegend.h"

#include "KDChartLegend_p.h"

#include <KDChartTextAttributes.h >

#include <KDChartMarkerAttributes.h >

#include <QFont >

#include <QPainter >

#include <QTextTableCell >

#include <QTextCursor >

#include <QTextCharFormat >

#include <QTextDocumentFragment >

#include <QTimer >

#include <QAbstractTextDocumentLayout >

#include <QtDebug >

#include <QLabel >

#include <KDChartAbstractDiagram.h >

#include "KDTextDocument.h"

#include <KDChartDiagramObserver.h >

#include <QGridLayout >

#include "KDChartLayoutItems.h"

#include <KDABLibFakes >

Include dependency graph for KDChartLegend.cpp:

Defines

• #defined d_func()

7.55.1 Define Documentation

7.55.1.1 #define d d_func()

Definition at line 72 of file KDChartLegend.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.56 KDChartLegend.h File Reference 771

7.56 KDChartLegend.h File Reference

#include "KDChartAbstractAreaWidget.h"

#include "KDChartPosition.h"

#include "KDChartMarkerAttributes.h"

Include dependency graph for KDChartLegend.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

772 KD Chart 2 File Documentation

7.57 KDChartLineAttributes.cpp File Reference

#include "KDChartLineAttributes.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartLineAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::LineAttributes&a)

7.57.1 Define Documentation

7.57.1.1 #define d d_func()

Definition at line 31 of file KDChartLineAttributes.cpp.

7.57.2 Function Documentation

7.57.2.1 QDebug operator<< (QDebugdbg, constKDChart::LineAttributes & a)

Definition at line 123 of file KDChartLineAttributes.cpp.

124 {125 dbg << "KDChart::LineAttributes("126 // MissingValuesPolicy missingValuesPolicy;127 << "bool="<<a.displayArea()128 << "transparency="<<a.transparency()129 << ")";130 return dbg;131132 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.58 KDChartLineAttributes.h File Reference 773

7.58 KDChartLineAttributes.h File Reference

#include <QMetaType >

#include "KDChartGlobal.h"

Include dependency graph for KDChartLineAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::LineAttributes&)• Q_DECLARE_TYPEINFO(KDChart::LineAttributes, Q_MOVABLE_TYPE)

7.58.1 Function Documentation

7.58.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::LineAttributes&)

Definition at line 123 of file KDChartLineAttributes.cpp.

References KDChart::LineAttributes::displayArea(), and KDChart::LineAttributes::transparency().

124 {125 dbg << "KDChart::LineAttributes("126 // MissingValuesPolicy missingValuesPolicy;127 << "bool="<<a.displayArea()128 << "transparency="<<a.transparency()129 << ")";130 return dbg;131132 }

7.58.1.2 Q_DECLARE_TYPEINFO (KDChart::LineAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

774 KD Chart 2 File Documentation

7.59 KDChartLineDiagram.cpp File Reference

#include <QDebug>

#include <QPainter >

#include <QString >

#include <QPen>

#include <QVector >

#include "KDChartLineDiagram.h"

#include "KDChartLineDiagram_p.h"

#include "KDChartPaintContext.h"

#include "KDChartPalette.h"

#include "KDChartTextAttributes.h"

#include "KDChartThreeDLineAttributes.h"

#include "KDChartAttributesModel.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartAbstractGrid.h"

#include "KDChartDataValueAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartLineDiagram.cpp:

Defines

• #defined d_func()

7.59.1 Define Documentation

7.59.1.1 #define d d_func()

Definition at line 56 of file KDChartLineDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.60 KDChartLineDiagram.h File Reference 775

7.60 KDChartLineDiagram.h File Reference

#include "KDChartAbstractCartesianDiagram.h"

#include "KDChartLineAttributes.h"

Include dependency graph for KDChartLineDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

776 KD Chart 2 File Documentation

7.61 KDChartMarkerAttributes.cpp File Reference

#include "KDChartMarkerAttributes.h"

#include <QColor >

#include <QMap>

#include <QPen>

#include <QSizeF >

#include <QDebug>

#include <qglobal.h >

#include <KDABLibFakes >

Include dependency graph for KDChartMarkerAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constMarkerAttributes&ma)

7.61.1 Define Documentation

7.61.1.1 #define d d_func()

Definition at line 85 of file KDChartMarkerAttributes.cpp.

7.61.2 Function Documentation

7.61.2.1 QDebug operator<< (QDebugdbg, constMarkerAttributes & ma)

Definition at line 162 of file KDChartMarkerAttributes.cpp.

References KDChart::MarkerAttributes::isVisible(), KDChart::MarkerAttributes::markerColor(),KDChart::MarkerAttributes::markerStyle(), KDChart::MarkerAttributes::markerStylesMap(), andKDChart::MarkerAttributes::pen().

162 {163 return dbg << "KDChart::MarkerAttributes("164 << "visible=" << ma.isVisible()165 << "markerStylesMap=" << ma.markerStylesMap()166 << "markerStyle=" << ma.markerStyle()167 << "markerColor=" << ma.markerColor()168 << "pen=" << ma.pen()169 << ")";170 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.62 KDChartMarkerAttributes.h File Reference 777

7.62 KDChartMarkerAttributes.h File Reference

#include <QMetaType >

#include "KDChartGlobal.h"

Include dependency graph for KDChartMarkerAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::MarkerAttributes&)• Q_DECLARE_TYPEINFO(KDChart::MarkerAttributes, Q_MOVABLE_TYPE)

7.62.1 Function Documentation

7.62.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::MarkerAttributes &)

7.62.1.2 Q_DECLARE_TYPEINFO (KDChart::MarkerAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

778 KD Chart 2 File Documentation

7.63 KDChartMeasure.cpp File Reference

#include <QWidget >

#include "KDChartMeasure.h"

#include <QtXml/QDomDocumentFragment >

#include <KDChartAbstractArea.h >

#include <KDChartTextAttributes.h >

#include <KDChartFrameAttributes.h >

#include <KDChartBackgroundAttributes.h >

#include <KDABLibFakes >

Include dependency graph for KDChartMeasure.cpp:

Namespaces

• namespaceKDChart

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::Measure&m)

7.63.1 Function Documentation

7.63.1.1 QDebug operator<< (QDebugdbg, constKDChart::Measure & m)

Definition at line 158 of file KDChartMeasure.cpp.

159 {160 dbg << "KDChart::Measure("161 << "value="<<m.value()162 << "calculationmode="<<m.calculationMode()163 << "referencearea="<<m.referenceArea()164 << "referenceorientation="<<m.referenceOrientation()165 << ")";166 return dbg;167 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.64 KDChartMeasure.h File Reference 779

7.64 KDChartMeasure.h File Reference

#include <QDebug>

#include <Qt>

#include "KDChartGlobal.h"

#include "KDChartEnums.h"

Include dependency graph for KDChartMeasure.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::Measure&)

7.64.1 Function Documentation

7.64.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::Measure &)

Definition at line 158 of file KDChartMeasure.cpp.

References KDChart::Measure::calculationMode(), KDChart::Measure::referenceArea(),KDChart::Measure::referenceOrientation(), and KDChart::Measure::value().

159 {160 dbg << "KDChart::Measure("161 << "value="<<m.value()162 << "calculationmode="<<m.calculationMode()163 << "referencearea="<<m.referenceArea()164 << "referenceorientation="<<m.referenceOrientation()165 << ")";166 return dbg;167 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

780 KD Chart 2 File Documentation

7.65 KDChartPaintContext.cpp File Reference

#include <QRectF >

#include <QPainter >

#include "KDChartPaintContext.h"

#include "KDChartAbstractCoordinatePlane.h"

#include <KDABLibFakes >

Include dependency graph for KDChartPaintContext.cpp:

Defines

• #defined (d_func())

7.65.1 Define Documentation

7.65.1.1 #define d (d_func())

Definition at line 36 of file KDChartPaintContext.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.66 KDChartPaintContext.h File Reference 781

7.66 KDChartPaintContext.h File Reference

#include <QRectF >

#include "KDChartGlobal.h"

Include dependency graph for KDChartPaintContext.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

782 KD Chart 2 File Documentation

7.67 KDChartPalette.cpp File Reference

#include "KDChartPalette.h"

#include <QBrush >

#include <QVector >

#include <KDABLibFakes >

Include dependency graph for KDChartPalette.cpp:

Defines

• #defined d_func()

Functions

• PalettemakeDefaultPalette()• PalettemakeRainbowPalette()• PalettemakeSubduedPalette()

7.67.1 Define Documentation

7.67.1.1 #define d d_func()

Definition at line 103 of file KDChartPalette.cpp.

7.67.2 Function Documentation

7.67.2.1 PalettemakeDefaultPalette () [static]

Definition at line 40 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush().

40 {41 Palette p;4243 p.addBrush( Qt::red );44 p.addBrush( Qt::green );45 p.addBrush( Qt::blue );46 p.addBrush( Qt::cyan );47 p.addBrush( Qt::magenta );48 p.addBrush( Qt::yellow );49 p.addBrush( Qt::darkRed );50 p.addBrush( Qt::darkGreen );51 p.addBrush( Qt::darkBlue );52 p.addBrush( Qt::darkCyan );53 p.addBrush( Qt::darkMagenta );54 p.addBrush( Qt::darkYellow );5556 return p;57 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.67 KDChartPalette.cpp File Reference 783

7.67.2.2 PalettemakeRainbowPalette () [static]

Definition at line 84 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush(), and KDChart::Palette::getBrush().

84 {85 Palette p;8687 p.addBrush( QColor(255, 0,196) );88 p.addBrush( QColor(255, 0, 96) );89 p.addBrush( QColor(255, 128,64) );90 p.addBrush( Qt::yellow );91 p.addBrush( Qt::green );92 p.addBrush( Qt::cyan );93 p.addBrush( QColor( 96, 96,255) );94 p.addBrush( QColor(160, 0,255) );95 for( int i = 8 ; i < 16 ; ++i )96 p.addBrush( p.getBrush(i-8).color().light(), i );9798 return p;99 }

7.67.2.3 PalettemakeSubduedPalette () [static]

Definition at line 59 of file KDChartPalette.cpp.

References KDChart::Palette::addBrush().

59 {60 Palette p;6162 p.addBrush( QColor( 0xe0,0x7f,0x70 ) );63 p.addBrush( QColor( 0xe2,0xa5,0x6f ) );64 p.addBrush( QColor( 0xe0,0xc9,0x70 ) );65 p.addBrush( QColor( 0xd1,0xe0,0x70 ) );66 p.addBrush( QColor( 0xac,0xe0,0x70 ) );67 p.addBrush( QColor( 0x86,0xe0,0x70 ) );68 p.addBrush( QColor( 0x70,0xe0,0x7f ) );69 p.addBrush( QColor( 0x70,0xe0,0xa4 ) );70 p.addBrush( QColor( 0x70,0xe0,0xc9 ) );71 p.addBrush( QColor( 0x70,0xd1,0xe0 ) );72 p.addBrush( QColor( 0x70,0xac,0xe0 ) );73 p.addBrush( QColor( 0x70,0x86,0xe0 ) );74 p.addBrush( QColor( 0x7f,0x70,0xe0 ) );75 p.addBrush( QColor( 0xa4,0x70,0xe0 ) );76 p.addBrush( QColor( 0xc9,0x70,0xe0 ) );77 p.addBrush( QColor( 0xe0,0x70,0xd1 ) );78 p.addBrush( QColor( 0xe0,0x70,0xac ) );79 p.addBrush( QColor( 0xe0,0x70,0x86 ) );8081 return p;82 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

784 KD Chart 2 File Documentation

7.68 KDChartPalette.h File Reference

#include <QObject >

#include <QBrush >

#include "KDChartGlobal.h"

Include dependency graph for KDChartPalette.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.69 KDChartPieAttributes.cpp File Reference 785

7.69 KDChartPieAttributes.cpp File Reference

#include "KDChartPieAttributes.h"

#include "KDChartPieAttributes_p.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartPieAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::PieAttributes&a)

7.69.1 Define Documentation

7.69.1.1 #define d d_func()

Definition at line 33 of file KDChartPieAttributes.cpp.

7.69.2 Function Documentation

7.69.2.1 QDebug operator<< (QDebugdbg, constKDChart::PieAttributes & a)

Definition at line 106 of file KDChartPieAttributes.cpp.

107 {108 dbg << "KDChart::PieAttributes(";109 dbg << "explodeFactor="<< a.explodeFactor() << ")";110 return dbg;111 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

786 KD Chart 2 File Documentation

7.70 KDChartPieAttributes.h File Reference

#include <QMetaType >

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartGlobal.h"

Include dependency graph for KDChartPieAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::PieAttributes&)• Q_DECLARE_TYPEINFO(KDChart::PieAttributes, Q_MOVABLE_TYPE)

7.70.1 Function Documentation

7.70.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::PieAttributes &)

Definition at line 106 of file KDChartPieAttributes.cpp.

References KDChart::PieAttributes::explodeFactor().

107 {108 dbg << "KDChart::PieAttributes(";109 dbg << "explodeFactor="<< a.explodeFactor() << ")";110 return dbg;111 }

7.70.1.2 Q_DECLARE_TYPEINFO (KDChart::PieAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.71 KDChartPieDiagram.cpp File Reference 787

7.71 KDChartPieDiagram.cpp File Reference

#include <QDebug>

#include <QPainter >

#include <QStack >

#include "KDChartAttributesModel.h"

#include "KDChartPaintContext.h"

#include "KDChartPieDiagram.h"

#include "KDChartPieDiagram_p.h"

#include "KDChartPieAttributes.h"

#include "KDChartThreeDPieAttributes.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartDataValueAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartPieDiagram.cpp:

Defines

• #defined d_func()

Functions

• QRectFbuildReferenceRect(constPolarCoordinatePlane∗plane)

7.71.1 Define Documentation

7.71.1.1 #define d d_func()

Definition at line 50 of file KDChartPieDiagram.cpp.

7.71.2 Function Documentation

7.71.2.1 QRectF buildReferenceRect (constPolarCoordinatePlane∗ plane) [static]

Definition at line 113 of file KDChartPieDiagram.cpp.

References KDChart::PolarCoordinatePlane::translate().

Referenced by KDChart::PieDiagram::paint().

114 {115 QRectF contentsRect;116 //qDebug() << "..........................................";117 QPointF referencePointAtTop = plane->translate( QPointF( 1, 0 ) );118 QPointF temp = plane->translate( QPointF( 0, 0 ) ) - referencePointAtTop;119 const double offset = temp.y();120 referencePointAtTop.setX( referencePointAtTop.x() - offset );

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

788 KD Chart 2 File Documentation

121 contentsRect.setTopLeft( referencePointAtTop );122 contentsRect.setBottomRight( referencePointAtTop + QPointF( 2*offset, 2*offset) );123 //qDebug() << contentsRect;124 return contentsRect;125 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.72 KDChartPieDiagram.h File Reference 789

7.72 KDChartPieDiagram.h File Reference

#include "KDChartAbstractPieDiagram.h"

Include dependency graph for KDChartPieDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

790 KD Chart 2 File Documentation

7.73 KDChartPolarCoordinatePlane.cpp File Reference

#include <math.h >

#include <QFont >

#include <QList >

#include <QtDebug >

#include <QPainter >

#include "KDChartChart.h"

#include "KDChartPaintContext.h"

#include "KDChartAbstractDiagram.h"

#include "KDChartAbstractPolarDiagram.h"

#include "KDChartPolarCoordinatePlane.h"

#include "KDChartPolarCoordinatePlane_p.h"

#include "KDChartPainterSaver_p.h"

#include <KDABLibFakes >

Include dependency graph for KDChartPolarCoordinatePlane.cpp:

Defines

• #defined d_func()

7.73.1 Define Documentation

7.73.1.1 #define d d_func()

Definition at line 45 of file KDChartPolarCoordinatePlane.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.74 KDChartPolarCoordinatePlane.h File Reference 791

7.74 KDChartPolarCoordinatePlane.h File Reference

#include "KDChartAbstractCoordinatePlane.h"

Include dependency graph for KDChartPolarCoordinatePlane.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

792 KD Chart 2 File Documentation

7.75 KDChartPolarDiagram.cpp File Reference

#include <QPainter >

#include "KDChartAttributesModel.h"

#include "KDChartPaintContext.h"

#include "KDChartPolarDiagram.h"

#include "KDChartPolarDiagram_p.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartDataValueAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartPolarDiagram.cpp:

Defines

• #defined d_func()

7.75.1 Define Documentation

7.75.1.1 #define d d_func()

Definition at line 47 of file KDChartPolarDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.76 KDChartPolarDiagram.h File Reference 793

7.76 KDChartPolarDiagram.h File Reference

#include "KDChartPosition.h"

#include "KDChartAbstractPolarDiagram.h"

Include dependency graph for KDChartPolarDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

794 KD Chart 2 File Documentation

7.77 KDChartPosition.cpp File Reference

#include <KDChartPosition.h >

#include <KDChartEnums.h >

#include <QString >

#include <QStringList >

#include <QList >

#include <QByteArray >

#include <KDABLibFakes >

#include <cassert >

Include dependency graph for KDChartPosition.cpp:

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::Position&p)

Variables

• int maxPositionValue= 9

• PositionstaticPositionCenter= Position( KDChartEnums::PositionCenter )

• PositionstaticPositionEast= Position( KDChartEnums::PositionEast )

• const char∗ staticPositionNames[ ]

• PositionstaticPositionNorth= Position( KDChartEnums::PositionNorth )

• PositionstaticPositionNorthEast= Position( KDChartEnums::PositionNorthEast )

• PositionstaticPositionNorthWest= Position( KDChartEnums::PositionNorthWest )

• PositionstaticPositionSouth= Position( KDChartEnums::PositionSouth )

• PositionstaticPositionSouthEast= Position( KDChartEnums::PositionSouthEast )

• PositionstaticPositionSouthWest= Position( KDChartEnums::PositionSouthWest )

• PositionstaticPositionUnknown= Position( KDChartEnums::PositionUnknown )

• PositionstaticPositionWest= Position( KDChartEnums::PositionWest )

7.77.1 Function Documentation

7.77.1.1 QDebug operator<< (QDebugdbg, constKDChart::Position & p)

Definition at line 247 of file KDChartPosition.cpp.

248 {249 dbg << "KDChart::Position("250 << p.name() << ")";251 return dbg;252 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.77 KDChartPosition.cpp File Reference 795

7.77.2 Variable Documentation

7.77.2.1 intmaxPositionValue= 9 [static]

Definition at line 78 of file KDChartPosition.cpp.

Referenced by KDChart::Position::fromName(), KDChart::Position::names(), andKDChart::Position::printableNames().

7.77.2.2 PositionstaticPositionCenter= Position( KDChartEnums::PositionCenter ) [static]

Definition at line 68 of file KDChartPosition.cpp.

7.77.2.3 PositionstaticPositionEast= Position( KDChartEnums::PositionEast ) [static]

Definition at line 72 of file KDChartPosition.cpp.

7.77.2.4 const char∗ staticPositionNames[ ] [static]

Initial value:

{QT_TRANSLATE_NOOP("Position","Unknown Position"),QT_TRANSLATE_NOOP("Position","Center"),QT_TRANSLATE_NOOP("Position","NorthWest"),QT_TRANSLATE_NOOP("Position","North"),QT_TRANSLATE_NOOP("Position","NorthEast"),QT_TRANSLATE_NOOP("Position","East"),QT_TRANSLATE_NOOP("Position","SouthEast"),QT_TRANSLATE_NOOP("Position","South"),QT_TRANSLATE_NOOP("Position","SouthWest"),

}

Definition at line 49 of file KDChartPosition.cpp.

Referenced by KDChart::Position::fromName(), KDChart::Position::name(), KDChart::Position::names(),and KDChart::Position::printableName().

7.77.2.5 PositionstaticPositionNorth = Position( KDChartEnums::PositionNorth ) [static]

Definition at line 70 of file KDChartPosition.cpp.

7.77.2.6 Position staticPositionNorthEast= Position( KDChartEnums::PositionNorthEast )[static]

Definition at line 71 of file KDChartPosition.cpp.

7.77.2.7 Position staticPositionNorthWest= Position( KDChartEnums::PositionNorthWest )[static]

Definition at line 69 of file KDChartPosition.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

796 KD Chart 2 File Documentation

7.77.2.8 PositionstaticPositionSouth= Position( KDChartEnums::PositionSouth ) [static]

Definition at line 74 of file KDChartPosition.cpp.

7.77.2.9 Position staticPositionSouthEast= Position( KDChartEnums::PositionSouthEast )[static]

Definition at line 73 of file KDChartPosition.cpp.

7.77.2.10 Position staticPositionSouthWest= Position( KDChartEnums::PositionSouthWest )[static]

Definition at line 75 of file KDChartPosition.cpp.

7.77.2.11 Position staticPositionUnknown= Position( KDChartEnums::PositionUnknown )[static]

Definition at line 67 of file KDChartPosition.cpp.

7.77.2.12 PositionstaticPositionWest= Position( KDChartEnums::PositionWest ) [static]

Definition at line 76 of file KDChartPosition.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.78 KDChartPosition.h File Reference 797

7.78 KDChartPosition.h File Reference

#include <QDebug>

#include <Qt>

#include <QMetaType >

#include <QCoreApplication >

#include "KDChartGlobal.h"

#include "KDChartEnums.h"

Include dependency graph for KDChartPosition.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::Position&)• Q_DECLARE_TYPEINFO(KDChart::Position, Q_MOVABLE_TYPE)

7.78.1 Function Documentation

7.78.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::Position &)

Definition at line 247 of file KDChartPosition.cpp.

References KDChart::Position::name().

248 {249 dbg << "KDChart::Position("250 << p.name() << ")";251 return dbg;252 }

7.78.1.2 Q_DECLARE_TYPEINFO (KDChart::Position , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

798 KD Chart 2 File Documentation

7.79 KDChartRelativePosition.cpp File Reference

#include "KDChartRelativePosition.h"

#include "KDChartEnums.h"

#include "KDChartMeasure.h"

#include "KDChartPosition.h"

#include <KDABLibFakes >

Include dependency graph for KDChartRelativePosition.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::RelativePosition&rp)

7.79.1 Define Documentation

7.79.1.1 #define d d_func()

Definition at line 84 of file KDChartRelativePosition.cpp.

7.79.2 Function Documentation

7.79.2.1 QDebug operator<< (QDebugdbg, constKDChart::RelativePosition & rp)

Definition at line 148 of file KDChartRelativePosition.cpp.

149 {150 dbg << "KDChart::RelativePosition("151 << "referencearea="<<rp.referenceArea()152 << "referenceposition="<<rp.referencePosition()153 << "alignment="<<rp.alignment()154 << "horizontalpadding="<<rp.horizontalPadding()155 << "verticalpadding="<<rp.verticalPadding()156 << "rotation="<<rp.rotation()157 << ")";158 return dbg;159 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.80 KDChartRelativePosition.h File Reference 799

7.80 KDChartRelativePosition.h File Reference

#include <QDebug>

#include <QMetaType >

#include <Qt>

#include "KDChartGlobal.h"

Include dependency graph for KDChartRelativePosition.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::RelativePosition&)• Q_DECLARE_TYPEINFO(KDChart::RelativePosition, Q_MOVABLE_TYPE)

7.80.1 Function Documentation

7.80.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::RelativePosition&)

Definition at line 148 of file KDChartRelativePosition.cpp.

References KDChart::RelativePosition::alignment(), KDChart::RelativePosition::horizontalPadding(),KDChart::RelativePosition::referenceArea(), KDChart::RelativePosition::referencePosition(),KDChart::RelativePosition::rotation(), and KDChart::RelativePosition::verticalPadding().

149 {150 dbg << "KDChart::RelativePosition("151 << "referencearea="<<rp.referenceArea()152 << "referenceposition="<<rp.referencePosition()153 << "alignment="<<rp.alignment()154 << "horizontalpadding="<<rp.horizontalPadding()155 << "verticalpadding="<<rp.verticalPadding()156 << "rotation="<<rp.rotation()157 << ")";158 return dbg;159 }

7.80.1.2 Q_DECLARE_TYPEINFO (KDChart::RelativePosition, Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

800 KD Chart 2 File Documentation

7.81 KDChartRingDiagram.cpp File Reference

#include <QPainter >

#include "KDChartAttributesModel.h"

#include "KDChartPaintContext.h"

#include "KDChartRingDiagram.h"

#include "KDChartRingDiagram_p.h"

#include "KDChartPainterSaver_p.h"

#include "KDChartPieAttributes.h"

#include "KDChartThreeDPieAttributes.h"

#include "KDChartDataValueAttributes.h"

#include <KDABLibFakes >

Include dependency graph for KDChartRingDiagram.cpp:

Defines

• #defined d_func()

7.81.1 Define Documentation

7.81.1.1 #define d d_func()

Definition at line 48 of file KDChartRingDiagram.cpp.

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.82 KDChartRingDiagram.h File Reference 801

7.82 KDChartRingDiagram.h File Reference

#include "KDChartAbstractPieDiagram.h"

Include dependency graph for KDChartRingDiagram.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

802 KD Chart 2 File Documentation

7.83 KDChartTextArea.cpp File Reference

#include "KDChartTextArea.h"

#include "KDChartTextArea_p.h"

#include <qglobal.h >

#include <QPainter >

#include <QRect >

#include <KDABLibFakes >

Include dependency graph for KDChartTextArea.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.84 KDChartTextArea.h File Reference 803

7.84 KDChartTextArea.h File Reference

#include <QObject >

#include "KDChartGlobal.h"

#include "KDChartAbstractAreaBase.h"

#include "KDChartLayoutItems.h"

Include dependency graph for KDChartTextArea.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

804 KD Chart 2 File Documentation

7.85 KDChartTextAttributes.cpp File Reference

#include "KDChartTextAttributes.h"

#include <QFont >

#include <QPen>

#include <qglobal.h >

#include <QApplication >

#include <KDABLibFakes >

Include dependency graph for KDChartTextAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::TextAttributes&ta)

7.85.1 Define Documentation

7.85.1.1 #define d d_func()

Definition at line 34 of file KDChartTextAttributes.cpp.

7.85.2 Function Documentation

7.85.2.1 QDebug operator<< (QDebugdbg, constKDChart::TextAttributes & ta)

Definition at line 192 of file KDChartTextAttributes.cpp.

193 {194 dbg << "KDChart::TextAttributes("195 << "visible="<<ta.isVisible()196 << "font="<<ta.font().toString() /* What? No QDebug for QFont? */197 << "fontsize="<<ta.fontSize()198 << "minimalfontsize="<<ta.minimalFontSize()199 << "autorotate="<<ta.autoRotate()200 << "autoshrink="<<ta.autoShrink()201 << "rotation="<<ta.rotation()202 << "pen="<<ta.pen()203 << ")";204 return dbg;205 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.86 KDChartTextAttributes.h File Reference 805

7.86 KDChartTextAttributes.h File Reference

#include <QDebug>

#include <QMetaType >

#include "KDChartGlobal.h"

#include "KDChartMeasure.h"

Include dependency graph for KDChartTextAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::TextAttributes&)• Q_DECLARE_TYPEINFO(KDChart::TextAttributes, Q_MOVABLE_TYPE)

7.86.1 Function Documentation

7.86.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::TextAttributes&)

Definition at line 192 of file KDChartTextAttributes.cpp.

References KDChart::TextAttributes::autoRotate(), KDChart::TextAttributes::autoShrink(),KDChart::TextAttributes::font(), KDChart::TextAttributes::fontSize(), KDChart::TextAttributes::is-Visible(), KDChart::TextAttributes::minimalFontSize(), KDChart::TextAttributes::pen(), andKDChart::TextAttributes::rotation().

193 {194 dbg << "KDChart::TextAttributes("195 << "visible="<<ta.isVisible()196 << "font="<<ta.font().toString() /* What? No QDebug for QFont? */197 << "fontsize="<<ta.fontSize()198 << "minimalfontsize="<<ta.minimalFontSize()199 << "autorotate="<<ta.autoRotate()200 << "autoshrink="<<ta.autoShrink()201 << "rotation="<<ta.rotation()202 << "pen="<<ta.pen()203 << ")";204 return dbg;205 }

7.86.1.2 Q_DECLARE_TYPEINFO (KDChart::TextAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

806 KD Chart 2 File Documentation

7.87 KDChartThreeDBarAttributes.cpp File Reference

#include "KDChartThreeDBarAttributes.h"

#include "KDChartThreeDBarAttributes_p.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartThreeDBarAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::ThreeDBarAttributes&a)

7.87.1 Define Documentation

7.87.1.1 #define d d_func()

Definition at line 33 of file KDChartThreeDBarAttributes.cpp.

7.87.2 Function Documentation

7.87.2.1 QDebug operator<< (QDebugdbg, constKDChart::ThreeDBarAttributes & a)

Definition at line 105 of file KDChartThreeDBarAttributes.cpp.

106 {107 dbg << "KDChart::ThreeDBarAttributes(";108 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );109 dbg << "useShadowColors="<< a.useShadowColors()110 << "angle=" << a.angle() << ")";111 return dbg;112 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.88 KDChartThreeDBarAttributes.h File Reference 807

7.88 KDChartThreeDBarAttributes.h File Reference

#include <QMetaType >

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartGlobal.h"

Include dependency graph for KDChartThreeDBarAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::ThreeDBarAttributes&)• Q_DECLARE_TYPEINFO(KDChart::ThreeDBarAttributes, Q_MOVABLE_TYPE)

7.88.1 Function Documentation

7.88.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::ThreeDBarAttributes &)

Definition at line 105 of file KDChartThreeDBarAttributes.cpp.

References KDChart::ThreeDBarAttributes::angle(), and KDChart::ThreeDBarAttributes::useShadow-Colors().

106 {107 dbg << "KDChart::ThreeDBarAttributes(";108 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );109 dbg << "useShadowColors="<< a.useShadowColors()110 << "angle=" << a.angle() << ")";111 return dbg;112 }

7.88.1.2 Q_DECLARE_TYPEINFO (KDChart::ThreeDBarAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

808 KD Chart 2 File Documentation

7.89 KDChartThreeDLineAttributes.cpp File Reference

#include "KDChartThreeDLineAttributes.h"

#include "KDChartThreeDLineAttributes_p.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartThreeDLineAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::ThreeDLineAttributes&a)

7.89.1 Define Documentation

7.89.1.1 #define d d_func()

Definition at line 33 of file KDChartThreeDLineAttributes.cpp.

7.89.2 Function Documentation

7.89.2.1 QDebug operator<< (QDebugdbg, constKDChart::ThreeDLineAttributes & a)

Definition at line 106 of file KDChartThreeDLineAttributes.cpp.

107 {108 dbg << "KDChart::ThreeDLineAttributes(";109 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );110 dbg << " lineXRotation="<< a.lineXRotation()111 << " lineYRotation="<< a.lineYRotation()112 << ")";113 return dbg;114 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.90 KDChartThreeDLineAttributes.h File Reference 809

7.90 KDChartThreeDLineAttributes.h File Reference

#include <QMetaType >

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartGlobal.h"

Include dependency graph for KDChartThreeDLineAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::ThreeDLineAttributes&)• Q_DECLARE_TYPEINFO(KDChart::ThreeDLineAttributes, Q_MOVABLE_TYPE)

7.90.1 Function Documentation

7.90.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::ThreeDLineAttributes &)

Definition at line 106 of file KDChartThreeDLineAttributes.cpp.

References KDChart::ThreeDLineAttributes::lineXRotation(), and KDChart::ThreeDLineAttributes::line-YRotation().

107 {108 dbg << "KDChart::ThreeDLineAttributes(";109 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );110 dbg << " lineXRotation="<< a.lineXRotation()111 << " lineYRotation="<< a.lineYRotation()112 << ")";113 return dbg;114 }

7.90.1.2 Q_DECLARE_TYPEINFO (KDChart::ThreeDLineAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

810 KD Chart 2 File Documentation

7.91 KDChartThreeDPieAttributes.cpp File Reference

#include "KDChartThreeDPieAttributes.h"

#include "KDChartThreeDPieAttributes_p.h"

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartThreeDPieAttributes.cpp:

Defines

• #defined d_func()

Functions

• QDebugoperator<< (QDebug dbg, constKDChart::ThreeDPieAttributes&a)

7.91.1 Define Documentation

7.91.1.1 #define d d_func()

Definition at line 33 of file KDChartThreeDPieAttributes.cpp.

7.91.2 Function Documentation

7.91.2.1 QDebug operator<< (QDebugdbg, constKDChart::ThreeDPieAttributes & a)

Definition at line 92 of file KDChartThreeDPieAttributes.cpp.

References KDChart::ThreeDPieAttributes::useShadowColors().

93 {94 dbg << "KDChart::ThreeDPieAttributes(";95 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );96 dbg << "useShadowColors="<< a.useShadowColors() << ")";97 return dbg;98 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.92 KDChartThreeDPieAttributes.h File Reference 811

7.92 KDChartThreeDPieAttributes.h File Reference

#include <QMetaType >

#include "KDChartAbstractThreeDAttributes.h"

#include "KDChartGlobal.h"

Include dependency graph for KDChartThreeDPieAttributes.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Functions

• KDCHART_EXPORT QDebugoperator<< (QDebug, constKDChart::ThreeDPieAttributes&)• Q_DECLARE_TYPEINFO(KDChart::ThreeDPieAttributes, Q_MOVABLE_TYPE)

7.92.1 Function Documentation

7.92.1.1 KDCHART_EXPORT QDebug operator<< (QDebug, constKDChart::ThreeDPieAttributes &)

Definition at line 92 of file KDChartThreeDPieAttributes.cpp.

References KDChart::ThreeDPieAttributes::useShadowColors().

93 {94 dbg << "KDChart::ThreeDPieAttributes(";95 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );96 dbg << "useShadowColors="<< a.useShadowColors() << ")";97 return dbg;98 }

7.92.1.2 Q_DECLARE_TYPEINFO (KDChart::ThreeDPieAttributes , Q_MOVABLE_TYPE)

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

812 KD Chart 2 File Documentation

7.93 KDChartWidget.cpp File Reference

#include <KDChartWidget.h >

#include <KDChartWidget_p.h >

#include <KDChartAbstractDiagram.h >

#include <KDChartBarDiagram.h >

#include <KDChartCartesianCoordinatePlane.h >

#include <KDChartChart.h >

#include <KDChartAbstractCoordinatePlane.h >

#include <KDChartLineDiagram.h >

#include <KDChartPieDiagram.h >

#include <KDChartPolarCoordinatePlane.h >

#include <KDChartPolarDiagram.h >

#include <KDChartRingDiagram.h >

#include <KDChartLegend.h >

#include <QDebug>

#include <KDABLibFakes >

Include dependency graph for KDChartWidget.cpp:

Defines

• #defined d_func()• #defineSET_SUB_TYPE(DIAGRAM, SUBTYPE)• #defineTEST_SUB_TYPE(DIAGRAM, INTERNALSUBTYPE, SUBTYPE)

Functions

• bool isCartesian(KDChart::Widget::ChartTypetype)• bool isPolar(KDChart::Widget::ChartTypetype)

7.93.1 Define Documentation

7.93.1.1 #define d d_func()

Definition at line 49 of file KDChartWidget.cpp.

7.93.1.2 #define SET_SUB_TYPE(DIAGRAM, SUBTYPE)

Value:

{ \if( DIAGRAM ) \

DIAGRAM->setType( SUBTYPE ); \}

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.93 KDChartWidget.cpp File Reference 813

Referenced by KDChart::Widget::setSubType().

7.93.1.3 #define TEST_SUB_TYPE(DIAGRAM, INTERNALSUBTYPE, SUBTYPE)

Value:

{ \if( DIAGRAM && DIAGRAM->type() == INTERNALSUBTYPE ) \

retVal = SUBTYPE; \}

7.93.2 Function Documentation

7.93.2.1 bool isCartesian (KDChart::Widget::ChartType type) [static]

Definition at line 360 of file KDChartWidget.cpp.

361 {362 return (type == KDChart::Widget::Bar || type == KDChart::Widget::Line);363 }

7.93.2.2 bool isPolar (KDChart::Widget::ChartType type) [static]

Definition at line 365 of file KDChartWidget.cpp.

366 {367 return (type == KDChart::Widget::Pie368 || type == KDChart::Widget::Ring369 || type == KDChart::Widget::Polar );370 }

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

814 KD Chart 2 File Documentation

7.94 KDChartWidget.h File Reference

#include "KDChartGlobal.h"

#include <QWidget >

#include "KDChartEnums.h"

#include "KDChartHeaderFooter.h"

Include dependency graph for KDChartWidget.h:

This graph shows which files directly or indirectly include this file:

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.95 KDChartZoomParameters.h File Reference 815

7.95 KDChartZoomParameters.h File Reference

Namespaces

• namespaceKDChart

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

816 KD Chart 2 File Documentation

7.96 KDTextDocument.cpp File Reference

#include "KDTextDocument.h"

#include <QRect >

#include <QAbstractTextDocumentLayout >

#include <QtDebug >

#include <QTextBlock >

#include <KDABLibFakes >

Include dependency graph for KDTextDocument.cpp:

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

7.97 KDTextDocument.h File Reference 817

7.97 KDTextDocument.h File Reference

#include <QTextDocument >

#include <QSize >

Include dependency graph for KDTextDocument.h:

This graph shows which files directly or indirectly include this file:

Classes

• classKDTextDocument

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

Index

∼AbstractAreaKDChart::AbstractArea,30

∼AbstractAreaBaseKDChart::AbstractAreaBase,38

∼AbstractAreaWidgetKDChart::AbstractAreaWidget,44

∼AbstractAxisKDChart::AbstractAxis,52

∼AbstractCartesianDiagramKDChart::AbstractCartesianDiagram,67

∼AbstractCoordinatePlaneKDChart::AbstractCoordinatePlane,96

∼AbstractDiagramKDChart::AbstractDiagram,118

∼AbstractPieDiagramKDChart::AbstractPieDiagram,148

∼AbstractPolarDiagramKDChart::AbstractPolarDiagram,180

∼AbstractThreeDAttributesKDChart::AbstractThreeDAttributes,206

∼AttributesModelKDChart::AttributesModel,210

∼BackgroundAttributesKDChart::BackgroundAttributes,220

∼BarAttributesKDChart::BarAttributes,222

∼BarDiagramKDChart::BarDiagram,230

∼CartesianAxisKDChart::CartesianAxis,268

∼CartesianCoordinatePlaneKDChart::CartesianCoordinatePlane,298

∼ChartKDChart::Chart,328

∼DataValueAttributesKDChart::DataValueAttributes,356

∼DiagramObserverKDChart::DiagramObserver,362

∼FrameAttributesKDChart::FrameAttributes,364

∼GridAttributesKDChart::GridAttributes,366

∼HeaderFooterKDChart::HeaderFooter,371

∼KDTextDocument

KDTextDocument,400∼Legend

KDChart::Legend,405∼LineAttributes

KDChart::LineAttributes,429∼LineDiagram

KDChart::LineDiagram,436∼MarkerAttributes

KDChart::MarkerAttributes,474∼Palette

KDChart::Palette,489∼PieAttributes

KDChart::PieAttributes,491∼PieDiagram

KDChart::PieDiagram,498∼PolarCoordinatePlane

KDChart::PolarCoordinatePlane,533∼PolarDiagram

KDChart::PolarDiagram,561∼RelativePosition

KDChart::RelativePosition,606∼RingDiagram

KDChart::RingDiagram,612∼TextArea

KDChart::TextArea,644∼TextAttributes

KDChart::TextAttributes,657∼ThreeDBarAttributes

KDChart::ThreeDBarAttributes,670∼ThreeDLineAttributes

KDChart::ThreeDLineAttributes,675∼ThreeDPieAttributes

KDChart::ThreeDPieAttributes,680∼Widget

KDChart::Widget,692__kdab__dereference_for_methodcall

KDChartGlobal.h,763__pad0__

KDChart::AbstractArea,36KDChart::AbstractAreaWidget,49KDChart::AbstractAxis,62KDChart::AbstractCartesianDiagram,92KDChart::AbstractCoordinatePlane,113KDChart::AbstractDiagram,140KDChart::AbstractPieDiagram,175

INDEX 819

KDChart::AbstractPolarDiagram,203KDChart::AttributesModel,218KDChart::BarDiagram,264KDChart::CartesianAxis,293KDChart::CartesianCoordinatePlane,325KDChart::Chart,341KDChart::DatasetSelectorWidget,354KDChart::DiagramObserver,363KDChart::HeaderFooter,384KDChart::Legend,427KDChart::LineDiagram,472KDChart::Palette,490KDChart::PieDiagram,529KDChart::PolarCoordinatePlane,555KDChart::PolarDiagram,588KDChart::RingDiagram,641KDChart::TextArea,655

AbstractAreaKDChart::AbstractArea,30

AbstractAreaBaseKDChart::AbstractAreaBase,38

AbstractAreaWidgetKDChart::AbstractAreaWidget,44

AbstractAxisKDChart::AbstractAxis,52

AbstractCartesianDiagramKDChart::AbstractCartesianDiagram,67

AbstractCoordinatePlaneKDChart::AbstractCoordinatePlane,96

AbstractDiagramKDChart::AbstractDiagram,118

AbstractDiagramListKDChart,18

AbstractLayoutItemKDChart::AbstractLayoutItem,141

AbstractPieDiagramKDChart::AbstractPieDiagram,148

AbstractPolarDiagramKDChart::AbstractPolarDiagram,180

AbstractProxyModelKDChart::AbstractProxyModel,204

AbstractThreeDAttributesKDChart::AbstractThreeDAttributes,206

ADD_VBOX_WITH_LEGENDSKDChartChart.cpp,744

addAxisKDChart::AbstractCartesianDiagram,67KDChart::BarDiagram,230KDChart::LineDiagram,436

addBrushKDChart::Palette,489

addCoordinatePlaneKDChart::Chart,328

addDiagramKDChart::AbstractCoordinatePlane,96KDChart::CartesianCoordinatePlane,298KDChart::Legend,405KDChart::PolarCoordinatePlane,534

addHeaderFooterKDChart::Chart,329KDChart::Widget,693

addLegendKDChart::Chart,329KDChart::Widget,693

alignmentKDChart::Legend,406KDChart::RelativePosition,606

alignToReferencePointKDChart::AbstractArea,31KDChart::AbstractAreaBase,39KDChart::AbstractAreaWidget,44KDChart::AbstractAxis,52KDChart::AbstractCoordinatePlane,97KDChart::CartesianAxis,269KDChart::CartesianCoordinatePlane,298KDChart::HeaderFooter,371KDChart::Legend,406KDChart::PolarCoordinatePlane,534KDChart::TextArea,644

allHeadersFootersKDChart::Widget,694

allLegendsKDChart::Widget,694

allowOverlappingDataValueTextsKDChart::AbstractCartesianDiagram,68KDChart::AbstractDiagram,118KDChart::AbstractPieDiagram,148KDChart::AbstractPolarDiagram,180KDChart::BarDiagram,231KDChart::LineDiagram,437KDChart::PieDiagram,499KDChart::PolarDiagram,561KDChart::RingDiagram,613

angleKDChart::ThreeDBarAttributes,671

angleUnitKDChart::PolarCoordinatePlane,534

antiAliasingKDChart::AbstractCartesianDiagram,68KDChart::AbstractDiagram,118KDChart::AbstractPieDiagram,149KDChart::AbstractPolarDiagram,180KDChart::BarDiagram,231KDChart::LineDiagram,437KDChart::PieDiagram,499KDChart::PolarDiagram,562KDChart::RingDiagram,613

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

820 INDEX

areaGeometryKDChart::AbstractArea,31KDChart::AbstractAreaBase,39KDChart::AbstractAreaWidget,44KDChart::AbstractAxis,52KDChart::AbstractCoordinatePlane,97KDChart::CartesianAxis,269KDChart::CartesianCoordinatePlane,299KDChart::HeaderFooter,372KDChart::Legend,406KDChart::PolarCoordinatePlane,535KDChart::TextArea,644

attributesKDChartAbstractAreaBase.cpp,709

AttributesModelKDChart::AttributesModel,210

attributesModelKDChart::AbstractCartesianDiagram,68KDChart::AbstractDiagram,119KDChart::AbstractPieDiagram,149KDChart::AbstractPolarDiagram,180KDChart::BarDiagram,231KDChart::LineDiagram,437KDChart::PieDiagram,499KDChart::PolarDiagram,562KDChart::RingDiagram,613

attributesModelRootIndexKDChart::AbstractCartesianDiagram,69KDChart::AbstractDiagram,119KDChart::AbstractPieDiagram,149KDChart::AbstractPolarDiagram,181KDChart::BarDiagram,232KDChart::LineDiagram,438KDChart::PieDiagram,500KDChart::PolarDiagram,562KDChart::RingDiagram,613

autoReferenceAreaKDChart::HeaderFooter,372KDChart::TextArea,644KDChart::TextLayoutItem,663

autoRotateKDChart::TextAttributes,657

autoShrinkKDChart::TextAttributes,657

axesKDChart::AbstractCartesianDiagram,69KDChart::BarDiagram,232KDChart::LineDiagram,438

AxesCalcModeKDChart::AbstractCoordinatePlane,96KDChart::CartesianCoordinatePlane,297KDChart::PolarCoordinatePlane,533

axesCalcModeXKDChart::CartesianCoordinatePlane,299

axesCalcModeYKDChart::CartesianCoordinatePlane,299

BackgroundAttributes,11KDChart::BackgroundAttributes,220

backgroundAttributesKDChart::AbstractArea,31KDChart::AbstractAreaBase,39KDChart::AbstractAreaWidget,44KDChart::AbstractAxis,52KDChart::AbstractCoordinatePlane,97KDChart::CartesianAxis,269KDChart::CartesianCoordinatePlane,299KDChart::DataValueAttributes,356KDChart::HeaderFooter,372KDChart::Legend,406KDChart::PolarCoordinatePlane,535KDChart::TextArea,645

BackgroundPixmapModeKDChart::BackgroundAttributes,219

BackgroundPixmapModeCenteredKDChart::BackgroundAttributes,219

BackgroundPixmapModeNoneKDChart::BackgroundAttributes,219

BackgroundPixmapModeScaledKDChart::BackgroundAttributes,219

BackgroundPixmapModeStretchedKDChart::BackgroundAttributes,219

BarKDChart::Widget,692

BarAttributes,12KDChart::BarAttributes,222

barAttributesKDChart::BarDiagram,232, 233

BarAttributesRoleKDChart,19

BarDiagramKDChart::BarDiagram,230

barDiagramKDChart::Widget,694

barGapFactorKDChart::BarAttributes,222

BarTypeKDChart::BarDiagram,230

BottomKDChart::CartesianAxis,268

bottomKDChart::Widget,702

brushKDChart::AbstractCartesianDiagram,69,

70KDChart::AbstractDiagram,119, 120KDChart::AbstractPieDiagram,150KDChart::AbstractPolarDiagram,181, 182

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 821

KDChart::BackgroundAttributes,220KDChart::BarDiagram,233KDChart::Legend,406KDChart::LineDiagram,438, 439KDChart::PieDiagram,500KDChart::PolarDiagram,563KDChart::RingDiagram,614

buildLegendKDChart::Legend,407

buildReferenceRectKDChartPieDiagram.cpp,787

calcModeKDChart::DataDimension,344

calculateDataBoundariesKDChart::AbstractCartesianDiagram,70KDChart::AbstractDiagram,120KDChart::AbstractPieDiagram,150KDChart::AbstractPolarDiagram,182KDChart::BarDiagram,234KDChart::LineDiagram,439KDChart::PieDiagram,501KDChart::PolarDiagram,563KDChart::RingDiagram,615

calculatedValueKDChart::Measure,482

calculateRawDataBoundingRectKDChart::CartesianCoordinatePlane,300

calculationModeKDChart::Measure,483

CartesianAxisKDChart::CartesianAxis,268

CartesianAxisListKDChart,18

CartesianCoordinatePlaneKDChart::CartesianCoordinatePlane,298

CenterKDChart::Position,596

ChartKDChart::Chart,328

ChartTypeKDChart::Widget,692

checkInvariantsKDChart::AbstractCartesianDiagram,70KDChart::AbstractDiagram,120KDChart::AbstractPieDiagram,151KDChart::AbstractPolarDiagram,182KDChart::BarDiagram,236KDChart::LineDiagram,441KDChart::PieDiagram,501KDChart::PolarDiagram,564KDChart::RingDiagram,615

cloneKDChart::BarDiagram,236

KDChart::HeaderFooter,372KDChart::Legend,409KDChart::LineDiagram,442KDChart::PieDiagram,502KDChart::PolarDiagram,564KDChart::RingDiagram,615

columnConfigKDChart::DatasetSelectorWidget,354

columnCountKDChart::AbstractPieDiagram,151KDChart::AbstractPolarDiagram,183KDChart::AttributesModel,211KDChart::PieDiagram,502KDChart::PolarDiagram,565KDChart::RingDiagram,616

columnToIndexKDChart::AbstractCartesianDiagram,71KDChart::AbstractDiagram,121KDChart::AbstractPieDiagram,151KDChart::AbstractPolarDiagram,183KDChart::BarDiagram,237KDChart::LineDiagram,442KDChart::PieDiagram,502KDChart::PolarDiagram,565KDChart::RingDiagram,616

connectSignalsKDChart::AbstractAxis,53KDChart::CartesianAxis,269

ConstAbstractDiagramListKDChart,18

coordinatePlaneKDChart::AbstractAxis,53KDChart::AbstractCartesianDiagram,71KDChart::AbstractDiagram,121KDChart::AbstractPieDiagram,151KDChart::AbstractPolarDiagram,183KDChart::BarDiagram,237KDChart::CartesianAxis,270KDChart::Chart,330KDChart::LineDiagram,442KDChart::PaintContext,486KDChart::PieDiagram,502KDChart::PolarDiagram,565KDChart::RingDiagram,616KDChart::Widget,694

CoordinatePlaneListKDChart,18

coordinatePlanesKDChart::Chart,330

CoordinateTransformationListKDChart::PolarCoordinatePlane,533

createObserverKDChart::AbstractAxis,53KDChart::CartesianAxis,270

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

822 INDEX

dKDChartAbstractAreaBase.cpp,709KDChartAbstractAreaWidget.cpp,714KDChartAbstractAxis.cpp,716KDChartAbstractCartesianDiagram.cpp,

718KDChartAbstractCoordinatePlane.cpp,720KDChartAbstractDiagram.cpp,722KDChartAbstractPieDiagram.cpp,724KDChartAbstractPolarDiagram.cpp,726KDChartAbstractThreeDAttributes.cpp,

730KDChartBackgroundAttributes.cpp,734KDChartBarAttributes.cpp,736KDChartBarDiagram.cpp,738KDChartCartesianAxis.cpp,740KDChartCartesianCoordinatePlane.cpp,

742KDChartChart.cpp,745KDChartDataValueAttributes.cpp,751KDChartFrameAttributes.cpp,757KDChartGridAttributes.cpp,764KDChartHeaderFooter.cpp,766KDChartLegend.cpp,770KDChartLineAttributes.cpp,772KDChartLineDiagram.cpp,774KDChartMarkerAttributes.cpp,776KDChartPaintContext.cpp,780KDChartPalette.cpp,782KDChartPieAttributes.cpp,785KDChartPieDiagram.cpp,787KDChartPolarCoordinatePlane.cpp,790KDChartPolarDiagram.cpp,792KDChartRelativePosition.cpp,798KDChartRingDiagram.cpp,800KDChartTextAttributes.cpp,804KDChartThreeDBarAttributes.cpp,806KDChartThreeDLineAttributes.cpp,808KDChartThreeDPieAttributes.cpp,810KDChartWidget.cpp,812

dataKDChart::AttributesModel,211, 212KDChart::DatasetProxyModel,346

dataBoundariesKDChart::AbstractCartesianDiagram,71KDChart::AbstractDiagram,121KDChart::AbstractPieDiagram,152KDChart::AbstractPolarDiagram,183KDChart::BarDiagram,237KDChart::LineDiagram,442KDChart::PieDiagram,503KDChart::PolarDiagram,565KDChart::RingDiagram,616

dataChanged

KDChart::AbstractCartesianDiagram,72KDChart::AbstractDiagram,122KDChart::AbstractPieDiagram,152KDChart::AbstractPolarDiagram,184KDChart::BarDiagram,238KDChart::LineDiagram,443KDChart::PieDiagram,503KDChart::PolarDiagram,566KDChart::RingDiagram,617

DataDimensionKDChart::DataDimension,342, 343

DataDimensionsListKDChart,19

dataLabelKDChart::DataValueAttributes,356

datasetBrushesKDChart::AbstractCartesianDiagram,72KDChart::AbstractDiagram,122KDChart::AbstractPieDiagram,153KDChart::AbstractPolarDiagram,184KDChart::BarDiagram,238KDChart::LineDiagram,443KDChart::PieDiagram,503KDChart::PolarDiagram,566KDChart::RingDiagram,617

DatasetBrushRoleKDChart,19

datasetCountKDChart::Legend,410

DatasetDescriptionVectorKDChart,19

datasetDimensionKDChart::AbstractCartesianDiagram,72KDChart::AbstractDiagram,123KDChart::AbstractPieDiagram,153KDChart::AbstractPolarDiagram,185KDChart::BarDiagram,238KDChart::LineDiagram,444KDChart::PieDiagram,504KDChart::PolarDiagram,567KDChart::RingDiagram,618

datasetLabelsKDChart::AbstractCartesianDiagram,73KDChart::AbstractDiagram,123KDChart::AbstractPieDiagram,154KDChart::AbstractPolarDiagram,185KDChart::BarDiagram,239KDChart::LineDiagram,444KDChart::PieDiagram,504KDChart::PolarDiagram,567KDChart::RingDiagram,618

datasetMarkersKDChart::AbstractCartesianDiagram,73KDChart::AbstractDiagram,123

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 823

KDChart::AbstractPieDiagram,154KDChart::AbstractPolarDiagram,186KDChart::BarDiagram,239KDChart::LineDiagram,445KDChart::PieDiagram,505KDChart::PolarDiagram,568KDChart::RingDiagram,619

DatasetPenRoleKDChart,19

datasetPensKDChart::AbstractCartesianDiagram,74KDChart::AbstractDiagram,124KDChart::AbstractPieDiagram,154KDChart::AbstractPolarDiagram,186KDChart::BarDiagram,240KDChart::LineDiagram,445KDChart::PieDiagram,505KDChart::PolarDiagram,568KDChart::RingDiagram,619

DatasetProxyModelKDChart::DatasetProxyModel,346

DatasetSelectorWidgetKDChart::DatasetSelectorWidget,352

DataValueAttributes,13KDChart::DataValueAttributes,356

dataValueAttributesKDChart::AbstractCartesianDiagram,74,

75KDChart::AbstractDiagram,124, 125KDChart::AbstractPieDiagram,155, 156KDChart::AbstractPolarDiagram,186, 187KDChart::BarDiagram,240, 241KDChart::LineDiagram,445, 446KDChart::PieDiagram,506KDChart::PolarDiagram,568, 569KDChart::RingDiagram,619, 620

DataValueLabelAttributesRoleKDChart,19

decimalDigitsKDChart::DataValueAttributes,356

defaultAttributesKDChart::DataValueAttributes,357

defaultAttributesAsVariantKDChart::DataValueAttributes,357

defaultPaletteKDChart::Palette,489

deleteObserverKDChart::AbstractAxis,54KDChart::CartesianAxis,270

depthKDChart::AbstractThreeDAttributes,207KDChart::ThreeDBarAttributes,671KDChart::ThreeDLineAttributes,676KDChart::ThreeDPieAttributes,681

diagramKDChart::AbstractAxis,54KDChart::AbstractCoordinatePlane,97KDChart::CartesianAxis,270KDChart::CartesianCoordinatePlane,300KDChart::DiagramObserver,362KDChart::Legend,410KDChart::PolarCoordinatePlane,535KDChart::Widget,695

diagramAttributesChangedKDChart::DiagramObserver,362

diagramDataChangedKDChart::DiagramObserver,362

DiagramListKDChart,19

DiagramObserverKDChart::DiagramObserver,361

diagramsKDChart::AbstractCoordinatePlane,98KDChart::CartesianCoordinatePlane,301KDChart::Legend,410KDChart::PolarCoordinatePlane,535, 536

displayAreaKDChart::LineAttributes,429

DisplayRolesKDChart,19

distanceKDChart::DataDimension,343

doesIsometricScalingKDChart::CartesianCoordinatePlane,301

doItemsLayoutKDChart::AbstractCartesianDiagram,75KDChart::AbstractDiagram,125KDChart::AbstractPieDiagram,156KDChart::AbstractPolarDiagram,187KDChart::BarDiagram,241KDChart::LineDiagram,446KDChart::PieDiagram,507KDChart::PolarDiagram,569KDChart::RingDiagram,620

drawingAreaKDChart::CartesianCoordinatePlane,302

drawSolidExcessArrowsKDChart::BarAttributes,222

EastKDChart::Position,596

endKDChart::DataDimension,344

ExcludeCenterKDChart::Position,591

expandingDirectionsKDChart::AbstractCoordinatePlane,98KDChart::CartesianAxis,271

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

824 INDEX

KDChart::CartesianCoordinatePlane,302KDChart::HeaderFooter,372KDChart::HorizontalLineLayoutItem,386KDChart::MarkerLayoutItem,477KDChart::PolarCoordinatePlane,536KDChart::TextArea,645KDChart::TextLayoutItem,663KDChart::VerticalLineLayoutItem,685

explodeKDChart::PieAttributes,492

explodeFactorKDChart::PieAttributes,492

filterAcceptsColumnKDChart::DatasetProxyModel,346

filterAcceptsRowKDChart::DatasetProxyModel,347

findOrCreateHBoxLayoutByObjectNameKDChartChart.cpp,745

findOrCreateLayoutByObjectNameKDChartChart.cpp,745

findOrCreateVBoxLayoutByObjectNameKDChartChart.cpp,745

firstHeaderFooterKDChart::Widget,695

fixedBarWidthKDChart::BarAttributes,222

fixedDataValueGapKDChart::BarAttributes,222

fixedValueBlockGapKDChart::BarAttributes,223

fontKDChart::TextAttributes,657

fontSizeKDChart::TextAttributes,657

FooterKDChart::HeaderFooter,371

forceRebuildKDChart::AbstractAreaWidget,44KDChart::Legend,411

FrameAttributes,14KDChart::FrameAttributes,364

frameAttributesKDChart::AbstractArea,31KDChart::AbstractAreaBase,39KDChart::AbstractAreaWidget,45KDChart::AbstractAxis,54KDChart::AbstractCoordinatePlane,99KDChart::CartesianAxis,271KDChart::CartesianCoordinatePlane,302KDChart::DataValueAttributes,357KDChart::HeaderFooter,373KDChart::Legend,411KDChart::PolarCoordinatePlane,536

KDChart::TextArea,645fromName

KDChart::Position,592

geometryKDChart::AbstractAxis,54KDChart::AbstractCoordinatePlane,99KDChart::CartesianAxis,271KDChart::CartesianCoordinatePlane,302KDChart::HeaderFooter,373KDChart::HorizontalLineLayoutItem,386KDChart::MarkerLayoutItem,477KDChart::PolarCoordinatePlane,537KDChart::TextArea,645KDChart::TextLayoutItem,663KDChart::VerticalLineLayoutItem,685

getBrushKDChart::Palette,489

getCellValuesKDChart::LineDiagram,447

getDataDimensionsListKDChart::AbstractCoordinatePlane,99KDChart::CartesianCoordinatePlane,303KDChart::PolarCoordinatePlane,537

globalGridAttributesKDChart::AbstractCoordinatePlane,99KDChart::CartesianCoordinatePlane,304KDChart::PolarCoordinatePlane,537

globalLeadingBottomKDChart::Chart,330KDChart::Widget,695

globalLeadingLeftKDChart::Chart,331KDChart::Widget,695

globalLeadingRightKDChart::Chart,331KDChart::Widget,696

globalLeadingTopKDChart::Chart,331KDChart::Widget,696

granularityKDChart::AbstractPieDiagram,156KDChart::PieDiagram,507KDChart::RingDiagram,621

GranularitySequenceKDChartEnums,392

GranularitySequence_10_20KDChartEnums,392

GranularitySequence_10_50KDChartEnums,392

GranularitySequence_25_50KDChartEnums,392

GranularitySequenceIrregularKDChartEnums,392

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 825

granularitySequenceToStringKDChartEnums,396

GridAttributes,15KDChart::GridAttributes,366

gridAttributesKDChart::CartesianCoordinatePlane,304KDChart::PolarCoordinatePlane,537

gridDimensionsListKDChart::AbstractCoordinatePlane,100KDChart::CartesianCoordinatePlane,304KDChart::PolarCoordinatePlane,538

gridGranularitySequenceKDChart::GridAttributes,366

gridPenKDChart::GridAttributes,366

gridStepWidthKDChart::GridAttributes,366

gridSubStepWidthKDChart::GridAttributes,367

groupGapFactorKDChart::BarAttributes,223

hasAbsoluteFontSizeKDChart::TextAttributes,657

hasDefaultTitleTextAttributesKDChart::CartesianAxis,271

hasOwnGridAttributesKDChart::CartesianCoordinatePlane,305KDChart::PolarCoordinatePlane,539

HeaderKDChart::HeaderFooter,371

headerDataKDChart::AttributesModel,212KDChart::DatasetProxyModel,347

HeaderFooterKDChart::HeaderFooter,371

headerFooterKDChart::Chart,332

HeaderFooterListKDChart,19

headerFootersKDChart::Chart,332

HeaderFooterTypeKDChart::HeaderFooter,371

HorizontalLineLayoutItemKDChart::HorizontalLineLayoutItem,385

horizontalOffsetKDChart::AbstractCartesianDiagram,75KDChart::AbstractDiagram,125KDChart::AbstractPieDiagram,156KDChart::AbstractPolarDiagram,188KDChart::BarDiagram,241KDChart::LineDiagram,447KDChart::PieDiagram,507

KDChart::PolarDiagram,570KDChart::RingDiagram,621

horizontalPaddingKDChart::RelativePosition,606

horizontalRangeKDChart::CartesianCoordinatePlane,306

IncludeCenterKDChart::Position,591

indexKDChart::AbstractProxyModel,204KDChart::AttributesModel,213KDChart::DatasetProxyModel,348

indexAtKDChart::AbstractCartesianDiagram,76KDChart::AbstractDiagram,126KDChart::AbstractPieDiagram,157KDChart::AbstractPolarDiagram,188KDChart::BarDiagram,241KDChart::LineDiagram,447KDChart::PieDiagram,507KDChart::PolarDiagram,570KDChart::RingDiagram,621

initFromKDChart::AttributesModel,213

innerRectKDChart::AbstractArea,31KDChart::AbstractAreaBase,39KDChart::AbstractAreaWidget,45KDChart::AbstractAxis,54KDChart::AbstractCoordinatePlane,100KDChart::CartesianAxis,272KDChart::CartesianCoordinatePlane,306KDChart::HeaderFooter,373KDChart::Legend,411KDChart::PolarCoordinatePlane,539KDChart::TextArea,645

intersectsKDChart::HeaderFooter,373, 374KDChart::TextArea,646, 647KDChart::TextLayoutItem,663, 664

isAbscissaKDChart::CartesianAxis,272

isCalculatedKDChart::DataDimension,344

isCartesianKDChartWidget.cpp,813

isCornerKDChart::Position,593

isEastSideKDChart::Position,593

isEmptyKDChart::AbstractCoordinatePlane,101KDChart::CartesianAxis,272

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

826 INDEX

KDChart::CartesianCoordinatePlane,306KDChart::HeaderFooter,374KDChart::HorizontalLineLayoutItem,386KDChart::MarkerLayoutItem,477KDChart::PolarCoordinatePlane,539KDChart::TextArea,647KDChart::TextLayoutItem,664KDChart::VerticalLineLayoutItem,685

isEnabledKDChart::AbstractThreeDAttributes,207KDChart::ThreeDBarAttributes,671KDChart::ThreeDLineAttributes,676KDChart::ThreeDPieAttributes,681

isGridVisibleKDChart::GridAttributes,367

isIndexHiddenKDChart::AbstractCartesianDiagram,76KDChart::AbstractDiagram,126KDChart::AbstractPieDiagram,157KDChart::AbstractPolarDiagram,188KDChart::BarDiagram,242KDChart::LineDiagram,448KDChart::PieDiagram,508KDChart::PolarDiagram,570KDChart::RingDiagram,621

isKnownAttributesRoleKDChart::AttributesModel,214

isNorthSideKDChart::Position,593

isOrdinateKDChart::CartesianAxis,272

isPolarKDChartWidget.cpp,813

isPoleKDChart::Position,593

isSouthSideKDChart::Position,594

isSubGridVisibleKDChart::GridAttributes,367

isValidKDChart::Palette,489

isVisibleKDChart::BackgroundAttributes,220KDChart::DataValueAttributes,357KDChart::FrameAttributes,364KDChart::MarkerAttributes,474KDChart::TextAttributes,657

isWestSideKDChart::Position,594

itemRowLabelsKDChart::AbstractCartesianDiagram,76KDChart::AbstractDiagram,126KDChart::AbstractPieDiagram,157KDChart::AbstractPolarDiagram,188

KDChart::BarDiagram,242KDChart::LineDiagram,448KDChart::PieDiagram,508KDChart::PolarDiagram,570KDChart::RingDiagram,622

KDAB_SET_OBJECT_NAMEKDChartGlobal.h,759

KDChart,16AbstractDiagramList,18BarAttributesRole,19CartesianAxisList,18ConstAbstractDiagramList,18CoordinatePlaneList,18DataDimensionsList,19DatasetBrushRole,19DatasetDescriptionVector,19DatasetPenRole,19DataValueLabelAttributesRole,19DiagramList,19DisplayRoles,19HeaderFooterList,19LegendList,19LineAttributesRole,19PieAttributesRole,20ThreeDAttributesRole,19ThreeDBarAttributesRole,20ThreeDLineAttributesRole,19ThreeDPieAttributesRole,20

KDChart::AbstractArea,29KDChart::AbstractArea

∼AbstractArea,30__pad0__,36AbstractArea,30alignToReferencePoint,31areaGeometry,31backgroundAttributes,31frameAttributes,31innerRect,31mParent,36mParentLayout,37paint,32paintAll, 32paintBackground,33paintCtx,33paintFrame,34paintIntoRect,34positionHasChanged,35removeFromParentLayout,35setBackgroundAttributes,35setFrameAttributes,35setParentLayout,35setParentWidget,36sizeHintChanged,36

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 827

KDChart::AbstractAreaBase,38KDChart::AbstractAreaBase

∼AbstractAreaBase,38AbstractAreaBase,38alignToReferencePoint,39areaGeometry,39backgroundAttributes,39frameAttributes,39innerRect,39paintBackground,40paintFrame,41positionHasChanged,41setBackgroundAttributes,41setFrameAttributes,42

KDChart::AbstractAreaWidget,43KDChart::AbstractAreaWidget

∼AbstractAreaWidget,44__pad0__,49AbstractAreaWidget,44alignToReferencePoint,44areaGeometry,44backgroundAttributes,44forceRebuild,44frameAttributes,45innerRect,45paint,45paintAll, 46paintBackground,46paintEvent,47paintFrame,47paintIntoRect,48positionHasChanged,48setBackgroundAttributes,48setFrameAttributes,49

KDChart::AbstractAxis,50KDChart::AbstractAxis

∼AbstractAxis,52__pad0__,62AbstractAxis,52alignToReferencePoint,52areaGeometry,52backgroundAttributes,52connectSignals,53coordinatePlane,53createObserver,53deleteObserver,54diagram,54frameAttributes,54geometry,54innerRect,54labels,55mParent,62mParentLayout,62observedBy,55

paint,55paintAll, 55paintBackground,56paintCtx,57paintFrame,57paintIntoRect,58positionHasChanged,58Q_SLOTS,62removeFromParentLayout,58setBackgroundAttributes,59setFrameAttributes,59setGeometry,59setLabels,59setParentLayout,60setParentWidget,60setShortLabels,60setTextAttributes,60shortLabels,61sizeHintChanged,61textAttributes,61

KDChart::AbstractCartesianDiagram,63KDChart::AbstractCartesianDiagram

∼AbstractCartesianDiagram,67__pad0__,92AbstractCartesianDiagram,67addAxis,67allowOverlappingDataValueTexts,68antiAliasing,68attributesModel,68attributesModelRootIndex,69axes,69brush,69, 70calculateDataBoundaries,70checkInvariants,70columnToIndex,71coordinatePlane,71dataBoundaries,71dataChanged,72datasetBrushes,72datasetDimension,72datasetLabels,73datasetMarkers,73datasetPens,74dataValueAttributes,74, 75doItemsLayout,75horizontalOffset,75indexAt,76isIndexHidden,76itemRowLabels,76layoutPlanes,76modelsChanged,77moveCursor,77numberOfAbscissaSegments,77numberOfOrdinateSegments,77

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

828 INDEX

paint,77paintDataValueText,77paintDataValueTexts,78paintMarker,78, 79paintMarkers,81pen,81, 82percentMode,82propertiesChanged,82referenceDiagram,82referenceDiagramOffset,83resize,83scrollTo,83setAllowOverlappingDataValueTexts,83setAntiAliasing,84setAttributesModel,84setAttributesModelRootIndex,85setBrush,85setCoordinatePlane,85setDataBoundariesDirty,86setDatasetDimension,86setDataValueAttributes,87setModel,88setPen,88setPercentMode,89setReferenceDiagram,89setRootIndex,89setSelection,89takeAxis,89threeDItemDepth,90update,90useDefaultColors,90useRainbowColors,90useSubduedColors,91valueForCell,91verticalOffset,91visualRect,91visualRegionForSelection,92

KDChart::AbstractCoordinatePlane,93Linear,96Logarithmic,96

KDChart::AbstractCoordinatePlane∼AbstractCoordinatePlane,96__pad0__,113AbstractCoordinatePlane,96addDiagram,96alignToReferencePoint,97areaGeometry,97AxesCalcMode,96backgroundAttributes,97diagram,97diagrams,98expandingDirections,98frameAttributes,99geometry,99

getDataDimensionsList,99globalGridAttributes,99gridDimensionsList,100innerRect,100isEmpty,101layoutDiagrams,101layoutPlanes,101maximumSize,101minimumSize,102minimumSizeHint,102mParent,113mParentLayout,113needLayoutPlanes,102needRelayout,102needUpdate,102paint,102paintAll, 103paintBackground,103paintCtx,104paintFrame,104paintIntoRect,105parent,105positionHasChanged,106propertiesChanged,106Q_SLOTS,113referenceCoordinatePlane,106relayout,106removeFromParentLayout,107replaceDiagram,107setBackgroundAttributes,108setFrameAttributes,108setGeometry,108setGlobalGridAttributes,108setParent,109setParentLayout,109setParentWidget,109setReferenceCoordinatePlane,110setZoomCenter,110setZoomFactorX,110setZoomFactorY,110sizeHint,111sizeHintChanged,111sizePolicy,111takeDiagram,111translate,112zoomCenter,112zoomFactorX,112zoomFactorY,113

KDChart::AbstractDiagram,114KDChart::AbstractDiagram

∼AbstractDiagram,118__pad0__,140AbstractDiagram,118allowOverlappingDataValueTexts,118

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 829

antiAliasing,118attributesModel,119attributesModelRootIndex,119brush,119, 120calculateDataBoundaries,120checkInvariants,120columnToIndex,121coordinatePlane,121dataBoundaries,121dataChanged,122datasetBrushes,122datasetDimension,123datasetLabels,123datasetMarkers,123datasetPens,124dataValueAttributes,124, 125doItemsLayout,125horizontalOffset,125indexAt,126isIndexHidden,126itemRowLabels,126modelsChanged,126moveCursor,126paint,127paintDataValueText,127paintDataValueTexts,128paintMarker,128paintMarkers,130pen,131percentMode,131propertiesChanged,132resize,132scrollTo,132setAllowOverlappingDataValueTexts,132setAntiAliasing,132setAttributesModel,133setAttributesModelRootIndex,133setBrush,134setCoordinatePlane,134setDataBoundariesDirty,135setDatasetDimension,135setDataValueAttributes,135, 136setModel,136setPen,137setPercentMode,137setRootIndex,138setSelection,138update,138useDefaultColors,138useRainbowColors,138useSubduedColors,139valueForCell,139verticalOffset,139visualRect,139

visualRegionForSelection,140KDChart::AbstractLayoutItem,141KDChart::AbstractLayoutItem

AbstractLayoutItem,141mParent,143mParentLayout,143paint,141paintCtx,141removeFromParentLayout,142setParentLayout,142setParentWidget,142sizeHintChanged,142

KDChart::AbstractPieDiagram,144KDChart::AbstractPieDiagram

∼AbstractPieDiagram,148__pad0__,175AbstractPieDiagram,148allowOverlappingDataValueTexts,148antiAliasing,149attributesModel,149attributesModelRootIndex,149brush,150calculateDataBoundaries,150checkInvariants,151columnCount,151columnToIndex,151coordinatePlane,151dataBoundaries,152dataChanged,152datasetBrushes,153datasetDimension,153datasetLabels,154datasetMarkers,154datasetPens,154dataValueAttributes,155, 156doItemsLayout,156granularity,156horizontalOffset,156indexAt,157isIndexHidden,157itemRowLabels,157modelsChanged,157moveCursor,157numberOfGridRings,158numberOfValuesPerDataset,158paint,158paintDataValueText,158paintDataValueTexts,159paintMarker,159, 160paintMarkers,162pen,162percentMode,163pieAttributes,163polarCoordinatePlane,164

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

830 INDEX

propertiesChanged,164resize,164scrollTo,164setAllowOverlappingDataValueTexts,164setAntiAliasing,165setAttributesModel,165setAttributesModelRootIndex,166setBrush,166setCoordinatePlane,167setDataBoundariesDirty,167setDatasetDimension,167setDataValueAttributes,168setGranularity,169setModel,169setPen,169, 170setPercentMode,170setPieAttributes,170setRootIndex,171setSelection,171setStartPosition,171setThreeDPieAttributes,171, 172startPosition,172threeDPieAttributes,172, 173update,173useDefaultColors,173useRainbowColors,173useSubduedColors,174valueForCell,174valueTotals,174verticalOffset,174visualRect,174visualRegionForSelection,175

KDChart::AbstractPolarDiagram,176KDChart::AbstractPolarDiagram

∼AbstractPolarDiagram,180__pad0__,203AbstractPolarDiagram,180allowOverlappingDataValueTexts,180antiAliasing,180attributesModel,180attributesModelRootIndex,181brush,181, 182calculateDataBoundaries,182checkInvariants,182columnCount,183columnToIndex,183coordinatePlane,183dataBoundaries,183dataChanged,184datasetBrushes,184datasetDimension,185datasetLabels,185datasetMarkers,186datasetPens,186

dataValueAttributes,186, 187doItemsLayout,187horizontalOffset,188indexAt,188isIndexHidden,188itemRowLabels,188modelsChanged,189moveCursor,189numberOfGridRings,189numberOfValuesPerDataset,189paint,189paintDataValueText,189paintDataValueTexts,190paintMarker,191paintMarkers,193pen,193, 194percentMode,194polarCoordinatePlane,194propertiesChanged,194resize,195scrollTo,195setAllowOverlappingDataValueTexts,195setAntiAliasing,195setAttributesModel,196setAttributesModelRootIndex,196setBrush,196, 197setCoordinatePlane,197setDataBoundariesDirty,198setDatasetDimension,198setDataValueAttributes,198, 199setModel,199setPen,199, 200setPercentMode,200setRootIndex,200setSelection,201update,201useDefaultColors,201useRainbowColors,201useSubduedColors,201valueForCell,202valueTotals,202verticalOffset,202visualRect,202visualRegionForSelection,203

KDChart::AbstractProxyModel,204KDChart::AbstractProxyModel

AbstractProxyModel,204index,204mapFromSource,204mapToSource,205parent,205

KDChart::AbstractThreeDAttributes,206KDChart::AbstractThreeDAttributes

∼AbstractThreeDAttributes,206

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 831

AbstractThreeDAttributes,206depth,207isEnabled,207operator!=,207operator=,207operator==,207setDepth,208setEnabled,208validDepth,208

KDChart::AttributesModel,209PaletteTypeDefault,210PaletteTypeRainbow,210PaletteTypeSubdued,210

KDChart::AttributesModel∼AttributesModel,210__pad0__,218AttributesModel,210columnCount,211data,211, 212headerData,212index,213initFrom,213isKnownAttributesRole,214mapFromSource,214mapToSource,215modelData,215PaletteType,210paletteType,215parent,215rowCount,216setData,216setHeaderData,216setModelData,217setPaletteType,217setSourceModel,217

KDChart::BackgroundAttributes,219BackgroundPixmapModeCentered,219BackgroundPixmapModeNone,219BackgroundPixmapModeScaled,219BackgroundPixmapModeStretched,219

KDChart::BackgroundAttributes∼BackgroundAttributes,220BackgroundAttributes,220BackgroundPixmapMode,219brush,220isVisible,220operator!=,220operator=,220operator==,220pixmap,220pixmapMode,220setBrush,220setPixmap,220setPixmapMode,220

setVisible,220KDChart::BarAttributes,222KDChart::BarAttributes

∼BarAttributes,222BarAttributes,222barGapFactor,222drawSolidExcessArrows,222fixedBarWidth,222fixedDataValueGap,222fixedValueBlockGap,223groupGapFactor,223operator!=,223operator=,223operator==,223setBarGapFactor,223setDrawSolidExcessArrows,223setFixedBarWidth,223setFixedDataValueGap,223setFixedValueBlockGap,223setGroupGapFactor,223setUseFixedBarWidth,223setUseFixedDataValueGap,223setUseFixedValueBlockGap,223useFixedBarWidth,223useFixedDataValueGap,223useFixedValueBlockGap,223

KDChart::BarDiagram,225Normal,230Percent,230Rows,230Stacked,230

KDChart::BarDiagram∼BarDiagram,230__pad0__,264addAxis,230allowOverlappingDataValueTexts,231antiAliasing,231attributesModel,231attributesModelRootIndex,232axes,232barAttributes,232, 233BarDiagram,230BarType,230brush,233calculateDataBoundaries,234checkInvariants,236clone,236columnToIndex,237coordinatePlane,237dataBoundaries,237dataChanged,238datasetBrushes,238datasetDimension,238datasetLabels,239

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

832 INDEX

datasetMarkers,239datasetPens,240dataValueAttributes,240, 241doItemsLayout,241horizontalOffset,241indexAt,241isIndexHidden,242itemRowLabels,242layoutPlanes,242modelsChanged,242moveCursor,243numberOfAbscissaSegments,243numberOfOrdinateSegments,243paint,243paintDataValueText,247paintDataValueTexts,248paintMarker,248paintMarkers,250pen,250, 251percentMode,251propertiesChanged,251referenceDiagram,252referenceDiagramOffset,252resize,252resizeEvent,252scrollTo,252setAllowOverlappingDataValueTexts,253setAntiAliasing,253setAttributesModel,253setAttributesModelRootIndex,254setBarAttributes,254, 255setBrush,255setCoordinatePlane,255setDataBoundariesDirty,256setDatasetDimension,256setDataValueAttributes,257setModel,258setPen,258setPercentMode,259setReferenceDiagram,259setRootIndex,259setSelection,259setThreeDBarAttributes,259, 260setType,260takeAxis,261threeDBarAttributes,261, 262threeDItemDepth,262type,262update,263useDefaultColors,263useRainbowColors,263useSubduedColors,263valueForCell,263verticalOffset,264

visualRect,264visualRegionForSelection,264

KDChart::CartesianAxis,265Bottom,268Left, 268Right,268Top,268

KDChart::CartesianAxis∼CartesianAxis,268__pad0__,293alignToReferencePoint,269areaGeometry,269backgroundAttributes,269CartesianAxis,268connectSignals,269coordinatePlane,270createObserver,270deleteObserver,270diagram,270expandingDirections,271frameAttributes,271geometry,271hasDefaultTitleTextAttributes,271innerRect,272isAbscissa,272isEmpty,272isOrdinate,272labels,273layoutPlanes,273maximumSize,273minimumSize,275mParent,293mParentLayout,293observedBy,275paint,276paintAll, 276paintBackground,277paintCtx,278paintFrame,285paintIntoRect,286Position,268position,286positionHasChanged,286Q_SLOTS,293removeFromParentLayout,287resetTitleTextAttributes,287setBackgroundAttributes,287setFrameAttributes,287setGeometry,288setLabels,288setParentLayout,288setParentWidget,288setPosition,289setShortLabels,289

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 833

setTextAttributes,289setTitleText,290setTitleTextAttributes,290shortLabels,290sizeHint,291sizeHintChanged,291textAttributes,291tickLength,291titleText,292titleTextAttributes,292

KDChart::CartesianCoordinatePlane,294Linear,297Logarithmic,297

KDChart::CartesianCoordinatePlane∼CartesianCoordinatePlane,298__pad0__,325addDiagram,298alignToReferencePoint,298areaGeometry,299AxesCalcMode,297axesCalcModeX,299axesCalcModeY,299backgroundAttributes,299calculateRawDataBoundingRect,300CartesianCoordinatePlane,298diagram,300diagrams,301doesIsometricScaling,301drawingArea,302expandingDirections,302frameAttributes,302geometry,302getDataDimensionsList,303globalGridAttributes,304gridAttributes,304gridDimensionsList,304hasOwnGridAttributes,305horizontalRange,306innerRect,306isEmpty,306layoutDiagrams,306layoutPlanes,308maximumSize,308minimumSize,308minimumSizeHint,309mParent,325mParentLayout,325needLayoutPlanes,309needRelayout,309needUpdate,309paint,309paintAll, 310paintBackground,311paintCtx,312

paintEvent,312paintFrame,312paintIntoRect,313parent,313positionHasChanged,313propertiesChanged,314Q_SLOTS,325referenceCoordinatePlane,314relayout,314removeFromParentLayout,314replaceDiagram,315resetGridAttributes,315setAxesCalcModes,316setAxesCalcModeX,316setAxesCalcModeY,316setBackgroundAttributes,317setFrameAttributes,317setGeometry,317setGlobalGridAttributes,318setGridAttributes,318setHorizontalRange,319setIsometricScaling,319setParent,319setParentLayout,320setParentWidget,320setReferenceCoordinatePlane,320setVerticalRange,320setZoomCenter,321setZoomFactorX,321setZoomFactorY,322sizeHint,322sizeHintChanged,322sizePolicy,322takeDiagram,323translate,323verticalRange,324zoomCenter,324zoomFactorX,324zoomFactorY,324

KDChart::Chart,326∼Chart,328__pad0__,341addCoordinatePlane,328addHeaderFooter,329addLegend,329Chart,328coordinatePlane,330coordinatePlanes,330globalLeadingBottom,330globalLeadingLeft,331globalLeadingRight,331globalLeadingTop,331headerFooter,332headerFooters,332

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

834 INDEX

legend,332legends,333paint,333paintEvent,335replaceCoordinatePlane,335replaceHeaderFooter,336replaceLegend,336resizeEvent,337setCoordinatePlaneLayout,337setGlobalLeading,337setGlobalLeadingBottom,338setGlobalLeadingLeft,338setGlobalLeadingRight,338setGlobalLeadingTop,339takeCoordinatePlane,339takeHeaderFooter,340takeLegend,340

KDChart::DataDimension,342KDChart::DataDimension

calcMode,344DataDimension,342, 343distance,343end,344isCalculated,344operator!=,343operator==,343sequence,344start,344stepWidth,344subStepWidth,344

KDChart::DatasetProxyModel,345KDChart::DatasetProxyModel

data,346DatasetProxyModel,346filterAcceptsColumn,346filterAcceptsRow,347headerData,347index,348mapFromSource,348mapToSource,348parent,349Q_SLOTS,351setDatasetColumnDescriptionVector,349setDatasetDescriptionVectors,349setDatasetRowDescriptionVector,350setSourceModel,350setSourceRootIndex,350

KDChart::DatasetSelectorWidget,352KDChart::DatasetSelectorWidget

__pad0__,354columnConfig,354DatasetSelectorWidget,352mappingDisabled,352on_cbReverseColumns_stateChanged,352

on_cbReverseRows_stateChanged,353on_groupBox_toggled,353on_sbColumnCount_valueChanged,353on_sbRowCount_valueChanged,353on_sbStartRow_valueChanged,353Q_SLOTS,354setSourceColumnCount,354

KDChart::DataValueAttributes,355KDChart::DataValueAttributes

∼DataValueAttributes,356backgroundAttributes,356dataLabel,356DataValueAttributes,356decimalDigits,356defaultAttributes,357defaultAttributesAsVariant,357frameAttributes,357isVisible,357markerAttributes,357negativePosition,357operator!=,357operator=,357operator==,358positivePosition,358powerOfTenDivisor,358prefix,358setBackgroundAttributes,358setDataLabel,358setDecimalDigits,358setFrameAttributes,358setMarkerAttributes,359setNegativePosition,359setPositivePosition,359setPowerOfTenDivisor,359setPrefix,359setShowInfinite,359setSuffix,359setTextAttributes,359setVisible,360showInfinite,360suffix, 360textAttributes,360

KDChart::DiagramObserver,361KDChart::DiagramObserver

∼DiagramObserver,362__pad0__,363diagram,362diagramAttributesChanged,362diagramDataChanged,362DiagramObserver,361Q_SLOTS,363slotAttributesChanged,362slotDataChanged,363slotModelsChanged,363

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 835

KDChart::FrameAttributes,364KDChart::FrameAttributes

∼FrameAttributes,364FrameAttributes,364isVisible,364operator!=,364operator=,364operator==,364padding,364pen,364setPadding,365setPen,365setVisible,365

KDChart::GridAttributes,366KDChart::GridAttributes

∼GridAttributes,366GridAttributes,366gridGranularitySequence,366gridPen,366gridStepWidth,366gridSubStepWidth,367isGridVisible,367isSubGridVisible,367operator!=,367operator=,367operator==,367setGridGranularitySequence,367setGridPen,367setGridStepWidth,367setGridSubStepWidth,367setGridVisible,367setSubGridPen,367setSubGridVisible,367setZeroLinePen,367subGridPen,367zeroLinePen,367

KDChart::HeaderFooter,369Footer,371Header,371

KDChart::HeaderFooter∼HeaderFooter,371__pad0__,384alignToReferencePoint,371areaGeometry,372autoReferenceArea,372backgroundAttributes,372clone,372expandingDirections,372frameAttributes,373geometry,373HeaderFooter,371HeaderFooterType,371innerRect,373intersects,373, 374

isEmpty,374maximumSize,375minimumSize,375mParent,384mParentLayout,384paint,375paintAll, 376paintBackground,376paintCtx,377paintFrame,377paintIntoRect,378position,378positionChanged,378positionHasChanged,379realFont,379realFontSize,379removeFromParentLayout,379setAutoReferenceArea,379setBackgroundAttributes,380setFrameAttributes,380setGeometry,380setParent,380setParentLayout,381setParentWidget,381setPosition,381setText,381setTextAttributes,382setType,382sizeHint,382sizeHintChanged,383text,383textAttributes,383type,384

KDChart::HorizontalLineLayoutItem,385KDChart::HorizontalLineLayoutItem

expandingDirections,386geometry,386HorizontalLineLayoutItem,385isEmpty,386maximumSize,386minimumSize,386mParent,388mParentLayout,388paint,386paintCtx,387removeFromParentLayout,387setGeometry,387setParentLayout,387setParentWidget,387sizeHint,388sizeHintChanged,388

KDChart::Legend,402∼Legend,405__pad0__,427

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

836 INDEX

addDiagram,405alignment,406alignToReferencePoint,406areaGeometry,406backgroundAttributes,406brush,406buildLegend,407clone,409datasetCount,410diagram,410diagrams,410forceRebuild,411frameAttributes,411innerRect,411Legend,404markerAttributes,412orientation,412paint,412paintAll, 413paintBackground,414paintEvent,415paintFrame,415paintIntoRect,415pen,416position,416positionHasChanged,416propertiesChanged,417Q_SLOTS,427referenceArea,417removeDiagram,417removeDiagrams,417replaceDiagram,418resetDiagram,418resetTexts,418resizeEvent,419setAlignment,419setBackgroundAttributes,419setBrush,419setBrushesFromDiagram,420setColor,420setDefaultColors,420setDiagram,421setFrameAttributes,421setMarkerAttributes,421setNeedRebuild,421setOrientation,422setPen,422setPosition,422setRainbowColors,422setReferenceArea,423setShowLines,423setSpacing,423setSubduedColors,424setText,425

setTextAttributes,425setTitleText,425setTitleTextAttributes,425setVisible,425showLines,426spacing,426text,426textAttributes,426titleText,427titleTextAttributes,427

KDChart::LineAttributes,428MissingValuesAreBridged,429MissingValuesHideSegments,429MissingValuesPolicyIgnored,429MissingValuesShownAsZero,429

KDChart::LineAttributes∼LineAttributes,429displayArea,429LineAttributes,429MissingValuesPolicy,428missingValuesPolicy,429operator!=,429operator=,429operator==,429setDisplayArea,429setMissingValuesPolicy,429setTransparency,429transparency,429

KDChart::LineDiagram,431Normal,436Percent,436Stacked,436

KDChart::LineDiagram∼LineDiagram,436__pad0__,472addAxis,436allowOverlappingDataValueTexts,437antiAliasing,437attributesModel,437attributesModelRootIndex,438axes,438brush,438, 439calculateDataBoundaries,439checkInvariants,441clone,442columnToIndex,442coordinatePlane,442dataBoundaries,442dataChanged,443datasetBrushes,443datasetDimension,444datasetLabels,444datasetMarkers,445datasetPens,445

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 837

dataValueAttributes,445, 446doItemsLayout,446getCellValues,447horizontalOffset,447indexAt,447isIndexHidden,448itemRowLabels,448layoutPlanes,448lineAttributes,448, 449LineDiagram,436LineType,436modelsChanged,449moveCursor,449numberOfAbscissaSegments,449numberOfOrdinateSegments,450paint,450paintDataValueText,453paintDataValueTexts,454paintEvent,455paintMarker,455paintMarkers,457pen,457, 458percentMode,458propertiesChanged,458referenceDiagram,459referenceDiagramOffset,459resize,459resizeEvent,459scrollTo,459setAllowOverlappingDataValueTexts,460setAntiAliasing,460setAttributesModel,460setAttributesModelRootIndex,461setBrush,461, 462setCoordinatePlane,462setDataBoundariesDirty,462setDatasetDimension,463setDataValueAttributes,463, 464setLineAttributes,464, 465setModel,465setPen,465, 466setPercentMode,466setReferenceDiagram,466setRootIndex,466setSelection,467setThreeDLineAttributes,467setType,468takeAxis,468threeDItemDepth,469threeDLineAttributes,469, 470type,470update,470useDefaultColors,470useRainbowColors,470

useSubduedColors,471valueForCell,471valueForCellTesting,471verticalOffset,472visualRect,472visualRegionForSelection,472

KDChart::MarkerAttributes,473Marker1Pixel,474Marker4Pixels,474MarkerCircle,474MarkerCross,474MarkerDiamond,474MarkerFastCross,474MarkerRing,474MarkerSquare,474

KDChart::MarkerAttributes∼MarkerAttributes,474isVisible,474MarkerAttributes,474markerColor,474markerSize,474MarkerStyle,474markerStyle,474MarkerStylesMap,473markerStylesMap,474operator!=,475operator=,475operator==,475pen,475setMarkerColor,475setMarkerSize,475setMarkerStyle,475setMarkerStylesMap,475setPen,475setVisible,475

KDChart::MarkerLayoutItem,476KDChart::MarkerLayoutItem

expandingDirections,477geometry,477isEmpty,477MarkerLayoutItem,476maximumSize,477minimumSize,477mParent,480mParentLayout,480paint,477paintCtx,478removeFromParentLayout,478setGeometry,478setParentLayout,479setParentWidget,479sizeHint,479sizeHintChanged,479

KDChart::Measure,481

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

838 INDEX

calculatedValue,482calculationMode,483Measure,481, 482operator!=,483operator=,483operator==,484referenceArea,484referenceOrientation,484setCalculationMode,484setReferenceArea,484setReferenceOrientation,485setRelativeMode,485setValue,485value,485

KDChart::PaintContext,486KDChart::PaintContext

coordinatePlane,486PaintContext,486painter,486rectangle,486setCoordinatePlane,486setPainter,486setRectangle,486

KDChart::Palette,488∼Palette,489__pad0__,490addBrush,489defaultPalette,489getBrush,489isValid, 489operator=,489Palette,489rainbowPalette,489removeBrush,489size,490subduedPalette,490

KDChart::PieAttributes,491KDChart::PieAttributes

∼PieAttributes,491explode,492explodeFactor,492operator!=,492operator=,492operator==,492PieAttributes,491setExplode,493setExplodeFactor,493

KDChart::PieDiagram,494KDChart::PieDiagram

∼PieDiagram,498__pad0__,529allowOverlappingDataValueTexts,499antiAliasing,499attributesModel,499

attributesModelRootIndex,500brush,500calculateDataBoundaries,501checkInvariants,501clone,502columnCount,502columnToIndex,502coordinatePlane,502dataBoundaries,503dataChanged,503datasetBrushes,503datasetDimension,504datasetLabels,504datasetMarkers,505datasetPens,505dataValueAttributes,506doItemsLayout,507granularity,507horizontalOffset,507indexAt,507isIndexHidden,508itemRowLabels,508modelsChanged,508moveCursor,508numberOfGridRings,508numberOfValuesPerDataset,509paint,509paintDataValueText,512paintDataValueTexts,513paintEvent,513paintMarker,513, 514paintMarkers,515pen,516percentMode,517pieAttributes,517PieDiagram,498polarCoordinatePlane,518propertiesChanged,518resize,518resizeEvent,518scrollTo,518setAllowOverlappingDataValueTexts,519setAntiAliasing,519setAttributesModel,519setAttributesModelRootIndex,520setBrush,520, 521setCoordinatePlane,521setDataBoundariesDirty,521setDatasetDimension,521setDataValueAttributes,522setGranularity,523setModel,523setPen,524setPercentMode,524

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 839

setPieAttributes,524, 525setRootIndex,525setSelection,525setStartPosition,525setThreeDPieAttributes,525, 526startPosition,526threeDPieAttributes,526, 527update,527useDefaultColors,527useRainbowColors,528useSubduedColors,528valueForCell,528valueTotals,528verticalOffset,529visualRect,529visualRegionForSelection,529

KDChart::PolarCoordinatePlane,530Linear,533Logarithmic,533

KDChart::PolarCoordinatePlane∼PolarCoordinatePlane,533__pad0__,555addDiagram,534alignToReferencePoint,534angleUnit,534areaGeometry,535AxesCalcMode,533backgroundAttributes,535CoordinateTransformationList,533diagram,535diagrams,535, 536expandingDirections,536frameAttributes,536geometry,537getDataDimensionsList,537globalGridAttributes,537gridAttributes,537gridDimensionsList,538hasOwnGridAttributes,539innerRect,539isEmpty,539layoutDiagrams,540layoutPlanes,541maximumSize,541minimumSize,541minimumSizeHint,541mParent,555mParentLayout,555needLayoutPlanes,542needRelayout,542needUpdate,542paint,542paintAll, 543paintBackground,543

paintCtx,544paintEvent,544paintFrame,545paintIntoRect,545parent,545PolarCoordinatePlane,533positionHasChanged,546propertiesChanged,546Q_SLOTS,556referenceCoordinatePlane,546relayout,547removeFromParentLayout,547replaceDiagram,547resetGridAttributes,548resizeEvent,548setBackgroundAttributes,548setFrameAttributes,549setGeometry,549setGlobalGridAttributes,549setGridAttributes,550setParent,550setParentLayout,551setParentWidget,551setReferenceCoordinatePlane,551setZoomCenter,551setZoomFactorX,552setZoomFactorY,552sizeHint,552sizeHintChanged,553sizePolicy,553takeDiagram,553translate,554translatePolar,554zoomCenter,554zoomFactorX,555zoomFactorY,555

KDChart::PolarDiagram,557KDChart::PolarDiagram

∼PolarDiagram,561__pad0__,588allowOverlappingDataValueTexts,561antiAliasing,562attributesModel,562attributesModelRootIndex,562brush,563calculateDataBoundaries,563checkInvariants,564clone,564columnCount,565columnToIndex,565coordinatePlane,565dataBoundaries,565dataChanged,566datasetBrushes,566

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

840 INDEX

datasetDimension,567datasetLabels,567datasetMarkers,568datasetPens,568dataValueAttributes,568, 569doItemsLayout,569horizontalOffset,570indexAt,570isIndexHidden,570itemRowLabels,570modelsChanged,571moveCursor,571numberOfGridRings,571numberOfValuesPerDataset,571paint,571paintDataValueText,572paintDataValueTexts,573paintEvent,573paintMarker,574paintMarkers,576paintPolarMarkers,576pen,577percentMode,577polarCoordinatePlane,578PolarDiagram,561propertiesChanged,578resize,578resizeEvent,578rotateCircularLabels,578scrollTo,579setAllowOverlappingDataValueTexts,579setAntiAliasing,579setAttributesModel,579setAttributesModelRootIndex,580setBrush,580, 581setCoordinatePlane,581setDataBoundariesDirty,581setDatasetDimension,582setDataValueAttributes,582, 583setModel,583setPen,583, 584setPercentMode,584setRootIndex,584setRotateCircularLabels,585setSelection,585setShowDelimitersAtPosition,585setShowLabelsAtPosition,585setZeroDegreePosition,585showDelimitersAtPosition,586showLabelsAtPosition,586update,586useDefaultColors,586useRainbowColors,586useSubduedColors,587

valueForCell,587valueTotals,587verticalOffset,588visualRect,588visualRegionForSelection,588zeroDegreePosition,588

KDChart::Position,590Center,596East,596ExcludeCenter,591fromName,592IncludeCenter,591isCorner,593isEastSide,593isNorthSide,593isPole,593isSouthSide,594isWestSide,594name,594names,594North,597NorthEast,597NorthWest,597operator!=,595operator==,595Option,591Position,592printableName,595printableNames,596South,597SouthEast,597SouthWest,597Unknown,597value,596West,597

KDChart::RelativePosition,606KDChart::RelativePosition

∼RelativePosition,606alignment,606horizontalPadding,606operator!=,607operator=,607operator==,607referenceArea,607referencePosition,607RelativePosition,606rotation,607setAlignment,607setHorizontalPadding,607setReferenceArea,607setReferencePosition,607setRotation,607setVerticalPadding,607verticalPadding,607

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 841

KDChart::RingDiagram,608KDChart::RingDiagram

∼RingDiagram,612__pad0__,641allowOverlappingDataValueTexts,613antiAliasing,613attributesModel,613attributesModelRootIndex,613brush,614calculateDataBoundaries,615checkInvariants,615clone,615columnCount,616columnToIndex,616coordinatePlane,616dataBoundaries,616dataChanged,617datasetBrushes,617datasetDimension,618datasetLabels,618datasetMarkers,619datasetPens,619dataValueAttributes,619, 620doItemsLayout,620granularity,621horizontalOffset,621indexAt,621isIndexHidden,621itemRowLabels,622modelsChanged,622moveCursor,622numberOfGridRings,622numberOfValuesPerDataset,622paint,623paintDataValueText,623paintDataValueTexts,624paintEvent,624paintMarker,625paintMarkers,627pen,627, 628percentMode,628pieAttributes,628, 629polarCoordinatePlane,629propertiesChanged,629relativeThickness,629resize,630resizeEvent,630RingDiagram,612scrollTo,630setAllowOverlappingDataValueTexts,630setAntiAliasing,630setAttributesModel,631setAttributesModelRootIndex,631setBrush,632

setCoordinatePlane,632setDataBoundariesDirty,633setDatasetDimension,633setDataValueAttributes,633, 634setGranularity,634setModel,635setPen,635, 636setPercentMode,636setPieAttributes,636setRelativeThickness,636setRootIndex,637setSelection,637setStartPosition,637setThreeDPieAttributes,637, 638startPosition,638threeDPieAttributes,638, 639update,639useDefaultColors,639useRainbowColors,639useSubduedColors,640valueForCell,640valueTotals,640verticalOffset,641visualRect,641visualRegionForSelection,641

KDChart::TextArea,642KDChart::TextArea

∼TextArea,644__pad0__,655alignToReferencePoint,644areaGeometry,644autoReferenceArea,644backgroundAttributes,645expandingDirections,645frameAttributes,645geometry,645innerRect,645intersects,646, 647isEmpty,647maximumSize,647minimumSize,647mParent,655mParentLayout,655paint,647paintAll, 648paintBackground,648paintCtx,649paintFrame,650paintIntoRect,650positionHasChanged,651realFont,651realFontSize,651removeFromParentLayout,651setAutoReferenceArea,651

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

842 INDEX

setBackgroundAttributes,652setFrameAttributes,652setGeometry,652setParentLayout,652setParentWidget,653setText,653setTextAttributes,653sizeHint,654sizeHintChanged,654text,654TextArea,644textAttributes,654

KDChart::TextAttributes,656KDChart::TextAttributes

∼TextAttributes,657autoRotate,657autoShrink,657font, 657fontSize,657hasAbsoluteFontSize,657isVisible,657minimalFontSize,658operator!=,658operator=,658operator==,658pen,658rotation,658setAutoRotate,658setAutoShrink,658setFont,659setFontSize,659setMinimalFontSize,659setPen,659setRotation,659setVisible,659TextAttributes,657

KDChart::TextLayoutItem,661KDChart::TextLayoutItem

autoReferenceArea,663expandingDirections,663geometry,663intersects,663, 664isEmpty,664maximumSize,664minimumSize,664mParent,669mParentLayout,669paint,665paintCtx,665realFont,665realFontSize,666removeFromParentLayout,666setAutoReferenceArea,666setGeometry,666

setParentLayout,667setParentWidget,667setText,667setTextAttributes,667sizeHint,668sizeHintChanged,668text,668textAttributes,669TextLayoutItem,662

KDChart::ThreeDBarAttributes,670KDChart::ThreeDBarAttributes

∼ThreeDBarAttributes,670angle,671depth,671isEnabled,671operator!=,671operator=,672operator==,672setAngle,672setDepth,673setEnabled,673setUseShadowColors,673ThreeDBarAttributes,670useShadowColors,673validDepth,673

KDChart::ThreeDLineAttributes,675KDChart::ThreeDLineAttributes

∼ThreeDLineAttributes,675depth,676isEnabled,676lineXRotation,676lineYRotation,676operator!=,677operator=,677operator==,677setDepth,678setEnabled,678setLineXRotation,678setLineYRotation,678ThreeDLineAttributes,675validDepth,678

KDChart::ThreeDPieAttributes,680KDChart::ThreeDPieAttributes

∼ThreeDPieAttributes,680depth,681isEnabled,681operator!=,681operator=,681operator==,682setDepth,682setEnabled,682setUseShadowColors,682ThreeDPieAttributes,680useShadowColors,683

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 843

validDepth,683KDChart::VerticalLineLayoutItem,684KDChart::VerticalLineLayoutItem

expandingDirections,685geometry,685isEmpty,685maximumSize,685minimumSize,685mParent,687mParentLayout,687paint,685paintCtx,686removeFromParentLayout,686setGeometry,686setParentLayout,686setParentWidget,686sizeHint,687sizeHintChanged,687VerticalLineLayoutItem,684

KDChart::Widget,689∼Widget,692addHeaderFooter,693addLegend,693allHeadersFooters,694allLegends,694Bar,692barDiagram,694bottom,702ChartType,692coordinatePlane,694diagram,695firstHeaderFooter,695globalLeadingBottom,695globalLeadingLeft,695globalLeadingRight,696globalLeadingTop,696legend,696Line, 692lineDiagram,696Normal,692NoType,692Percent,692Pie,692pieDiagram,697Polar,692polarDiagram,697Q_SLOTS,702replaceHeaderFooter,697replaceLegend,698resetData,698right, 702Ring,692ringDiagram,698Rows,692

setDataset,698, 699setGlobalLeadingBottom,699setGlobalLeadingLeft,699setGlobalLeadingRight,700setGlobalLeadingTop,700setSubType,700Stacked,692SubType,692subType,701, 702takeHeaderFooter,701takeLegend,701top,703type,702Widget,692

KDChart::ZoomParameters,704KDChart::ZoomParameters

xCenter,704xFactor,704yCenter,704yFactor,704ZoomParameters,704

KDCHART_DATA_VALUE_AUTO_DIGITSKDChartDataValueAttributes.cpp,751

KDCHART_DECLARE_DERIVED_-DIAGRAM

KDChartGlobal.h,759KDCHART_DECLARE_PRIVATE_BASE_-

POLYMORPHICKDChartGlobal.h,760

KDCHART_DECLARE_PRIVATE_BASE_-POLYMORPHIC_QWIDGET

KDChartGlobal.h,760KDCHART_DECLARE_PRIVATE_BASE_-

VALUEKDChartGlobal.h,760

KDCHART_DECLARE_PRIVATE_DERIVEDKDChartGlobal.h,761

KDCHART_DECLARE_PRIVATE_-DERIVED_PARENT

KDChartGlobal.h,761KDCHART_DECLARE_PRIVATE_-

DERIVED_QWIDGETKDChartGlobal.h,761

KDCHART_DECLARE_SWAP_BASEKDChartGlobal.h,761

KDCHART_DECLARE_SWAP_DERIVEDKDChartGlobal.h,761

KDCHART_DECLARE_SWAP_-SPECIALISATION

KDChartGlobal.h,761KDCHART_DECLARE_SWAP_-

SPECIALISATION_DERIVEDKDChartGlobal.h,762

KDCHART_DERIVED_PRIVATE_FOOTER

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

844 INDEX

KDChartGlobal.h,762KDCHART_IMPL_DERIVED_DIAGRAM

KDChartGlobal.h,762KDCHART_IMPL_DERIVED_PLANE

KDChartGlobal.h,762KDChartAbstractArea.cpp,707KDChartAbstractArea.h,708KDChartAbstractAreaBase.cpp,709KDChartAbstractAreaBase.cpp

attributes,709d, 709

KDChartAbstractAreaBase.h,713KDChartAbstractAreaWidget.cpp,714KDChartAbstractAreaWidget.cpp

d, 714KDChartAbstractAreaWidget.h,715KDChartAbstractAxis.cpp,716KDChartAbstractAxis.cpp

d, 716KDChartAbstractAxis.h,717KDChartAbstractCartesianDiagram.cpp,718KDChartAbstractCartesianDiagram.cpp

d, 718KDChartAbstractCartesianDiagram.h,719KDChartAbstractCoordinatePlane.cpp,720KDChartAbstractCoordinatePlane.cpp

d, 720KDChartAbstractCoordinatePlane.h,721KDChartAbstractDiagram.cpp,722KDChartAbstractDiagram.cpp

d, 722KDChartAbstractDiagram.h,723KDChartAbstractPieDiagram.cpp,724KDChartAbstractPieDiagram.cpp

d, 724KDChartAbstractPieDiagram.h,725KDChartAbstractPolarDiagram.cpp,726KDChartAbstractPolarDiagram.cpp

d, 726KDChartAbstractPolarDiagram.h,727KDChartAbstractProxyModel.cpp,728KDChartAbstractProxyModel.h,729KDChartAbstractThreeDAttributes.cpp,730KDChartAbstractThreeDAttributes.cpp

d, 730operator<<, 730

KDChartAbstractThreeDAttributes.h,731KDChartAbstractThreeDAttributes.h

operator<<, 731KDChartAttributesModel.cpp,732KDChartAttributesModel.h,733KDChartBackgroundAttributes.cpp,734KDChartBackgroundAttributes.cpp

d, 734

operator<<, 734KDChartBackgroundAttributes.h,735KDChartBackgroundAttributes.h

operator<<, 735Q_DECLARE_TYPEINFO,735

KDChartBarAttributes.cpp,736KDChartBarAttributes.cpp

d, 736KDChartBarAttributes.h,737KDChartBarDiagram.cpp,738KDChartBarDiagram.cpp

d, 738KDChartBarDiagram.h,739KDChartCartesianAxis.cpp,740KDChartCartesianAxis.cpp

d, 740ptr, 740

KDChartCartesianAxis.h,741KDChartCartesianCoordinatePlane.cpp,742KDChartCartesianCoordinatePlane.cpp

d, 742KDChartCartesianCoordinatePlane.h,743KDChartChart.cpp,744KDChartChart.cpp

ADD_VBOX_WITH_LEGENDS,744d, 745findOrCreateHBoxLayoutByObjectName,

745findOrCreateLayoutByObjectName,745findOrCreateVBoxLayoutByObjectName,

745KDChartChart.h,746KDChartDatasetProxyModel.cpp,747KDChartDatasetProxyModel.h,748KDChartDatasetSelector.cpp,749KDChartDatasetSelector.h,750KDChartDataValueAttributes.cpp,751KDChartDataValueAttributes.cpp

d, 751KDCHART_DATA_VALUE_AUTO_-

DIGITS, 751operator<<, 751

KDChartDataValueAttributes.h,753KDChartDataValueAttributes.h

operator<<, 753Q_DECLARE_TYPEINFO,753

KDChartDiagramObserver.cpp,754KDChartDiagramObserver.h,755KDChartEnums,390

GranularitySequence_10_20,392GranularitySequence_10_50,392GranularitySequence_25_50,392GranularitySequenceIrregular,392LayoutJustOverwrite,395

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 845

LayoutPolicyRotate,395LayoutPolicyShiftHorizontally,395LayoutPolicyShiftVertically,395LayoutPolicyShrinkFontSize,395MeasureCalculationModeAbsolute,393MeasureCalculationModeAuto,393MeasureCalculationModeAutoArea,393MeasureCalculationModeAutoOrientation,

393MeasureCalculationModeRelative,393MeasureOrientationAuto,394MeasureOrientationHorizontal,394MeasureOrientationMaximum,394MeasureOrientationMinimum,394MeasureOrientationVertical,394PositionCenter,394PositionEast,394PositionNorth,394PositionNorthEast,394PositionNorthWest,394PositionSouth,394PositionSouthEast,394PositionSouthWest,394PositionUnknown,394PositionWest,394

KDChartEnumsGranularitySequence,392granularitySequenceToString,396layoutPolicyToString,396MeasureCalculationMode,392measureCalculationModeToString,396MeasureOrientation,393MeasureOrientationToString,397PositionValue,394stringToGranularitySequence,397stringToLayoutPolicy,398stringToMeasureCalculationMode,398stringToMeasureOrientation,398TextLayoutPolicy,395

KDChartEnums.h,756KDChartFrameAttributes.cpp,757KDChartFrameAttributes.cpp

d, 757operator<<, 757

KDChartFrameAttributes.h,758KDChartFrameAttributes.h

operator<<, 758Q_DECLARE_TYPEINFO,758

KDChartGlobal.h,759KDChartGlobal.h

__kdab__dereference_for_methodcall,763KDAB_SET_OBJECT_NAME,759KDCHART_DECLARE_DERIVED_-

DIAGRAM, 759

KDCHART_DECLARE_PRIVATE_-BASE_POLYMORPHIC,760

KDCHART_DECLARE_PRIVATE_-BASE_POLYMORPHIC_-QWIDGET,760

KDCHART_DECLARE_PRIVATE_-BASE_VALUE, 760

KDCHART_DECLARE_PRIVATE_-DERIVED, 761

KDCHART_DECLARE_PRIVATE_-DERIVED_PARENT,761

KDCHART_DECLARE_PRIVATE_-DERIVED_QWIDGET,761

KDCHART_DECLARE_SWAP_BASE,761

KDCHART_DECLARE_SWAP_-DERIVED, 761

KDCHART_DECLARE_SWAP_-SPECIALISATION,761

KDCHART_DECLARE_SWAP_-SPECIALISATION_DERIVED,762

KDCHART_DERIVED_PRIVATE_-FOOTER,762

KDCHART_IMPL_DERIVED_-DIAGRAM, 762

KDCHART_IMPL_DERIVED_PLANE,762

KDChartGridAttributes.cpp,764KDChartGridAttributes.cpp

d, 764operator<<, 764

KDChartGridAttributes.h,765KDChartGridAttributes.h

operator<<, 765Q_DECLARE_TYPEINFO,765

KDChartHeaderFooter.cpp,766KDChartHeaderFooter.cpp

d, 766KDChartHeaderFooter.h,767KDChartLayoutItems.cpp,768KDChartLayoutItems.cpp

PI, 768KDChartLayoutItems.h,769KDChartLegend.cpp,770KDChartLegend.cpp

d, 770KDChartLegend.h,771KDChartLineAttributes.cpp,772KDChartLineAttributes.cpp

d, 772operator<<, 772

KDChartLineAttributes.h,773KDChartLineAttributes.h

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

846 INDEX

operator<<, 773Q_DECLARE_TYPEINFO,773

KDChartLineDiagram.cpp,774KDChartLineDiagram.cpp

d, 774KDChartLineDiagram.h,775KDChartMarkerAttributes.cpp,776KDChartMarkerAttributes.cpp

d, 776operator<<, 776

KDChartMarkerAttributes.h,777KDChartMarkerAttributes.h

operator<<, 777Q_DECLARE_TYPEINFO,777

KDChartMeasure.cpp,778KDChartMeasure.cpp

operator<<, 778KDChartMeasure.h,779KDChartMeasure.h

operator<<, 779KDChartPaintContext.cpp,780KDChartPaintContext.cpp

d, 780KDChartPaintContext.h,781KDChartPalette.cpp,782KDChartPalette.cpp

d, 782makeDefaultPalette,782makeRainbowPalette,782makeSubduedPalette,783

KDChartPalette.h,784KDChartPieAttributes.cpp,785KDChartPieAttributes.cpp

d, 785operator<<, 785

KDChartPieAttributes.h,786KDChartPieAttributes.h

operator<<, 786Q_DECLARE_TYPEINFO,786

KDChartPieDiagram.cpp,787KDChartPieDiagram.cpp

buildReferenceRect,787d, 787

KDChartPieDiagram.h,789KDChartPolarCoordinatePlane.cpp,790KDChartPolarCoordinatePlane.cpp

d, 790KDChartPolarCoordinatePlane.h,791KDChartPolarDiagram.cpp,792KDChartPolarDiagram.cpp

d, 792KDChartPolarDiagram.h,793KDChartPosition.cpp,794KDChartPosition.cpp

maxPositionValue,795operator<<, 794staticPositionCenter,795staticPositionEast,795staticPositionNames,795staticPositionNorth,795staticPositionNorthEast,795staticPositionNorthWest,795staticPositionSouth,795staticPositionSouthEast,796staticPositionSouthWest,796staticPositionUnknown,796staticPositionWest,796

KDChartPosition.h,797KDChartPosition.h

operator<<, 797Q_DECLARE_TYPEINFO,797

KDChartRelativePosition.cpp,798KDChartRelativePosition.cpp

d, 798operator<<, 798

KDChartRelativePosition.h,799KDChartRelativePosition.h

operator<<, 799Q_DECLARE_TYPEINFO,799

KDChartRingDiagram.cpp,800KDChartRingDiagram.cpp

d, 800KDChartRingDiagram.h,801KDChartTextArea.cpp,802KDChartTextArea.h,803KDChartTextAttributes.cpp,804KDChartTextAttributes.cpp

d, 804operator<<, 804

KDChartTextAttributes.h,805KDChartTextAttributes.h

operator<<, 805Q_DECLARE_TYPEINFO,805

KDChartThreeDBarAttributes.cpp,806KDChartThreeDBarAttributes.cpp

d, 806operator<<, 806

KDChartThreeDBarAttributes.h,807KDChartThreeDBarAttributes.h

operator<<, 807Q_DECLARE_TYPEINFO,807

KDChartThreeDLineAttributes.cpp,808KDChartThreeDLineAttributes.cpp

d, 808operator<<, 808

KDChartThreeDLineAttributes.h,809KDChartThreeDLineAttributes.h

operator<<, 809

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 847

Q_DECLARE_TYPEINFO,809KDChartThreeDPieAttributes.cpp,810KDChartThreeDPieAttributes.cpp

d, 810operator<<, 810

KDChartThreeDPieAttributes.h,811KDChartThreeDPieAttributes.h

operator<<, 811Q_DECLARE_TYPEINFO,811

KDChartWidget.cpp,812KDChartWidget.cpp

d, 812isCartesian,813isPolar,813SET_SUB_TYPE,812TEST_SUB_TYPE,813

KDChartWidget.h,814KDChartZoomParameters.h,815KDTextDocument,400

KDTextDocument,400KDTextDocument

∼KDTextDocument,400KDTextDocument,400minimumSizeHint,401sizeHint,401

KDTextDocument.cpp,816KDTextDocument.h,817

labelsKDChart::AbstractAxis,55KDChart::CartesianAxis,273

layoutDiagramsKDChart::AbstractCoordinatePlane,101KDChart::CartesianCoordinatePlane,306KDChart::PolarCoordinatePlane,540

LayoutJustOverwriteKDChartEnums,395

layoutPlanesKDChart::AbstractCartesianDiagram,76KDChart::AbstractCoordinatePlane,101KDChart::BarDiagram,242KDChart::CartesianAxis,273KDChart::CartesianCoordinatePlane,308KDChart::LineDiagram,448KDChart::PolarCoordinatePlane,541

LayoutPolicyRotateKDChartEnums,395

LayoutPolicyShiftHorizontallyKDChartEnums,395

LayoutPolicyShiftVerticallyKDChartEnums,395

LayoutPolicyShrinkFontSizeKDChartEnums,395

layoutPolicyToString

KDChartEnums,396Left

KDChart::CartesianAxis,268Legend

KDChart::Legend,404legend

KDChart::Chart,332KDChart::Widget,696

LegendListKDChart,19

legendsKDChart::Chart,333

LineKDChart::Widget,692

LinearKDChart::AbstractCoordinatePlane,96KDChart::CartesianCoordinatePlane,297KDChart::PolarCoordinatePlane,533

LineAttributes,21KDChart::LineAttributes,429

lineAttributesKDChart::LineDiagram,448, 449

LineAttributesRoleKDChart,19

LineDiagramKDChart::LineDiagram,436

lineDiagramKDChart::Widget,696

LineTypeKDChart::LineDiagram,436

lineXRotationKDChart::ThreeDLineAttributes,676

lineYRotationKDChart::ThreeDLineAttributes,676

LogarithmicKDChart::AbstractCoordinatePlane,96KDChart::CartesianCoordinatePlane,297KDChart::PolarCoordinatePlane,533

makeDefaultPaletteKDChartPalette.cpp,782

makeRainbowPaletteKDChartPalette.cpp,782

makeSubduedPaletteKDChartPalette.cpp,783

mapFromSourceKDChart::AbstractProxyModel,204KDChart::AttributesModel,214KDChart::DatasetProxyModel,348

mappingDisabledKDChart::DatasetSelectorWidget,352

mapToSourceKDChart::AbstractProxyModel,205KDChart::AttributesModel,215

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

848 INDEX

KDChart::DatasetProxyModel,348Marker1Pixel

KDChart::MarkerAttributes,474Marker4Pixels

KDChart::MarkerAttributes,474MarkerAttributes,22

KDChart::MarkerAttributes,474markerAttributes

KDChart::DataValueAttributes,357KDChart::Legend,412

MarkerCircleKDChart::MarkerAttributes,474

markerColorKDChart::MarkerAttributes,474

MarkerCrossKDChart::MarkerAttributes,474

MarkerDiamondKDChart::MarkerAttributes,474

MarkerFastCrossKDChart::MarkerAttributes,474

MarkerLayoutItemKDChart::MarkerLayoutItem,476

MarkerRingKDChart::MarkerAttributes,474

markerSizeKDChart::MarkerAttributes,474

MarkerSquareKDChart::MarkerAttributes,474

MarkerStyleKDChart::MarkerAttributes,474

markerStyleKDChart::MarkerAttributes,474

MarkerStylesMapKDChart::MarkerAttributes,473

markerStylesMapKDChart::MarkerAttributes,474

maximumSizeKDChart::AbstractCoordinatePlane,101KDChart::CartesianAxis,273KDChart::CartesianCoordinatePlane,308KDChart::HeaderFooter,375KDChart::HorizontalLineLayoutItem,386KDChart::MarkerLayoutItem,477KDChart::PolarCoordinatePlane,541KDChart::TextArea,647KDChart::TextLayoutItem,664KDChart::VerticalLineLayoutItem,685

maxPositionValueKDChartPosition.cpp,795

MeasureKDChart::Measure,481, 482

MeasureCalculationModeKDChartEnums,392

MeasureCalculationModeAbsolute

KDChartEnums,393MeasureCalculationModeAuto

KDChartEnums,393MeasureCalculationModeAutoArea

KDChartEnums,393MeasureCalculationModeAutoOrientation

KDChartEnums,393MeasureCalculationModeRelative

KDChartEnums,393measureCalculationModeToString

KDChartEnums,396MeasureOrientation

KDChartEnums,393MeasureOrientationAuto

KDChartEnums,394MeasureOrientationHorizontal

KDChartEnums,394MeasureOrientationMaximum

KDChartEnums,394MeasureOrientationMinimum

KDChartEnums,394MeasureOrientationToString

KDChartEnums,397MeasureOrientationVertical

KDChartEnums,394minimalFontSize

KDChart::TextAttributes,658minimumSize

KDChart::AbstractCoordinatePlane,102KDChart::CartesianAxis,275KDChart::CartesianCoordinatePlane,308KDChart::HeaderFooter,375KDChart::HorizontalLineLayoutItem,386KDChart::MarkerLayoutItem,477KDChart::PolarCoordinatePlane,541KDChart::TextArea,647KDChart::TextLayoutItem,664KDChart::VerticalLineLayoutItem,685

minimumSizeHintKDChart::AbstractCoordinatePlane,102KDChart::CartesianCoordinatePlane,309KDChart::PolarCoordinatePlane,541KDTextDocument,401

MissingValuesAreBridgedKDChart::LineAttributes,429

MissingValuesHideSegmentsKDChart::LineAttributes,429

MissingValuesPolicyKDChart::LineAttributes,428

missingValuesPolicyKDChart::LineAttributes,429

MissingValuesPolicyIgnoredKDChart::LineAttributes,429

MissingValuesShownAsZero

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 849

KDChart::LineAttributes,429modelData

KDChart::AttributesModel,215modelsChanged

KDChart::AbstractCartesianDiagram,77KDChart::AbstractDiagram,126KDChart::AbstractPieDiagram,157KDChart::AbstractPolarDiagram,189KDChart::BarDiagram,242KDChart::LineDiagram,449KDChart::PieDiagram,508KDChart::PolarDiagram,571KDChart::RingDiagram,622

moveCursorKDChart::AbstractCartesianDiagram,77KDChart::AbstractDiagram,126KDChart::AbstractPieDiagram,157KDChart::AbstractPolarDiagram,189KDChart::BarDiagram,243KDChart::LineDiagram,449KDChart::PieDiagram,508KDChart::PolarDiagram,571KDChart::RingDiagram,622

mParentKDChart::AbstractArea,36KDChart::AbstractAxis,62KDChart::AbstractCoordinatePlane,113KDChart::AbstractLayoutItem,143KDChart::CartesianAxis,293KDChart::CartesianCoordinatePlane,325KDChart::HeaderFooter,384KDChart::HorizontalLineLayoutItem,388KDChart::MarkerLayoutItem,480KDChart::PolarCoordinatePlane,555KDChart::TextArea,655KDChart::TextLayoutItem,669KDChart::VerticalLineLayoutItem,687

mParentLayoutKDChart::AbstractArea,37KDChart::AbstractAxis,62KDChart::AbstractCoordinatePlane,113KDChart::AbstractLayoutItem,143KDChart::CartesianAxis,293KDChart::CartesianCoordinatePlane,325KDChart::HeaderFooter,384KDChart::HorizontalLineLayoutItem,388KDChart::MarkerLayoutItem,480KDChart::PolarCoordinatePlane,555KDChart::TextArea,655KDChart::TextLayoutItem,669KDChart::VerticalLineLayoutItem,687

nameKDChart::Position,594

namesKDChart::Position,594

needLayoutPlanesKDChart::AbstractCoordinatePlane,102KDChart::CartesianCoordinatePlane,309KDChart::PolarCoordinatePlane,542

needRelayoutKDChart::AbstractCoordinatePlane,102KDChart::CartesianCoordinatePlane,309KDChart::PolarCoordinatePlane,542

needUpdateKDChart::AbstractCoordinatePlane,102KDChart::CartesianCoordinatePlane,309KDChart::PolarCoordinatePlane,542

negativePositionKDChart::DataValueAttributes,357

NormalKDChart::BarDiagram,230KDChart::LineDiagram,436KDChart::Widget,692

NorthKDChart::Position,597

NorthEastKDChart::Position,597

NorthWestKDChart::Position,597

NoTypeKDChart::Widget,692

numberOfAbscissaSegmentsKDChart::AbstractCartesianDiagram,77KDChart::BarDiagram,243KDChart::LineDiagram,449

numberOfGridRingsKDChart::AbstractPieDiagram,158KDChart::AbstractPolarDiagram,189KDChart::PieDiagram,508KDChart::PolarDiagram,571KDChart::RingDiagram,622

numberOfOrdinateSegmentsKDChart::AbstractCartesianDiagram,77KDChart::BarDiagram,243KDChart::LineDiagram,450

numberOfValuesPerDatasetKDChart::AbstractPieDiagram,158KDChart::AbstractPolarDiagram,189KDChart::PieDiagram,509KDChart::PolarDiagram,571KDChart::RingDiagram,622

observedByKDChart::AbstractAxis,55KDChart::CartesianAxis,275

on_cbReverseColumns_stateChangedKDChart::DatasetSelectorWidget,352

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

850 INDEX

on_cbReverseRows_stateChangedKDChart::DatasetSelectorWidget,353

on_groupBox_toggledKDChart::DatasetSelectorWidget,353

on_sbColumnCount_valueChangedKDChart::DatasetSelectorWidget,353

on_sbRowCount_valueChangedKDChart::DatasetSelectorWidget,353

on_sbStartRow_valueChangedKDChart::DatasetSelectorWidget,353

operator!=KDChart::AbstractThreeDAttributes,207KDChart::BackgroundAttributes,220KDChart::BarAttributes,223KDChart::DataDimension,343KDChart::DataValueAttributes,357KDChart::FrameAttributes,364KDChart::GridAttributes,367KDChart::LineAttributes,429KDChart::MarkerAttributes,475KDChart::Measure,483KDChart::PieAttributes,492KDChart::Position,595KDChart::RelativePosition,607KDChart::TextAttributes,658KDChart::ThreeDBarAttributes,671KDChart::ThreeDLineAttributes,677KDChart::ThreeDPieAttributes,681

operator<<KDChartAbstractThreeDAttributes.cpp,

730KDChartAbstractThreeDAttributes.h,731KDChartBackgroundAttributes.cpp,734KDChartBackgroundAttributes.h,735KDChartDataValueAttributes.cpp,751KDChartDataValueAttributes.h,753KDChartFrameAttributes.cpp,757KDChartFrameAttributes.h,758KDChartGridAttributes.cpp,764KDChartGridAttributes.h,765KDChartLineAttributes.cpp,772KDChartLineAttributes.h,773KDChartMarkerAttributes.cpp,776KDChartMarkerAttributes.h,777KDChartMeasure.cpp,778KDChartMeasure.h,779KDChartPieAttributes.cpp,785KDChartPieAttributes.h,786KDChartPosition.cpp,794KDChartPosition.h,797KDChartRelativePosition.cpp,798KDChartRelativePosition.h,799KDChartTextAttributes.cpp,804KDChartTextAttributes.h,805

KDChartThreeDBarAttributes.cpp,806KDChartThreeDBarAttributes.h,807KDChartThreeDLineAttributes.cpp,808KDChartThreeDLineAttributes.h,809KDChartThreeDPieAttributes.cpp,810KDChartThreeDPieAttributes.h,811

operator=KDChart::AbstractThreeDAttributes,207KDChart::BackgroundAttributes,220KDChart::BarAttributes,223KDChart::DataValueAttributes,357KDChart::FrameAttributes,364KDChart::GridAttributes,367KDChart::LineAttributes,429KDChart::MarkerAttributes,475KDChart::Measure,483KDChart::Palette,489KDChart::PieAttributes,492KDChart::RelativePosition,607KDChart::TextAttributes,658KDChart::ThreeDBarAttributes,672KDChart::ThreeDLineAttributes,677KDChart::ThreeDPieAttributes,681

operator==KDChart::AbstractThreeDAttributes,207KDChart::BackgroundAttributes,220KDChart::BarAttributes,223KDChart::DataDimension,343KDChart::DataValueAttributes,358KDChart::FrameAttributes,364KDChart::GridAttributes,367KDChart::LineAttributes,429KDChart::MarkerAttributes,475KDChart::Measure,484KDChart::PieAttributes,492KDChart::Position,595KDChart::RelativePosition,607KDChart::TextAttributes,658KDChart::ThreeDBarAttributes,672KDChart::ThreeDLineAttributes,677KDChart::ThreeDPieAttributes,682

OptionKDChart::Position,591

orientationKDChart::Legend,412

paddingKDChart::FrameAttributes,364

paintKDChart::AbstractArea,32KDChart::AbstractAreaWidget,45KDChart::AbstractAxis,55KDChart::AbstractCartesianDiagram,77KDChart::AbstractCoordinatePlane,102

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 851

KDChart::AbstractDiagram,127KDChart::AbstractLayoutItem,141KDChart::AbstractPieDiagram,158KDChart::AbstractPolarDiagram,189KDChart::BarDiagram,243KDChart::CartesianAxis,276KDChart::CartesianCoordinatePlane,309KDChart::Chart,333KDChart::HeaderFooter,375KDChart::HorizontalLineLayoutItem,386KDChart::Legend,412KDChart::LineDiagram,450KDChart::MarkerLayoutItem,477KDChart::PieDiagram,509KDChart::PolarCoordinatePlane,542KDChart::PolarDiagram,571KDChart::RingDiagram,623KDChart::TextArea,647KDChart::TextLayoutItem,665KDChart::VerticalLineLayoutItem,685

paintAllKDChart::AbstractArea,32KDChart::AbstractAreaWidget,46KDChart::AbstractAxis,55KDChart::AbstractCoordinatePlane,103KDChart::CartesianAxis,276KDChart::CartesianCoordinatePlane,310KDChart::HeaderFooter,376KDChart::Legend,413KDChart::PolarCoordinatePlane,543KDChart::TextArea,648

paintBackgroundKDChart::AbstractArea,33KDChart::AbstractAreaBase,40KDChart::AbstractAreaWidget,46KDChart::AbstractAxis,56KDChart::AbstractCoordinatePlane,103KDChart::CartesianAxis,277KDChart::CartesianCoordinatePlane,311KDChart::HeaderFooter,376KDChart::Legend,414KDChart::PolarCoordinatePlane,543KDChart::TextArea,648

PaintContext,23KDChart::PaintContext,486

paintCtxKDChart::AbstractArea,33KDChart::AbstractAxis,57KDChart::AbstractCoordinatePlane,104KDChart::AbstractLayoutItem,141KDChart::CartesianAxis,278KDChart::CartesianCoordinatePlane,312KDChart::HeaderFooter,377KDChart::HorizontalLineLayoutItem,387

KDChart::MarkerLayoutItem,478KDChart::PolarCoordinatePlane,544KDChart::TextArea,649KDChart::TextLayoutItem,665KDChart::VerticalLineLayoutItem,686

paintDataValueTextKDChart::AbstractCartesianDiagram,77KDChart::AbstractDiagram,127KDChart::AbstractPieDiagram,158KDChart::AbstractPolarDiagram,189KDChart::BarDiagram,247KDChart::LineDiagram,453KDChart::PieDiagram,512KDChart::PolarDiagram,572KDChart::RingDiagram,623

paintDataValueTextsKDChart::AbstractCartesianDiagram,78KDChart::AbstractDiagram,128KDChart::AbstractPieDiagram,159KDChart::AbstractPolarDiagram,190KDChart::BarDiagram,248KDChart::LineDiagram,454KDChart::PieDiagram,513KDChart::PolarDiagram,573KDChart::RingDiagram,624

painterKDChart::PaintContext,486

paintEventKDChart::AbstractAreaWidget,47KDChart::CartesianCoordinatePlane,312KDChart::Chart,335KDChart::Legend,415KDChart::LineDiagram,455KDChart::PieDiagram,513KDChart::PolarCoordinatePlane,544KDChart::PolarDiagram,573KDChart::RingDiagram,624

paintFrameKDChart::AbstractArea,34KDChart::AbstractAreaBase,41KDChart::AbstractAreaWidget,47KDChart::AbstractAxis,57KDChart::AbstractCoordinatePlane,104KDChart::CartesianAxis,285KDChart::CartesianCoordinatePlane,312KDChart::HeaderFooter,377KDChart::Legend,415KDChart::PolarCoordinatePlane,545KDChart::TextArea,650

paintIntoRectKDChart::AbstractArea,34KDChart::AbstractAreaWidget,48KDChart::AbstractAxis,58KDChart::AbstractCoordinatePlane,105

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

852 INDEX

KDChart::CartesianAxis,286KDChart::CartesianCoordinatePlane,313KDChart::HeaderFooter,378KDChart::Legend,415KDChart::PolarCoordinatePlane,545KDChart::TextArea,650

paintMarkerKDChart::AbstractCartesianDiagram,78,

79KDChart::AbstractDiagram,128KDChart::AbstractPieDiagram,159, 160KDChart::AbstractPolarDiagram,191KDChart::BarDiagram,248KDChart::LineDiagram,455KDChart::PieDiagram,513, 514KDChart::PolarDiagram,574KDChart::RingDiagram,625

paintMarkersKDChart::AbstractCartesianDiagram,81KDChart::AbstractDiagram,130KDChart::AbstractPieDiagram,162KDChart::AbstractPolarDiagram,193KDChart::BarDiagram,250KDChart::LineDiagram,457KDChart::PieDiagram,515KDChart::PolarDiagram,576KDChart::RingDiagram,627

paintPolarMarkersKDChart::PolarDiagram,576

Palette,24KDChart::Palette,489

PaletteTypeKDChart::AttributesModel,210

paletteTypeKDChart::AttributesModel,215

PaletteTypeDefaultKDChart::AttributesModel,210

PaletteTypeRainbowKDChart::AttributesModel,210

PaletteTypeSubduedKDChart::AttributesModel,210

parentKDChart::AbstractCoordinatePlane,105KDChart::AbstractProxyModel,205KDChart::AttributesModel,215KDChart::CartesianCoordinatePlane,313KDChart::DatasetProxyModel,349KDChart::PolarCoordinatePlane,545

penKDChart::AbstractCartesianDiagram,81,

82KDChart::AbstractDiagram,131KDChart::AbstractPieDiagram,162KDChart::AbstractPolarDiagram,193, 194

KDChart::BarDiagram,250, 251KDChart::FrameAttributes,364KDChart::Legend,416KDChart::LineDiagram,457, 458KDChart::MarkerAttributes,475KDChart::PieDiagram,516KDChart::PolarDiagram,577KDChart::RingDiagram,627, 628KDChart::TextAttributes,658

PercentKDChart::BarDiagram,230KDChart::LineDiagram,436KDChart::Widget,692

percentModeKDChart::AbstractCartesianDiagram,82KDChart::AbstractDiagram,131KDChart::AbstractPieDiagram,163KDChart::AbstractPolarDiagram,194KDChart::BarDiagram,251KDChart::LineDiagram,458KDChart::PieDiagram,517KDChart::PolarDiagram,577KDChart::RingDiagram,628

PIKDChartLayoutItems.cpp,768

PieKDChart::Widget,692

PieAttributesKDChart::PieAttributes,491

pieAttributesKDChart::AbstractPieDiagram,163KDChart::PieDiagram,517KDChart::RingDiagram,628, 629

PieAttributesRoleKDChart,20

PieDiagramKDChart::PieDiagram,498

pieDiagramKDChart::Widget,697

pixmapKDChart::BackgroundAttributes,220

pixmapModeKDChart::BackgroundAttributes,220

PolarKDChart::Widget,692

PolarCoordinatePlaneKDChart::PolarCoordinatePlane,533

polarCoordinatePlaneKDChart::AbstractPieDiagram,164KDChart::AbstractPolarDiagram,194KDChart::PieDiagram,518KDChart::PolarDiagram,578KDChart::RingDiagram,629

PolarDiagram

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 853

KDChart::PolarDiagram,561polarDiagram

KDChart::Widget,697Position

KDChart::CartesianAxis,268KDChart::Position,592

positionKDChart::CartesianAxis,286KDChart::HeaderFooter,378KDChart::Legend,416

PositionCenterKDChartEnums,394

positionChangedKDChart::HeaderFooter,378

PositionEastKDChartEnums,394

positionHasChangedKDChart::AbstractArea,35KDChart::AbstractAreaBase,41KDChart::AbstractAreaWidget,48KDChart::AbstractAxis,58KDChart::AbstractCoordinatePlane,106KDChart::CartesianAxis,286KDChart::CartesianCoordinatePlane,313KDChart::HeaderFooter,379KDChart::Legend,416KDChart::PolarCoordinatePlane,546KDChart::TextArea,651

PositionNorthKDChartEnums,394

PositionNorthEastKDChartEnums,394

PositionNorthWestKDChartEnums,394

PositionSouthKDChartEnums,394

PositionSouthEastKDChartEnums,394

PositionSouthWestKDChartEnums,394

PositionUnknownKDChartEnums,394

PositionValueKDChartEnums,394

PositionWestKDChartEnums,394

positivePositionKDChart::DataValueAttributes,358

powerOfTenDivisorKDChart::DataValueAttributes,358

prefixKDChart::DataValueAttributes,358

printableNameKDChart::Position,595

printableNamesKDChart::Position,596

propertiesChangedKDChart::AbstractCartesianDiagram,82KDChart::AbstractCoordinatePlane,106KDChart::AbstractDiagram,132KDChart::AbstractPieDiagram,164KDChart::AbstractPolarDiagram,194KDChart::BarDiagram,251KDChart::CartesianCoordinatePlane,314KDChart::Legend,417KDChart::LineDiagram,458KDChart::PieDiagram,518KDChart::PolarCoordinatePlane,546KDChart::PolarDiagram,578KDChart::RingDiagram,629

ptrKDChartCartesianAxis.cpp,740

Q_DECLARE_TYPEINFOKDChartBackgroundAttributes.h,735KDChartDataValueAttributes.h,753KDChartFrameAttributes.h,758KDChartGridAttributes.h,765KDChartLineAttributes.h,773KDChartMarkerAttributes.h,777KDChartPieAttributes.h,786KDChartPosition.h,797KDChartRelativePosition.h,799KDChartTextAttributes.h,805KDChartThreeDBarAttributes.h,807KDChartThreeDLineAttributes.h,809KDChartThreeDPieAttributes.h,811

Q_SLOTSKDChart::AbstractAxis,62KDChart::AbstractCoordinatePlane,113KDChart::CartesianAxis,293KDChart::CartesianCoordinatePlane,325KDChart::DatasetProxyModel,351KDChart::DatasetSelectorWidget,354KDChart::DiagramObserver,363KDChart::Legend,427KDChart::PolarCoordinatePlane,556KDChart::Widget,702

QAbstractItemView,598QAbstractProxyModel,599QFrame,600QLayoutItem,601QObject,602QSortFilterProxyModel,603QTextDocument,604QWidget,605

rainbowPalette

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

854 INDEX

KDChart::Palette,489realFont

KDChart::HeaderFooter,379KDChart::TextArea,651KDChart::TextLayoutItem,665

realFontSizeKDChart::HeaderFooter,379KDChart::TextArea,651KDChart::TextLayoutItem,666

rectangleKDChart::PaintContext,486

referenceAreaKDChart::Legend,417KDChart::Measure,484KDChart::RelativePosition,607

referenceCoordinatePlaneKDChart::AbstractCoordinatePlane,106KDChart::CartesianCoordinatePlane,314KDChart::PolarCoordinatePlane,546

referenceDiagramKDChart::AbstractCartesianDiagram,82KDChart::BarDiagram,252KDChart::LineDiagram,459

referenceDiagramOffsetKDChart::AbstractCartesianDiagram,83KDChart::BarDiagram,252KDChart::LineDiagram,459

referenceOrientationKDChart::Measure,484

referencePositionKDChart::RelativePosition,607

RelativePosition,25KDChart::RelativePosition,606

relativeThicknessKDChart::RingDiagram,629

relayoutKDChart::AbstractCoordinatePlane,106KDChart::CartesianCoordinatePlane,314KDChart::PolarCoordinatePlane,547

removeBrushKDChart::Palette,489

removeDiagramKDChart::Legend,417

removeDiagramsKDChart::Legend,417

removeFromParentLayoutKDChart::AbstractArea,35KDChart::AbstractAxis,58KDChart::AbstractCoordinatePlane,107KDChart::AbstractLayoutItem,142KDChart::CartesianAxis,287KDChart::CartesianCoordinatePlane,314KDChart::HeaderFooter,379KDChart::HorizontalLineLayoutItem,387

KDChart::MarkerLayoutItem,478KDChart::PolarCoordinatePlane,547KDChart::TextArea,651KDChart::TextLayoutItem,666KDChart::VerticalLineLayoutItem,686

replaceCoordinatePlaneKDChart::Chart,335

replaceDiagramKDChart::AbstractCoordinatePlane,107KDChart::CartesianCoordinatePlane,315KDChart::Legend,418KDChart::PolarCoordinatePlane,547

replaceHeaderFooterKDChart::Chart,336KDChart::Widget,697

replaceLegendKDChart::Chart,336KDChart::Widget,698

resetDataKDChart::Widget,698

resetDiagramKDChart::Legend,418

resetGridAttributesKDChart::CartesianCoordinatePlane,315KDChart::PolarCoordinatePlane,548

resetTextsKDChart::Legend,418

resetTitleTextAttributesKDChart::CartesianAxis,287

resizeKDChart::AbstractCartesianDiagram,83KDChart::AbstractDiagram,132KDChart::AbstractPieDiagram,164KDChart::AbstractPolarDiagram,195KDChart::BarDiagram,252KDChart::LineDiagram,459KDChart::PieDiagram,518KDChart::PolarDiagram,578KDChart::RingDiagram,630

resizeEventKDChart::BarDiagram,252KDChart::Chart,337KDChart::Legend,419KDChart::LineDiagram,459KDChart::PieDiagram,518KDChart::PolarCoordinatePlane,548KDChart::PolarDiagram,578KDChart::RingDiagram,630

RightKDChart::CartesianAxis,268

rightKDChart::Widget,702

RingKDChart::Widget,692

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 855

RingDiagramKDChart::RingDiagram,612

ringDiagramKDChart::Widget,698

rotateCircularLabelsKDChart::PolarDiagram,578

rotationKDChart::RelativePosition,607KDChart::TextAttributes,658

rowCountKDChart::AttributesModel,216

RowsKDChart::BarDiagram,230KDChart::Widget,692

scrollToKDChart::AbstractCartesianDiagram,83KDChart::AbstractDiagram,132KDChart::AbstractPieDiagram,164KDChart::AbstractPolarDiagram,195KDChart::BarDiagram,252KDChart::LineDiagram,459KDChart::PieDiagram,518KDChart::PolarDiagram,579KDChart::RingDiagram,630

sequenceKDChart::DataDimension,344

SET_SUB_TYPEKDChartWidget.cpp,812

setAlignmentKDChart::Legend,419KDChart::RelativePosition,607

setAllowOverlappingDataValueTextsKDChart::AbstractCartesianDiagram,83KDChart::AbstractDiagram,132KDChart::AbstractPieDiagram,164KDChart::AbstractPolarDiagram,195KDChart::BarDiagram,253KDChart::LineDiagram,460KDChart::PieDiagram,519KDChart::PolarDiagram,579KDChart::RingDiagram,630

setAngleKDChart::ThreeDBarAttributes,672

setAntiAliasingKDChart::AbstractCartesianDiagram,84KDChart::AbstractDiagram,132KDChart::AbstractPieDiagram,165KDChart::AbstractPolarDiagram,195KDChart::BarDiagram,253KDChart::LineDiagram,460KDChart::PieDiagram,519KDChart::PolarDiagram,579KDChart::RingDiagram,630

setAttributesModelKDChart::AbstractCartesianDiagram,84KDChart::AbstractDiagram,133KDChart::AbstractPieDiagram,165KDChart::AbstractPolarDiagram,196KDChart::BarDiagram,253KDChart::LineDiagram,460KDChart::PieDiagram,519KDChart::PolarDiagram,579KDChart::RingDiagram,631

setAttributesModelRootIndexKDChart::AbstractCartesianDiagram,85KDChart::AbstractDiagram,133KDChart::AbstractPieDiagram,166KDChart::AbstractPolarDiagram,196KDChart::BarDiagram,254KDChart::LineDiagram,461KDChart::PieDiagram,520KDChart::PolarDiagram,580KDChart::RingDiagram,631

setAutoReferenceAreaKDChart::HeaderFooter,379KDChart::TextArea,651KDChart::TextLayoutItem,666

setAutoRotateKDChart::TextAttributes,658

setAutoShrinkKDChart::TextAttributes,658

setAxesCalcModesKDChart::CartesianCoordinatePlane,316

setAxesCalcModeXKDChart::CartesianCoordinatePlane,316

setAxesCalcModeYKDChart::CartesianCoordinatePlane,316

setBackgroundAttributesKDChart::AbstractArea,35KDChart::AbstractAreaBase,41KDChart::AbstractAreaWidget,48KDChart::AbstractAxis,59KDChart::AbstractCoordinatePlane,108KDChart::CartesianAxis,287KDChart::CartesianCoordinatePlane,317KDChart::DataValueAttributes,358KDChart::HeaderFooter,380KDChart::Legend,419KDChart::PolarCoordinatePlane,548KDChart::TextArea,652

setBarAttributesKDChart::BarDiagram,254, 255

setBarGapFactorKDChart::BarAttributes,223

setBrushKDChart::AbstractCartesianDiagram,85KDChart::AbstractDiagram,134

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

856 INDEX

KDChart::AbstractPieDiagram,166KDChart::AbstractPolarDiagram,196, 197KDChart::BackgroundAttributes,220KDChart::BarDiagram,255KDChart::Legend,419KDChart::LineDiagram,461, 462KDChart::PieDiagram,520, 521KDChart::PolarDiagram,580, 581KDChart::RingDiagram,632

setBrushesFromDiagramKDChart::Legend,420

setCalculationModeKDChart::Measure,484

setColorKDChart::Legend,420

setCoordinatePlaneKDChart::AbstractCartesianDiagram,85KDChart::AbstractDiagram,134KDChart::AbstractPieDiagram,167KDChart::AbstractPolarDiagram,197KDChart::BarDiagram,255KDChart::LineDiagram,462KDChart::PaintContext,486KDChart::PieDiagram,521KDChart::PolarDiagram,581KDChart::RingDiagram,632

setCoordinatePlaneLayoutKDChart::Chart,337

setDataKDChart::AttributesModel,216

setDataBoundariesDirtyKDChart::AbstractCartesianDiagram,86KDChart::AbstractDiagram,135KDChart::AbstractPieDiagram,167KDChart::AbstractPolarDiagram,198KDChart::BarDiagram,256KDChart::LineDiagram,462KDChart::PieDiagram,521KDChart::PolarDiagram,581KDChart::RingDiagram,633

setDataLabelKDChart::DataValueAttributes,358

setDatasetKDChart::Widget,698, 699

setDatasetColumnDescriptionVectorKDChart::DatasetProxyModel,349

setDatasetDescriptionVectorsKDChart::DatasetProxyModel,349

setDatasetDimensionKDChart::AbstractCartesianDiagram,86KDChart::AbstractDiagram,135KDChart::AbstractPieDiagram,167KDChart::AbstractPolarDiagram,198KDChart::BarDiagram,256

KDChart::LineDiagram,463KDChart::PieDiagram,521KDChart::PolarDiagram,582KDChart::RingDiagram,633

setDatasetRowDescriptionVectorKDChart::DatasetProxyModel,350

setDataValueAttributesKDChart::AbstractCartesianDiagram,87KDChart::AbstractDiagram,135, 136KDChart::AbstractPieDiagram,168KDChart::AbstractPolarDiagram,198, 199KDChart::BarDiagram,257KDChart::LineDiagram,463, 464KDChart::PieDiagram,522KDChart::PolarDiagram,582, 583KDChart::RingDiagram,633, 634

setDecimalDigitsKDChart::DataValueAttributes,358

setDefaultColorsKDChart::Legend,420

setDepthKDChart::AbstractThreeDAttributes,208KDChart::ThreeDBarAttributes,673KDChart::ThreeDLineAttributes,678KDChart::ThreeDPieAttributes,682

setDiagramKDChart::Legend,421

setDisplayAreaKDChart::LineAttributes,429

setDrawSolidExcessArrowsKDChart::BarAttributes,223

setEnabledKDChart::AbstractThreeDAttributes,208KDChart::ThreeDBarAttributes,673KDChart::ThreeDLineAttributes,678KDChart::ThreeDPieAttributes,682

setExplodeKDChart::PieAttributes,493

setExplodeFactorKDChart::PieAttributes,493

setFixedBarWidthKDChart::BarAttributes,223

setFixedDataValueGapKDChart::BarAttributes,223

setFixedValueBlockGapKDChart::BarAttributes,223

setFontKDChart::TextAttributes,659

setFontSizeKDChart::TextAttributes,659

setFrameAttributesKDChart::AbstractArea,35KDChart::AbstractAreaBase,42KDChart::AbstractAreaWidget,49

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 857

KDChart::AbstractAxis,59KDChart::AbstractCoordinatePlane,108KDChart::CartesianAxis,287KDChart::CartesianCoordinatePlane,317KDChart::DataValueAttributes,358KDChart::HeaderFooter,380KDChart::Legend,421KDChart::PolarCoordinatePlane,549KDChart::TextArea,652

setGeometryKDChart::AbstractAxis,59KDChart::AbstractCoordinatePlane,108KDChart::CartesianAxis,288KDChart::CartesianCoordinatePlane,317KDChart::HeaderFooter,380KDChart::HorizontalLineLayoutItem,387KDChart::MarkerLayoutItem,478KDChart::PolarCoordinatePlane,549KDChart::TextArea,652KDChart::TextLayoutItem,666KDChart::VerticalLineLayoutItem,686

setGlobalGridAttributesKDChart::AbstractCoordinatePlane,108KDChart::CartesianCoordinatePlane,318KDChart::PolarCoordinatePlane,549

setGlobalLeadingKDChart::Chart,337

setGlobalLeadingBottomKDChart::Chart,338KDChart::Widget,699

setGlobalLeadingLeftKDChart::Chart,338KDChart::Widget,699

setGlobalLeadingRightKDChart::Chart,338KDChart::Widget,700

setGlobalLeadingTopKDChart::Chart,339KDChart::Widget,700

setGranularityKDChart::AbstractPieDiagram,169KDChart::PieDiagram,523KDChart::RingDiagram,634

setGridAttributesKDChart::CartesianCoordinatePlane,318KDChart::PolarCoordinatePlane,550

setGridGranularitySequenceKDChart::GridAttributes,367

setGridPenKDChart::GridAttributes,367

setGridStepWidthKDChart::GridAttributes,367

setGridSubStepWidthKDChart::GridAttributes,367

setGridVisibleKDChart::GridAttributes,367

setGroupGapFactorKDChart::BarAttributes,223

setHeaderDataKDChart::AttributesModel,216

setHorizontalPaddingKDChart::RelativePosition,607

setHorizontalRangeKDChart::CartesianCoordinatePlane,319

setIsometricScalingKDChart::CartesianCoordinatePlane,319

setLabelsKDChart::AbstractAxis,59KDChart::CartesianAxis,288

setLineAttributesKDChart::LineDiagram,464, 465

setLineXRotationKDChart::ThreeDLineAttributes,678

setLineYRotationKDChart::ThreeDLineAttributes,678

setMarkerAttributesKDChart::DataValueAttributes,359KDChart::Legend,421

setMarkerColorKDChart::MarkerAttributes,475

setMarkerSizeKDChart::MarkerAttributes,475

setMarkerStyleKDChart::MarkerAttributes,475

setMarkerStylesMapKDChart::MarkerAttributes,475

setMinimalFontSizeKDChart::TextAttributes,659

setMissingValuesPolicyKDChart::LineAttributes,429

setModelKDChart::AbstractCartesianDiagram,88KDChart::AbstractDiagram,136KDChart::AbstractPieDiagram,169KDChart::AbstractPolarDiagram,199KDChart::BarDiagram,258KDChart::LineDiagram,465KDChart::PieDiagram,523KDChart::PolarDiagram,583KDChart::RingDiagram,635

setModelDataKDChart::AttributesModel,217

setNeedRebuildKDChart::Legend,421

setNegativePositionKDChart::DataValueAttributes,359

setOrientationKDChart::Legend,422

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

858 INDEX

setPaddingKDChart::FrameAttributes,365

setPainterKDChart::PaintContext,486

setPaletteTypeKDChart::AttributesModel,217

setParentKDChart::AbstractCoordinatePlane,109KDChart::CartesianCoordinatePlane,319KDChart::HeaderFooter,380KDChart::PolarCoordinatePlane,550

setParentLayoutKDChart::AbstractArea,35KDChart::AbstractAxis,60KDChart::AbstractCoordinatePlane,109KDChart::AbstractLayoutItem,142KDChart::CartesianAxis,288KDChart::CartesianCoordinatePlane,320KDChart::HeaderFooter,381KDChart::HorizontalLineLayoutItem,387KDChart::MarkerLayoutItem,479KDChart::PolarCoordinatePlane,551KDChart::TextArea,652KDChart::TextLayoutItem,667KDChart::VerticalLineLayoutItem,686

setParentWidgetKDChart::AbstractArea,36KDChart::AbstractAxis,60KDChart::AbstractCoordinatePlane,109KDChart::AbstractLayoutItem,142KDChart::CartesianAxis,288KDChart::CartesianCoordinatePlane,320KDChart::HeaderFooter,381KDChart::HorizontalLineLayoutItem,387KDChart::MarkerLayoutItem,479KDChart::PolarCoordinatePlane,551KDChart::TextArea,653KDChart::TextLayoutItem,667KDChart::VerticalLineLayoutItem,686

setPenKDChart::AbstractCartesianDiagram,88KDChart::AbstractDiagram,137KDChart::AbstractPieDiagram,169, 170KDChart::AbstractPolarDiagram,199, 200KDChart::BarDiagram,258KDChart::FrameAttributes,365KDChart::Legend,422KDChart::LineDiagram,465, 466KDChart::MarkerAttributes,475KDChart::PieDiagram,524KDChart::PolarDiagram,583, 584KDChart::RingDiagram,635, 636KDChart::TextAttributes,659

setPercentMode

KDChart::AbstractCartesianDiagram,89KDChart::AbstractDiagram,137KDChart::AbstractPieDiagram,170KDChart::AbstractPolarDiagram,200KDChart::BarDiagram,259KDChart::LineDiagram,466KDChart::PieDiagram,524KDChart::PolarDiagram,584KDChart::RingDiagram,636

setPieAttributesKDChart::AbstractPieDiagram,170KDChart::PieDiagram,524, 525KDChart::RingDiagram,636

setPixmapKDChart::BackgroundAttributes,220

setPixmapModeKDChart::BackgroundAttributes,220

setPositionKDChart::CartesianAxis,289KDChart::HeaderFooter,381KDChart::Legend,422

setPositivePositionKDChart::DataValueAttributes,359

setPowerOfTenDivisorKDChart::DataValueAttributes,359

setPrefixKDChart::DataValueAttributes,359

setRainbowColorsKDChart::Legend,422

setRectangleKDChart::PaintContext,486

setReferenceAreaKDChart::Legend,423KDChart::Measure,484KDChart::RelativePosition,607

setReferenceCoordinatePlaneKDChart::AbstractCoordinatePlane,110KDChart::CartesianCoordinatePlane,320KDChart::PolarCoordinatePlane,551

setReferenceDiagramKDChart::AbstractCartesianDiagram,89KDChart::BarDiagram,259KDChart::LineDiagram,466

setReferenceOrientationKDChart::Measure,485

setReferencePositionKDChart::RelativePosition,607

setRelativeModeKDChart::Measure,485

setRelativeThicknessKDChart::RingDiagram,636

setRootIndexKDChart::AbstractCartesianDiagram,89KDChart::AbstractDiagram,138

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 859

KDChart::AbstractPieDiagram,171KDChart::AbstractPolarDiagram,200KDChart::BarDiagram,259KDChart::LineDiagram,466KDChart::PieDiagram,525KDChart::PolarDiagram,584KDChart::RingDiagram,637

setRotateCircularLabelsKDChart::PolarDiagram,585

setRotationKDChart::RelativePosition,607KDChart::TextAttributes,659

setSelectionKDChart::AbstractCartesianDiagram,89KDChart::AbstractDiagram,138KDChart::AbstractPieDiagram,171KDChart::AbstractPolarDiagram,201KDChart::BarDiagram,259KDChart::LineDiagram,467KDChart::PieDiagram,525KDChart::PolarDiagram,585KDChart::RingDiagram,637

setShortLabelsKDChart::AbstractAxis,60KDChart::CartesianAxis,289

setShowDelimitersAtPositionKDChart::PolarDiagram,585

setShowInfiniteKDChart::DataValueAttributes,359

setShowLabelsAtPositionKDChart::PolarDiagram,585

setShowLinesKDChart::Legend,423

setSourceColumnCountKDChart::DatasetSelectorWidget,354

setSourceModelKDChart::AttributesModel,217KDChart::DatasetProxyModel,350

setSourceRootIndexKDChart::DatasetProxyModel,350

setSpacingKDChart::Legend,423

setStartPositionKDChart::AbstractPieDiagram,171KDChart::PieDiagram,525KDChart::RingDiagram,637

setSubduedColorsKDChart::Legend,424

setSubGridPenKDChart::GridAttributes,367

setSubGridVisibleKDChart::GridAttributes,367

setSubTypeKDChart::Widget,700

setSuffixKDChart::DataValueAttributes,359

setTextKDChart::HeaderFooter,381KDChart::Legend,425KDChart::TextArea,653KDChart::TextLayoutItem,667

setTextAttributesKDChart::AbstractAxis,60KDChart::CartesianAxis,289KDChart::DataValueAttributes,359KDChart::HeaderFooter,382KDChart::Legend,425KDChart::TextArea,653KDChart::TextLayoutItem,667

setThreeDBarAttributesKDChart::BarDiagram,259, 260

setThreeDLineAttributesKDChart::LineDiagram,467

setThreeDPieAttributesKDChart::AbstractPieDiagram,171, 172KDChart::PieDiagram,525, 526KDChart::RingDiagram,637, 638

setTitleTextKDChart::CartesianAxis,290KDChart::Legend,425

setTitleTextAttributesKDChart::CartesianAxis,290KDChart::Legend,425

setTransparencyKDChart::LineAttributes,429

setTypeKDChart::BarDiagram,260KDChart::HeaderFooter,382KDChart::LineDiagram,468

setUseFixedBarWidthKDChart::BarAttributes,223

setUseFixedDataValueGapKDChart::BarAttributes,223

setUseFixedValueBlockGapKDChart::BarAttributes,223

setUseShadowColorsKDChart::ThreeDBarAttributes,673KDChart::ThreeDPieAttributes,682

setValueKDChart::Measure,485

setVerticalPaddingKDChart::RelativePosition,607

setVerticalRangeKDChart::CartesianCoordinatePlane,320

setVisibleKDChart::BackgroundAttributes,220KDChart::DataValueAttributes,360KDChart::FrameAttributes,365

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

860 INDEX

KDChart::Legend,425KDChart::MarkerAttributes,475KDChart::TextAttributes,659

setZeroDegreePositionKDChart::PolarDiagram,585

setZeroLinePenKDChart::GridAttributes,367

setZoomCenterKDChart::AbstractCoordinatePlane,110KDChart::CartesianCoordinatePlane,321KDChart::PolarCoordinatePlane,551

setZoomFactorXKDChart::AbstractCoordinatePlane,110KDChart::CartesianCoordinatePlane,321KDChart::PolarCoordinatePlane,552

setZoomFactorYKDChart::AbstractCoordinatePlane,110KDChart::CartesianCoordinatePlane,322KDChart::PolarCoordinatePlane,552

shortLabelsKDChart::AbstractAxis,61KDChart::CartesianAxis,290

showDelimitersAtPositionKDChart::PolarDiagram,586

showInfiniteKDChart::DataValueAttributes,360

showLabelsAtPositionKDChart::PolarDiagram,586

showLinesKDChart::Legend,426

sizeKDChart::Palette,490

sizeHintKDChart::AbstractCoordinatePlane,111KDChart::CartesianAxis,291KDChart::CartesianCoordinatePlane,322KDChart::HeaderFooter,382KDChart::HorizontalLineLayoutItem,388KDChart::MarkerLayoutItem,479KDChart::PolarCoordinatePlane,552KDChart::TextArea,654KDChart::TextLayoutItem,668KDChart::VerticalLineLayoutItem,687KDTextDocument,401

sizeHintChangedKDChart::AbstractArea,36KDChart::AbstractAxis,61KDChart::AbstractCoordinatePlane,111KDChart::AbstractLayoutItem,142KDChart::CartesianAxis,291KDChart::CartesianCoordinatePlane,322KDChart::HeaderFooter,383KDChart::HorizontalLineLayoutItem,388KDChart::MarkerLayoutItem,479

KDChart::PolarCoordinatePlane,553KDChart::TextArea,654KDChart::TextLayoutItem,668KDChart::VerticalLineLayoutItem,687

sizePolicyKDChart::AbstractCoordinatePlane,111KDChart::CartesianCoordinatePlane,322KDChart::PolarCoordinatePlane,553

slotAttributesChangedKDChart::DiagramObserver,362

slotDataChangedKDChart::DiagramObserver,363

slotModelsChangedKDChart::DiagramObserver,363

SouthKDChart::Position,597

SouthEastKDChart::Position,597

SouthWestKDChart::Position,597

spacingKDChart::Legend,426

StackedKDChart::BarDiagram,230KDChart::LineDiagram,436KDChart::Widget,692

startKDChart::DataDimension,344

startPositionKDChart::AbstractPieDiagram,172KDChart::PieDiagram,526KDChart::RingDiagram,638

staticPositionCenterKDChartPosition.cpp,795

staticPositionEastKDChartPosition.cpp,795

staticPositionNamesKDChartPosition.cpp,795

staticPositionNorthKDChartPosition.cpp,795

staticPositionNorthEastKDChartPosition.cpp,795

staticPositionNorthWestKDChartPosition.cpp,795

staticPositionSouthKDChartPosition.cpp,795

staticPositionSouthEastKDChartPosition.cpp,796

staticPositionSouthWestKDChartPosition.cpp,796

staticPositionUnknownKDChartPosition.cpp,796

staticPositionWestKDChartPosition.cpp,796

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 861

stepWidthKDChart::DataDimension,344

stringToGranularitySequenceKDChartEnums,397

stringToLayoutPolicyKDChartEnums,398

stringToMeasureCalculationModeKDChartEnums,398

stringToMeasureOrientationKDChartEnums,398

subduedPaletteKDChart::Palette,490

subGridPenKDChart::GridAttributes,367

subStepWidthKDChart::DataDimension,344

SubTypeKDChart::Widget,692

subTypeKDChart::Widget,701, 702

suffixKDChart::DataValueAttributes,360

takeAxisKDChart::AbstractCartesianDiagram,89KDChart::BarDiagram,261KDChart::LineDiagram,468

takeCoordinatePlaneKDChart::Chart,339

takeDiagramKDChart::AbstractCoordinatePlane,111KDChart::CartesianCoordinatePlane,323KDChart::PolarCoordinatePlane,553

takeHeaderFooterKDChart::Chart,340KDChart::Widget,701

takeLegendKDChart::Chart,340KDChart::Widget,701

TEST_SUB_TYPEKDChartWidget.cpp,813

textKDChart::HeaderFooter,383KDChart::Legend,426KDChart::TextArea,654KDChart::TextLayoutItem,668

TextAreaKDChart::TextArea,644

TextAttributes,26KDChart::TextAttributes,657

textAttributesKDChart::AbstractAxis,61KDChart::CartesianAxis,291KDChart::DataValueAttributes,360

KDChart::HeaderFooter,383KDChart::Legend,426KDChart::TextArea,654KDChart::TextLayoutItem,669

TextLayoutItemKDChart::TextLayoutItem,662

TextLayoutPolicyKDChartEnums,395

ThreeDAttributesRoleKDChart,19

ThreeDBarAttributesKDChart::ThreeDBarAttributes,670

threeDBarAttributesKDChart::BarDiagram,261, 262

ThreeDBarAttributesRoleKDChart,20

threeDItemDepthKDChart::AbstractCartesianDiagram,90KDChart::BarDiagram,262KDChart::LineDiagram,469

ThreeDLineAttributesKDChart::ThreeDLineAttributes,675

threeDLineAttributesKDChart::LineDiagram,469, 470

ThreeDLineAttributesRoleKDChart,19

ThreeDPieAttributesKDChart::ThreeDPieAttributes,680

threeDPieAttributesKDChart::AbstractPieDiagram,172, 173KDChart::PieDiagram,526, 527KDChart::RingDiagram,638, 639

ThreeDPieAttributesRoleKDChart,20

tickLengthKDChart::CartesianAxis,291

titleTextKDChart::CartesianAxis,292KDChart::Legend,427

titleTextAttributesKDChart::CartesianAxis,292KDChart::Legend,427

TopKDChart::CartesianAxis,268

topKDChart::Widget,703

translateKDChart::AbstractCoordinatePlane,112KDChart::CartesianCoordinatePlane,323KDChart::PolarCoordinatePlane,554

translatePolarKDChart::PolarCoordinatePlane,554

transparencyKDChart::LineAttributes,429

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

862 INDEX

typeKDChart::BarDiagram,262KDChart::HeaderFooter,384KDChart::LineDiagram,470KDChart::Widget,702

Ui, 27Unknown

KDChart::Position,597update

KDChart::AbstractCartesianDiagram,90KDChart::AbstractDiagram,138KDChart::AbstractPieDiagram,173KDChart::AbstractPolarDiagram,201KDChart::BarDiagram,263KDChart::LineDiagram,470KDChart::PieDiagram,527KDChart::PolarDiagram,586KDChart::RingDiagram,639

useDefaultColorsKDChart::AbstractCartesianDiagram,90KDChart::AbstractDiagram,138KDChart::AbstractPieDiagram,173KDChart::AbstractPolarDiagram,201KDChart::BarDiagram,263KDChart::LineDiagram,470KDChart::PieDiagram,527KDChart::PolarDiagram,586KDChart::RingDiagram,639

useFixedBarWidthKDChart::BarAttributes,223

useFixedDataValueGapKDChart::BarAttributes,223

useFixedValueBlockGapKDChart::BarAttributes,223

useRainbowColorsKDChart::AbstractCartesianDiagram,90KDChart::AbstractDiagram,138KDChart::AbstractPieDiagram,173KDChart::AbstractPolarDiagram,201KDChart::BarDiagram,263KDChart::LineDiagram,470KDChart::PieDiagram,528KDChart::PolarDiagram,586KDChart::RingDiagram,639

useShadowColorsKDChart::ThreeDBarAttributes,673KDChart::ThreeDPieAttributes,683

useSubduedColorsKDChart::AbstractCartesianDiagram,91KDChart::AbstractDiagram,139KDChart::AbstractPieDiagram,174KDChart::AbstractPolarDiagram,201KDChart::BarDiagram,263

KDChart::LineDiagram,471KDChart::PieDiagram,528KDChart::PolarDiagram,587KDChart::RingDiagram,640

validDepthKDChart::AbstractThreeDAttributes,208KDChart::ThreeDBarAttributes,673KDChart::ThreeDLineAttributes,678KDChart::ThreeDPieAttributes,683

valueKDChart::Measure,485KDChart::Position,596

valueForCellKDChart::AbstractCartesianDiagram,91KDChart::AbstractDiagram,139KDChart::AbstractPieDiagram,174KDChart::AbstractPolarDiagram,202KDChart::BarDiagram,263KDChart::LineDiagram,471KDChart::PieDiagram,528KDChart::PolarDiagram,587KDChart::RingDiagram,640

valueForCellTestingKDChart::LineDiagram,471

valueTotalsKDChart::AbstractPieDiagram,174KDChart::AbstractPolarDiagram,202KDChart::PieDiagram,528KDChart::PolarDiagram,587KDChart::RingDiagram,640

VerticalLineLayoutItemKDChart::VerticalLineLayoutItem,684

verticalOffsetKDChart::AbstractCartesianDiagram,91KDChart::AbstractDiagram,139KDChart::AbstractPieDiagram,174KDChart::AbstractPolarDiagram,202KDChart::BarDiagram,264KDChart::LineDiagram,472KDChart::PieDiagram,529KDChart::PolarDiagram,588KDChart::RingDiagram,641

verticalPaddingKDChart::RelativePosition,607

verticalRangeKDChart::CartesianCoordinatePlane,324

visualRectKDChart::AbstractCartesianDiagram,91KDChart::AbstractDiagram,139KDChart::AbstractPieDiagram,174KDChart::AbstractPolarDiagram,202KDChart::BarDiagram,264KDChart::LineDiagram,472

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen

INDEX 863

KDChart::PieDiagram,529KDChart::PolarDiagram,588KDChart::RingDiagram,641

visualRegionForSelectionKDChart::AbstractCartesianDiagram,92KDChart::AbstractDiagram,140KDChart::AbstractPieDiagram,175KDChart::AbstractPolarDiagram,203KDChart::BarDiagram,264KDChart::LineDiagram,472KDChart::PieDiagram,529KDChart::PolarDiagram,588KDChart::RingDiagram,641

WestKDChart::Position,597

WidgetKDChart::Widget,692

xCenterKDChart::ZoomParameters,704

xFactorKDChart::ZoomParameters,704

yCenterKDChart::ZoomParameters,704

yFactorKDChart::ZoomParameters,704

zeroDegreePositionKDChart::PolarDiagram,588

zeroLinePenKDChart::GridAttributes,367

zoomCenterKDChart::AbstractCoordinatePlane,112KDChart::CartesianCoordinatePlane,324KDChart::PolarCoordinatePlane,554

zoomFactorXKDChart::AbstractCoordinatePlane,112KDChart::CartesianCoordinatePlane,324KDChart::PolarCoordinatePlane,555

zoomFactorYKDChart::AbstractCoordinatePlane,113KDChart::CartesianCoordinatePlane,324KDChart::PolarCoordinatePlane,555

ZoomParametersKDChart::ZoomParameters,704

Generated on Fri Sep 29 03:56:34 2006 for KD Chart 2 by Doxygen