##// END OF EJS Templates
Change headers to qt ones in some examples
Michal Klocek -
r632:936476785a4d
parent child
Show More
@@ -1,10 +1,8
1 #include <QApplication>
1 #include <QApplication>
2 #include <QMainWindow>
2 #include <QMainWindow>
3 #include <qchartview.h>
3 #include <QChartView>
4 #include <qlineseries.h>
4 #include <QLineSeries>
5 #include <qareaseries.h>
5 #include <QAreaSeries>
6 #include <qchart.h>
7 #include <qchartaxis.h>
8 #include <cmath>
6 #include <cmath>
9
7
10 QTCOMMERCIALCHART_USE_NAMESPACE
8 QTCOMMERCIALCHART_USE_NAMESPACE
@@ -42,7 +40,7 int main(int argc, char *argv[])
42 QMainWindow window;
40 QMainWindow window;
43 QChartView* chartView = new QChartView(&window);
41 QChartView* chartView = new QChartView(&window);
44
42
45 chartView->setChartTitle("Basic area chart example");
43 chartView->setChartTitle("Simple area chart example");
46 chartView->setRenderHint(QPainter::Antialiasing);
44 chartView->setRenderHint(QPainter::Antialiasing);
47
45
48 chartView->addSeries(series);
46 chartView->addSeries(series);
@@ -29,7 +29,7 m_y(1)
29 m_series0->add(m_x,m_y);
29 m_series0->add(m_x,m_y);
30 m_series1->add(m_x,m_y);
30 m_series1->add(m_x,m_y);
31
31
32 setChartTitle("Simple EKG exmaple");
32 setChartTitle("Simple EKG example");
33 addSeries(m_series0);
33 addSeries(m_series0);
34 addSeries(m_series1);
34 addSeries(m_series1);
35 axisY()->setRange(-5,5);
35 axisY()->setRange(-5,5);
@@ -1,8 +1,7
1 #include <QApplication>
1 #include <QApplication>
2 #include <QMainWindow>
2 #include <QMainWindow>
3 #include <qchartview.h>
3 #include <QChartView>
4 #include <qlineseries.h>
4 #include <QLineSeries>
5 #include <qchart.h>
6 #include <cmath>
5 #include <cmath>
7
6
8 QTCOMMERCIALCHART_USE_NAMESPACE
7 QTCOMMERCIALCHART_USE_NAMESPACE
@@ -1,14 +1,14
1 #include "chartview.h"
1 #include "chartview.h"
2 #include <qlineseries.h>
2 #include <QLineSeries>
3 #include <qscatterseries.h>
3 #include <QScatterSeries>
4 #include <qsplineseries.h>
4 #include <QSplineSeries>
5 #include <qareaseries.h>
5 #include <QAreaSeries>
6 #include <QTime>
6 #include <QTime>
7
7
8 ChartView::ChartView(QWidget* parent):QChartView(parent),
8 ChartView::ChartView(QWidget* parent):QChartView(parent),
9 m_index(0)
9 m_index(0)
10 {
10 {
11 setChartTitle("Four charts");
11 setChartTitle("Charts presenter");
12 QObject::connect(&m_timer,SIGNAL(timeout()),this,SLOT(handleTimeout()));
12 QObject::connect(&m_timer,SIGNAL(timeout()),this,SLOT(handleTimeout()));
13 m_timer.setInterval(3000);
13 m_timer.setInterval(3000);
14
14
@@ -1,7 +1,7
1 #ifndef CHARTVIEW_H_
1 #ifndef CHARTVIEW_H_
2 #define CHARTVIEW_H_
2 #define CHARTVIEW_H_
3
3
4 #include <qchartview.h>
4 #include <QChartView>
5 #include <QTimer>
5 #include <QTimer>
6
6
7 QTCOMMERCIALCHART_USE_NAMESPACE
7 QTCOMMERCIALCHART_USE_NAMESPACE
@@ -1,8 +1,7
1 #include <QtGui/QApplication>
1 #include <QtGui/QApplication>
2 #include <QMainWindow>
2 #include <QMainWindow>
3 #include <qchartglobal.h>
3 #include <QChartView>
4 #include <qchartview.h>
4 #include <QScatterSeries>
5 #include <qscatterseries.h>
6
5
7 QTCOMMERCIALCHART_USE_NAMESPACE
6 QTCOMMERCIALCHART_USE_NAMESPACE
8
7
@@ -36,7 +35,7 int main(int argc, char *argv[])
36 QMainWindow window;
35 QMainWindow window;
37 QChartView *chartView = new QChartView(&window);
36 QChartView *chartView = new QChartView(&window);
38 chartView->setRenderHint(QPainter::Antialiasing);
37 chartView->setRenderHint(QPainter::Antialiasing);
39 chartView->setChartTitle("Basic scatter chart example");
38 chartView->setChartTitle("Simple scatter chart example");
40 chartView->addSeries(scatter);
39 chartView->addSeries(scatter);
41 //! [3]
40 //! [3]
42
41
@@ -1,7 +1,7
1 #include "chartwidget.h"
1 #include "chartwidget.h"
2 #include <QApplication>
2 #include <QApplication>
3 #include <QMainWindow>
3 #include <QMainWindow>
4 #include <qlineseries.h>
4 #include <QLineSeries>
5 #include <cmath>
5 #include <cmath>
6
6
7 QTCOMMERCIALCHART_USE_NAMESPACE
7 QTCOMMERCIALCHART_USE_NAMESPACE
General Comments 0
You need to be logged in to leave comments. Login now