-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
74 lines (68 loc) · 2.17 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <QApplication>
#include <QDir>
#include <QVariantMap>
#include <QVariantList>
#include <QDebug>
#include "pdfreport.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
PdfReport pdfReport(QDir::homePath()+"/report.pdf");
/*
* QVariantList[
* {
* "observation": QString observations,
* "results": QVariantMap statistics{
* {"min", DBL_MAX},
* {"max", DBL_MIN},
* {"media", 0.0},
* {"minTolerance", 0.0},
* {"maxTolerance", 0.0},
* {"status", false},
* };
*
* "parameters": QVariantMap ventilatorParameters{
* "key": "value",
* "key1": "value1",
* "key2": "value2",
* "key3": "value3",
* }
* "realResults": {
* 16: [{"result": 10, "time": (10:45:51)}, {"result": 55.3, "time": (10:45:52)}, {"result": 8, "time": (10:45:53)}, {"result": 13.7, "time": (10:45:54)}...],
* 7: [{"result": 10, "time": (10:45:51)}, {"result": 55.3, "time": (10:45:52)}, {"result": 8, "time": (10:45:53)}, {"result": 13.7, "time": (10:45:54)}...]
* },
* ...
*
*/
pdfReport.exportPdf(
QVariantMap{
{"testerName", "aaaaaa"},
{"testerDate", "aaaaaa"},
{"equipmentName", "aaaaaa"},
{"testerRegistration", "aaaaaa"},
{"hysteresisLabel", "aaaaaa"},
{"equipmentNumber", "aaaaaa"}
},
QVariantList{
QVariantMap{
{"observation", "AAAAAAAA"},
{"results", QVariantMap{
{"min", 15},
{"max", 20},
{"media", 0.0},
{"minTolerance", 0.0},
{"maxTolerance", 0.0},
{"status", false}
}
},
{"paremers", QVariantMap{
{"a", "b"},
{"c", "D"}
}
}
}
}
);
qDebug()<<"Printou";
return app.exec();
}