-
Notifications
You must be signed in to change notification settings - Fork 0
/
rawreader.h
42 lines (35 loc) · 935 Bytes
/
rawreader.h
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
#ifndef RAWREADER_H
#define RAWREADER_H
#include <QString>
#include <QMap>
#include <QDateTime>
class RawReader
{
public:
RawReader();
void calculate(const QString &data, const QDateTime &startDate);
const QString &getResult() const;
const QString &getResultCSV() const;
QMap<QDateTime, int> getResultCorrected(int type) const;
private:
class Record {
public:
int entry1;
int entry2;
int entry3;
};
void calculateTimeRunning();
void calculateNextWriteBlocks();
void calculateCurrentValues();
void calculateHistoricValues();
Record recordToLong(const QString &record);
QString m_data;
int m_numberOfMinutesRunning;
int m_nextWriteBlock1;
int m_nextWriteBlock2;
QString m_result;
QString m_resultCSV;
QMap<int, Record> m_resultMap;
QDateTime m_startDate;
};
#endif // RAWREADER_H