| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QPIELEGENDMARKER_H |
| 5 | #define QPIELEGENDMARKER_H |
| 6 | |
| 7 | #include <QtCharts/QChartGlobal> |
| 8 | #include <QtCharts/QLegendMarker> |
| 9 | #include <QtCharts/QPieSeries> |
| 10 | #include <QtCharts/QPieSlice> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | class QPieLegendMarkerPrivate; |
| 15 | |
| 16 | class Q_CHARTS_EXPORT QPieLegendMarker : public QLegendMarker |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | |
| 20 | public: |
| 21 | explicit QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend *legend, QObject *parent = nullptr); |
| 22 | virtual ~QPieLegendMarker(); |
| 23 | |
| 24 | LegendMarkerType type() override { return LegendMarkerTypePie; } |
| 25 | |
| 26 | // Related series and slice |
| 27 | QPieSeries* series() override; |
| 28 | QPieSlice* slice(); |
| 29 | |
| 30 | protected: |
| 31 | QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent = nullptr); |
| 32 | |
| 33 | private: |
| 34 | Q_DECLARE_PRIVATE(QPieLegendMarker) |
| 35 | Q_DISABLE_COPY(QPieLegendMarker) |
| 36 | |
| 37 | }; |
| 38 | |
| 39 | QT_END_NAMESPACE |
| 40 | #endif // QPIELEGENDMARKER_H |
| 41 |
