##// END OF EJS Templates
Make public headers compile with -Wzero-as-null-pointer-constant...
Marc Mutz -
r2871:cf15f38aab8d
parent child
Show More
@@ -1,115 +1,115
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QAREASERIES_H
23 23 #define QAREASERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QAbstractSeries>
27 27 #include <QtGui/QPen>
28 28 #include <QtGui/QBrush>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31 class QLineSeries;
32 32 class QAreaSeriesPrivate;
33 33
34 34 class QT_CHARTS_EXPORT QAreaSeries : public QAbstractSeries
35 35 {
36 36 Q_OBJECT
37 37 Q_PROPERTY(QLineSeries *upperSeries READ upperSeries)
38 38 Q_PROPERTY(QLineSeries *lowerSeries READ lowerSeries)
39 39 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
40 40 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
41 41 Q_PROPERTY(QString pointLabelsFormat READ pointLabelsFormat WRITE setPointLabelsFormat NOTIFY pointLabelsFormatChanged)
42 42 Q_PROPERTY(bool pointLabelsVisible READ pointLabelsVisible WRITE setPointLabelsVisible NOTIFY pointLabelsVisibilityChanged)
43 43 Q_PROPERTY(QFont pointLabelsFont READ pointLabelsFont WRITE setPointLabelsFont NOTIFY pointLabelsFontChanged)
44 44 Q_PROPERTY(QColor pointLabelsColor READ pointLabelsColor WRITE setPointLabelsColor NOTIFY pointLabelsColorChanged)
45 45 Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged)
46 46
47 47 public:
48 explicit QAreaSeries(QObject *parent = 0);
49 explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = 0);
48 explicit QAreaSeries(QObject *parent = Q_NULLPTR);
49 explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = Q_NULLPTR);
50 50 ~QAreaSeries();
51 51
52 52 public:
53 53 QAbstractSeries::SeriesType type() const;
54 54
55 55 void setUpperSeries(QLineSeries *series);
56 56 QLineSeries *upperSeries() const;
57 57 void setLowerSeries(QLineSeries *series);
58 58 QLineSeries *lowerSeries() const;
59 59
60 60 void setPen(const QPen &pen);
61 61 QPen pen() const;
62 62
63 63 void setBrush(const QBrush &brush);
64 64 QBrush brush() const;
65 65
66 66 void setColor(const QColor &color);
67 67 QColor color() const;
68 68
69 69 void setBorderColor(const QColor &color);
70 70 QColor borderColor() const;
71 71
72 72 void setPointsVisible(bool visible = true);
73 73 bool pointsVisible() const;
74 74
75 75 void setPointLabelsFormat(const QString &format);
76 76 QString pointLabelsFormat() const;
77 77
78 78 void setPointLabelsVisible(bool visible = true);
79 79 bool pointLabelsVisible() const;
80 80
81 81 void setPointLabelsFont(const QFont &font);
82 82 QFont pointLabelsFont() const;
83 83
84 84 void setPointLabelsColor(const QColor &color);
85 85 QColor pointLabelsColor() const;
86 86
87 87 void setPointLabelsClipping(bool enabled = true);
88 88 bool pointLabelsClipping() const;
89 89
90 90 Q_SIGNALS:
91 91 void clicked(const QPointF &point);
92 92 void hovered(const QPointF &point, bool state);
93 93 void pressed(const QPointF &point);
94 94 void released(const QPointF &point);
95 95 void doubleClicked(const QPointF &point);
96 96 void selected();
97 97 void colorChanged(QColor color);
98 98 void borderColorChanged(QColor color);
99 99 void pointLabelsFormatChanged(const QString &format);
100 100 void pointLabelsVisibilityChanged(bool visible);
101 101 void pointLabelsFontChanged(const QFont &font);
102 102 void pointLabelsColorChanged(const QColor &color);
103 103 void pointLabelsClippingChanged(bool clipping);
104 104
105 105 private:
106 106 Q_DECLARE_PRIVATE(QAreaSeries)
107 107 Q_DISABLE_COPY(QAreaSeries)
108 108 friend class AreaLegendMarker;
109 109 friend class AreaChartItem;
110 110 friend class QAreaLegendMarkerPrivate;
111 111 };
112 112
113 113 QT_CHARTS_END_NAMESPACE
114 114
115 115 #endif // QAREASERIES_H
@@ -1,82 +1,82
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBARCATEGORYAXIS_H
23 23 #define QBARCATEGORYAXIS_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QBarCategoryAxisPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QBarCategoryAxis : public QAbstractAxis
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(QStringList categories READ categories WRITE setCategories NOTIFY categoriesChanged)
35 35 Q_PROPERTY(QString min READ min WRITE setMin NOTIFY minChanged)
36 36 Q_PROPERTY(QString max READ max WRITE setMax NOTIFY maxChanged)
37 37 Q_PROPERTY(int count READ count NOTIFY countChanged)
38 38
39 39 public:
40 explicit QBarCategoryAxis(QObject *parent = 0);
40 explicit QBarCategoryAxis(QObject *parent = Q_NULLPTR);
41 41 ~QBarCategoryAxis();
42 42
43 43 protected:
44 QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = 0);
44 QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = Q_NULLPTR);
45 45
46 46 public:
47 47 AxisType type() const;
48 48 void append(const QStringList &categories);
49 49 void append(const QString &category);
50 50 void remove(const QString &category);
51 51 void insert(int index, const QString &category);
52 52 void replace(const QString &oldCategory, const QString &newCategory);
53 53 Q_INVOKABLE void clear();
54 54 void setCategories(const QStringList &categories);
55 55 QStringList categories();
56 56 int count() const;
57 57 QString at(int index) const;
58 58
59 59 //range handling
60 60 void setMin(const QString &minCategory);
61 61 QString min() const;
62 62 void setMax(const QString &maxCategory);
63 63 QString max() const;
64 64 void setRange(const QString &minCategory, const QString &maxCategory);
65 65
66 66 Q_SIGNALS:
67 67 void categoriesChanged();
68 68 void minChanged(const QString &min);
69 69 void maxChanged(const QString &max);
70 70 void rangeChanged(const QString &min, const QString &max);
71 71 void countChanged();
72 72
73 73 private:
74 74 Q_DECLARE_PRIVATE(QBarCategoryAxis)
75 75 Q_DISABLE_COPY(QBarCategoryAxis)
76 76 friend class ChartBarCategoryAxisX;
77 77 friend class ChartBarCategoryAxisY;
78 78 };
79 79
80 80 QT_CHARTS_END_NAMESPACE
81 81
82 82 #endif // QBARCATEGORYAXIS_H
@@ -1,83 +1,83
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QCATEGORYAXIS_H
23 23 #define QCATEGORYAXIS_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26 #include <QtCharts/QValueAxis>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29
30 30 class QCategoryAxisPrivate;
31 31
32 32 class QT_CHARTS_EXPORT QCategoryAxis : public QValueAxis
33 33 {
34 34 Q_OBJECT
35 35 Q_PROPERTY(qreal startValue READ startValue WRITE setStartValue)
36 36 Q_PROPERTY(int count READ count)
37 37 Q_PROPERTY(QStringList categoriesLabels READ categoriesLabels)
38 38 Q_PROPERTY(AxisLabelsPosition labelsPosition READ labelsPosition WRITE setLabelsPosition NOTIFY labelsPositionChanged)
39 39 Q_ENUMS(AxisLabelsPosition)
40 40
41 41 public:
42 42
43 43 enum AxisLabelsPosition {
44 44 AxisLabelsPositionCenter = 0x0,
45 45 AxisLabelsPositionOnValue = 0x1
46 46 };
47 47
48 explicit QCategoryAxis(QObject *parent = 0);
48 explicit QCategoryAxis(QObject *parent = Q_NULLPTR);
49 49 ~QCategoryAxis();
50 50
51 51 protected:
52 QCategoryAxis(QCategoryAxisPrivate &d, QObject *parent = 0);
52 QCategoryAxis(QCategoryAxisPrivate &d, QObject *parent = Q_NULLPTR);
53 53
54 54 public:
55 55 AxisType type() const;
56 56
57 57 void append(const QString &label, qreal categoryEndValue);
58 58 void remove(const QString &label);
59 59 void replaceLabel(const QString &oldLabel, const QString &newLabel);
60 60
61 61 qreal startValue(const QString &categoryLabel = QString()) const;
62 62 void setStartValue(qreal min);
63 63
64 64 qreal endValue(const QString &categoryLabel) const;
65 65
66 66 QStringList categoriesLabels();
67 67 int count() const;
68 68
69 69 QCategoryAxis::AxisLabelsPosition labelsPosition() const;
70 70 void setLabelsPosition(QCategoryAxis::AxisLabelsPosition position);
71 71
72 72 Q_SIGNALS:
73 73 void categoriesChanged();
74 74 void labelsPositionChanged(QCategoryAxis::AxisLabelsPosition position);
75 75
76 76 private:
77 77 Q_DECLARE_PRIVATE(QCategoryAxis)
78 78 Q_DISABLE_COPY(QCategoryAxis)
79 79 };
80 80
81 81 QT_CHARTS_END_NAMESPACE
82 82
83 83 #endif // QCATEGORYAXIS_H
@@ -1,81 +1,81
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QDATETIMEAXIS_H
23 23 #define QDATETIMEAXIS_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26
27 27 QT_BEGIN_NAMESPACE
28 28 class QDateTime;
29 29 QT_END_NAMESPACE
30 30
31 31 QT_CHARTS_BEGIN_NAMESPACE
32 32
33 33 class QDateTimeAxisPrivate;
34 34
35 35 class QT_CHARTS_EXPORT QDateTimeAxis : public QAbstractAxis
36 36 {
37 37 Q_OBJECT
38 38 Q_PROPERTY(int tickCount READ tickCount WRITE setTickCount NOTIFY tickCountChanged)
39 39 Q_PROPERTY(QDateTime min READ min WRITE setMin NOTIFY minChanged)
40 40 Q_PROPERTY(QDateTime max READ max WRITE setMax NOTIFY maxChanged)
41 41 Q_PROPERTY(QString format READ format WRITE setFormat NOTIFY formatChanged)
42 42
43 43 public:
44 explicit QDateTimeAxis(QObject *parent = 0);
44 explicit QDateTimeAxis(QObject *parent = Q_NULLPTR);
45 45 ~QDateTimeAxis();
46 46
47 47 protected:
48 QDateTimeAxis(QDateTimeAxisPrivate &d, QObject *parent = 0);
48 QDateTimeAxis(QDateTimeAxisPrivate &d, QObject *parent = Q_NULLPTR);
49 49
50 50 public:
51 51 AxisType type() const;
52 52
53 53 //range handling
54 54 void setMin(QDateTime min);
55 55 QDateTime min() const;
56 56 void setMax(QDateTime max);
57 57 QDateTime max() const;
58 58 void setRange(QDateTime min, QDateTime max);
59 59
60 60 void setFormat(QString format);
61 61 QString format() const;
62 62
63 63 //ticks handling
64 64 void setTickCount(int count);
65 65 int tickCount() const;
66 66
67 67 Q_SIGNALS:
68 68 void minChanged(QDateTime min);
69 69 void maxChanged(QDateTime max);
70 70 void rangeChanged(QDateTime min, QDateTime max);
71 71 void formatChanged(QString format);
72 72 void tickCountChanged(int tick);
73 73
74 74 private:
75 75 Q_DECLARE_PRIVATE(QDateTimeAxis)
76 76 Q_DISABLE_COPY(QDateTimeAxis)
77 77 };
78 78
79 79 QT_CHARTS_END_NAMESPACE
80 80
81 81 #endif // QDATETIMEAXIS_H
@@ -1,80 +1,80
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QLOGVALUEAXIS_H
23 23 #define QLOGVALUEAXIS_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26
27 27 QT_BEGIN_NAMESPACE
28 28 class QDateTime;
29 29 QT_END_NAMESPACE
30 30
31 31 QT_CHARTS_BEGIN_NAMESPACE
32 32
33 33 class QLogValueAxisPrivate;
34 34
35 35 class QT_CHARTS_EXPORT QLogValueAxis : public QAbstractAxis
36 36 {
37 37 Q_OBJECT
38 38 Q_PROPERTY(qreal min READ min WRITE setMin NOTIFY minChanged)
39 39 Q_PROPERTY(qreal max READ max WRITE setMax NOTIFY maxChanged)
40 40 Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged)
41 41 Q_PROPERTY(qreal base READ base WRITE setBase NOTIFY baseChanged)
42 42
43 43 public:
44 explicit QLogValueAxis(QObject *parent = 0);
44 explicit QLogValueAxis(QObject *parent = Q_NULLPTR);
45 45 ~QLogValueAxis();
46 46
47 47 protected:
48 QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent = 0);
48 QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent = Q_NULLPTR);
49 49
50 50 public:
51 51 AxisType type() const;
52 52
53 53 //range handling
54 54 void setMin(qreal min);
55 55 qreal min() const;
56 56 void setMax(qreal max);
57 57 qreal max() const;
58 58 void setRange(qreal min, qreal max);
59 59
60 60 void setLabelFormat(const QString &format);
61 61 QString labelFormat() const;
62 62
63 63 void setBase(qreal base);
64 64 qreal base() const;
65 65
66 66 Q_SIGNALS:
67 67 void minChanged(qreal min);
68 68 void maxChanged(qreal max);
69 69 void rangeChanged(qreal min, qreal max);
70 70 void labelFormatChanged(const QString &format);
71 71 void baseChanged(qreal base);
72 72
73 73 private:
74 74 Q_DECLARE_PRIVATE(QLogValueAxis)
75 75 Q_DISABLE_COPY(QLogValueAxis)
76 76 };
77 77
78 78 QT_CHARTS_END_NAMESPACE
79 79
80 80 #endif // QLOGVALUEAXIS_H
@@ -1,210 +1,210
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QABSTRACTAXIS_H
23 23 #define QABSTRACTAXIS_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtGui/QPen>
27 27 #include <QtGui/QFont>
28 28 #include <QtCore/QVariant>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31
32 32 class QAbstractAxisPrivate;
33 33
34 34 class QT_CHARTS_EXPORT QAbstractAxis : public QObject
35 35 {
36 36 Q_OBJECT
37 37 //visibility
38 38 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
39 39 //arrow
40 40 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
41 41 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
42 42 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
43 43 //labels
44 44 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
45 45 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
46 46 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
47 47 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
48 48 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
49 49 //grid
50 50 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
51 51 Q_PROPERTY(QPen gridLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
52 52 Q_PROPERTY(bool minorGridVisible READ isMinorGridLineVisible WRITE setMinorGridLineVisible NOTIFY minorGridVisibleChanged)
53 53 Q_PROPERTY(QPen minorGridLinePen READ minorGridLinePen WRITE setMinorGridLinePen NOTIFY minorGridLinePenChanged)
54 54 Q_PROPERTY(QColor gridLineColor READ gridLineColor WRITE setGridLineColor NOTIFY gridLineColorChanged)
55 55 Q_PROPERTY(QColor minorGridLineColor READ minorGridLineColor WRITE setMinorGridLineColor NOTIFY minorGridLineColorChanged)
56 56 //shades
57 57 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
58 58 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
59 59 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
60 60 Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged)
61 61 Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged)
62 62 //title
63 63 Q_PROPERTY(QString titleText READ titleText WRITE setTitleText NOTIFY titleTextChanged)
64 64 Q_PROPERTY(QBrush titleBrush READ titleBrush WRITE setTitleBrush NOTIFY titleBrushChanged)
65 65 Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibleChanged)
66 66 Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont NOTIFY titleFontChanged)
67 67 //orientation
68 68 Q_PROPERTY(Qt::Orientation orientation READ orientation)
69 69 //aligment
70 70 Q_PROPERTY(Qt::Alignment alignment READ alignment)
71 71 Q_PROPERTY(bool reverse READ isReverse WRITE setReverse NOTIFY reverseChanged)
72 72
73 73 public:
74 74
75 75 enum AxisType {
76 76 AxisTypeNoAxis = 0x0,
77 77 AxisTypeValue = 0x1,
78 78 AxisTypeBarCategory = 0x2,
79 79 AxisTypeCategory = 0x4,
80 80 AxisTypeDateTime = 0x8,
81 81 AxisTypeLogValue = 0x10
82 82 };
83 83
84 84 Q_DECLARE_FLAGS(AxisTypes, AxisType)
85 85
86 86 protected:
87 explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = 0);
87 explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = Q_NULLPTR);
88 88
89 89 public:
90 90 ~QAbstractAxis();
91 91
92 92 virtual AxisType type() const = 0;
93 93
94 94 //visibility handling
95 95 bool isVisible() const;
96 96 void setVisible(bool visible = true);
97 97 void show();
98 98 void hide();
99 99
100 100 //arrow handling
101 101 bool isLineVisible() const;
102 102 void setLineVisible(bool visible = true);
103 103 void setLinePen(const QPen &pen);
104 104 QPen linePen() const;
105 105 void setLinePenColor(QColor color);
106 106 QColor linePenColor() const;
107 107
108 108 //grid handling
109 109 bool isGridLineVisible() const;
110 110 void setGridLineVisible(bool visible = true);
111 111 void setGridLinePen(const QPen &pen);
112 112 QPen gridLinePen() const;
113 113 bool isMinorGridLineVisible() const;
114 114 void setMinorGridLineVisible(bool visible = true);
115 115 void setMinorGridLinePen(const QPen &pen);
116 116 QPen minorGridLinePen() const;
117 117 void setGridLineColor(const QColor &color);
118 118 QColor gridLineColor();
119 119 void setMinorGridLineColor(const QColor &color);
120 120 QColor minorGridLineColor();
121 121
122 122 //labels handling
123 123 bool labelsVisible() const;
124 124 void setLabelsVisible(bool visible = true);
125 125 void setLabelsBrush(const QBrush &brush);
126 126 QBrush labelsBrush() const;
127 127 void setLabelsFont(const QFont &font);
128 128 QFont labelsFont() const;
129 129 void setLabelsAngle(int angle);
130 130 int labelsAngle() const;
131 131 void setLabelsColor(QColor color);
132 132 QColor labelsColor() const;
133 133
134 134 //title handling
135 135 bool isTitleVisible() const;
136 136 void setTitleVisible(bool visible = true);
137 137 void setTitleBrush(const QBrush &brush);
138 138 QBrush titleBrush() const;
139 139 void setTitleFont(const QFont &font);
140 140 QFont titleFont() const;
141 141 void setTitleText(const QString &title);
142 142 QString titleText() const;
143 143
144 144 //shades handling
145 145 bool shadesVisible() const;
146 146 void setShadesVisible(bool visible = true);
147 147 void setShadesPen(const QPen &pen);
148 148 QPen shadesPen() const;
149 149 void setShadesBrush(const QBrush &brush);
150 150 QBrush shadesBrush() const;
151 151 void setShadesColor(QColor color);
152 152 QColor shadesColor() const;
153 153 void setShadesBorderColor(QColor color);
154 154 QColor shadesBorderColor() const;
155 155
156 156 Qt::Orientation orientation() const;
157 157 Qt::Alignment alignment() const;
158 158
159 159 //range handling
160 160 void setMin(const QVariant &min);
161 161 void setMax(const QVariant &max);
162 162 void setRange(const QVariant &min, const QVariant &max);
163 163
164 164 //reverse handling
165 165 void setReverse(bool reverse = true);
166 166 bool isReverse() const;
167 167
168 168 Q_SIGNALS:
169 169 void visibleChanged(bool visible);
170 170 void linePenChanged(const QPen &pen);
171 171 void lineVisibleChanged(bool visible);
172 172 void labelsVisibleChanged(bool visible);
173 173 void labelsBrushChanged(const QBrush &brush);
174 174 void labelsFontChanged(const QFont &pen);
175 175 void labelsAngleChanged(int angle);
176 176 void gridLinePenChanged(const QPen &pen);
177 177 void gridVisibleChanged(bool visible);
178 178 void minorGridVisibleChanged(bool visible);
179 179 void minorGridLinePenChanged(const QPen &pen);
180 180 void gridLineColorChanged(const QColor &color);
181 181 void minorGridLineColorChanged(const QColor &color);
182 182 void colorChanged(QColor color);
183 183 void labelsColorChanged(QColor color);
184 184 void titleTextChanged(const QString &title);
185 185 void titleBrushChanged(const QBrush &brush);
186 186 void titleVisibleChanged(bool visible);
187 187 void titleFontChanged(const QFont &font);
188 188 void shadesVisibleChanged(bool visible);
189 189 void shadesColorChanged(QColor color);
190 190 void shadesBorderColorChanged(QColor color);
191 191 void shadesPenChanged(const QPen &pen);
192 192 void shadesBrushChanged(const QBrush &brush);
193 193 void reverseChanged(bool reverse);
194 194
195 195 protected:
196 196 QScopedPointer<QAbstractAxisPrivate> d_ptr;
197 197 friend class ChartDataSet;
198 198 friend class ChartPresenter;
199 199 friend class ChartThemeManager;
200 200 friend class AbstractDomain;
201 201 friend class ChartAxisElement;
202 202 friend class XYChart;
203 203
204 204 private:
205 205 Q_DISABLE_COPY(QAbstractAxis)
206 206 };
207 207
208 208 QT_CHARTS_END_NAMESPACE
209 209
210 210 #endif // QABSTRACTAXIS_H
@@ -1,84 +1,84
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QVALUEAXIS_H
23 23 #define QVALUEAXIS_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QValueAxisPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QValueAxis : public QAbstractAxis
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(int tickCount READ tickCount WRITE setTickCount NOTIFY tickCountChanged)
35 35 Q_PROPERTY(qreal min READ min WRITE setMin NOTIFY minChanged)
36 36 Q_PROPERTY(qreal max READ max WRITE setMax NOTIFY maxChanged)
37 37 Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged)
38 38 Q_PROPERTY(int minorTickCount READ minorTickCount WRITE setMinorTickCount NOTIFY minorTickCountChanged)
39 39
40 40 public:
41 explicit QValueAxis(QObject *parent = 0);
41 explicit QValueAxis(QObject *parent = Q_NULLPTR);
42 42 ~QValueAxis();
43 43
44 44 protected:
45 QValueAxis(QValueAxisPrivate &d, QObject *parent = 0);
45 QValueAxis(QValueAxisPrivate &d, QObject *parent = Q_NULLPTR);
46 46
47 47 public:
48 48 AxisType type() const;
49 49
50 50 //range handling
51 51 void setMin(qreal min);
52 52 qreal min() const;
53 53 void setMax(qreal max);
54 54 qreal max() const;
55 55 void setRange(qreal min, qreal max);
56 56
57 57 //ticks handling
58 58 void setTickCount(int count);
59 59 int tickCount() const;
60 60 void setMinorTickCount(int count);
61 61 int minorTickCount() const;
62 62
63 63 void setLabelFormat(const QString &format);
64 64 QString labelFormat() const;
65 65
66 66 public Q_SLOTS:
67 67 void applyNiceNumbers();
68 68
69 69 Q_SIGNALS:
70 70 void minChanged(qreal min);
71 71 void maxChanged(qreal max);
72 72 void rangeChanged(qreal min, qreal max);
73 73 void tickCountChanged(int tickCount);
74 74 void minorTickCountChanged(int tickCount);
75 75 void labelFormatChanged(const QString &format);
76 76
77 77 private:
78 78 Q_DECLARE_PRIVATE(QValueAxis)
79 79 Q_DISABLE_COPY(QValueAxis)
80 80 };
81 81
82 82 QT_CHARTS_END_NAMESPACE
83 83
84 84 #endif // QVALUEAXIS_H
@@ -1,46 +1,46
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHORIZONTALBARSERIES_H
23 23 #define QHORIZONTALBARSERIES_H
24 24
25 25 #include <QtCharts/QAbstractBarSeries>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QHorizontalBarSeriesPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QHorizontalBarSeries : public QAbstractBarSeries
32 32 {
33 33 Q_OBJECT
34 34 public:
35 explicit QHorizontalBarSeries(QObject *parent = 0);
35 explicit QHorizontalBarSeries(QObject *parent = Q_NULLPTR);
36 36 ~QHorizontalBarSeries();
37 37 QAbstractSeries::SeriesType type() const;
38 38
39 39 private:
40 40 Q_DECLARE_PRIVATE(QHorizontalBarSeries)
41 41 Q_DISABLE_COPY(QHorizontalBarSeries)
42 42 };
43 43
44 44 QT_CHARTS_END_NAMESPACE
45 45
46 46 #endif // QHORIZONTALBARSERIES_H
@@ -1,46 +1,46
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHORIZONTALPERCENTBARSERIES_H
23 23 #define QHORIZONTALPERCENTBARSERIES_H
24 24
25 25 #include <QtCharts/QAbstractBarSeries>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QHorizontalPercentBarSeriesPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QHorizontalPercentBarSeries : public QAbstractBarSeries
32 32 {
33 33 Q_OBJECT
34 34 public:
35 explicit QHorizontalPercentBarSeries(QObject *parent = 0);
35 explicit QHorizontalPercentBarSeries(QObject *parent = Q_NULLPTR);
36 36 ~QHorizontalPercentBarSeries();
37 37 QAbstractSeries::SeriesType type() const;
38 38
39 39 private:
40 40 Q_DECLARE_PRIVATE(QHorizontalPercentBarSeries)
41 41 Q_DISABLE_COPY(QHorizontalPercentBarSeries)
42 42 };
43 43
44 44 QT_CHARTS_END_NAMESPACE
45 45
46 46 #endif // QHORIZONTALPERCENTBARSERIES_H
@@ -1,46 +1,46
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHORIZONTALSTACKEDBARSERIES_H
23 23 #define QHORIZONTALSTACKEDBARSERIES_H
24 24
25 25 #include <QtCharts/QAbstractBarSeries>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QHorizontalStackedBarSeriesPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QHorizontalStackedBarSeries : public QAbstractBarSeries
32 32 {
33 33 Q_OBJECT
34 34 public:
35 explicit QHorizontalStackedBarSeries(QObject *parent = 0);
35 explicit QHorizontalStackedBarSeries(QObject *parent = Q_NULLPTR);
36 36 ~QHorizontalStackedBarSeries();
37 37 QAbstractSeries::SeriesType type() const;
38 38
39 39 private:
40 40 Q_DECLARE_PRIVATE(QHorizontalStackedBarSeries)
41 41 Q_DISABLE_COPY(QHorizontalStackedBarSeries)
42 42 };
43 43
44 44 QT_CHARTS_END_NAMESPACE
45 45
46 46 #endif // QHORIZONTALSTACKEDBARSERIES_H
@@ -1,113 +1,113
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QABSTRACTBARSERIES_H
23 23 #define QABSTRACTBARSERIES_H
24 24
25 25 #include <QtCharts/QAbstractSeries>
26 26 #include <QtCore/QStringList>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29
30 30 class QBarSet;
31 31 class QAbstractBarSeriesPrivate;
32 32
33 33 // Container for series
34 34 class QT_CHARTS_EXPORT QAbstractBarSeries : public QAbstractSeries
35 35 {
36 36 Q_OBJECT
37 37 Q_PROPERTY(qreal barWidth READ barWidth WRITE setBarWidth)
38 38 Q_PROPERTY(int count READ count NOTIFY countChanged)
39 39 Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
40 40 Q_PROPERTY(QString labelsFormat READ labelsFormat WRITE setLabelsFormat NOTIFY labelsFormatChanged)
41 41 Q_PROPERTY(LabelsPosition labelsPosition READ labelsPosition WRITE setLabelsPosition NOTIFY labelsPositionChanged)
42 42 Q_PROPERTY(qreal labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
43 43 Q_ENUMS(LabelsPosition)
44 44
45 45 public:
46 46 enum LabelsPosition {
47 47 LabelsCenter = 0,
48 48 LabelsInsideEnd,
49 49 LabelsInsideBase,
50 50 LabelsOutsideEnd
51 51 };
52 52
53 53 public:
54 54 virtual ~QAbstractBarSeries();
55 55
56 56 void setBarWidth(qreal width);
57 57 qreal barWidth() const;
58 58
59 59 bool append(QBarSet *set);
60 60 bool remove(QBarSet *set);
61 61 bool take(QBarSet *set);
62 62 bool append(QList<QBarSet *> sets);
63 63 bool insert(int index, QBarSet *set);
64 64 int count() const;
65 65 QList<QBarSet *> barSets() const;
66 66 void clear();
67 67
68 68 void setLabelsVisible(bool visible = true);
69 69 bool isLabelsVisible() const;
70 70
71 71 void setLabelsFormat(const QString &format);
72 72 QString labelsFormat() const;
73 73
74 74 void setLabelsAngle(qreal angle);
75 75 qreal labelsAngle() const;
76 76
77 77 void setLabelsPosition(QAbstractBarSeries::LabelsPosition position);
78 78 QAbstractBarSeries::LabelsPosition labelsPosition() const;
79 79
80 80 protected:
81 explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = 0);
81 explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = Q_NULLPTR);
82 82
83 83 Q_SIGNALS:
84 84 void clicked(int index, QBarSet *barset);
85 85 void hovered(bool status, int index, QBarSet *barset);
86 86 void pressed(int index, QBarSet *barset);
87 87 void released(int index, QBarSet *barset);
88 88 void doubleClicked(int index, QBarSet *barset);
89 89 void countChanged();
90 90 void labelsVisibleChanged();
91 91 void labelsFormatChanged(const QString &format);
92 92 void labelsPositionChanged(QAbstractBarSeries::LabelsPosition position);
93 93 void labelsAngleChanged(qreal angle);
94 94
95 95 void barsetsAdded(QList<QBarSet *> sets);
96 96 void barsetsRemoved(QList<QBarSet *> sets);
97 97
98 98 protected:
99 99 Q_DECLARE_PRIVATE(QAbstractBarSeries)
100 100 friend class AbstractBarChartItem;
101 101 friend class PercentBarChartItem;
102 102 friend class StackedBarChartItem;
103 103 friend class BoxPlotChartItem;
104 104 friend class BarChartItem;
105 105 friend class HorizontalBarChartItem;
106 106 friend class HorizontalStackedBarChartItem;
107 107 friend class HorizontalPercentBarChartItem;
108 108 friend class BarSet;
109 109 };
110 110
111 111 QT_CHARTS_END_NAMESPACE
112 112
113 113 #endif // QABSTRACTBARSERIES_H
@@ -1,72 +1,72
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBARMODELMAPPER_H
23 23 #define QBARMODELMAPPER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27
28 28 QT_BEGIN_NAMESPACE
29 29 class QAbstractItemModel;
30 30 QT_END_NAMESPACE
31 31
32 32 QT_CHARTS_BEGIN_NAMESPACE
33 33
34 34 class QBarModelMapperPrivate;
35 35 class QAbstractBarSeries;
36 36
37 37 class QT_CHARTS_EXPORT QBarModelMapper : public QObject
38 38 {
39 39 Q_OBJECT
40 40
41 41 protected:
42 explicit QBarModelMapper(QObject *parent = 0);
42 explicit QBarModelMapper(QObject *parent = Q_NULLPTR);
43 43
44 44 QAbstractItemModel *model() const;
45 45 void setModel(QAbstractItemModel *model);
46 46
47 47 QAbstractBarSeries *series() const;
48 48 void setSeries(QAbstractBarSeries *series);
49 49
50 50 int first() const;
51 51 void setFirst(int first);
52 52
53 53 int count() const;
54 54 void setCount(int count);
55 55
56 56 int firstBarSetSection() const;
57 57 void setFirstBarSetSection(int firstBarSetSection);
58 58
59 59 int lastBarSetSection() const;
60 60 void setLastBarSetSection(int lastBarSetSection);
61 61
62 62 Qt::Orientation orientation() const;
63 63 void setOrientation(Qt::Orientation orientation);
64 64
65 65 protected:
66 66 QBarModelMapperPrivate * const d_ptr;
67 67 Q_DECLARE_PRIVATE(QBarModelMapper)
68 68 };
69 69
70 70 QT_CHARTS_END_NAMESPACE
71 71
72 72 #endif // QBARMODELMAPPER_H
@@ -1,123 +1,123
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBARSET_H
23 23 #define QBARSET_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtGui/QPen>
27 27 #include <QtGui/QBrush>
28 28 #include <QtGui/QFont>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31 class QBarSetPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QBarSet : public QObject
34 34 {
35 35 Q_OBJECT
36 36 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
37 37 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
38 38 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
39 39 Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush NOTIFY labelBrushChanged)
40 40 Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont NOTIFY labelFontChanged)
41 41 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
42 42 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
43 43 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged)
44 44
45 45 public:
46 explicit QBarSet(const QString label, QObject *parent = 0);
46 explicit QBarSet(const QString label, QObject *parent = Q_NULLPTR);
47 47 virtual ~QBarSet();
48 48
49 49 void setLabel(const QString label);
50 50 QString label() const;
51 51
52 52 void append(const qreal value);
53 53 void append(const QList<qreal> &values);
54 54
55 55 QBarSet &operator << (const qreal &value);
56 56
57 57 void insert(const int index, const qreal value);
58 58 void remove(const int index, const int count = 1);
59 59 void replace(const int index, const qreal value);
60 60 qreal at(const int index) const;
61 61 qreal operator [](const int index) const;
62 62 int count() const;
63 63 qreal sum() const;
64 64
65 65 void setPen(const QPen &pen);
66 66 QPen pen() const;
67 67
68 68 void setBrush(const QBrush &brush);
69 69 QBrush brush() const;
70 70
71 71 void setLabelBrush(const QBrush &brush);
72 72 QBrush labelBrush() const;
73 73
74 74 void setLabelFont(const QFont &font);
75 75 QFont labelFont() const;
76 76
77 77 QColor color();
78 78 void setColor(QColor color);
79 79
80 80 QColor borderColor();
81 81 void setBorderColor(QColor color);
82 82
83 83 QColor labelColor();
84 84 void setLabelColor(QColor color);
85 85
86 86 Q_SIGNALS:
87 87 void clicked(int index);
88 88 void hovered(bool status, int index);
89 89 void pressed(int index);
90 90 void released(int index);
91 91 void doubleClicked(int index);
92 92 void penChanged();
93 93 void brushChanged();
94 94 void labelChanged();
95 95 void labelBrushChanged();
96 96 void labelFontChanged();
97 97 void colorChanged(QColor color);
98 98 void borderColorChanged(QColor color);
99 99 void labelColorChanged(QColor color);
100 100
101 101 void valuesAdded(int index, int count);
102 102 void valuesRemoved(int index, int count);
103 103 void valueChanged(int index);
104 104
105 105 private:
106 106 QScopedPointer<QBarSetPrivate> d_ptr;
107 107 Q_DISABLE_COPY(QBarSet)
108 108 friend class QAbstractBarSeries;
109 109 friend class BarLegendMarker;
110 110 friend class AbstractBarChartItem;
111 111 friend class QAbstractBarSeriesPrivate;
112 112 friend class StackedBarChartItem;
113 113 friend class PercentBarChartItem;
114 114 friend class BarChartItem;
115 115 friend class HorizontalBarChartItem;
116 116 friend class HorizontalStackedBarChartItem;
117 117 friend class HorizontalPercentBarChartItem;
118 118 friend class BoxPlotChartItem;
119 119 };
120 120
121 121 QT_CHARTS_END_NAMESPACE
122 122
123 123 #endif // QBARSET_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHBARMODELMAPPER_H
23 23 #define QHBARMODELMAPPER_H
24 24
25 25 #include <QtCharts/QBarModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QHBarModelMapper : public QBarModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QAbstractBarSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int firstBarSetRow READ firstBarSetRow WRITE setFirstBarSetRow NOTIFY firstBarSetRowChanged)
35 35 Q_PROPERTY(int lastBarSetRow READ lastBarSetRow WRITE setLastBarSetRow NOTIFY lastBarSetRowChanged)
36 36 Q_PROPERTY(int firstColumn READ firstColumn WRITE setFirstColumn NOTIFY firstColumnChanged)
37 37 Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
38 38
39 39 public:
40 explicit QHBarModelMapper(QObject *parent = 0);
40 explicit QHBarModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QAbstractBarSeries *series() const;
46 46 void setSeries(QAbstractBarSeries *series);
47 47
48 48 int firstBarSetRow() const;
49 49 void setFirstBarSetRow(int firstBarSetRow);
50 50
51 51 int lastBarSetRow() const;
52 52 void setLastBarSetRow(int lastBarSetRow);
53 53
54 54 int firstColumn() const;
55 55 void setFirstColumn(int firstColumn);
56 56
57 57 int columnCount() const;
58 58 void setColumnCount(int columnCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void firstBarSetRowChanged();
64 64 void lastBarSetRowChanged();
65 65 void firstColumnChanged();
66 66 void columnCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QHBARMODELMAPPER_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QVBARMODELMAPPER_H
23 23 #define QVBARMODELMAPPER_H
24 24
25 25 #include <QtCharts/QBarModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QVBarModelMapper : public QBarModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QAbstractBarSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int firstBarSetColumn READ firstBarSetColumn WRITE setFirstBarSetColumn NOTIFY firstBarSetColumnChanged)
35 35 Q_PROPERTY(int lastBarSetColumn READ lastBarSetColumn WRITE setLastBarSetColumn NOTIFY lastBarSetColumnChanged)
36 36 Q_PROPERTY(int firstRow READ firstRow WRITE setFirstRow NOTIFY firstRowChanged)
37 37 Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
38 38
39 39 public:
40 explicit QVBarModelMapper(QObject *parent = 0);
40 explicit QVBarModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QAbstractBarSeries *series() const;
46 46 void setSeries(QAbstractBarSeries *series);
47 47
48 48 int firstBarSetColumn() const;
49 49 void setFirstBarSetColumn(int firstBarSetColumn);
50 50
51 51 int lastBarSetColumn() const;
52 52 void setLastBarSetColumn(int lastBarSetColumn);
53 53
54 54 int firstRow() const;
55 55 void setFirstRow(int firstRow);
56 56
57 57 int rowCount() const;
58 58 void setRowCount(int rowCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void firstBarSetColumnChanged();
64 64 void lastBarSetColumnChanged();
65 65 void firstRowChanged();
66 66 void rowCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QVBARMODELMAPPER_H
@@ -1,46 +1,46
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBARSERIES_H
23 23 #define QBARSERIES_H
24 24
25 25 #include <QtCharts/QAbstractBarSeries>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QBarSeriesPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QBarSeries : public QAbstractBarSeries
32 32 {
33 33 Q_OBJECT
34 34 public:
35 explicit QBarSeries(QObject *parent = 0);
35 explicit QBarSeries(QObject *parent = Q_NULLPTR);
36 36 ~QBarSeries();
37 37 QAbstractSeries::SeriesType type() const;
38 38
39 39 private:
40 40 Q_DECLARE_PRIVATE(QBarSeries)
41 41 Q_DISABLE_COPY(QBarSeries)
42 42 };
43 43
44 44 QT_CHARTS_END_NAMESPACE
45 45
46 46 #endif // QBARSERIES_H
@@ -1,47 +1,47
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPERCENTBARSERIES_H
23 23 #define QPERCENTBARSERIES_H
24 24
25 25 #include <QtCore/QStringList>
26 26 #include <QtCharts/QAbstractBarSeries>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29
30 30 class QPercentBarSeriesPrivate;
31 31
32 32 class QT_CHARTS_EXPORT QPercentBarSeries : public QAbstractBarSeries
33 33 {
34 34 Q_OBJECT
35 35 public:
36 explicit QPercentBarSeries(QObject *parent = 0);
36 explicit QPercentBarSeries(QObject *parent = Q_NULLPTR);
37 37 ~QPercentBarSeries();
38 38 QAbstractSeries::SeriesType type() const;
39 39
40 40 private:
41 41 Q_DECLARE_PRIVATE(QPercentBarSeries)
42 42 Q_DISABLE_COPY(QPercentBarSeries)
43 43 };
44 44
45 45 QT_CHARTS_END_NAMESPACE
46 46
47 47 #endif // QPERCENTBARSERIES_H
@@ -1,47 +1,47
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QSTACKEDBARSERIES_H
23 23 #define QSTACKEDBARSERIES_H
24 24
25 25 #include <QtCore/QStringList>
26 26 #include <QtCharts/QAbstractBarSeries>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29
30 30 class QStackedBarSeriesPrivate;
31 31
32 32 class QT_CHARTS_EXPORT QStackedBarSeries : public QAbstractBarSeries
33 33 {
34 34 Q_OBJECT
35 35 public:
36 explicit QStackedBarSeries(QObject *parent = 0);
36 explicit QStackedBarSeries(QObject *parent = Q_NULLPTR);
37 37 ~QStackedBarSeries();
38 38 QAbstractSeries::SeriesType type() const;
39 39
40 40 private:
41 41 Q_DECLARE_PRIVATE(QStackedBarSeries)
42 42 Q_DISABLE_COPY(QStackedBarSeries)
43 43 };
44 44
45 45 QT_CHARTS_END_NAMESPACE
46 46
47 47 #endif // QSTACKEDBARSERIES_H
@@ -1,72 +1,72
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBOXPLOTMODELMAPPER_H
23 23 #define QBOXPLOTMODELMAPPER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27
28 28 QT_BEGIN_NAMESPACE
29 29 class QAbstractItemModel;
30 30 QT_END_NAMESPACE
31 31
32 32 QT_CHARTS_BEGIN_NAMESPACE
33 33
34 34 class QBoxPlotModelMapperPrivate;
35 35 class QBoxPlotSeries;
36 36
37 37 class QT_CHARTS_EXPORT QBoxPlotModelMapper : public QObject
38 38 {
39 39 Q_OBJECT
40 40
41 41 protected:
42 explicit QBoxPlotModelMapper(QObject *parent = 0);
42 explicit QBoxPlotModelMapper(QObject *parent = Q_NULLPTR);
43 43
44 44 QAbstractItemModel *model() const;
45 45 void setModel(QAbstractItemModel *model);
46 46
47 47 QBoxPlotSeries *series() const;
48 48 void setSeries(QBoxPlotSeries *series);
49 49
50 50 int first() const;
51 51 void setFirst(int first);
52 52
53 53 int count() const;
54 54 void setCount(int count);
55 55
56 56 int firstBoxSetSection() const;
57 57 void setFirstBoxSetSection(int firstBoxSetSection);
58 58
59 59 int lastBoxSetSection() const;
60 60 void setLastBoxSetSection(int lastBoxSetSection);
61 61
62 62 Qt::Orientation orientation() const;
63 63 void setOrientation(Qt::Orientation orientation);
64 64
65 65 protected:
66 66 QBoxPlotModelMapperPrivate * const d_ptr;
67 67 Q_DECLARE_PRIVATE(QBoxPlotModelMapper)
68 68 };
69 69
70 70 QT_CHARTS_END_NAMESPACE
71 71
72 72 #endif // QBOXPLOTMODELMAPPER_H
@@ -1,89 +1,89
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBOXPLOTSERIES_H
23 23 #define QBOXPLOTSERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QBoxSet>
27 27 #include <QtCharts/QAbstractSeries>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QBoxPlotSeriesPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QBoxPlotSeries : public QAbstractSeries
34 34 {
35 35 Q_OBJECT
36 36 Q_PROPERTY(bool boxOutlineVisible READ boxOutlineVisible WRITE setBoxOutlineVisible NOTIFY boxOutlineVisibilityChanged)
37 37 Q_PROPERTY(qreal boxWidth READ boxWidth WRITE setBoxWidth NOTIFY boxWidthChanged)
38 38 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
39 39 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
40 40 Q_PROPERTY(int count READ count NOTIFY countChanged REVISION 1)
41 41 public:
42 explicit QBoxPlotSeries(QObject *parent = 0);
42 explicit QBoxPlotSeries(QObject *parent = Q_NULLPTR);
43 43 ~QBoxPlotSeries();
44 44
45 45 bool append(QBoxSet *box);
46 46 bool remove(QBoxSet *box);
47 47 bool take(QBoxSet *box);
48 48 bool append(QList<QBoxSet *> boxes);
49 49 bool insert(int index, QBoxSet *box);
50 50 int count() const;
51 51 QList<QBoxSet *> boxSets() const;
52 52 void clear();
53 53
54 54 QAbstractSeries::SeriesType type() const;
55 55
56 56 void setBoxOutlineVisible(bool visible);
57 57 bool boxOutlineVisible();
58 58 void setBoxWidth(qreal width);
59 59 qreal boxWidth();
60 60 void setBrush(const QBrush &brush);
61 61 QBrush brush() const;
62 62 void setPen(const QPen &pen);
63 63 QPen pen() const;
64 64
65 65 Q_SIGNALS:
66 66 void clicked(QBoxSet *boxset);
67 67 void hovered(bool status, QBoxSet *boxset);
68 68 void pressed(QBoxSet *boxset);
69 69 void released(QBoxSet *boxset);
70 70 void doubleClicked(QBoxSet *boxset);
71 71 void countChanged();
72 72 void penChanged();
73 73 void brushChanged();
74 74 void boxOutlineVisibilityChanged();
75 75 void boxWidthChanged();
76 76
77 77 void boxsetsAdded(QList<QBoxSet *> sets);
78 78 void boxsetsRemoved(QList<QBoxSet *> sets);
79 79
80 80 private:
81 81 Q_DECLARE_PRIVATE(QBoxPlotSeries)
82 82 Q_DISABLE_COPY(QBoxPlotSeries)
83 83 friend class BoxPlotChartItem;
84 84 friend class QBoxPlotLegendMarkerPrivate;
85 85 };
86 86
87 87 QT_CHARTS_END_NAMESPACE
88 88
89 89 #endif // QBOXPLOTSERIES_H
@@ -1,98 +1,98
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBOXSET_H
23 23 #define QBOXSET_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtGui/QPen>
27 27 #include <QtGui/QBrush>
28 28 #include <QtGui/QFont>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31 class QBoxSetPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QBoxSet : public QObject
34 34 {
35 35 Q_OBJECT
36 36 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
37 37 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
38 38
39 39 public:
40 40 enum ValuePositions {
41 41 LowerExtreme,
42 42 LowerQuartile,
43 43 Median,
44 44 UpperQuartile,
45 45 UpperExtreme
46 46 };
47 47
48 48 public:
49 explicit QBoxSet(const QString label = QString(), QObject *parent = 0);
50 explicit QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = 0);
49 explicit QBoxSet(const QString label = QString(), QObject *parent = Q_NULLPTR);
50 explicit QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = Q_NULLPTR);
51 51 virtual ~QBoxSet();
52 52
53 53 void append(const qreal value);
54 54 void append(const QList<qreal> &values);
55 55
56 56 void clear();
57 57
58 58 void setLabel(const QString label);
59 59 QString label() const;
60 60
61 61 QBoxSet &operator << (const qreal &value);
62 62
63 63 void setValue(const int index, const qreal value);
64 64 qreal at(const int index) const;
65 65 qreal operator [](const int index) const;
66 66 int count() const;
67 67
68 68 void setPen(const QPen &pen);
69 69 QPen pen() const;
70 70
71 71 void setBrush(const QBrush &brush);
72 72 QBrush brush() const;
73 73
74 74 Q_SIGNALS:
75 75 void clicked();
76 76 void hovered(bool status);
77 77 void pressed();
78 78 void released();
79 79 void doubleClicked();
80 80 void penChanged();
81 81 void brushChanged();
82 82
83 83 void valuesChanged();
84 84 void valueChanged(int index);
85 85 void cleared();
86 86
87 87 private:
88 88 QScopedPointer<QBoxSetPrivate> d_ptr;
89 89 Q_DISABLE_COPY(QBoxSet)
90 90 friend class BarLegendMarker;
91 91 friend class BarChartItem;
92 92 friend class BoxPlotChartItem;
93 93 friend class QBoxPlotSeriesPrivate;
94 94 };
95 95
96 96 QT_CHARTS_END_NAMESPACE
97 97
98 98 #endif // QBOXSET_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QVBOXPLOTMODELMAPPER_H
23 23 #define QVBOXPLOTMODELMAPPER_H
24 24
25 25 #include <QtCharts/QBoxPlotModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QVBoxPlotModelMapper : public QBoxPlotModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QBoxPlotSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int firstBoxSetColumn READ firstBoxSetColumn WRITE setFirstBoxSetColumn NOTIFY firstBoxSetColumnChanged)
35 35 Q_PROPERTY(int lastBoxSetColumn READ lastBoxSetColumn WRITE setLastBoxSetColumn NOTIFY lastBoxSetColumnChanged)
36 36 Q_PROPERTY(int firstRow READ firstRow WRITE setFirstRow NOTIFY firstRowChanged)
37 37 Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
38 38
39 39 public:
40 explicit QVBoxPlotModelMapper(QObject *parent = 0);
40 explicit QVBoxPlotModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QBoxPlotSeries *series() const;
46 46 void setSeries(QBoxPlotSeries *series);
47 47
48 48 int firstBoxSetColumn() const;
49 49 void setFirstBoxSetColumn(int firstBoxSetColumn);
50 50
51 51 int lastBoxSetColumn() const;
52 52 void setLastBoxSetColumn(int lastBoxSetColumn);
53 53
54 54 int firstRow() const;
55 55 void setFirstRow(int firstRow);
56 56
57 57 int rowCount() const;
58 58 void setRowCount(int rowCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void firstBoxSetColumnChanged();
64 64 void lastBoxSetColumnChanged();
65 65 void firstRowChanged();
66 66 void rowCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QVBOXPLOTMODELMAPPER_H
@@ -1,57 +1,57
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QAREALEGENDMARKER_H
23 23 #define QAREALEGENDMARKER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QLegendMarker>
27 27 #include <QtCharts/QAreaSeries>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QAreaLegendMarkerPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QAreaLegendMarker : public QLegendMarker
34 34 {
35 35 Q_OBJECT
36 36
37 37 public:
38 explicit QAreaLegendMarker(QAreaSeries *series, QLegend *legend, QObject *parent = 0);
38 explicit QAreaLegendMarker(QAreaSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
39 39 virtual ~QAreaLegendMarker();
40 40
41 41 virtual LegendMarkerType type() { return LegendMarkerTypeArea; }
42 42
43 43 // Related series
44 44 virtual QAreaSeries* series();
45 45
46 46 protected:
47 QAreaLegendMarker(QAreaLegendMarkerPrivate &d, QObject *parent = 0);
47 QAreaLegendMarker(QAreaLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
48 48
49 49 private:
50 50 Q_DECLARE_PRIVATE(QAreaLegendMarker)
51 51 Q_DISABLE_COPY(QAreaLegendMarker)
52 52
53 53 };
54 54
55 55 QT_CHARTS_END_NAMESPACE
56 56
57 57 #endif // QAREALEGENDMARKER_H
@@ -1,58 +1,58
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21 #ifndef QBARLEGENDMARKER_H
22 22 #define QBARLEGENDMARKER_H
23 23
24 24 #include <QtCharts/QChartGlobal>
25 25 #include <QtCharts/QLegendMarker>
26 26 #include <QtCharts/QAbstractBarSeries>
27 27 #include <QtCharts/QBarSet>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QLegend;
32 32 class QBarLegendMarkerPrivate;
33 33
34 34 class QT_CHARTS_EXPORT QBarLegendMarker : public QLegendMarker
35 35 {
36 36 Q_OBJECT
37 37 public:
38 explicit QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset, QLegend *legend, QObject *parent = 0);
38 explicit QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset, QLegend *legend, QObject *parent = Q_NULLPTR);
39 39 virtual ~QBarLegendMarker();
40 40
41 41 virtual LegendMarkerType type() { return LegendMarkerTypeBar; }
42 42
43 43 // Related series and barset
44 44 virtual QAbstractBarSeries* series();
45 45 QBarSet* barset();
46 46
47 47 protected:
48 QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent = 0);
48 QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
49 49
50 50 private:
51 51 Q_DECLARE_PRIVATE(QBarLegendMarker)
52 52 Q_DISABLE_COPY(QBarLegendMarker)
53 53
54 54 };
55 55
56 56 QT_CHARTS_END_NAMESPACE
57 57
58 58 #endif // QBARLEGENDMARKER_H
@@ -1,56 +1,56
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QBOXPLOTLEGENDMARKER_H
23 23 #define QBOXPLOTLEGENDMARKER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QLegendMarker>
27 27 #include <QtCharts/QBoxPlotSeries>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QBoxPlotLegendMarkerPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QBoxPlotLegendMarker : public QLegendMarker
34 34 {
35 35 Q_OBJECT
36 36
37 37 public:
38 explicit QBoxPlotLegendMarker(QBoxPlotSeries *series, QLegend *legend, QObject *parent = 0);
38 explicit QBoxPlotLegendMarker(QBoxPlotSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
39 39 virtual ~QBoxPlotLegendMarker();
40 40
41 41 virtual LegendMarkerType type() { return LegendMarkerTypeBoxPlot; }
42 42
43 43 // Related series
44 44 virtual QBoxPlotSeries* series();
45 45
46 46 protected:
47 QBoxPlotLegendMarker(QBoxPlotLegendMarkerPrivate &d, QObject *parent = 0);
47 QBoxPlotLegendMarker(QBoxPlotLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
48 48
49 49 private:
50 50 Q_DECLARE_PRIVATE(QBoxPlotLegendMarker)
51 51 Q_DISABLE_COPY(QBoxPlotLegendMarker)
52 52 };
53 53
54 54 QT_CHARTS_END_NAMESPACE
55 55
56 56 #endif // QBOXPLOTLEGENDMARKER_H
@@ -1,113 +1,113
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QLEGEND_H
23 23 #define QLEGEND_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtWidgets/QGraphicsWidget>
27 27 #include <QtGui/QPen>
28 28 #include <QtGui/QBrush>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31
32 32 class QChart;
33 33 class QLegendPrivate;
34 34 class QLegendMarker;
35 35 class QAbstractSeries;
36 36
37 37 class QT_CHARTS_EXPORT QLegend : public QGraphicsWidget
38 38 {
39 39 Q_OBJECT
40 40 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
41 41 Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible NOTIFY backgroundVisibleChanged)
42 42 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
43 43 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
44 44 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
45 45 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged)
46 46 Q_PROPERTY(bool reverseMarkers READ reverseMarkers WRITE setReverseMarkers NOTIFY reverseMarkersChanged)
47 47
48 48 private:
49 49 explicit QLegend(QChart *chart);
50 50
51 51 public:
52 52 ~QLegend();
53 53
54 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
54 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
55 55
56 56 void setBrush(const QBrush &brush);
57 57 QBrush brush() const;
58 58 void setColor(QColor color);
59 59 QColor color();
60 60
61 61 void setPen(const QPen &pen);
62 62 QPen pen() const;
63 63 void setBorderColor(QColor color);
64 64 QColor borderColor();
65 65
66 66 void setFont(const QFont &font);
67 67 QFont font() const;
68 68 void setLabelBrush(const QBrush &brush);
69 69 QBrush labelBrush() const;
70 70
71 71 void setLabelColor(QColor color);
72 72 QColor labelColor() const;
73 73
74 74 void setAlignment(Qt::Alignment alignment);
75 75 Qt::Alignment alignment() const;
76 76
77 77 void detachFromChart();
78 78 void attachToChart();
79 79 bool isAttachedToChart();
80 80
81 81 void setBackgroundVisible(bool visible = true);
82 82 bool isBackgroundVisible() const;
83 83
84 QList <QLegendMarker*> markers(QAbstractSeries *series = 0) const;
84 QList <QLegendMarker*> markers(QAbstractSeries *series = Q_NULLPTR) const;
85 85
86 86 bool reverseMarkers();
87 87 void setReverseMarkers(bool reverseMarkers = true);
88 88
89 89 protected:
90 90 void hideEvent(QHideEvent *event);
91 91 void showEvent(QShowEvent *event);
92 92
93 93 Q_SIGNALS:
94 94 void backgroundVisibleChanged(bool visible);
95 95 void colorChanged(QColor color);
96 96 void borderColorChanged(QColor color);
97 97 void fontChanged(QFont font);
98 98 void labelColorChanged(QColor color);
99 99 void reverseMarkersChanged(bool reverseMarkers);
100 100
101 101 private:
102 102 QScopedPointer<QLegendPrivate> d_ptr;
103 103 Q_DISABLE_COPY(QLegend)
104 104 friend class LegendScroller;
105 105 friend class LegendLayout;
106 106 friend class ChartLayout;
107 107 friend class LegendMarkerItem;
108 108 friend class QLegendMarkerPrivate;
109 109 };
110 110
111 111 QT_CHARTS_END_NAMESPACE
112 112
113 113 #endif // QLEGEND_H
@@ -1,108 +1,108
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QLEGENDMARKER_H
23 23 #define QLEGENDMARKER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27 #include <QtGui/QPen>
28 28 #include <QtGui/QBrush>
29 29 #include <QtGui/QFont>
30 30
31 31 QT_CHARTS_BEGIN_NAMESPACE
32 32
33 33 class QLegendMarkerPrivate;
34 34 class QAbstractSeries;
35 35 class QLegend;
36 36
37 37 class QT_CHARTS_EXPORT QLegendMarker : public QObject
38 38 {
39 39 Q_OBJECT
40 40
41 41 public:
42 42 enum LegendMarkerType {
43 43 LegendMarkerTypeArea,
44 44 LegendMarkerTypeBar,
45 45 LegendMarkerTypePie,
46 46 LegendMarkerTypeXY,
47 47 LegendMarkerTypeBoxPlot
48 48 };
49 49
50 50 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
51 51 Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush NOTIFY labelBrushChanged)
52 52 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
53 53 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
54 54 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
55 55 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
56 56 Q_ENUMS(LegendMarkerType)
57 57
58 58 public:
59 59 virtual ~QLegendMarker();
60 60 virtual LegendMarkerType type() = 0;
61 61
62 62 QString label() const;
63 63 void setLabel(const QString &label);
64 64
65 65 QBrush labelBrush() const;
66 66 void setLabelBrush(const QBrush &brush);
67 67
68 68 QFont font() const;
69 69 void setFont(const QFont &font);
70 70
71 71 QPen pen() const;
72 72 void setPen(const QPen &pen);
73 73
74 74 QBrush brush() const;
75 75 void setBrush(const QBrush &brush);
76 76
77 77 bool isVisible() const;
78 78 void setVisible(bool visible);
79 79
80 80 virtual QAbstractSeries* series() = 0;
81 81
82 82 Q_SIGNALS:
83 83 void clicked();
84 84 void hovered(bool status);
85 85 void labelChanged();
86 86 void labelBrushChanged();
87 87 void fontChanged();
88 88 void penChanged();
89 89 void brushChanged();
90 90 void visibleChanged();
91 91
92 92 protected:
93 explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = 0);
93 explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
94 94
95 95 QScopedPointer<QLegendMarkerPrivate> d_ptr;
96 96 friend class QLegendPrivate;
97 97 friend class QLegendMarkerPrivate;
98 98 friend class LegendMarkerItem;
99 99 friend class LegendLayout;
100 100 friend class LegendScroller;
101 101
102 102 private:
103 103 Q_DISABLE_COPY(QLegendMarker)
104 104 };
105 105
106 106 QT_CHARTS_END_NAMESPACE
107 107
108 108 #endif // QLEGENDMARKER_H
@@ -1,58 +1,58
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPIELEGENDMARKER_H
23 23 #define QPIELEGENDMARKER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QLegendMarker>
27 27 #include <QtCharts/QPieSeries>
28 28 #include <QtCharts/QPieSlice>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31
32 32 class QPieLegendMarkerPrivate;
33 33
34 34 class QT_CHARTS_EXPORT QPieLegendMarker : public QLegendMarker
35 35 {
36 36 Q_OBJECT
37 37
38 38 public:
39 explicit QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend *legend, QObject *parent = 0);
39 explicit QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend *legend, QObject *parent = Q_NULLPTR);
40 40 virtual ~QPieLegendMarker();
41 41
42 42 virtual LegendMarkerType type() { return LegendMarkerTypePie; }
43 43
44 44 // Related series and slice
45 45 virtual QPieSeries* series();
46 46 QPieSlice* slice();
47 47
48 48 protected:
49 QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent = 0);
49 QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
50 50
51 51 private:
52 52 Q_DECLARE_PRIVATE(QPieLegendMarker)
53 53 Q_DISABLE_COPY(QPieLegendMarker)
54 54
55 55 };
56 56
57 57 QT_CHARTS_END_NAMESPACE
58 58 #endif // QPIELEGENDMARKER_H
@@ -1,56 +1,56
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QXYLEGENDMARKER_H
23 23 #define QXYLEGENDMARKER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QLegendMarker>
27 27 #include <QtCharts/QXYSeries>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QXYLegendMarkerPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QXYLegendMarker : public QLegendMarker
34 34 {
35 35 Q_OBJECT
36 36 public:
37 explicit QXYLegendMarker(QXYSeries *series, QLegend *legend, QObject *parent = 0);
37 explicit QXYLegendMarker(QXYSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
38 38 virtual ~QXYLegendMarker();
39 39
40 40 virtual LegendMarkerType type() { return LegendMarkerTypeXY; }
41 41
42 42 // Related series
43 43 virtual QXYSeries* series();
44 44
45 45 protected:
46 QXYLegendMarker(QXYLegendMarkerPrivate &d, QObject *parent = 0);
46 QXYLegendMarker(QXYLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
47 47
48 48 private:
49 49 Q_DECLARE_PRIVATE(QXYLegendMarker)
50 50 Q_DISABLE_COPY(QXYLegendMarker)
51 51
52 52 };
53 53
54 54 QT_CHARTS_END_NAMESPACE
55 55
56 56 #endif // QXYLEGENDMARKER_H
@@ -1,53 +1,53
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QLINESERIES_H
23 23 #define QLINESERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QXYSeries>
27 27 #include <QtGui/QPen>
28 28
29 29 QT_CHARTS_BEGIN_NAMESPACE
30 30
31 31 class QLineSeriesPrivate;
32 32
33 33 class QT_CHARTS_EXPORT QLineSeries : public QXYSeries
34 34 {
35 35 Q_OBJECT
36 36
37 37 public:
38 explicit QLineSeries(QObject *parent = 0);
38 explicit QLineSeries(QObject *parent = Q_NULLPTR);
39 39 ~QLineSeries();
40 40 QAbstractSeries::SeriesType type() const;
41 41
42 42 protected:
43 QLineSeries(QLineSeriesPrivate &d, QObject *parent = 0);
43 QLineSeries(QLineSeriesPrivate &d, QObject *parent = Q_NULLPTR);
44 44
45 45 private:
46 46 Q_DECLARE_PRIVATE(QLineSeries)
47 47 Q_DISABLE_COPY(QLineSeries)
48 48 friend class LineChartItem;
49 49 };
50 50
51 51 QT_CHARTS_END_NAMESPACE
52 52
53 53 #endif // QLINESERIES_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHPIEMODELMAPPER_H
23 23 #define QHPIEMODELMAPPER_H
24 24
25 25 #include <QtCharts/QPieModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QHPieModelMapper : public QPieModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QPieSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int valuesRow READ valuesRow WRITE setValuesRow NOTIFY valuesRowChanged)
35 35 Q_PROPERTY(int labelsRow READ labelsRow WRITE setLabelsRow NOTIFY labelsRowChanged)
36 36 Q_PROPERTY(int firstColumn READ firstColumn WRITE setFirstColumn NOTIFY firstColumnChanged)
37 37 Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
38 38
39 39 public:
40 explicit QHPieModelMapper(QObject *parent = 0);
40 explicit QHPieModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QPieSeries *series() const;
46 46 void setSeries(QPieSeries *series);
47 47
48 48 int valuesRow() const;
49 49 void setValuesRow(int valuesRow);
50 50
51 51 int labelsRow() const;
52 52 void setLabelsRow(int labelsRow);
53 53
54 54 int firstColumn() const;
55 55 void setFirstColumn(int firstColumn);
56 56
57 57 int columnCount() const;
58 58 void setColumnCount(int columnCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void valuesRowChanged();
64 64 void labelsRowChanged();
65 65 void firstColumnChanged();
66 66 void columnCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QHPIEMODELMAPPER_H
@@ -1,72 +1,72
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPIEMODELMAPPER_H
23 23 #define QPIEMODELMAPPER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27
28 28 QT_BEGIN_NAMESPACE
29 29 class QAbstractItemModel;
30 30 QT_END_NAMESPACE
31 31
32 32 QT_CHARTS_BEGIN_NAMESPACE
33 33
34 34 class QPieModelMapperPrivate;
35 35 class QPieSeries;
36 36
37 37 class QT_CHARTS_EXPORT QPieModelMapper : public QObject
38 38 {
39 39 Q_OBJECT
40 40
41 41 protected:
42 explicit QPieModelMapper(QObject *parent = 0);
42 explicit QPieModelMapper(QObject *parent = Q_NULLPTR);
43 43
44 44 QAbstractItemModel *model() const;
45 45 void setModel(QAbstractItemModel *model);
46 46
47 47 QPieSeries *series() const;
48 48 void setSeries(QPieSeries *series);
49 49
50 50 int first() const;
51 51 void setFirst(int first);
52 52
53 53 int count() const;
54 54 void setCount(int count);
55 55
56 56 int valuesSection() const;
57 57 void setValuesSection(int valuesSection);
58 58
59 59 int labelsSection() const;
60 60 void setLabelsSection(int labelsSection);
61 61
62 62 Qt::Orientation orientation() const;
63 63 void setOrientation(Qt::Orientation orientation);
64 64
65 65 protected:
66 66 QPieModelMapperPrivate * const d_ptr;
67 67 Q_DECLARE_PRIVATE(QPieModelMapper)
68 68 };
69 69
70 70 QT_CHARTS_END_NAMESPACE
71 71
72 72 #endif // QPIEMODELMAPPER_H
@@ -1,107 +1,107
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPIESERIES_H
23 23 #define QPIESERIES_H
24 24
25 25 #include <QtCharts/QAbstractSeries>
26 26 #include <QtCharts/QPieSlice>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29 class QPieSeriesPrivate;
30 30
31 31 class QT_CHARTS_EXPORT QPieSeries : public QAbstractSeries
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(qreal horizontalPosition READ horizontalPosition WRITE setHorizontalPosition)
35 35 Q_PROPERTY(qreal verticalPosition READ verticalPosition WRITE setVerticalPosition)
36 36 Q_PROPERTY(qreal size READ pieSize WRITE setPieSize)
37 37 Q_PROPERTY(qreal startAngle READ pieStartAngle WRITE setPieStartAngle)
38 38 Q_PROPERTY(qreal endAngle READ pieEndAngle WRITE setPieEndAngle)
39 39 Q_PROPERTY(int count READ count NOTIFY countChanged)
40 40 Q_PROPERTY(qreal sum READ sum NOTIFY sumChanged)
41 41 Q_PROPERTY(qreal holeSize READ holeSize WRITE setHoleSize)
42 42
43 43 public:
44 explicit QPieSeries(QObject *parent = 0);
44 explicit QPieSeries(QObject *parent = Q_NULLPTR);
45 45 virtual ~QPieSeries();
46 46
47 47 QAbstractSeries::SeriesType type() const;
48 48
49 49 bool append(QPieSlice *slice);
50 50 bool append(QList<QPieSlice *> slices);
51 51 QPieSeries &operator << (QPieSlice *slice);
52 52 QPieSlice *append(QString label, qreal value);
53 53
54 54 bool insert(int index, QPieSlice *slice);
55 55
56 56 bool remove(QPieSlice *slice);
57 57 bool take(QPieSlice *slice);
58 58 void clear();
59 59
60 60 QList<QPieSlice *> slices() const;
61 61 int count() const;
62 62
63 63 bool isEmpty() const;
64 64
65 65 qreal sum() const;
66 66
67 67 void setHoleSize(qreal holeSize);
68 68 qreal holeSize() const;
69 69
70 70 void setHorizontalPosition(qreal relativePosition);
71 71 qreal horizontalPosition() const;
72 72
73 73 void setVerticalPosition(qreal relativePosition);
74 74 qreal verticalPosition() const;
75 75
76 76 void setPieSize(qreal relativeSize);
77 77 qreal pieSize() const;
78 78
79 79 void setPieStartAngle(qreal startAngle);
80 80 qreal pieStartAngle() const;
81 81
82 82 void setPieEndAngle(qreal endAngle);
83 83 qreal pieEndAngle() const;
84 84
85 85 void setLabelsVisible(bool visible = true);
86 86 void setLabelsPosition(QPieSlice::LabelPosition position);
87 87
88 88 Q_SIGNALS:
89 89 void added(QList<QPieSlice *> slices);
90 90 void removed(QList<QPieSlice *> slices);
91 91 void clicked(QPieSlice *slice);
92 92 void hovered(QPieSlice *slice, bool state);
93 93 void pressed(QPieSlice *slice);
94 94 void released(QPieSlice *slice);
95 95 void doubleClicked(QPieSlice *slice);
96 96 void countChanged();
97 97 void sumChanged();
98 98
99 99 private:
100 100 Q_DECLARE_PRIVATE(QPieSeries)
101 101 Q_DISABLE_COPY(QPieSeries)
102 102 friend class PieChartItem;
103 103 };
104 104
105 105 QT_CHARTS_END_NAMESPACE
106 106
107 107 #endif // QPIESERIES_H
@@ -1,151 +1,151
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPIESLICE_H
23 23 #define QPIESLICE_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27 #include <QtGui/QPen>
28 28 #include <QtGui/QBrush>
29 29 #include <QtGui/QFont>
30 30
31 31 QT_CHARTS_BEGIN_NAMESPACE
32 32 class QPieSlicePrivate;
33 33 class QPieSeries;
34 34
35 35 class QT_CHARTS_EXPORT QPieSlice : public QObject
36 36 {
37 37 Q_OBJECT
38 38 Q_ENUMS(LabelPosition)
39 39 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
40 40 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged)
41 41 Q_PROPERTY(bool labelVisible READ isLabelVisible WRITE setLabelVisible NOTIFY labelVisibleChanged)
42 42 Q_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition)
43 43 Q_PROPERTY(bool exploded READ isExploded WRITE setExploded)
44 44 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
45 45 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
46 46 Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged)
47 47 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
48 48 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
49 49 Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush NOTIFY labelBrushChanged)
50 50 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged)
51 51 Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont NOTIFY labelFontChanged)
52 52 Q_PROPERTY(qreal labelArmLengthFactor READ labelArmLengthFactor WRITE setLabelArmLengthFactor)
53 53 Q_PROPERTY(qreal explodeDistanceFactor READ explodeDistanceFactor WRITE setExplodeDistanceFactor)
54 54 Q_PROPERTY(qreal percentage READ percentage NOTIFY percentageChanged)
55 55 Q_PROPERTY(qreal startAngle READ startAngle NOTIFY startAngleChanged)
56 56 Q_PROPERTY(qreal angleSpan READ angleSpan NOTIFY angleSpanChanged)
57 57
58 58 public:
59 59 enum LabelPosition {
60 60 LabelOutside,
61 61 LabelInsideHorizontal,
62 62 LabelInsideTangential,
63 63 LabelInsideNormal
64 64 };
65 65
66 66 public:
67 explicit QPieSlice(QObject *parent = 0);
68 QPieSlice(QString label, qreal value, QObject *parent = 0);
67 explicit QPieSlice(QObject *parent = Q_NULLPTR);
68 QPieSlice(QString label, qreal value, QObject *parent = Q_NULLPTR);
69 69 virtual ~QPieSlice();
70 70
71 71 void setLabel(QString label);
72 72 QString label() const;
73 73
74 74 void setValue(qreal value);
75 75 qreal value() const;
76 76
77 77 void setLabelVisible(bool visible = true);
78 78 bool isLabelVisible() const;
79 79
80 80 LabelPosition labelPosition();
81 81 void setLabelPosition(LabelPosition position);
82 82
83 83 void setExploded(bool exploded = true);
84 84 bool isExploded() const;
85 85
86 86 void setPen(const QPen &pen);
87 87 QPen pen() const;
88 88
89 89 QColor borderColor();
90 90 void setBorderColor(QColor color);
91 91
92 92 int borderWidth();
93 93 void setBorderWidth(int width);
94 94
95 95 void setBrush(const QBrush &brush);
96 96 QBrush brush() const;
97 97
98 98 QColor color();
99 99 void setColor(QColor color);
100 100
101 101 void setLabelBrush(const QBrush &brush);
102 102 QBrush labelBrush() const;
103 103
104 104 QColor labelColor();
105 105 void setLabelColor(QColor color);
106 106
107 107 void setLabelFont(const QFont &font);
108 108 QFont labelFont() const;
109 109
110 110 void setLabelArmLengthFactor(qreal factor);
111 111 qreal labelArmLengthFactor() const;
112 112
113 113 void setExplodeDistanceFactor(qreal factor);
114 114 qreal explodeDistanceFactor() const;
115 115
116 116 qreal percentage() const;
117 117 qreal startAngle() const;
118 118 qreal angleSpan() const;
119 119
120 120 QPieSeries *series() const;
121 121
122 122 Q_SIGNALS:
123 123 void clicked();
124 124 void hovered(bool state);
125 125 void pressed();
126 126 void released();
127 127 void doubleClicked();
128 128 void labelChanged();
129 129 void valueChanged();
130 130 void labelVisibleChanged();
131 131 void penChanged();
132 132 void brushChanged();
133 133 void labelBrushChanged();
134 134 void labelFontChanged();
135 135 void percentageChanged();
136 136 void startAngleChanged();
137 137 void angleSpanChanged();
138 138 void colorChanged();
139 139 void borderColorChanged();
140 140 void borderWidthChanged();
141 141 void labelColorChanged();
142 142
143 143 private:
144 144 QPieSlicePrivate * const d_ptr;
145 145 Q_DECLARE_PRIVATE(QPieSlice)
146 146 Q_DISABLE_COPY(QPieSlice)
147 147 };
148 148
149 149 QT_CHARTS_END_NAMESPACE
150 150
151 151 #endif // QPIESLICE_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QVPIEMODELMAPPER_H
23 23 #define QVPIEMODELMAPPER_H
24 24
25 25 #include <QtCharts/QPieModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QVPieModelMapper : public QPieModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QPieSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int valuesColumn READ valuesColumn WRITE setValuesColumn NOTIFY valuesColumnChanged)
35 35 Q_PROPERTY(int labelsColumn READ labelsColumn WRITE setLabelsColumn NOTIFY labelsColumnChanged)
36 36 Q_PROPERTY(int firstRow READ firstRow WRITE setFirstRow NOTIFY firstRowChanged)
37 37 Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
38 38
39 39 public:
40 explicit QVPieModelMapper(QObject *parent = 0);
40 explicit QVPieModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QPieSeries *series() const;
46 46 void setSeries(QPieSeries *series);
47 47
48 48 int valuesColumn() const;
49 49 void setValuesColumn(int valuesColumn);
50 50
51 51 int labelsColumn() const;
52 52 void setLabelsColumn(int labelsColumn);
53 53
54 54 int firstRow() const;
55 55 void setFirstRow(int firstRow);
56 56
57 57 int rowCount() const;
58 58 void setRowCount(int rowCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void valuesColumnChanged();
64 64 void labelsColumnChanged();
65 65 void firstRowChanged();
66 66 void rowCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QVPIEMODELMAPPER_H
@@ -1,104 +1,104
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QABSTRACTSERIES_H
23 23 #define QABSTRACTSERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QAbstractAxis>
27 27 #include <QtCore/QObject>
28 28 #include <QtGui/QPen>
29 29
30 30 QT_CHARTS_BEGIN_NAMESPACE
31 31
32 32 class QAbstractSeriesPrivate;
33 33 class QChart;
34 34
35 35 class QT_CHARTS_EXPORT QAbstractSeries : public QObject
36 36 {
37 37 Q_OBJECT
38 38 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
39 39 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
40 40 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
41 41 Q_PROPERTY(SeriesType type READ type)
42 42 Q_PROPERTY(bool useOpenGL READ useOpenGL WRITE setUseOpenGL NOTIFY useOpenGLChanged)
43 43 Q_ENUMS(SeriesType)
44 44
45 45 public:
46 46 enum SeriesType {
47 47 SeriesTypeLine,
48 48 SeriesTypeArea,
49 49 SeriesTypeBar,
50 50 SeriesTypeStackedBar,
51 51 SeriesTypePercentBar,
52 52 SeriesTypePie,
53 53 SeriesTypeScatter,
54 54 SeriesTypeSpline,
55 55 SeriesTypeHorizontalBar,
56 56 SeriesTypeHorizontalStackedBar,
57 57 SeriesTypeHorizontalPercentBar,
58 58 SeriesTypeBoxPlot
59 59 };
60 60
61 61 protected:
62 QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent = 0);
62 QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent = Q_NULLPTR);
63 63
64 64 public:
65 65 ~QAbstractSeries();
66 66 virtual SeriesType type() const = 0;
67 67
68 68 void setName(const QString &name);
69 69 QString name() const;
70 70 void setVisible(bool visible = true);
71 71 bool isVisible() const;
72 72 qreal opacity() const;
73 73 void setOpacity(qreal opacity);
74 74 void setUseOpenGL(bool enable = true);
75 75 bool useOpenGL() const;
76 76
77 77 QChart *chart() const;
78 78
79 79 bool attachAxis(QAbstractAxis *axis);
80 80 bool detachAxis(QAbstractAxis *axis);
81 81 QList<QAbstractAxis*> attachedAxes();
82 82
83 83 void show();
84 84 void hide();
85 85
86 86 Q_SIGNALS:
87 87 void nameChanged();
88 88 void visibleChanged();
89 89 void opacityChanged();
90 90 void useOpenGLChanged();
91 91
92 92 protected:
93 93 QScopedPointer<QAbstractSeriesPrivate> d_ptr;
94 94 friend class ChartDataSet;
95 95 friend class ChartPresenter;
96 96 friend class ChartThemeManager;
97 97 friend class QLegendPrivate;
98 98 friend class DeclarativeChart;
99 99 friend class QAreaSeries;
100 100 };
101 101
102 102 QT_CHARTS_END_NAMESPACE
103 103
104 104 #endif // QABSTRACTSERIES_H
@@ -1,195 +1,195
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QCHART_H
23 23 #define QCHART_H
24 24
25 25 #include <QtCharts/QAbstractSeries>
26 26 #include <QtCharts/QLegend>
27 27 #include <QtWidgets/QGraphicsWidget>
28 28 #include <QtCore/QMargins>
29 29
30 30 QT_BEGIN_NAMESPACE
31 31 class QGraphicsSceneResizeEvent;
32 32 QT_END_NAMESPACE
33 33
34 34 QT_CHARTS_BEGIN_NAMESPACE
35 35
36 36 class QAbstractSeries;
37 37 class QAbstractAxis;
38 38 class QLegend;
39 39 class QChartPrivate;
40 40 class QBoxPlotSeries;
41 41
42 42 class QT_CHARTS_EXPORT QChart : public QGraphicsWidget
43 43 {
44 44 Q_OBJECT
45 45 Q_PROPERTY(QChart::ChartTheme theme READ theme WRITE setTheme)
46 46 Q_PROPERTY(QString title READ title WRITE setTitle)
47 47 Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible)
48 48 Q_PROPERTY(bool dropShadowEnabled READ isDropShadowEnabled WRITE setDropShadowEnabled)
49 49 Q_PROPERTY(qreal backgroundRoundness READ backgroundRoundness WRITE setBackgroundRoundness)
50 50 Q_PROPERTY(QChart::AnimationOptions animationOptions READ animationOptions WRITE setAnimationOptions)
51 51 Q_PROPERTY(int animationDuration READ animationDuration WRITE setAnimationDuration)
52 52 Q_PROPERTY(QEasingCurve animationEasingCurve READ animationEasingCurve WRITE setAnimationEasingCurve)
53 53 Q_PROPERTY(QMargins margins READ margins WRITE setMargins)
54 54 Q_PROPERTY(QChart::ChartType chartType READ chartType)
55 55 Q_PROPERTY(bool plotAreaBackgroundVisible READ isPlotAreaBackgroundVisible WRITE setPlotAreaBackgroundVisible)
56 56 Q_PROPERTY(bool localizeNumbers READ localizeNumbers WRITE setLocalizeNumbers)
57 57 Q_PROPERTY(QLocale locale READ locale WRITE setLocale)
58 58 Q_PROPERTY(QRectF plotArea READ plotArea NOTIFY plotAreaChanged)
59 59 Q_ENUMS(ChartTheme)
60 60 Q_ENUMS(AnimationOption)
61 61 Q_ENUMS(ChartType)
62 62
63 63 public:
64 64 enum ChartType {
65 65 ChartTypeUndefined = 0,
66 66 ChartTypeCartesian,
67 67 ChartTypePolar
68 68 };
69 69
70 70 enum ChartTheme {
71 71 ChartThemeLight = 0,
72 72 ChartThemeBlueCerulean,
73 73 ChartThemeDark,
74 74 ChartThemeBrownSand,
75 75 ChartThemeBlueNcs,
76 76 ChartThemeHighContrast,
77 77 ChartThemeBlueIcy,
78 78 ChartThemeQt
79 79 };
80 80
81 81 enum AnimationOption {
82 82 NoAnimation = 0x0,
83 83 GridAxisAnimations = 0x1,
84 84 SeriesAnimations = 0x2,
85 85 AllAnimations = 0x3
86 86 };
87 87
88 88 Q_DECLARE_FLAGS(AnimationOptions, AnimationOption)
89 89
90 90 public:
91 explicit QChart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
91 explicit QChart(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
92 92 ~QChart();
93 93
94 94 void addSeries(QAbstractSeries *series);
95 95 void removeSeries(QAbstractSeries *series);
96 96 void removeAllSeries();
97 97 QList<QAbstractSeries *> series() const;
98 98
99 99 // *** deprecated ***
100 void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = 0);
101 void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = 0);
102 QAbstractAxis *axisX(QAbstractSeries *series = 0) const;
103 QAbstractAxis *axisY(QAbstractSeries *series = 0) const;
100 void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
101 void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
102 QAbstractAxis *axisX(QAbstractSeries *series = Q_NULLPTR) const;
103 QAbstractAxis *axisY(QAbstractSeries *series = Q_NULLPTR) const;
104 104 // ******************
105 105
106 106 void addAxis(QAbstractAxis *axis, Qt::Alignment alignment);
107 107 void removeAxis(QAbstractAxis *axis);
108 QList<QAbstractAxis*> axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = 0) const;
108 QList<QAbstractAxis*> axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = Q_NULLPTR) const;
109 109
110 110 void createDefaultAxes();
111 111
112 112 void setTheme(QChart::ChartTheme theme);
113 113 QChart::ChartTheme theme() const;
114 114
115 115 void setTitle(const QString &title);
116 116 QString title() const;
117 117 void setTitleFont(const QFont &font);
118 118 QFont titleFont() const;
119 119 void setTitleBrush(const QBrush &brush);
120 120 QBrush titleBrush() const;
121 121
122 122 void setBackgroundBrush(const QBrush &brush);
123 123 QBrush backgroundBrush() const;
124 124 void setBackgroundPen(const QPen &pen);
125 125 QPen backgroundPen() const;
126 126 void setBackgroundVisible(bool visible = true);
127 127 bool isBackgroundVisible() const;
128 128
129 129 void setDropShadowEnabled(bool enabled = true);
130 130 bool isDropShadowEnabled() const;
131 131 void setBackgroundRoundness(qreal diameter);
132 132 qreal backgroundRoundness() const;
133 133
134 134 void setAnimationOptions(AnimationOptions options);
135 135 AnimationOptions animationOptions() const;
136 136 void setAnimationDuration(int msecs);
137 137 int animationDuration() const;
138 138 void setAnimationEasingCurve(const QEasingCurve &curve);
139 139 QEasingCurve animationEasingCurve() const;
140 140
141 141 void zoomIn();
142 142 void zoomOut();
143 143
144 144 void zoomIn(const QRectF &rect);
145 145 void zoom(qreal factor);
146 146 void zoomReset();
147 147 bool isZoomed();
148 148
149 149 void scroll(qreal dx, qreal dy);
150 150
151 151 QLegend *legend() const;
152 152
153 153 void setMargins(const QMargins &margins);
154 154 QMargins margins() const;
155 155
156 156 QRectF plotArea() const;
157 157 void setPlotAreaBackgroundBrush(const QBrush &brush);
158 158 QBrush plotAreaBackgroundBrush() const;
159 159 void setPlotAreaBackgroundPen(const QPen &pen);
160 160 QPen plotAreaBackgroundPen() const;
161 161 void setPlotAreaBackgroundVisible(bool visible = true);
162 162 bool isPlotAreaBackgroundVisible() const;
163 163 void setLocalizeNumbers(bool localize);
164 164 bool localizeNumbers() const;
165 165 void setLocale(const QLocale &locale);
166 166 QLocale locale() const;
167 167
168 QPointF mapToValue(const QPointF &position, QAbstractSeries *series = 0);
169 QPointF mapToPosition(const QPointF &value, QAbstractSeries *series = 0);
168 QPointF mapToValue(const QPointF &position, QAbstractSeries *series = Q_NULLPTR);
169 QPointF mapToPosition(const QPointF &value, QAbstractSeries *series = Q_NULLPTR);
170 170
171 171 ChartType chartType() const;
172 172
173 173 Q_SIGNALS:
174 174 void plotAreaChanged(const QRectF &plotArea);
175 175
176 176 protected:
177 177 explicit QChart(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wFlags);
178 178 QScopedPointer<QChartPrivate> d_ptr;
179 179 friend class QLegend;
180 180 friend class DeclarativeChart;
181 181 friend class ChartDataSet;
182 182 friend class ChartPresenter;
183 183 friend class ChartThemeManager;
184 184 friend class QAbstractSeries;
185 185 friend class QBoxPlotSeriesPrivate;
186 186
187 187 private:
188 188 Q_DISABLE_COPY(QChart)
189 189 };
190 190
191 191 QT_CHARTS_END_NAMESPACE
192 192
193 193 Q_DECLARE_OPERATORS_FOR_FLAGS(QT_CHARTS_NAMESPACE::QChart::AnimationOptions)
194 194
195 195 #endif // QCHART_H
@@ -1,78 +1,78
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QCHARTVIEW_H
23 23 #define QCHARTVIEW_H
24 24
25 25 #include <QtCharts/QAbstractAxis>
26 26 #include <QtCharts/QAbstractSeries>
27 27 #include <QtCharts/QChart>
28 28 #include <QtWidgets/QGraphicsView>
29 29
30 30 QT_BEGIN_NAMESPACE
31 31 class QGraphicsScene;
32 32 class QRubberBand;
33 33 QT_END_NAMESPACE
34 34
35 35 QT_CHARTS_BEGIN_NAMESPACE
36 36
37 37 class QChartViewPrivate;
38 38
39 39 class QT_CHARTS_EXPORT QChartView : public QGraphicsView
40 40 {
41 41 Q_OBJECT
42 42 Q_ENUMS(RubberBand)
43 43 public:
44 44
45 45 enum RubberBand {
46 46 NoRubberBand = 0x0,
47 47 VerticalRubberBand = 0x1,
48 48 HorizontalRubberBand = 0x2,
49 49 RectangleRubberBand = 0x3
50 50 };
51 51
52 52 Q_DECLARE_FLAGS(RubberBands, RubberBand)
53 53
54 explicit QChartView(QWidget *parent = 0);
55 explicit QChartView(QChart *chart, QWidget *parent = 0);
54 explicit QChartView(QWidget *parent = Q_NULLPTR);
55 explicit QChartView(QChart *chart, QWidget *parent = Q_NULLPTR);
56 56 ~QChartView();
57 57
58 58 void setRubberBand(const RubberBands &rubberBands);
59 59 RubberBands rubberBand() const;
60 60
61 61 QChart *chart() const;
62 62 void setChart(QChart *chart);
63 63
64 64 protected:
65 65 void resizeEvent(QResizeEvent *event);
66 66 void mousePressEvent(QMouseEvent *event);
67 67 void mouseMoveEvent(QMouseEvent *event);
68 68 void mouseReleaseEvent(QMouseEvent *event);
69 69
70 70 QScopedPointer<QChartViewPrivate> d_ptr;
71 71
72 72 private:
73 73 Q_DISABLE_COPY(QChartView)
74 74 };
75 75
76 76 QT_CHARTS_END_NAMESPACE
77 77
78 78 #endif // QCHARTVIEW_H
@@ -1,61 +1,61
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QPOLARCHART_H
23 23 #define QPOLARCHART_H
24 24
25 25 #include <QtCharts/QChart>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28
29 29 class QAbstractSeries;
30 30 class QAbstractAxis;
31 31
32 32 class QT_CHARTS_EXPORT QPolarChart : public QChart
33 33 {
34 34 Q_OBJECT
35 35 Q_ENUMS(PolarOrientation)
36 36 Q_FLAGS(PolarOrientations)
37 37
38 38 public:
39 39 enum PolarOrientation {
40 40 PolarOrientationRadial = 0x1,
41 41 PolarOrientationAngular = 0x2
42 42 };
43 43 Q_DECLARE_FLAGS(PolarOrientations, PolarOrientation)
44 44
45 45 public:
46 explicit QPolarChart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
46 explicit QPolarChart(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
47 47 ~QPolarChart();
48 48
49 49 void addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation);
50 50
51 QList<QAbstractAxis*> axes(PolarOrientations polarOrientation = PolarOrientations(PolarOrientationRadial | PolarOrientationAngular), QAbstractSeries *series = 0) const;
51 QList<QAbstractAxis*> axes(PolarOrientations polarOrientation = PolarOrientations(PolarOrientationRadial | PolarOrientationAngular), QAbstractSeries *series = Q_NULLPTR) const;
52 52
53 53 static PolarOrientation axisPolarOrientation(QAbstractAxis *axis);
54 54
55 55 private:
56 56 Q_DISABLE_COPY(QPolarChart)
57 57 };
58 58
59 59 QT_CHARTS_END_NAMESPACE
60 60
61 61 #endif // QCHART_H
@@ -1,78 +1,78
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QSCATTERSERIES_H
23 23 #define QSCATTERSERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/qxyseries.h>
27 27
28 28 QT_CHARTS_BEGIN_NAMESPACE
29 29
30 30 class QScatterSeriesPrivate;
31 31
32 32 class QT_CHARTS_EXPORT QScatterSeries : public QXYSeries
33 33 {
34 34 Q_OBJECT
35 35 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
36 36 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
37 37 Q_PROPERTY(MarkerShape markerShape READ markerShape WRITE setMarkerShape NOTIFY markerShapeChanged)
38 38 Q_PROPERTY(qreal markerSize READ markerSize WRITE setMarkerSize NOTIFY markerSizeChanged)
39 39 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
40 40 Q_ENUMS(MarkerShape)
41 41
42 42 public:
43 43 enum MarkerShape {
44 44 MarkerShapeCircle,
45 45 MarkerShapeRectangle
46 46 };
47 47
48 48 public:
49 explicit QScatterSeries(QObject *parent = 0);
49 explicit QScatterSeries(QObject *parent = Q_NULLPTR);
50 50 ~QScatterSeries();
51 51 QAbstractSeries::SeriesType type() const;
52 52 void setPen(const QPen &pen);
53 53 void setBrush(const QBrush &brush);
54 54 QBrush brush() const;
55 55 void setColor(const QColor &color);
56 56 QColor color() const;
57 57 void setBorderColor(const QColor &color);
58 58 QColor borderColor() const;
59 59 MarkerShape markerShape() const;
60 60 void setMarkerShape(MarkerShape shape);
61 61 qreal markerSize() const;
62 62 void setMarkerSize(qreal size);
63 63
64 64 Q_SIGNALS:
65 65 void colorChanged(QColor color);
66 66 void borderColorChanged(QColor color);
67 67 void markerShapeChanged(MarkerShape shape);
68 68 void markerSizeChanged(qreal size);
69 69
70 70 private:
71 71 Q_DECLARE_PRIVATE(QScatterSeries)
72 72 Q_DISABLE_COPY(QScatterSeries)
73 73 friend class ScatterChartItem;
74 74 };
75 75
76 76 QT_CHARTS_END_NAMESPACE
77 77
78 78 #endif // QSCATTERSERIES_H
@@ -1,52 +1,52
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QSPLINESERIES_H
23 23 #define QSPLINESERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/qlineseries.h>
27 27 #include <QtCore/QList>
28 28 #include <QtCore/QPointF>
29 29 #include <QtCore/QtGlobal>
30 30
31 31 QT_CHARTS_BEGIN_NAMESPACE
32 32
33 33 class QSplineSeriesPrivate;
34 34
35 35 class QT_CHARTS_EXPORT QSplineSeries : public QLineSeries
36 36 {
37 37 Q_OBJECT
38 38
39 39 public:
40 explicit QSplineSeries(QObject *parent = 0);
40 explicit QSplineSeries(QObject *parent = Q_NULLPTR);
41 41 ~QSplineSeries();
42 42 QAbstractSeries::SeriesType type() const;
43 43
44 44 private:
45 45 Q_DECLARE_PRIVATE(QSplineSeries)
46 46 Q_DISABLE_COPY(QSplineSeries)
47 47 friend class SplineChartItem;
48 48 };
49 49
50 50 QT_CHARTS_END_NAMESPACE
51 51
52 52 #endif // QSPLINESERIES_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QHXYMODELMAPPER_H
23 23 #define QHXYMODELMAPPER_H
24 24
25 25 #include <QtCharts/QXYModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QHXYModelMapper : public QXYModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QXYSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int xRow READ xRow WRITE setXRow NOTIFY xRowChanged)
35 35 Q_PROPERTY(int yRow READ yRow WRITE setYRow NOTIFY yRowChanged)
36 36 Q_PROPERTY(int firstColumn READ firstColumn WRITE setFirstColumn NOTIFY firstColumnChanged)
37 37 Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
38 38
39 39 public:
40 explicit QHXYModelMapper(QObject *parent = 0);
40 explicit QHXYModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QXYSeries *series() const;
46 46 void setSeries(QXYSeries *series);
47 47
48 48 int xRow() const;
49 49 void setXRow(int xRow);
50 50
51 51 int yRow() const;
52 52 void setYRow(int yRow);
53 53
54 54 int firstColumn() const;
55 55 void setFirstColumn(int firstColumn);
56 56
57 57 int columnCount() const;
58 58 void setColumnCount(int columnCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void xRowChanged();
64 64 void yRowChanged();
65 65 void firstColumnChanged();
66 66 void columnCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QHXYMODELMAPPER_H
@@ -1,71 +1,71
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QVXYMODELMAPPER_H
23 23 #define QVXYMODELMAPPER_H
24 24
25 25 #include <QtCharts/QXYModelMapper>
26 26
27 27 QT_CHARTS_BEGIN_NAMESPACE
28 28 /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
29 29 class QT_CHARTS_EXPORT QVXYModelMapper : public QXYModelMapper
30 30 {
31 31 Q_OBJECT
32 32 Q_PROPERTY(QXYSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
33 33 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
34 34 Q_PROPERTY(int xColumn READ xColumn WRITE setXColumn NOTIFY xColumnChanged)
35 35 Q_PROPERTY(int yColumn READ yColumn WRITE setYColumn NOTIFY yColumnChanged)
36 36 Q_PROPERTY(int firstRow READ firstRow WRITE setFirstRow NOTIFY firstRowChanged)
37 37 Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
38 38
39 39 public:
40 explicit QVXYModelMapper(QObject *parent = 0);
40 explicit QVXYModelMapper(QObject *parent = Q_NULLPTR);
41 41
42 42 QAbstractItemModel *model() const;
43 43 void setModel(QAbstractItemModel *model);
44 44
45 45 QXYSeries *series() const;
46 46 void setSeries(QXYSeries *series);
47 47
48 48 int xColumn() const;
49 49 void setXColumn(int xColumn);
50 50
51 51 int yColumn() const;
52 52 void setYColumn(int yColumn);
53 53
54 54 int firstRow() const;
55 55 void setFirstRow(int firstRow);
56 56
57 57 int rowCount() const;
58 58 void setRowCount(int rowCount);
59 59
60 60 Q_SIGNALS:
61 61 void seriesReplaced();
62 62 void modelReplaced();
63 63 void xColumnChanged();
64 64 void yColumnChanged();
65 65 void firstRowChanged();
66 66 void rowCountChanged();
67 67 };
68 68
69 69 QT_CHARTS_END_NAMESPACE
70 70
71 71 #endif // QVXYMODELMAPPER_H
@@ -1,72 +1,72
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QXYMODELMAPPER_H
23 23 #define QXYMODELMAPPER_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCore/QObject>
27 27
28 28 QT_BEGIN_NAMESPACE
29 29 class QAbstractItemModel;
30 30 QT_END_NAMESPACE
31 31
32 32 QT_CHARTS_BEGIN_NAMESPACE
33 33
34 34 class QXYModelMapperPrivate;
35 35 class QXYSeries;
36 36
37 37 class QT_CHARTS_EXPORT QXYModelMapper : public QObject
38 38 {
39 39 Q_OBJECT
40 40
41 41 protected:
42 explicit QXYModelMapper(QObject *parent = 0);
42 explicit QXYModelMapper(QObject *parent = Q_NULLPTR);
43 43
44 44 QAbstractItemModel *model() const;
45 45 void setModel(QAbstractItemModel *model);
46 46
47 47 QXYSeries *series() const;
48 48 void setSeries(QXYSeries *series);
49 49
50 50 int first() const;
51 51 void setFirst(int first);
52 52
53 53 int count() const;
54 54 void setCount(int count);
55 55
56 56 Qt::Orientation orientation() const;
57 57 void setOrientation(Qt::Orientation orientation);
58 58
59 59 int xSection() const;
60 60 void setXSection(int xSection);
61 61
62 62 int ySection() const;
63 63 void setYSection(int ySection);
64 64
65 65 protected:
66 66 QXYModelMapperPrivate *const d_ptr;
67 67 Q_DECLARE_PRIVATE(QXYModelMapper)
68 68 };
69 69
70 70 QT_CHARTS_END_NAMESPACE
71 71
72 72 #endif // QXYMODELMAPPER_H
@@ -1,136 +1,136
1 1 /******************************************************************************
2 2 **
3 3 ** Copyright (C) 2015 The Qt Company Ltd.
4 4 ** Contact: http://www.qt.io/licensing/
5 5 **
6 6 ** This file is part of the Qt Charts module.
7 7 **
8 8 ** $QT_BEGIN_LICENSE:COMM$
9 9 **
10 10 ** Commercial License Usage
11 11 ** Licensees holding valid commercial Qt licenses may use this file in
12 12 ** accordance with the commercial license agreement provided with the
13 13 ** Software or, alternatively, in accordance with the terms contained in
14 14 ** a written agreement between you and The Qt Company. For licensing terms
15 15 ** and conditions see http://www.qt.io/terms-conditions. For further
16 16 ** information use the contact form at http://www.qt.io/contact-us.
17 17 **
18 18 ** $QT_END_LICENSE$
19 19 **
20 20 ******************************************************************************/
21 21
22 22 #ifndef QXYSERIES_H
23 23 #define QXYSERIES_H
24 24
25 25 #include <QtCharts/QChartGlobal>
26 26 #include <QtCharts/QAbstractSeries>
27 27 #include <QtGui/QPen>
28 28 #include <QtGui/QBrush>
29 29
30 30 QT_BEGIN_NAMESPACE
31 31 class QModelIndex;
32 32 QT_END_NAMESPACE
33 33
34 34 QT_CHARTS_BEGIN_NAMESPACE
35 35
36 36 class QXYSeriesPrivate;
37 37 class QXYModelMapper;
38 38
39 39 class QT_CHARTS_EXPORT QXYSeries : public QAbstractSeries
40 40 {
41 41 Q_OBJECT
42 42 Q_PROPERTY(bool pointsVisible READ pointsVisible WRITE setPointsVisible)
43 43 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
44 44 Q_PROPERTY(QString pointLabelsFormat READ pointLabelsFormat WRITE setPointLabelsFormat NOTIFY pointLabelsFormatChanged)
45 45 Q_PROPERTY(bool pointLabelsVisible READ pointLabelsVisible WRITE setPointLabelsVisible NOTIFY pointLabelsVisibilityChanged)
46 46 Q_PROPERTY(QFont pointLabelsFont READ pointLabelsFont WRITE setPointLabelsFont NOTIFY pointLabelsFontChanged)
47 47 Q_PROPERTY(QColor pointLabelsColor READ pointLabelsColor WRITE setPointLabelsColor NOTIFY pointLabelsColorChanged)
48 48 Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged)
49 49
50 50 protected:
51 explicit QXYSeries(QXYSeriesPrivate &d, QObject *parent = 0);
51 explicit QXYSeries(QXYSeriesPrivate &d, QObject *parent = Q_NULLPTR);
52 52
53 53 public:
54 54 ~QXYSeries();
55 55 void append(qreal x, qreal y);
56 56 void append(const QPointF &point);
57 57 void append(const QList<QPointF> &points);
58 58 void replace(qreal oldX, qreal oldY, qreal newX, qreal newY);
59 59 void replace(const QPointF &oldPoint, const QPointF &newPoint);
60 60 void replace(int index, qreal newX, qreal newY);
61 61 void replace(int index, const QPointF &newPoint);
62 62 void remove(qreal x, qreal y);
63 63 void remove(const QPointF &point);
64 64 void remove(int index);
65 65 void removePoints(int index, int count);
66 66 void insert(int index, const QPointF &point);
67 67 void clear();
68 68
69 69 int count() const;
70 70 QList<QPointF> points() const;
71 71 QVector<QPointF> pointsVector() const;
72 72 const QPointF &at(int index) const;
73 73
74 74 QXYSeries &operator << (const QPointF &point);
75 75 QXYSeries &operator << (const QList<QPointF> &points);
76 76
77 77 virtual void setPen(const QPen &pen);
78 78 QPen pen() const;
79 79
80 80 virtual void setBrush(const QBrush &brush);
81 81 QBrush brush() const;
82 82
83 83 virtual void setColor(const QColor &color);
84 84 virtual QColor color() const;
85 85
86 86 void setPointsVisible(bool visible = true);
87 87 bool pointsVisible() const;
88 88
89 89 void setPointLabelsFormat(const QString &format);
90 90 QString pointLabelsFormat() const;
91 91
92 92 void setPointLabelsVisible(bool visible = true);
93 93 bool pointLabelsVisible() const;
94 94
95 95 void setPointLabelsFont(const QFont &font);
96 96 QFont pointLabelsFont() const;
97 97
98 98 void setPointLabelsColor(const QColor &color);
99 99 QColor pointLabelsColor() const;
100 100
101 101 void setPointLabelsClipping(bool enabled = true);
102 102 bool pointLabelsClipping() const;
103 103
104 104 void replace(QList<QPointF> points);
105 105 void replace(QVector<QPointF> points);
106 106
107 107 Q_SIGNALS:
108 108 void clicked(const QPointF &point);
109 109 void hovered(const QPointF &point, bool state);
110 110 void pressed(const QPointF &point);
111 111 void released(const QPointF &point);
112 112 void doubleClicked(const QPointF &point);
113 113 void pointReplaced(int index);
114 114 void pointRemoved(int index);
115 115 void pointAdded(int index);
116 116 void colorChanged(QColor color);
117 117 void pointsReplaced();
118 118 void pointLabelsFormatChanged(const QString &format);
119 119 void pointLabelsVisibilityChanged(bool visible);
120 120 void pointLabelsFontChanged(const QFont &font);
121 121 void pointLabelsColorChanged(const QColor &color);
122 122 void pointLabelsClippingChanged(bool clipping);
123 123 void pointsRemoved(int index, int count);
124 124 void penChanged(const QPen &pen);
125 125
126 126 private:
127 127 Q_DECLARE_PRIVATE(QXYSeries)
128 128 Q_DISABLE_COPY(QXYSeries)
129 129 friend class QXYLegendMarkerPrivate;
130 130 friend class XYLegendMarker;
131 131 friend class XYChart;
132 132 };
133 133
134 134 QT_CHARTS_END_NAMESPACE
135 135
136 136 #endif // QXYSERIES_H
General Comments 0
You need to be logged in to leave comments. Login now