-
Notifications
You must be signed in to change notification settings - Fork 0
/
spatioframe.h
56 lines (40 loc) · 1.43 KB
/
spatioframe.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
#ifndef SPATIOFRAME_H
#define SPATIOFRAME_H
#include <QtQuick/QQuickPaintedItem>
#include <QPainter>
#include <QVariantList>
class SpatioFrame : public QQuickPaintedItem
{
Q_OBJECT
Q_PROPERTY(QObject* trackingPoints READ trackingPoints WRITE importParticlePositions)
Q_PROPERTY(QObject* trackingWeights READ trackingWeights WRITE importParticleWeights)
Q_PROPERTY(QObject* detectionPoints READ detectionPoints WRITE importDetectionPositions)
Q_PROPERTY(QObject* detectionWeights READ detectionWeights WRITE importDetectionWeights)
Q_ENUMS(PlotType)
public:
SpatioFrame(QQuickItem *parent = 0);
enum PlotType {
PlotType_Particle,
PlotType_Detection
};
void paint(QPainter *painter);
public slots:
// trackingPoints are particles
QObject* trackingPoints();
QObject* trackingWeights();
void importParticlePositions(QObject *trackingPoints);
void importParticleWeights(QObject *trackingWeights);
// detectionPoints are centre of detections
QObject* detectionPoints();
QObject* detectionWeights();
void importDetectionPositions(QObject *detectionPoints);
void importDetectionWeights(QObject *detectionWeights);
void changePlotType(PlotType type);
private:
QList<QPointF> m_trackingPoints;
QList<double> m_trackingWeights;
QList<QPointF> m_detectionPoints;
QList<double> m_detectionWeights;
PlotType m_plotType;
};
#endif // SPATIOFRAME_H