##// END OF EJS Templates
Fixed build error caused by QSeries name change
Tero Ahola -
r733:a8e3d9a5ee37
parent child
Show More
@@ -53,7 +53,7 public:
53 removeSeries(m_currentSeries);
53 removeSeries(m_currentSeries);
54 m_currentSeries = series;
54 m_currentSeries = series;
55 addSeries(series);
55 addSeries(series);
56 setChartTitle(series->title());
56 setChartTitle(series->name());
57 }
57 }
58
58
59 public Q_SLOTS:
59 public Q_SLOTS:
@@ -81,7 +81,7 int main(int argc, char *argv[])
81 drilldownChart->setAnimationOptions(QChart::AllAnimations);
81 drilldownChart->setAnimationOptions(QChart::AllAnimations);
82
82
83 QPieSeries* yearSeries = new QPieSeries(&window);
83 QPieSeries* yearSeries = new QPieSeries(&window);
84 yearSeries->setTitle("Sales by year - All");
84 yearSeries->setName("Sales by year - All");
85
85
86 QList<QString> months;
86 QList<QString> months;
87 months << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec";
87 months << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec";
@@ -90,7 +90,7 int main(int argc, char *argv[])
90
90
91 foreach (QString name, names) {
91 foreach (QString name, names) {
92 QPieSeries* series = new QPieSeries(&window);
92 QPieSeries* series = new QPieSeries(&window);
93 series->setTitle("Sales by month - " + name);
93 series->setName("Sales by month - " + name);
94
94
95 foreach (QString month, months)
95 foreach (QString month, months)
96 *series << new DrilldownSlice(qrand() % 1000, month, yearSeries);
96 *series << new DrilldownSlice(qrand() % 1000, month, yearSeries);
@@ -48,7 +48,7 public:
48 removeSeries(m_currentSeries);
48 removeSeries(m_currentSeries);
49 m_currentSeries = series;
49 m_currentSeries = series;
50 addSeries(series);
50 addSeries(series);
51 setChartTitle(series->title());
51 setChartTitle(series->name());
52 }
52 }
53
53
54 public Q_SLOTS:
54 public Q_SLOTS:
@@ -85,7 +85,7 int main(int argc, char *argv[])
85 //! [4]
85 //! [4]
86 // Create drilldown structure
86 // Create drilldown structure
87 DrilldownBarSeries* seasonSeries = new DrilldownBarSeries(months, drilldownChart);
87 DrilldownBarSeries* seasonSeries = new DrilldownBarSeries(months, drilldownChart);
88 seasonSeries->setTitle("Crop by month - Season");
88 seasonSeries->setName("Crop by month - Season");
89
89
90 // Each month in season series has drilldown series for weekly data
90 // Each month in season series has drilldown series for weekly data
91 foreach (QString month, months) {
91 foreach (QString month, months) {
@@ -97,7 +97,7 int main(int argc, char *argv[])
97 // Drilling down from weekly data brings us back to season data.
97 // Drilling down from weekly data brings us back to season data.
98 foreach (QString week, weeks) {
98 foreach (QString week, weeks) {
99 weeklySeries->mapDrilldownSeries(week, seasonSeries);
99 weeklySeries->mapDrilldownSeries(week, seasonSeries);
100 weeklySeries->setTitle(QString("Crop by week - " + month));
100 weeklySeries->setName(QString("Crop by week - " + month));
101 }
101 }
102
102
103 // Use right click signal to implement drilldown
103 // Use right click signal to implement drilldown
@@ -134,7 +134,7 int main(int argc, char *argv[])
134 //! [6]
134 //! [6]
135 // Show season series in initial view
135 // Show season series in initial view
136 drilldownChart->changeSeries(seasonSeries);
136 drilldownChart->changeSeries(seasonSeries);
137 drilldownChart->setChartTitle(seasonSeries->title());
137 drilldownChart->setChartTitle(seasonSeries->name());
138 //! [6]
138 //! [6]
139
139
140 drilldownChart->axisX()->setGridLineVisible(false);
140 drilldownChart->axisX()->setGridLineVisible(false);
General Comments 0
You need to be logged in to leave comments. Login now