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