##// END OF EJS Templates
added createAxis methods to private series
sauimone -
r1545:440df83ae867
parent child
Show More
@@ -27,6 +27,7
27 #include "chartdataset_p.h"
27 #include "chartdataset_p.h"
28 #include "charttheme_p.h"
28 #include "charttheme_p.h"
29 #include "chartanimator_p.h"
29 #include "chartanimator_p.h"
30 #include "qvaluesaxis.h"
30
31
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
33
@@ -378,6 +379,19 QList<LegendMarker*> QAreaSeriesPrivate::createLegendMarker(QLegend* legend)
378 return list << new AreaLegendMarker(q,legend);
379 return list << new AreaLegendMarker(q,legend);
379 }
380 }
380
381
382
383 QAbstractAxis* QAreaSeriesPrivate::createAxisX()
384 {
385 // TODO: parent?
386 return new QValuesAxis(this);
387 }
388
389 QAbstractAxis* QAreaSeriesPrivate::createAxisY()
390 {
391 // TODO: parent?
392 return new QValuesAxis(this);
393 }
394
381 #include "moc_qareaseries.cpp"
395 #include "moc_qareaseries.cpp"
382 #include "moc_qareaseries_p.cpp"
396 #include "moc_qareaseries_p.cpp"
383
397
@@ -46,6 +46,8 public:
46 void scaleDomain(Domain& domain);
46 void scaleDomain(Domain& domain);
47 Chart* createGraphics(ChartPresenter* presenter);
47 Chart* createGraphics(ChartPresenter* presenter);
48 QList<LegendMarker*> createLegendMarker(QLegend* legend);
48 QList<LegendMarker*> createLegendMarker(QLegend* legend);
49 QAbstractAxis* createAxisX();
50 QAbstractAxis* createAxisY();
49
51
50 Q_SIGNALS:
52 Q_SIGNALS:
51 void updated();
53 void updated();
@@ -27,6 +27,7
27 #include "chartdataset_p.h"
27 #include "chartdataset_p.h"
28 #include "charttheme_p.h"
28 #include "charttheme_p.h"
29 #include "chartanimator_p.h"
29 #include "chartanimator_p.h"
30 #include "qvaluesaxis.h"
30
31
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
33
@@ -607,6 +608,18 QList<LegendMarker*> QBarSeriesPrivate::createLegendMarker(QLegend* legend)
607 return markers;
608 return markers;
608 }
609 }
609
610
611 QAbstractAxis* QBarSeriesPrivate::createAxisX()
612 {
613 // TODO: parent?
614 return new QValuesAxis(this);
615 }
616
617 QAbstractAxis* QBarSeriesPrivate::createAxisY()
618 {
619 // TODO: parent?
620 return new QValuesAxis(this);
621 }
622
610 bool QBarSeriesPrivate::append(QBarSet *set)
623 bool QBarSeriesPrivate::append(QBarSet *set)
611 {
624 {
612 Q_Q(QBarSeries);
625 Q_Q(QBarSeries);
@@ -56,6 +56,9 public:
56 Chart* createGraphics(ChartPresenter* presenter);
56 Chart* createGraphics(ChartPresenter* presenter);
57 QList<LegendMarker*> createLegendMarker(QLegend* legend);
57 QList<LegendMarker*> createLegendMarker(QLegend* legend);
58
58
59 QAbstractAxis* createAxisX();
60 QAbstractAxis* createAxisY();
61
59 bool append(QBarSet *set);
62 bool append(QBarSet *set);
60 bool remove(QBarSet *set);
63 bool remove(QBarSet *set);
61 bool append(QList<QBarSet* > sets);
64 bool append(QList<QBarSet* > sets);
@@ -24,6 +24,8
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "chartanimator_p.h"
26 #include "chartanimator_p.h"
27 #include "qcategoriesaxis.h"
28 #include "qvaluesaxis.h"
27
29
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
31
@@ -110,6 +112,18 Chart* QGroupedBarSeriesPrivate::createGraphics(ChartPresenter* presenter)
110 return bar;
112 return bar;
111 }
113 }
112
114
115 QAbstractAxis* QGroupedBarSeriesPrivate::createAxisX()
116 {
117 // TODO: parent?
118 return new QCategoriesAxis(this);
119 }
120
121 QAbstractAxis* QGroupedBarSeriesPrivate::createAxisY()
122 {
123 // TODO: parent?
124 return new QValuesAxis(this);
125 }
126
113 #include "moc_qgroupedbarseries.cpp"
127 #include "moc_qgroupedbarseries.cpp"
114
128
115 QTCOMMERCIALCHART_END_NAMESPACE
129 QTCOMMERCIALCHART_END_NAMESPACE
@@ -42,6 +42,8 public:
42 QGroupedBarSeriesPrivate(QGroupedBarSeries* q);
42 QGroupedBarSeriesPrivate(QGroupedBarSeries* q);
43 Chart* createGraphics(ChartPresenter* presenter);
43 Chart* createGraphics(ChartPresenter* presenter);
44 void scaleDomain(Domain& domain);
44 void scaleDomain(Domain& domain);
45 QAbstractAxis* createAxisX();
46 QAbstractAxis* createAxisY();
45
47
46 private:
48 private:
47 Q_DECLARE_PUBLIC(QGroupedBarSeries)
49 Q_DECLARE_PUBLIC(QGroupedBarSeries)
@@ -24,6 +24,8
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "chartanimator_p.h"
26 #include "chartanimator_p.h"
27 #include "qcategoriesaxis.h"
28 #include "qvaluesaxis.h"
27
29
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
31
@@ -109,6 +111,18 Chart* QPercentBarSeriesPrivate::createGraphics(ChartPresenter* presenter)
109 return bar;
111 return bar;
110 }
112 }
111
113
114 QAbstractAxis* QPercentBarSeriesPrivate::createAxisX()
115 {
116 // TODO: parent?
117 return new QCategoriesAxis(this);
118 }
119
120 QAbstractAxis* QPercentBarSeriesPrivate::createAxisY()
121 {
122 // TODO: parent?
123 return new QValuesAxis(this);
124 }
125
112 #include "moc_qpercentbarseries.cpp"
126 #include "moc_qpercentbarseries.cpp"
113
127
114 QTCOMMERCIALCHART_END_NAMESPACE
128 QTCOMMERCIALCHART_END_NAMESPACE
@@ -42,6 +42,8 public:
42 QPercentBarSeriesPrivate(QPercentBarSeries* q);
42 QPercentBarSeriesPrivate(QPercentBarSeries* q);
43 void scaleDomain(Domain& domain);
43 void scaleDomain(Domain& domain);
44 Chart* createGraphics(ChartPresenter* presenter);
44 Chart* createGraphics(ChartPresenter* presenter);
45 QAbstractAxis* createAxisX();
46 QAbstractAxis* createAxisY();
45
47
46 private:
48 private:
47 Q_DECLARE_PUBLIC(QPercentBarSeries)
49 Q_DECLARE_PUBLIC(QPercentBarSeries)
@@ -24,6 +24,8
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "chartanimator_p.h"
26 #include "chartanimator_p.h"
27 #include "qcategoriesaxis.h"
28 #include "qvaluesaxis.h"
27
29
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
31
@@ -111,6 +113,19 Chart* QStackedBarSeriesPrivate::createGraphics(ChartPresenter* presenter)
111 return bar;
113 return bar;
112 }
114 }
113
115
116 QAbstractAxis* QStackedBarSeriesPrivate::createAxisX()
117 {
118 // TODO: parent?
119 return new QCategoriesAxis(this);
120 }
121
122 QAbstractAxis* QStackedBarSeriesPrivate::createAxisY()
123 {
124 // TODO: parent?
125 return new QValuesAxis(this);
126 }
127
128
114 #include "moc_qstackedbarseries.cpp"
129 #include "moc_qstackedbarseries.cpp"
115
130
116 QTCOMMERCIALCHART_END_NAMESPACE
131 QTCOMMERCIALCHART_END_NAMESPACE
@@ -42,6 +42,8 public:
42 QStackedBarSeriesPrivate(QStackedBarSeries* q);
42 QStackedBarSeriesPrivate(QStackedBarSeries* q);
43 Chart* createGraphics(ChartPresenter* presenter);
43 Chart* createGraphics(ChartPresenter* presenter);
44 void scaleDomain(Domain& domain);
44 void scaleDomain(Domain& domain);
45 QAbstractAxis* createAxisX();
46 QAbstractAxis* createAxisY();
45
47
46 private:
48 private:
47 Q_DECLARE_PUBLIC(QStackedBarSeries)
49 Q_DECLARE_PUBLIC(QStackedBarSeries)
@@ -24,6 +24,7
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "chartanimator_p.h"
26 #include "chartanimator_p.h"
27 #include "qvaluesaxis.h"
27
28
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
30
@@ -129,6 +130,18 Chart* QLineSeriesPrivate::createGraphics(ChartPresenter* presenter)
129 return line;
130 return line;
130 }
131 }
131
132
133 QAbstractAxis* QLineSeriesPrivate::createAxisX()
134 {
135 // TODO: parent?
136 return new QValuesAxis(this);
137 }
138
139 QAbstractAxis* QLineSeriesPrivate::createAxisY()
140 {
141 // TODO: parent?
142 return new QValuesAxis(this);
143 }
144
132 #include "moc_qlineseries.cpp"
145 #include "moc_qlineseries.cpp"
133
146
134 QTCOMMERCIALCHART_END_NAMESPACE
147 QTCOMMERCIALCHART_END_NAMESPACE
@@ -40,6 +40,9 class QLineSeriesPrivate: public QXYSeriesPrivate
40 public:
40 public:
41 QLineSeriesPrivate(QLineSeries* q);
41 QLineSeriesPrivate(QLineSeries* q);
42 Chart* createGraphics(ChartPresenter* presenter);
42 Chart* createGraphics(ChartPresenter* presenter);
43 QAbstractAxis* createAxisX();
44 QAbstractAxis* createAxisY();
45
43 private:
46 private:
44 Q_DECLARE_PUBLIC(QLineSeries);
47 Q_DECLARE_PUBLIC(QLineSeries);
45
48
@@ -27,6 +27,7
27 #include "charttheme_p.h"
27 #include "charttheme_p.h"
28 #include "chartanimator_p.h"
28 #include "chartanimator_p.h"
29 #include "legendmarker_p.h"
29 #include "legendmarker_p.h"
30 #include "qabstractaxis.h"
30
31
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
33
@@ -754,6 +755,16 QList<LegendMarker*> QPieSeriesPrivate::createLegendMarker(QLegend* legend)
754 return markers;
755 return markers;
755 }
756 }
756
757
758 QAbstractAxis* QPieSeriesPrivate::createAxisX()
759 {
760 return 0;
761 }
762
763 QAbstractAxis* QPieSeriesPrivate::createAxisY()
764 {
765 return 0;
766 }
767
757 #include "moc_qpieseries.cpp"
768 #include "moc_qpieseries.cpp"
758 #include "moc_qpieseries_p.cpp"
769 #include "moc_qpieseries_p.cpp"
759
770
@@ -47,6 +47,8 public:
47 void scaleDomain(Domain& domain);
47 void scaleDomain(Domain& domain);
48 Chart* createGraphics(ChartPresenter *presenter);
48 Chart* createGraphics(ChartPresenter *presenter);
49 QList<LegendMarker*> createLegendMarker(QLegend *legend);
49 QList<LegendMarker*> createLegendMarker(QLegend *legend);
50 QAbstractAxis* createAxisX();
51 QAbstractAxis* createAxisY();
50
52
51 void updateDerivativeData();
53 void updateDerivativeData();
52
54
@@ -52,8 +52,8 public:
52 virtual void scaleDomain(Domain& domain) = 0;
52 virtual void scaleDomain(Domain& domain) = 0;
53 virtual Chart* createGraphics(ChartPresenter* presenter) = 0;
53 virtual Chart* createGraphics(ChartPresenter* presenter) = 0;
54 virtual QList<LegendMarker*> createLegendMarker(QLegend* legend) = 0;
54 virtual QList<LegendMarker*> createLegendMarker(QLegend* legend) = 0;
55 virtual QAbstractAxis* createAxisX() { return 0; }
55 virtual QAbstractAxis* createAxisX() = 0;
56 virtual QAbstractAxis* createAxisY() { return 0; }
56 virtual QAbstractAxis* createAxisY() = 0;
57
57
58 protected:
58 protected:
59 QAbstractSeries *q_ptr;
59 QAbstractSeries *q_ptr;
@@ -24,6 +24,7
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "chartanimator_p.h"
26 #include "chartanimator_p.h"
27 #include "qvaluesaxis.h"
27
28
28 /*!
29 /*!
29 \class QScatterSeries
30 \class QScatterSeries
@@ -249,6 +250,19 Chart* QScatterSeriesPrivate::createGraphics(ChartPresenter* presenter)
249 return scatter;
250 return scatter;
250 }
251 }
251
252
253 QAbstractAxis* QScatterSeriesPrivate::createAxisX()
254 {
255 // TODO: parent?
256 return new QValuesAxis(this);
257 }
258
259 QAbstractAxis* QScatterSeriesPrivate::createAxisY()
260 {
261 // TODO: parent?
262 return new QValuesAxis(this);
263 }
264
265
252 #include "moc_qscatterseries.cpp"
266 #include "moc_qscatterseries.cpp"
253
267
254 QTCOMMERCIALCHART_END_NAMESPACE
268 QTCOMMERCIALCHART_END_NAMESPACE
@@ -39,6 +39,8 class QScatterSeriesPrivate: public QXYSeriesPrivate
39 public:
39 public:
40 QScatterSeriesPrivate(QScatterSeries* q);
40 QScatterSeriesPrivate(QScatterSeries* q);
41 Chart* createGraphics(ChartPresenter* presenter);
41 Chart* createGraphics(ChartPresenter* presenter);
42 QAbstractAxis* createAxisX();
43 QAbstractAxis* createAxisY();
42
44
43 private:
45 private:
44 QScatterSeries::MarkerShape m_shape;
46 QScatterSeries::MarkerShape m_shape;
General Comments 0
You need to be logged in to leave comments. Login now