QGIS API Documentation 3.43.0-Master (3ee7834ace6)
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 <QObject>
20
21#include "qgis_3d.h"
22
23class Qgs3DMapCanvas;
24class QMouseEvent;
25class QKeyEvent;
26class QWheelEvent;
27
28#define SIP_NO_FILE
29
30
37class _3D_EXPORT Qgs3DMapTool : public QObject
38{
39 Q_OBJECT
40
41 public:
44
46 virtual void mousePressEvent( QMouseEvent *event );
48 virtual void mouseReleaseEvent( QMouseEvent *event );
50 virtual void mouseMoveEvent( QMouseEvent *event );
52 virtual void keyPressEvent( QKeyEvent *event );
54 virtual void keyReleaseEvent( QKeyEvent *event );
56 virtual void mouseWheelEvent( QWheelEvent *event );
57
59 virtual void activate();
60
62 virtual void deactivate();
63
65 virtual QCursor cursor() const;
66
68 Qgs3DMapCanvas *canvas();
69
70 private slots:
72 virtual void onMapSettingsChanged();
73
74 protected:
75 Qgs3DMapCanvas *mCanvas = nullptr;
76};
77
78#endif // QGS3DMAPTOOL_H