-
Notifications
You must be signed in to change notification settings - Fork 1
/
cMouseEvents.h
69 lines (57 loc) · 1.89 KB
/
cMouseEvents.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
69
/*
* QRAP Project
*
* Version : 0.1
* Date : 2008/04/01
* License : GNU GPLv3
* File : cMouseEvents.h
* Copyright : University of Pretoria
* Author : Dirk van der Merwe
* : email: magdaleen.ballot@up.ac.za
* Description : This probably come from QGIS ... sorry maggie doesn't
* know true origin
*
**************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef MOUSEEVENTS_H_
#define MOUSEEVENTS_H_
#include <QCursor>
#include <QString>
#include <QObject>
#include <QMouseEvent>
#include <qgsmaptool.h>
#include <qgsmapcanvas.h>
#include <qgsmaptopixel.h>
#include <qgsmaptoolemitpoint.h>
class QgsMapLayer;
class QgsMapCanvas;
class QMouseEvent;
class QgsPoint;
class QgsMapTool;
class MouseEvents : public QgsMapTool
{ Q_OBJECT
public:
MouseEvents(QgsMapCanvas* canvas);
virtual ~MouseEvents();
public slots:
virtual void canvasReleaseEvent(QMouseEvent * e);
virtual void canvasMoveEvent(QMouseEvent * e);
signals:
void RightPoint(QgsPoint &Point);
void LeftPoint(QgsPoint &Point);
void MouseMove(QgsPoint &Point);
private:
//! pointer to map canvas
QgsMapCanvas* mCanvas;
//! cursor used in map tool
QCursor mCursor;
// Current map tool
QgsMapTool* mToolEmitPoint;
};
#endif /*MOUSEEVENTS_H_*/