-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeasurements.h
70 lines (55 loc) · 1.99 KB
/
measurements.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
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
#pragma once
#include <QObject>
#include <QPoint>
#include <QVector>
#include "entries/bss.h"
#include "entries/measurement.h"
#include "entries/measurement_entry.h"
#include "entries/measurement_type.h"
#include "entries/position.h"
class Measurements : public QObject {
Q_OBJECT
public:
explicit Measurements(QObject *parent = nullptr);
const QVector<Measurement> measurements() const;
const QVector<Position> positions() const;
const QVector<Bss> bsss() const;
const QVector<MeasurementType> measurementTypes() const;
qreal maxZAt(int index) const;
int countAt(int index) const;
QVector<Measurement> measurementsAt(Position position) const;
void newMeasurementsAtPosition(Position position,
const QVector<MeasurementEntry> &values);
void addPosition(Position position);
QVector<Measurement> removePosition(Position position);
void updatePosition(Position oldPosition, Position newPosition);
signals:
void preMeasurementAppended(int index, int count = 1);
void postMeasurementAppended();
void prePositionAppended(int index, int count = 1);
void postPositionAppended();
void preBssAppended(int index, int count = 1);
void postBssAppended();
void preTypeAppended(int index, int count = 1);
void postTypeAppended();
void preMeasurementRemoved(int index, int count = 1);
void postMeasurementRemoved();
void prePositionRemoved(int index, int count = 1);
void postPositionRemoved();
void preBssRemoved(int index, int count = 1);
void postBssRemoved();
void preTypeRemoved(int index, int count = 1);
void postTypeRemoved();
void positionChanged(int index);
void heatMapChanged();
public slots:
void selectedBssChanged(QVector<Bss> selectedBss);
void selectedTypeChanged(MeasurementType selectedType);
private:
QVector<Measurement> mMeasurements;
QVector<Position> mPositions;
QVector<Bss> mBss;
QVector<MeasurementType> mMeasurementTypes;
QVector<Bss> mCurrentBss;
MeasurementType mCurrentMeasurementType{WiFiSignal};
};