@@ -10,7 +10,7 TARGET = dynamicLineChart | |||
|
10 | 10 | TEMPLATE = app |
|
11 | 11 | QT += core gui |
|
12 | 12 | SOURCES += main.cpp |
|
13 |
HEADERS += |
|
|
13 | HEADERS += wavegenerator.h | |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 |
@@ -4,7 +4,7 | |||
|
4 | 4 | #include <qxychartseries.h> |
|
5 | 5 | #include <qchart.h> |
|
6 | 6 | #include <cmath> |
|
7 |
#include " |
|
|
7 | #include "wavegenerator.h" | |
|
8 | 8 | |
|
9 | 9 | int main(int argc, char *argv[]) |
|
10 | 10 | { |
@@ -21,15 +21,12 int main(int argc, char *argv[]) | |||
|
21 | 21 | red.setWidth(3); |
|
22 | 22 | series1->setPen(red); |
|
23 | 23 | |
|
24 | for (int x = 0; x <= numPoints; ++x) { | |
|
25 | series0->add(x, fabs(sin(PI/50*x)*100)); | |
|
26 | series1->add(x, fabs(cos(PI/50*x)*100)); | |
|
27 | } | |
|
24 | WaveGenerator generator(series0,series1); | |
|
28 | 25 | |
|
29 | 26 | QChartView* chartView = new QChartView(&window); |
|
30 | 27 | |
|
31 | 28 | chartView->setRenderHint(QPainter::Antialiasing); |
|
32 |
chartView->setTitle(" |
|
|
29 | chartView->setTitle("This is wave generator buahha."); | |
|
33 | 30 | chartView->addSeries(series0); |
|
34 | 31 | chartView->addSeries(series1); |
|
35 | 32 | |
@@ -37,7 +34,5 int main(int argc, char *argv[]) | |||
|
37 | 34 | window.resize(400, 300); |
|
38 | 35 | window.show(); |
|
39 | 36 | |
|
40 | Updater updater(series0,series1); | |
|
41 | ||
|
42 | 37 | return a.exec(); |
|
43 | 38 | } |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now