summaryrefslogtreecommitdiffstats
path: root/examples/charts/chartsgallery/piedrilldownchart.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/charts/chartsgallery/piedrilldownchart.h')
-rw-r--r--examples/charts/chartsgallery/piedrilldownchart.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/charts/chartsgallery/piedrilldownchart.h b/examples/charts/chartsgallery/piedrilldownchart.h
new file mode 100644
index 00000000..66c54f9b
--- /dev/null
+++ b/examples/charts/chartsgallery/piedrilldownchart.h
@@ -0,0 +1,26 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef PIEDRILLDOWNCHART_H
+#define PIEDRILLDOWNCHART_H
+
+#include <QChart>
+
+QT_FORWARD_DECLARE_CLASS(QAbstractSeries);
+QT_FORWARD_DECLARE_CLASS(QPieSlice);
+
+class PieDrilldownChart : public QChart
+{
+ Q_OBJECT
+public:
+ explicit PieDrilldownChart(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = {});
+ void changeSeries(QAbstractSeries *series);
+
+public slots:
+ void handleSliceClicked(QPieSlice *slice);
+
+private:
+ QAbstractSeries *m_currentSeries = nullptr;
+};
+
+#endif