summaryrefslogtreecommitdiffstats
path: root/examples/charts/chartsgallery/nesteddonutswidget.h
blob: 7dfc95c114bff659a92f90d46446903a6ee3ed95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef NESTEDDONUTSWIDGET_H
#define NESTEDDONUTSWIDGET_H

#include "contentwidget.h"

QT_FORWARD_DECLARE_CLASS(QTimer)
QT_FORWARD_DECLARE_CLASS(QPieSeries)

class NestedDonutsWidget : public ContentWidget
{
    Q_OBJECT
public:
    NestedDonutsWidget(QWidget *parent = nullptr);

public slots:
    void updateRotation();
    void explodeSlice(bool exploded);

private:
    QList<QPieSeries *> m_donuts;
    QTimer *m_updateTimer = nullptr;
};

#endif