KD Chart API Documentation  3.1
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 
14 #include "KDChartAbstractDiagram.h"
15 #include "KDChartCartesianAxis.h"
17 
18 namespace KDChart {
19 
20 class GridAttributes;
21 
29 class KDCHART_EXPORT AbstractCartesianDiagram : public AbstractDiagram
30 {
31  Q_OBJECT
32  Q_DISABLE_COPY(AbstractCartesianDiagram)
34 
35 public:
36  explicit AbstractCartesianDiagram(QWidget *parent = nullptr, CartesianCoordinatePlane *plane = nullptr);
37  ~AbstractCartesianDiagram() override;
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 
109 protected Q_SLOTS:
110  void connectAttributesModel(AttributesModel *);
111 
112 protected:
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.
QList< CartesianAxis * > CartesianAxisList

© 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 by doxygen 1.9.1