##// END OF EJS Templates
minor. updates to line ekg exampels
Michal Klocek -
r705:46244239bbcc
parent child
Show More
@@ -12,7 +12,7 m_y(1)
12 setChartTitle("Three random line charts");
12 setChartTitle("Three random line charts");
13
13
14 QObject::connect(&m_timer,SIGNAL(timeout()),this,SLOT(handleTimeout()));
14 QObject::connect(&m_timer,SIGNAL(timeout()),this,SLOT(handleTimeout()));
15 m_timer.setInterval(3000);
15 m_timer.setInterval(1000);
16
16
17 m_series0 = new QLineSeries(this);
17 m_series0 = new QLineSeries(this);
18 QPen blue(Qt::blue);
18 QPen blue(Qt::blue);
@@ -21,15 +21,14 m_y(1)
21
21
22
22
23 m_series1 = new QSplineSeries(this);
23 m_series1 = new QSplineSeries(this);
24 QPen green(Qt::green);
24 QPen green(Qt::red);
25 green.setWidth(3);
25 green.setWidth(3);
26 m_series1->setPen(green);
26 m_series1->setPen(green);
27
27
28
29 m_series0->add(m_x,m_y);
28 m_series0->add(m_x,m_y);
30 m_series1->add(m_x,m_y);
29 m_series1->add(m_x,m_y);
31
30
32 setChartTitle("Simple EKG example");
31 setChartTitle("Simple EKG chart");
33 addSeries(m_series0);
32 addSeries(m_series0);
34 addSeries(m_series1);
33 addSeries(m_series1);
35 axisY()->setRange(-5,5);
34 axisY()->setRange(-5,5);
@@ -35,7 +35,7 int main(int argc, char *argv[])
35 QMainWindow window;
35 QMainWindow window;
36 QChartView* chartView = new QChartView(&window);
36 QChartView* chartView = new QChartView(&window);
37
37
38 chartView->setChartTitle("Basic line chart example");
38 chartView->setChartTitle("Simple line chart");
39 chartView->setRenderHint(QPainter::Antialiasing);
39 chartView->setRenderHint(QPainter::Antialiasing);
40
40
41 chartView->addSeries(series0);
41 chartView->addSeries(series0);
General Comments 0
You need to be logged in to leave comments. Login now