-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmapviewwidget.h
60 lines (44 loc) · 1.14 KB
/
mapviewwidget.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
#ifndef MAPVIEWWIDGET_H
#define MAPVIEWWIDGET_H
#include <QWidget>
#include <QGLWidget>
#include "map.h"
class MapViewWidget : public QGLWidget
{
Q_OBJECT
public:
explicit MapViewWidget(QWidget *parent = 0);
~MapViewWidget();
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
QSize minimumSizeHint() const;
QSize sizeHint() const;
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void drawFrame(const std::vector<cv::Point3f>& points, const cv::Point3f &rgb);
public slots:
// slots for xyz-rotation
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
// open map file
void open();
signals:
// signaling rotation from mouse movement, currently not used.
void xRotationChanged(int angle);
void yRotationChanged(int angle);
void zRotationChanged(int angle);
private:
void draw();
Map* map;
int xRot;
int yRot;
int zRot;
float xTrans;
float yTrans;
QPoint lastPos;
};
#endif // MAPVIEWWIDGET_H