-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmovementdatabase.h
38 lines (28 loc) · 904 Bytes
/
movementdatabase.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
#ifndef MOVEMENTDATABASE_H
#define MOVEMENTDATABASE_H
#include <QObject>
#include <QList>
#include "movement.h"
#include "pattern.h"
class MovementDatabase : public QObject
{
Q_OBJECT
public:
explicit MovementDatabase(QObject *parent = nullptr);
Q_INVOKABLE void handleNewAcceleration(double x, double y, double velocityX, double velocityY, double xBias, double yBias);
Q_INVOKABLE void handleNewAngle(double alpha);
Q_INVOKABLE void reset();
QString getDirection();
public slots:
void createNewPattern(bool isAttempt);
signals:
void movementsUpdated(qreal x_pos, qreal y_pos, qreal angle, QString direction);
void angleUpdated(double alpha);
void newPattern(Pattern *pattern);
void newAttempt(Pattern *pattern);
private:
Movement *currentMovement;
QList<Movement *> m_movements;
void createNewMovement();
};
#endif // MOVEMENTDATABASE_H