1
/***************************************************************************
2
qgsmaptooldeletepart.h - delete a part from multipart geometry
5
copyright : (C) 2009 by Richard Kostecky
6
email : csf dot kostej at mail dot com
7
***************************************************************************
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. *
14
***************************************************************************/
16
#ifndef QGSMAPTOOLDELETEPART_H
17
#define QGSMAPTOOLDELETEPART_H
19
#include "qgsmaptoolvertexedit.h"
21
class QgsVertexMarker;
23
/**Map tool to delete vertices from line/polygon features*/
24
class QgsMapToolDeletePart: public QgsMapToolVertexEdit
29
QgsMapToolDeletePart( QgsMapCanvas* canvas );
30
virtual ~QgsMapToolDeletePart();
32
void canvasMoveEvent( QMouseEvent * e );
34
void canvasPressEvent( QMouseEvent * e );
36
void canvasReleaseEvent( QMouseEvent * e );
38
//! called when map tool is being deactivated
42
QgsVertexMarker* mCross;
44
//! delete part of a geometry
45
void deletePart( int fId, int beforeVertexNr, QgsVectorLayer* vlayer );
47
//! find out part number of geometry given the snapped vertex number
48
int partNumberOfVertex( QgsGeometry* g, int beforeVertexNr );