File indexing completed on 2024-06-16 04:09:12
0001 /* 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KD Chart library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KCHARTABSTRACTPOLARDIAGRAM_H 0010 #define KCHARTABSTRACTPOLARDIAGRAM_H 0011 0012 #include "KChartPolarCoordinatePlane.h" 0013 #include "KChartAbstractDiagram.h" 0014 0015 namespace KChart { 0016 0017 class GridAttributes; 0018 0019 /** 0020 * @brief Base class for diagrams based on a polar coordinate system. 0021 */ 0022 class KCHART_EXPORT AbstractPolarDiagram : public AbstractDiagram 0023 { 0024 Q_OBJECT 0025 Q_DISABLE_COPY( AbstractPolarDiagram ) 0026 KCHART_DECLARE_DERIVED_DIAGRAM( AbstractPolarDiagram, PolarCoordinatePlane ) 0027 0028 public: 0029 explicit AbstractPolarDiagram ( 0030 QWidget* parent = nullptr, PolarCoordinatePlane* plane = nullptr ); 0031 ~AbstractPolarDiagram() override {} 0032 0033 virtual qreal valueTotals () const = 0; 0034 virtual qreal numberOfValuesPerDataset() const = 0; 0035 virtual qreal numberOfDatasets() const { return 1; }; 0036 virtual qreal numberOfGridRings() const = 0; 0037 0038 const PolarCoordinatePlane * polarCoordinatePlane() const; 0039 0040 int columnCount() const; 0041 int rowCount() const; 0042 }; 0043 0044 } 0045 0046 #endif