File indexing completed on 2024-05-26 04:23:58
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_P_H 0010 #define KCHARTTERNARYCOORDINATEPLANE_P_H 0011 0012 // 0013 // W A R N I N G 0014 // ------------- 0015 // 0016 // This file is not part of the KD Chart API. It exists purely as an 0017 // implementation detail. This header file may change from version to 0018 // version without notice, or even be removed. 0019 // 0020 // We mean it. 0021 // 0022 0023 #include "KChartTernaryCoordinatePlane.h" 0024 #include "KChartTernaryGrid.h" 0025 #include "KChartAbstractCoordinatePlane_p.h" 0026 #include "KChartMath_p.h" 0027 0028 #include <QRectF> 0029 0030 namespace KChart { 0031 0032 class TernaryAxis; 0033 0034 /** 0035 * \internal 0036 */ 0037 0038 class Q_DECL_HIDDEN TernaryCoordinatePlane::Private : public AbstractCoordinatePlane::Private 0039 { 0040 friend class TernaryCoordinatePlane; 0041 0042 public: 0043 explicit Private(); 0044 0045 ~Private() override { 0046 // grid is delete in base class dtor 0047 } 0048 0049 void initialize() override 0050 { 0051 grid = new TernaryGrid(); 0052 xUnit = 0.0; 0053 yUnit = 0.0; 0054 } 0055 0056 QList<TernaryAxis*> axes; 0057 0058 TextAttributes labelAttributes; 0059 0060 // the diagram is drawn within this rectangle, which is within 0061 // this widget: 0062 QRectF diagramRectContainer; 0063 // this is the "frame" of the plot area 0064 QRectF diagramRect; 0065 // multiply m_xUnit with a [0..1] value to get an isometric 0066 // widget coordinate 0067 qreal xUnit; 0068 // same for y: 0069 qreal yUnit; 0070 0071 }; 0072 0073 KCHART_IMPL_DERIVED_PLANE(TernaryCoordinatePlane, AbstractCoordinatePlane) 0074 } 0075 0076 #endif /* KCHARTTERNARYCOORDINATEPLANE_P_H */