@@ -19,6 +19,7 | |||
|
19 | 19 | ****************************************************************************/ |
|
20 | 20 | #include <QApplication> |
|
21 | 21 | #include <QMainWindow> |
|
22 | #include <QStatusBar> | |
|
22 | 23 | #include <QChartView> |
|
23 | 24 | #include "donutbreakdownchart.h" |
|
24 | 25 | |
@@ -29,8 +30,6 int main(int argc, char *argv[]) | |||
|
29 | 30 | QApplication a(argc, argv); |
|
30 | 31 | |
|
31 | 32 | //![1] |
|
32 | // Data from http://www.stat.fi/til/ekul/2010/ekul_2010_2011-12-13_tie_001_en.html | |
|
33 | ||
|
34 | 33 | QPieSeries *series1 = new QPieSeries(); |
|
35 | 34 | series1->setName("Fossil fuels"); |
|
36 | 35 | series1->append("Oil", 353295); |
@@ -69,6 +68,11 int main(int argc, char *argv[]) | |||
|
69 | 68 | window.resize(800, 600); |
|
70 | 69 | window.show(); |
|
71 | 70 | //![3] |
|
71 | ||
|
72 | // Data is taken from Statistics Finland: | |
|
73 | // http://www.stat.fi/til/ekul/2010/ekul_2010_2011-12-13_tie_001_en.html | |
|
74 | window.statusBar()->setFont(QFont("Arial", 7)); | |
|
75 | window.statusBar()->showMessage("Graph is based on data of 'Total consumption of energy increased by 10 per cent in 2010' Statistics Finland, 13 December 2011"); | |
|
72 | 76 | |
|
73 | 77 | return a.exec(); |
|
74 | 78 | } |
General Comments 0
You need to be logged in to leave comments.
Login now