QGIS API Documentation 3.38.0-Grenoble (exported)
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 <QObject>
20
21#include "qgis_3d.h"
22
23class Qgs3DMapCanvas;
24class QMouseEvent;
25class QKeyEvent;
26
27#define SIP_NO_FILE
28
29
36class _3D_EXPORT Qgs3DMapTool : public QObject
37{
38 Q_OBJECT
39
40 public:
43
45 virtual void mousePressEvent( QMouseEvent *event );
47 virtual void mouseReleaseEvent( QMouseEvent *event );
49 virtual void mouseMoveEvent( QMouseEvent *event );
51 virtual void keyPressEvent( QKeyEvent *event );
52
54 virtual void activate();
55
57 virtual void deactivate();
58
60 virtual QCursor cursor() const;
61
68 virtual bool allowsCameraControls() const { return true; }
69
71 Qgs3DMapCanvas *canvas();
72
73 private slots:
75 virtual void onMapSettingsChanged();
76
77 protected:
78 Qgs3DMapCanvas *mCanvas = nullptr;
79};
80
81#endif // QGS3DMAPTOOL_H
virtual bool allowsCameraControls() const
Whether the default mouse controls to zoom/pan/rotate camera can stay enabled while the tool is activ...