1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4// W A R N I N G
5// -------------
6//
7// This file is not part of the Qt Chart API. It exists purely as an
8// implementation detail. This header file may change from version to
9// version without notice, or even be removed.
10//
11// We mean it.
12
13#ifndef QPIESLICE_P_H
14#define QPIESLICE_P_H
15
16#include <QtCore/QObject>
17#include <QtCharts/QPieSlice>
18#include <private/pieslicedata_p.h>
19#include <QtCharts/private/qchartglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22class QPieSeries;
23
24class Q_CHARTS_PRIVATE_EXPORT QPieSlicePrivate : public QObject
25{
26 Q_OBJECT
27
28public:
29 QPieSlicePrivate(QPieSlice *parent);
30 ~QPieSlicePrivate();
31
32 static QPieSlicePrivate *fromSlice(QPieSlice *slice);
33
34 void setPen(const QPen &pen, bool themed);
35 void setBrush(const QBrush &brush, bool themed);
36 void setLabelBrush(const QBrush &brush, bool themed);
37 void setLabelFont(const QFont &font, bool themed);
38
39 void setPercentage(qreal percentage);
40 void setStartAngle(qreal angle);
41 void setAngleSpan(qreal span);
42
43Q_SIGNALS:
44 void labelPositionChanged();
45 void explodedChanged();
46 void labelArmLengthFactorChanged();
47 void explodeDistanceFactorChanged();
48
49private:
50 friend class QPieSeries;
51 friend class QPieSeriesPrivate;
52 friend class ChartThemeManager;
53 friend class PieChartItem;
54
55 QPieSlice * const q_ptr;
56 Q_DECLARE_PUBLIC(QPieSlice)
57
58 PieSliceData m_data;
59 QPieSeries *m_series;
60};
61
62QT_END_NAMESPACE
63
64#endif // QPIESLICE_P_H
65

source code of qtcharts/src/charts/piechart/qpieslice_p.h