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 CHARTBACKGROUND_H
14#define CHARTBACKGROUND_H
15
16#include <QtCharts/QChartGlobal>
17#include <QtWidgets/QGraphicsRectItem>
18#include <QtCharts/private/qchartglobal_p.h>
19
20QT_BEGIN_NAMESPACE
21class QGraphicsDropShadowEffect;
22QT_END_NAMESPACE
23
24QT_BEGIN_NAMESPACE
25
26class Q_CHARTS_PRIVATE_EXPORT ChartBackground: public QGraphicsRectItem
27{
28public:
29 ChartBackground(QGraphicsItem *parent = 0);
30 ~ChartBackground();
31
32 void setDiameter(qreal diameter);
33 qreal diameter() const;
34 void setDropShadowEnabled(bool enabled);
35 bool isDropShadowEnabled() { return m_dropShadow != 0; }
36
37protected:
38 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
39
40private:
41 qreal m_diameter;
42 QGraphicsDropShadowEffect *m_dropShadow;
43};
44
45QT_END_NAMESPACE
46
47#endif /* CHARTBACKGROUND_H */
48
49
50

source code of qtcharts/src/charts/chartbackground_p.h