QGIS API Documentation
4.5.0-Master (c9e0ddc514d)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgs3dmaptool.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgs3dmaptool.h
3
--------------------------------------
4
Date : Sep 2018
5
Copyright : (C) 2018 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGS3DMAPTOOL_H
17
#define QGS3DMAPTOOL_H
18
19
#include "qgis_3d.h"
20
21
#include <QObject>
22
#include <QPointer>
23
24
class
Qgs3DMapCanvas
;
25
class
QMouseEvent;
26
class
QKeyEvent;
27
class
QWheelEvent;
28
29
35
class
_3D_EXPORT
Qgs3DMapTool
:
public
QObject
36
{
37
Q_OBJECT
38
39
public
:
41
Qgs3DMapTool
(
Qgs3DMapCanvas
*
canvas
);
42
44
~Qgs3DMapTool
()
override
;
45
47
virtual
void
mousePressEvent
( QMouseEvent *event );
49
virtual
void
mouseReleaseEvent
( QMouseEvent *event );
51
virtual
void
mouseMoveEvent
( QMouseEvent *event );
53
virtual
void
keyPressEvent
( QKeyEvent *event );
55
virtual
void
keyReleaseEvent
( QKeyEvent *event );
57
virtual
void
mouseWheelEvent
( QWheelEvent *event );
58
60
virtual
void
activate
();
61
63
virtual
void
deactivate
();
64
66
virtual
QCursor
cursor
()
const
;
67
69
Qgs3DMapCanvas
*
canvas
();
70
71
private
slots:
73
virtual
void
onMapSettingsChanged();
74
75
protected
:
76
QPointer<Qgs3DMapCanvas>
mCanvas
;
77
};
78
79
#endif
// QGS3DMAPTOOL_H
Qgs3DMapCanvas
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
Definition
qgs3dmapcanvas.h:89
Qgs3DMapTool::mCanvas
QPointer< Qgs3DMapCanvas > mCanvas
Definition
qgs3dmaptool.h:76
Qgs3DMapTool::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Reimplement to handle mouse event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:35
Qgs3DMapTool::cursor
virtual QCursor cursor() const
Mouse cursor to be used when the tool is active.
Definition
qgs3dmaptool.cpp:71
Qgs3DMapTool::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
Reimplement to handle mouse move event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:45
Qgs3DMapTool::Qgs3DMapTool
Qgs3DMapTool(Qgs3DMapCanvas *canvas)
Base constructor for a Qgs3DMapTool for the specified canvas.
Definition
qgs3dmaptool.cpp:22
Qgs3DMapTool::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Reimplement to handle key press event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:50
Qgs3DMapTool::deactivate
virtual void deactivate()
Called when map tool is being deactivated.
Definition
qgs3dmaptool.cpp:68
Qgs3DMapTool::activate
virtual void activate()
Called when set as currently active map tool.
Definition
qgs3dmaptool.cpp:65
Qgs3DMapTool::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event)
Reimplement to handle key release event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:55
Qgs3DMapTool::canvas
Qgs3DMapCanvas * canvas()
Returns the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:79
Qgs3DMapTool::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Reimplement to handle mouse release event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:40
Qgs3DMapTool::mouseWheelEvent
virtual void mouseWheelEvent(QWheelEvent *event)
Reimplement to handle mouse wheel event forwarded by the parent Qgs3DMapCanvas.
Definition
qgs3dmaptool.cpp:60
Generated on
for QGIS API Documentation by
1.17.0