rock_widget_collection  0.1
Functions
test.cpp File Reference
#include "StreamAlignerWidget.h"
#include "aggregator/StreamAlignerStatus.hpp"
#include <QApplication>
#include <QTimer>
#include "test.hpp"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 8 of file test.cpp.

9 {
10  QApplication app(argc, argv);
11  StreamAlignerWidget widget(NULL);
12 
13  aggregator::StreamAlignerStatus status;
14  status.samples_dropped_late_arriving = 57;
15  status.name = "TestTask";
16 
17  aggregator::StreamStatus sstatus;
18  sstatus.active = true;
19  sstatus.name = "Test";
20  sstatus.buffer_size = 200;
21  sstatus.buffer_fill = 87;
22  sstatus.samples_dropped_buffer_full = 587;
23  sstatus.samples_dropped_late_arriving = 317;
24 
25  status.streams.push_back(sstatus);
26  status.streams.push_back(sstatus);
27  status.streams.push_back(sstatus);
28 
29 
30  widget.updateData(status);
31 
32  status.streams[0].buffer_fill = 2;
33  status.name = "TestTask2";
34  widget.updateData(status);
35 
36  widget.show();
37 
38  QTimer t;
39  WidgetTester d(&widget);
40  QObject::connect(&t, SIGNAL(timeout ()), &d, SLOT(nextVal()));
41 
42  t.start(100);
43 
44  return app.exec();
45 }