QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
qgsmaptoolshapeabstract.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaptoolshapeabstract.cpp
3 ----------------------
4 begin : January 2022
5 copyright : (C) 2022 by Denis Rouzaud
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
19#include "moc_qgsmaptoolshapeabstract.cpp"
21
22#include <QKeyEvent>
23
24
29
31{
32 e->ignore();
33}
34
36{
37 e->ignore();
38}
39
41{
42 if ( mTempRubberBand )
43 {
44 delete mTempRubberBand;
45 mTempRubberBand = nullptr;
46 }
47
48 mPoints.clear();
49}
50
52{
53 if ( mPoints.count() > 0 )
54 mPoints.removeLast();
55}
QgsPointSequence mPoints
points (in map coordinates)
virtual void keyReleaseEvent(QKeyEvent *e)
Filters a key release event Ignores the event in default implementation.
virtual void undo()
Called to undo last action (last point added)
virtual void clean()
Called to clean the map tool (after canceling the operation or when the digitization has finished)
virtual void keyPressEvent(QKeyEvent *e)
Filters a key press event Ignores the event in default implementation.
QgsGeometryRubberBand * mTempRubberBand