File indexing completed on 2024-12-15 04:02:36

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 KCHARTTERNARYCOORDINATEPLANE_H
0010 #define KCHARTTERNARYCOORDINATEPLANE_H
0011 
0012 #include "KChartAbstractCoordinatePlane.h"
0013 
0014 namespace KChart {
0015 
0016     class TernaryGrid;
0017 
0018     /**
0019       * @brief Ternary coordinate plane
0020       */
0021     class KCHART_EXPORT TernaryCoordinatePlane
0022         : public AbstractCoordinatePlane
0023     {
0024         Q_OBJECT
0025         Q_DISABLE_COPY( TernaryCoordinatePlane )
0026         KCHART_DECLARE_PRIVATE_DERIVED_PARENT( TernaryCoordinatePlane, Chart* )
0027 
0028     public:
0029         explicit TernaryCoordinatePlane( Chart* parent = nullptr );
0030         ~TernaryCoordinatePlane() override;
0031 
0032         void addDiagram( AbstractDiagram* diagram ) override;
0033 
0034         void layoutDiagrams() override;
0035 
0036         const QPointF translate ( const QPointF& diagramPoint ) const override;
0037 
0038         void paint( QPainter* ) override;
0039         DataDimensionsList getDataDimensionsList() const override;
0040 
0041         /** \reimpl */
0042         QSize minimumSizeHint() const;
0043         /** \reimpl */
0044         QSizePolicy sizePolicy() const;
0045 
0046     private:
0047         TernaryGrid* grid() const;
0048     };
0049 
0050 }
0051 
0052 #endif