##// END OF EJS Templates
QAreaSeries upper and lower series type to QLineSeries
Tero Ahola -
r1498:57e0519386e5
parent child
Show More
@@ -1,84 +1,84
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #ifndef QAREASERIES_H
21 #ifndef QAREASERIES_H
22 #define QAREASERIES_H
22 #define QAREASERIES_H
23
23
24 #include <qchartglobal.h>
24 #include <qchartglobal.h>
25 #include <qabstractseries.h>
25 #include <qabstractseries.h>
26 #include <QPen>
26 #include <QPen>
27 #include <QBrush>
27 #include <QBrush>
28
28
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 class QLineSeries;
30 class QLineSeries;
31 class QAreaSeriesPrivate;
31 class QAreaSeriesPrivate;
32
32
33 class QTCOMMERCIALCHART_EXPORT QAreaSeries : public QAbstractSeries
33 class QTCOMMERCIALCHART_EXPORT QAreaSeries : public QAbstractSeries
34 {
34 {
35 Q_OBJECT
35 Q_OBJECT
36 Q_PROPERTY(QAbstractSeries *upperSeries READ upperSeries)
36 Q_PROPERTY(QLineSeries *upperSeries READ upperSeries)
37 Q_PROPERTY(QAbstractSeries *lowerSeries READ lowerSeries)
37 Q_PROPERTY(QLineSeries *lowerSeries READ lowerSeries)
38 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
38 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
39 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
39 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
40
40
41 public:
41 public:
42 explicit QAreaSeries(QObject *parent = 0);
42 explicit QAreaSeries(QObject *parent = 0);
43 explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = 0);
43 explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = 0);
44 ~QAreaSeries();
44 ~QAreaSeries();
45
45
46 public:
46 public:
47 QAbstractSeries::SeriesType type() const;
47 QAbstractSeries::SeriesType type() const;
48
48
49 void setUpperSeries(QLineSeries* series);
49 void setUpperSeries(QLineSeries* series);
50 QLineSeries* upperSeries() const;
50 QLineSeries* upperSeries() const;
51 void setLowerSeries(QLineSeries* series);
51 void setLowerSeries(QLineSeries* series);
52 QLineSeries* lowerSeries() const;
52 QLineSeries* lowerSeries() const;
53
53
54 void setPen(const QPen &pen);
54 void setPen(const QPen &pen);
55 QPen pen() const;
55 QPen pen() const;
56
56
57 void setBrush(const QBrush &brush);
57 void setBrush(const QBrush &brush);
58 QBrush brush() const;
58 QBrush brush() const;
59
59
60 void setColor(const QColor &color);
60 void setColor(const QColor &color);
61 QColor color() const;
61 QColor color() const;
62
62
63 void setBorderColor(const QColor &color);
63 void setBorderColor(const QColor &color);
64 QColor borderColor() const;
64 QColor borderColor() const;
65
65
66 void setPointsVisible(bool visible = true);
66 void setPointsVisible(bool visible = true);
67 bool pointsVisible() const;
67 bool pointsVisible() const;
68
68
69 Q_SIGNALS:
69 Q_SIGNALS:
70 void clicked(const QPointF &point);
70 void clicked(const QPointF &point);
71 void selected();
71 void selected();
72 void colorChanged(QColor color);
72 void colorChanged(QColor color);
73 void borderColorChanged(QColor color);
73 void borderColorChanged(QColor color);
74
74
75 private:
75 private:
76 Q_DECLARE_PRIVATE(QAreaSeries)
76 Q_DECLARE_PRIVATE(QAreaSeries)
77 Q_DISABLE_COPY(QAreaSeries)
77 Q_DISABLE_COPY(QAreaSeries)
78 friend class AreaLegendMarker;
78 friend class AreaLegendMarker;
79 friend class AreaChartItem;
79 friend class AreaChartItem;
80 };
80 };
81
81
82 QTCOMMERCIALCHART_END_NAMESPACE
82 QTCOMMERCIALCHART_END_NAMESPACE
83
83
84 #endif
84 #endif
General Comments 0
You need to be logged in to leave comments. Login now