KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartAbstractCartesianDiagram.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDCHARTABSTRACTCARTESIANDIAGRAM_H
12#define KDCHARTABSTRACTCARTESIANDIAGRAM_H
13
17
18namespace KDChart {
19
20class GridAttributes;
21
29class KDCHART_EXPORT AbstractCartesianDiagram : public AbstractDiagram
30{
31 Q_OBJECT
32 Q_DISABLE_COPY(AbstractCartesianDiagram)
34
35public:
36 explicit AbstractCartesianDiagram(QWidget *parent = nullptr, CartesianCoordinatePlane *plane = nullptr);
38
42 bool compare(const AbstractCartesianDiagram *other) const;
43
44#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && defined(Q_COMPILER_MANGLES_RETURN_TYPE)
45 virtual const int numberOfAbscissaSegments() const = 0;
46 virtual const int numberOfOrdinateSegments() const = 0;
47#else
48 virtual int numberOfAbscissaSegments() const = 0;
49 virtual int numberOfOrdinateSegments() const = 0;
50#endif
60 virtual void addAxis(CartesianAxis *axis);
69 virtual void takeAxis(CartesianAxis *axis);
73 virtual KDChart::CartesianAxisList axes() const;
74
79 virtual void layoutPlanes();
81 void setCoordinatePlane(AbstractCoordinatePlane *plane) override;
82
90 virtual void setReferenceDiagram(AbstractCartesianDiagram *diagram, const QPointF &offset = QPointF());
95 virtual AbstractCartesianDiagram *referenceDiagram() const;
100 virtual QPointF referenceDiagramOffset() const;
101
102 /* reimp */
103 void setModel(QAbstractItemModel *model) override;
104 /* reimp */
105 void setRootIndex(const QModelIndex &index) override;
106 /* reimp */
107 void setAttributesModel(AttributesModel *amodel) override;
108
109protected Q_SLOTS:
110 void connectAttributesModel(AttributesModel *);
111
112protected:
114 virtual qreal threeDItemDepth(const QModelIndex &index) const = 0;
116 virtual qreal threeDItemDepth(int column) const = 0;
117};
118}
119
120#endif
#define KDCHART_DECLARE_DERIVED_DIAGRAM(X, PLANE)
Base class for diagrams based on a cartesian coordianate system.
virtual qreal threeDItemDepth(int column) const =0
virtual int numberOfOrdinateSegments() const =0
virtual qreal threeDItemDepth(const QModelIndex &index) const =0
virtual int numberOfAbscissaSegments() const =0
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
AbstractDiagram defines the interface for diagram classes.
A proxy model used for decorating data with attributes.

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8