diff options
Diffstat (limited to 'examples/charts/chartsgallery/piedrilldownslice.h')
-rw-r--r-- | examples/charts/chartsgallery/piedrilldownslice.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/charts/chartsgallery/piedrilldownslice.h b/examples/charts/chartsgallery/piedrilldownslice.h new file mode 100644 index 00000000..9579c42e --- /dev/null +++ b/examples/charts/chartsgallery/piedrilldownslice.h @@ -0,0 +1,27 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef PIEDRILLDOWNSLICE_H +#define PIEDRILLDOWNSLICE_H + +#include <QPieSlice> + +QT_FORWARD_DECLARE_CLASS(QAbstractSeries); + +class PieDrilldownSlice : public QPieSlice +{ + Q_OBJECT +public: + PieDrilldownSlice(qreal value, const QString &prefix, QAbstractSeries *drilldownSeries); + QAbstractSeries *drilldownSeries() const; + +public slots: + void updateLabel(); + void showHighlight(bool show); + +private: + QAbstractSeries *m_drilldownSeries = nullptr; + QString m_prefix; +}; + +#endif |