QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
23class Qgs3DMapCanvas;
24class QMouseEvent;
25class QKeyEvent;
26class QWheelEvent;
27
28
34class _3D_EXPORT Qgs3DMapTool : public QObject
35{
36 Q_OBJECT
37
38 public:
41
43 virtual void mousePressEvent( QMouseEvent *event );
45 virtual void mouseReleaseEvent( QMouseEvent *event );
47 virtual void mouseMoveEvent( QMouseEvent *event );
49 virtual void keyPressEvent( QKeyEvent *event );
51 virtual void keyReleaseEvent( QKeyEvent *event );
53 virtual void mouseWheelEvent( QWheelEvent *event );
54
56 virtual void activate();
57
59 virtual void deactivate();
60
62 virtual QCursor cursor() const;
63
66
67 private slots:
69 virtual void onMapSettingsChanged();
70
71 protected:
73};
74
75#endif // QGS3DMAPTOOL_H
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
virtual void mousePressEvent(QMouseEvent *event)
Reimplement to handle mouse event forwarded by the parent Qgs3DMapCanvas.
virtual QCursor cursor() const
Mouse cursor to be used when the tool is active.
virtual void mouseMoveEvent(QMouseEvent *event)
Reimplement to handle mouse move event forwarded by the parent Qgs3DMapCanvas.
Qgs3DMapTool(Qgs3DMapCanvas *canvas)
Base constructor for a Qgs3DMapTool for the specified canvas.
virtual void keyPressEvent(QKeyEvent *event)
Reimplement to handle key press event forwarded by the parent Qgs3DMapCanvas.
virtual void deactivate()
Called when map tool is being deactivated.
Qgs3DMapCanvas * mCanvas
virtual void activate()
Called when set as currently active map tool.
virtual void keyReleaseEvent(QKeyEvent *event)
Reimplement to handle key release event forwarded by the parent Qgs3DMapCanvas.
Qgs3DMapCanvas * canvas()
Returns the parent Qgs3DMapCanvas.
virtual void mouseReleaseEvent(QMouseEvent *event)
Reimplement to handle mouse release event forwarded by the parent Qgs3DMapCanvas.
virtual void mouseWheelEvent(QWheelEvent *event)
Reimplement to handle mouse wheel event forwarded by the parent Qgs3DMapCanvas.