diff options
Diffstat (limited to 'examples/charts/chartsgallery/donutbreakdownchart.h')
-rw-r--r-- | examples/charts/chartsgallery/donutbreakdownchart.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/charts/chartsgallery/donutbreakdownchart.h b/examples/charts/chartsgallery/donutbreakdownchart.h new file mode 100644 index 00000000..5cfc574e --- /dev/null +++ b/examples/charts/chartsgallery/donutbreakdownchart.h @@ -0,0 +1,25 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef DONUTBREAKDOWNCHART_H +#define DONUTBREAKDOWNCHART_H + +#include <QChart> + +QT_FORWARD_DECLARE_CLASS(QPieSeries) + +class DonutBreakdownChart : public QChart +{ +public: + DonutBreakdownChart(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = {}); + void addBreakdownSeries(QPieSeries *series, QColor color); + +private: + void recalculateAngles(); + void updateLegendMarkers(); + +private: + QPieSeries *m_mainSeries = nullptr; +}; + +#endif |