-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathrenderarea.h
37 lines (34 loc) · 843 Bytes
/
renderarea.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
#ifndef RENDERAREA_H
#define RENDERAREA_H
#include "rrtstar.h"
#include <QWidget>
#include <QColor>
#include <QDebug>
#include <QPoint>
#include <QMouseEvent>
#include <QPainterPath>
#include <QPainter>
#include <QRect>
class RenderArea : public QWidget
{
Q_OBJECT
public:
RenderArea(QWidget *parent = 0);
RRTSTAR *rrtstar;
protected:
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void drawField(QPainter &event);
void drawStartPos(QPainter &event);
void drawEndPos(QPainter &event);
void drawObstacles(QPainter &event);
void drawNodes(QPainter &event);
private:
bool scribbling;
QPoint lastMouseClickedPoint;
signals:
void painting();
};
#endif // RENDERAREA_H