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