-
Notifications
You must be signed in to change notification settings - Fork 9
/
firarenderarea.h
41 lines (37 loc) · 1.22 KB
/
firarenderarea.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
#ifndef FIRARENDERAREA_H
#define FIRARENDERAREA_H
#include <QWidget>
#include "pose.h"
#include "beliefstate.h"
#include <QMutex>
class FIRARenderArea : public QWidget
{
Q_OBJECT
public:
explicit FIRARenderArea(QWidget *parent = 0);
void setEndPose(Pose p);
Pose getEndPose();
void setTrajectory(QPainterPath p);
void toggleTrajectory(bool x) { drawTraj = x; this->update();}
BeliefState *beliefStateSh;
QMutex *bsMutex;
Pose predictedPose; // predicted pose of some bot.
protected:
void paintEvent(QPaintEvent *);
void drawField(QPainter &painter);
void drawBot(QPainter &painter, double botX, double botY, double botTheta, bool isHome);
void drawBall(QPainter &painter, double ballX, double ballY);
void drawPose(QPainter &painter); //index is 0 = end pose
void drawTrajectory(QPainter &painter);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *event);
bool scribbling;
int x[1], y[1]; //
double theta[1]; // All in QWidget coordinate system. Needs to be converted to our coordinates.
QPainterPath traj;
bool drawTraj;
signals:
public slots:
};
#endif // FIRARENDERAREA_H