1
#include "signalplotterbenchmark.h"
2
#include "../../../libs/ksysguard/signalplotter/ksignalplotter.h"
9
void BenchmarkSignalPlotter::init()
11
s = new KSignalPlotter;
13
void BenchmarkSignalPlotter::cleanup()
18
void BenchmarkSignalPlotter::addData()
21
s->addBeam(Qt::green);
23
s->addBeam(Qt::yellow);
25
s->setMaxAxisTextWidth(5);
27
QTest::qWaitForWindowShown(s);
30
s->addSample(QList<qreal>() << qrand()%10 << qrand()%10 << qrand()%10 << qrand()%10);
31
qApp->processEvents();
35
void BenchmarkSignalPlotter::stackedData()
38
s->addBeam(Qt::green);
40
s->addBeam(Qt::yellow);
41
s->setStackGraph(true);
43
s->setMaxAxisTextWidth(5);
45
QTest::qWaitForWindowShown(s);
48
s->addSample(QList<qreal>() << qrand()%10 << qrand()%10 << qrand()%10 << qrand()%10);
49
qApp->processEvents();
53
void BenchmarkSignalPlotter::addDataWhenHidden()
56
s->addBeam(Qt::green);
58
s->addBeam(Qt::yellow);
61
s->addSample(QList<qreal>() << qrand()%10 << qrand()%10 << qrand()%10 << qrand()%10);
62
qApp->processEvents();
67
QTEST_KDEMAIN(BenchmarkSignalPlotter, GUI)