QGIS API Documentation
3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
src
gui
maptools
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
6
email :
[email protected]
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
18
#include "
qgsmaptoolshapeabstract.h
"
19
#include "moc_qgsmaptoolshapeabstract.cpp"
20
#include "
qgsgeometryrubberband.h
"
21
22
#include <QKeyEvent>
23
24
25
QgsMapToolShapeAbstract::~QgsMapToolShapeAbstract
()
26
{
27
clean
();
28
}
29
30
void
QgsMapToolShapeAbstract::keyPressEvent
( QKeyEvent *e )
31
{
32
e->ignore();
33
}
34
35
void
QgsMapToolShapeAbstract::keyReleaseEvent
( QKeyEvent *e )
36
{
37
e->ignore();
38
}
39
40
void
QgsMapToolShapeAbstract::clean
()
41
{
42
if
(
mTempRubberBand
)
43
{
44
delete
mTempRubberBand
;
45
mTempRubberBand
=
nullptr
;
46
}
47
48
mPoints
.clear();
49
}
50
51
void
QgsMapToolShapeAbstract::undo
()
52
{
53
if
(
mPoints
.count() > 0 )
54
mPoints
.removeLast();
55
}
QgsMapToolShapeAbstract::mPoints
QgsPointSequence mPoints
points (in map coordinates)
Definition
qgsmaptoolshapeabstract.h:109
QgsMapToolShapeAbstract::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *e)
Filters a key release event Ignores the event in default implementation.
Definition
qgsmaptoolshapeabstract.cpp:35
QgsMapToolShapeAbstract::undo
virtual void undo()
Called to undo last action (last point added)
Definition
qgsmaptoolshapeabstract.cpp:51
QgsMapToolShapeAbstract::clean
virtual void clean()
Called to clean the map tool (after canceling the operation or when the digitization has finished)
Definition
qgsmaptoolshapeabstract.cpp:40
QgsMapToolShapeAbstract::~QgsMapToolShapeAbstract
virtual ~QgsMapToolShapeAbstract()
Definition
qgsmaptoolshapeabstract.cpp:25
QgsMapToolShapeAbstract::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e)
Filters a key press event Ignores the event in default implementation.
Definition
qgsmaptoolshapeabstract.cpp:30
QgsMapToolShapeAbstract::mTempRubberBand
QgsGeometryRubberBand * mTempRubberBand
Definition
qgsmaptoolshapeabstract.h:111
qgsgeometryrubberband.h
qgsmaptoolshapeabstract.h
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8