forked from SaraAghajanzadeh/poly-split
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenderarea.h
37 lines (27 loc) · 1.09 KB
/
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"vector.h"
#include <QWidget>
#include <map>
class RenderArea : public QWidget
{
Q_OBJECT
public:
RenderArea(QWidget *parent = 0);
/* Added the following functions setFieldofCoverage(double) and getFieldofCoverage() and static data member fieldofCoverage to get camera's field of coverage area from user input via camera window class.*/
std::map<std::string,double> getCamera();
void setCamera(double, double, double, double, double);
static std::map<std::string,double> camera;
int static calculateCoverage(std::vector<QPolygon> fovs);
int static calculateOverlap(std::vector<QPolygon> fovs);
protected:
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
private:
void initPolygons(void);
};
#endif // RENDERAREA_H