forked from CCOMJHC/camp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectview.h
68 lines (58 loc) · 1.71 KB
/
projectview.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
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef PROJECTVIEW_H
#define PROJECTVIEW_H
#include<QGraphicsView>
#include <QGeoCoordinate>
class QStatusBar;
class QLabel;
class AutonomousVehicleProject;
class TrackLine;
class SurveyPattern;
class SurveyArea;
class Waypoint;
class BackgroundRaster;
class MeasuringTool;
class ProjectView : public QGraphicsView
{
Q_OBJECT
public:
explicit ProjectView(QWidget *parent = 0);
void setStatusBar(QStatusBar *bar);
void setAddWaypointMode();
void setAddTracklineMode();
void setAddSurveyPatternMode();
void setAddSurveyAreaMode();
void setPanMode();
void setProject(AutonomousVehicleProject *project);
signals:
void currentChanged(QModelIndex &index);
void scaleChanged(qreal scale);
public slots:
#ifdef AMP_ROS
void sendHover();
void sendGoto();
void sendLookAt();
void sendLookAtASV();
#endif
void updateBackground(BackgroundRaster * bg);
protected:
void wheelEvent(QWheelEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void contextMenuEvent(QContextMenuEvent *event) override;
private:
enum class MouseMode {pan, addWaypoint, addTrackline, addSurveyPattern, addSurveyArea};
QStatusBar * statusBar;
QLabel * positionLabel;
QLabel * modeLabel;
MouseMode mouseMode;
AutonomousVehicleProject *m_project;
TrackLine * currentTrackLine;
Waypoint * pendingTrackLineWaypoint;
SurveyPattern * pendingSurveyPattern;
SurveyArea * pendingSurveyArea;
Waypoint * pendingSurveyAreaWaypoint;
MeasuringTool * measuringTool;
QGeoCoordinate m_contextMenuLocation;
};
#endif // PROJECTVIEW_H