##// END OF EJS Templates
Added missing type definitions...
Mika Salmela -
r2470:58f029148996
parent child
Show More
@@ -1,104 +1,105
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2013 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef QLEGENDMARKER_H
22 22 #define QLEGENDMARKER_H
23 23
24 24 #include <QChartGlobal>
25 25 #include <QObject>
26 26 #include <QPen>
27 27 #include <QBrush>
28 28 #include <QFont>
29 29
30 30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 31
32 32 class QLegendMarkerPrivate;
33 33 class QAbstractSeries;
34 34 class QLegend;
35 35
36 36 class QTCOMMERCIALCHART_EXPORT QLegendMarker : public QObject
37 37 {
38 38 Q_OBJECT
39 39
40 40 public:
41 41 enum LegendMarkerType {
42 42 LegendMarkerTypeArea,
43 43 LegendMarkerTypeBar,
44 44 LegendMarkerTypePie,
45 LegendMarkerTypeXY
45 LegendMarkerTypeXY,
46 LegendMarkerTypeBoxPlot
46 47 };
47 48
48 49 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
49 50 Q_PROPERTY(QBrush labelBrush READ labelBrush WRITE setLabelBrush NOTIFY labelBrushChanged)
50 51 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
51 52 Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged)
52 53 Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
53 54 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
54 55 Q_ENUMS(LegendMarkerType)
55 56
56 57 public:
57 58 virtual ~QLegendMarker();
58 59 virtual LegendMarkerType type() = 0;
59 60
60 61 QString label() const;
61 62 void setLabel(const QString &label);
62 63
63 64 QBrush labelBrush() const;
64 65 void setLabelBrush(const QBrush &brush);
65 66
66 67 QFont font() const;
67 68 void setFont(const QFont &font);
68 69
69 70 QPen pen() const;
70 71 void setPen(const QPen &pen);
71 72
72 73 QBrush brush() const;
73 74 void setBrush(const QBrush &brush);
74 75
75 76 bool isVisible() const;
76 77 void setVisible(bool visible);
77 78
78 79 virtual QAbstractSeries* series() = 0;
79 80
80 81 Q_SIGNALS:
81 82 void clicked();
82 83 void hovered(bool status);
83 84 void labelChanged();
84 85 void labelBrushChanged();
85 86 void fontChanged();
86 87 void penChanged();
87 88 void brushChanged();
88 89 void visibleChanged();
89 90
90 91 protected:
91 92 explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = 0);
92 93
93 94 QScopedPointer<QLegendMarkerPrivate> d_ptr;
94 95 Q_DISABLE_COPY(QLegendMarker)
95 96 friend class QLegendPrivate;
96 97 friend class QLegendMarkerPrivate;
97 98 friend class LegendMarkerItem;
98 99 friend class LegendLayout;
99 100 friend class LegendScroller;
100 101 };
101 102
102 103 QTCOMMERCIALCHART_END_NAMESPACE
103 104
104 105 #endif // QLEGENDMARKER_H
@@ -1,97 +1,98
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2013 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef QABSTRACTSERIES_H
22 22 #define QABSTRACTSERIES_H
23 23
24 24 #include <qchartglobal.h>
25 25 #include <qabstractaxis.h>
26 26 #include <QObject>
27 27 #include <QPen>
28 28
29 29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 30
31 31 class QAbstractSeriesPrivate;
32 32 class QChart;
33 33
34 34 class QTCOMMERCIALCHART_EXPORT QAbstractSeries : public QObject
35 35 {
36 36 Q_OBJECT
37 37 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
38 38 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
39 39 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
40 40 Q_PROPERTY(SeriesType type READ type)
41 41 Q_ENUMS(SeriesType)
42 42
43 43 public:
44 44 enum SeriesType {
45 45 SeriesTypeLine,
46 46 SeriesTypeArea,
47 47 SeriesTypeBar,
48 48 SeriesTypeStackedBar,
49 49 SeriesTypePercentBar,
50 50 SeriesTypePie,
51 51 SeriesTypeScatter,
52 52 SeriesTypeSpline,
53 53 SeriesTypeHorizontalBar,
54 54 SeriesTypeHorizontalStackedBar,
55 SeriesTypeHorizontalPercentBar
55 SeriesTypeHorizontalPercentBar,
56 SeriesTypeBoxPlot
56 57 };
57 58
58 59 protected:
59 60 QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent = 0);
60 61
61 62 public:
62 63 ~QAbstractSeries();
63 64 virtual SeriesType type() const = 0;
64 65
65 66 void setName(const QString &name);
66 67 QString name() const;
67 68 void setVisible(bool visible = true);
68 69 bool isVisible() const;
69 70 qreal opacity() const;
70 71 void setOpacity(qreal opacity);
71 72
72 73 QChart *chart() const;
73 74
74 75 bool attachAxis(QAbstractAxis* axis);
75 76 bool detachAxis(QAbstractAxis* axis);
76 77 QList<QAbstractAxis*> attachedAxes();
77 78
78 79 void show();
79 80 void hide();
80 81
81 82 Q_SIGNALS:
82 83 void nameChanged();
83 84 void visibleChanged();
84 85 void opacityChanged();
85 86
86 87 protected:
87 88 QScopedPointer<QAbstractSeriesPrivate> d_ptr;
88 89 friend class ChartDataSet;
89 90 friend class ChartPresenter;
90 91 friend class ChartThemeManager;
91 92 friend class QLegendPrivate;
92 93 friend class DeclarativeChart;
93 94 };
94 95
95 96 QTCOMMERCIALCHART_END_NAMESPACE
96 97
97 98 #endif // QABSTRACTSERIES_H
General Comments 0
You need to be logged in to leave comments. Login now