| 1 | /**************************************************************************** |
|---|---|
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the Qt Charts module of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:GPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU |
| 19 | ** General Public License version 3 or (at your option) any later version |
| 20 | ** approved by the KDE Free Qt Foundation. The licenses are as published by |
| 21 | ** the Free Software Foundation and appearing in the file LICENSE.GPL3 |
| 22 | ** included in the packaging of this file. Please review the following |
| 23 | ** information to ensure the GNU General Public License requirements will |
| 24 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
| 25 | ** |
| 26 | ** $QT_END_LICENSE$ |
| 27 | ** |
| 28 | ****************************************************************************/ |
| 29 | |
| 30 | // W A R N I N G |
| 31 | // ------------- |
| 32 | // |
| 33 | // This file is not part of the Qt Chart API. It exists purely as an |
| 34 | // implementation detail. This header file may change from version to |
| 35 | // version without notice, or even be removed. |
| 36 | // |
| 37 | // We mean it. |
| 38 | |
| 39 | #ifndef DECLARATIVEAREASERIES_H |
| 40 | #define DECLARATIVEAREASERIES_H |
| 41 | |
| 42 | #include <QtCharts/QAreaSeries> |
| 43 | #include <private/declarativechartglobal_p.h> |
| 44 | #include <private/declarativeaxes_p.h> |
| 45 | |
| 46 | QT_CHARTS_BEGIN_NAMESPACE |
| 47 | class DeclarativeLineSeries; |
| 48 | |
| 49 | class Q_QMLCHARTS_PRIVATE_EXPORT DeclarativeAreaSeries : public QAreaSeries |
| 50 | { |
| 51 | Q_OBJECT |
| 52 | Q_PROPERTY(QtCharts::DeclarativeLineSeries *upperSeries READ upperSeries WRITE setUpperSeries) |
| 53 | Q_PROPERTY(QtCharts::DeclarativeLineSeries *lowerSeries READ lowerSeries WRITE setLowerSeries) |
| 54 | Q_PROPERTY(QtCharts::QAbstractAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged REVISION 1) |
| 55 | Q_PROPERTY(QtCharts::QAbstractAxis *axisY READ axisY WRITE setAxisY NOTIFY axisYChanged REVISION 1) |
| 56 | Q_PROPERTY(QtCharts::QAbstractAxis *axisXTop READ axisXTop WRITE setAxisXTop NOTIFY axisXTopChanged REVISION 2) |
| 57 | Q_PROPERTY(QtCharts::QAbstractAxis *axisYRight READ axisYRight WRITE setAxisYRight NOTIFY axisYRightChanged REVISION 2) |
| 58 | Q_PROPERTY(QtCharts::QAbstractAxis *axisAngular READ axisAngular WRITE setAxisAngular NOTIFY axisAngularChanged REVISION 3) |
| 59 | Q_PROPERTY(QtCharts::QAbstractAxis *axisRadial READ axisRadial WRITE setAxisRadial NOTIFY axisRadialChanged REVISION 3) |
| 60 | Q_PROPERTY(qreal borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged REVISION 1) |
| 61 | Q_PROPERTY(QString brushFilename READ brushFilename WRITE setBrushFilename NOTIFY brushFilenameChanged REVISION 4) |
| 62 | Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged REVISION 4) |
| 63 | |
| 64 | public: |
| 65 | explicit DeclarativeAreaSeries(QObject *parent = 0); |
| 66 | void setUpperSeries(DeclarativeLineSeries *series); |
| 67 | DeclarativeLineSeries *upperSeries() const; |
| 68 | void setLowerSeries(DeclarativeLineSeries *series); |
| 69 | DeclarativeLineSeries *lowerSeries() const; |
| 70 | QAbstractAxis *axisX() { return m_axes->axisX(); } |
| 71 | void setAxisX(QAbstractAxis *axis) { m_axes->setAxisX(axis); } |
| 72 | QAbstractAxis *axisY() { return m_axes->axisY(); } |
| 73 | void setAxisY(QAbstractAxis *axis) { m_axes->setAxisY(axis); } |
| 74 | QAbstractAxis *axisXTop() { return m_axes->axisXTop(); } |
| 75 | void setAxisXTop(QAbstractAxis *axis) { m_axes->setAxisXTop(axis); } |
| 76 | QAbstractAxis *axisYRight() { return m_axes->axisYRight(); } |
| 77 | void setAxisYRight(QAbstractAxis *axis) { m_axes->setAxisYRight(axis); } |
| 78 | QAbstractAxis *axisAngular() { return m_axes->axisX(); } |
| 79 | void setAxisAngular(QAbstractAxis *axis) { m_axes->setAxisX(axis); } |
| 80 | QAbstractAxis *axisRadial() { return m_axes->axisY(); } |
| 81 | void setAxisRadial(QAbstractAxis *axis) { m_axes->setAxisY(axis); } |
| 82 | qreal borderWidth() const; |
| 83 | void setBorderWidth(qreal borderWidth); |
| 84 | QString brushFilename() const; |
| 85 | void setBrushFilename(const QString &brushFilename); |
| 86 | void setBrush(const QBrush &brush); |
| 87 | QBrush brush() const; |
| 88 | |
| 89 | Q_SIGNALS: |
| 90 | Q_REVISION(1) void axisXChanged(QAbstractAxis *axis); |
| 91 | Q_REVISION(1) void axisYChanged(QAbstractAxis *axis); |
| 92 | Q_REVISION(1) void borderWidthChanged(qreal width); |
| 93 | Q_REVISION(2) void axisXTopChanged(QAbstractAxis *axis); |
| 94 | Q_REVISION(2) void axisYRightChanged(QAbstractAxis *axis); |
| 95 | Q_REVISION(3) void axisAngularChanged(QAbstractAxis *axis); |
| 96 | Q_REVISION(3) void axisRadialChanged(QAbstractAxis *axis); |
| 97 | Q_REVISION(4) void brushChanged(); |
| 98 | Q_REVISION(4) void brushFilenameChanged(const QString &brushFilename); |
| 99 | |
| 100 | private Q_SLOTS: |
| 101 | void handleBrushChanged(); |
| 102 | |
| 103 | public: |
| 104 | DeclarativeAxes *m_axes; |
| 105 | |
| 106 | private: |
| 107 | QString m_brushFilename; |
| 108 | QImage m_brushImage; |
| 109 | }; |
| 110 | |
| 111 | QT_CHARTS_END_NAMESPACE |
| 112 | |
| 113 | #endif // DECLARATIVEAREASERIES_H |
| 114 |
