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 | |
20 | QT_BEGIN_NAMESPACE |
21 | class QGraphicsDropShadowEffect; |
22 | QT_END_NAMESPACE |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class Q_CHARTS_PRIVATE_EXPORT ChartBackground: public QGraphicsRectItem |
27 | { |
28 | public: |
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 | |
37 | protected: |
38 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; |
39 | |
40 | private: |
41 | qreal m_diameter; |
42 | QGraphicsDropShadowEffect *m_dropShadow; |
43 | }; |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif /* CHARTBACKGROUND_H */ |
48 | |
49 | |
50 | |