1
/***************************************************************************
2
qgsmaptooladdfeature.h - map tool for adding point/line/polygon features
5
copyright : (C) 2007 by Marco Hugentobler
6
email : marco dot hugentobler at karto dot baug dot ethz dot ch
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
***************************************************************************/
17
#include "qgsmaptoolcapture.h"
19
/**This tool adds new point/line/polygon features to already existing vector layers*/
20
class QgsMapToolAddFeature: public QgsMapToolCapture
24
QgsMapToolAddFeature( QgsMapCanvas* canvas, enum CaptureTool tool );
25
virtual ~QgsMapToolAddFeature();
26
void canvasReleaseEvent( QMouseEvent * e );
28
/**Modifies geometry to avoid intersections with the layers specified in project properties
29
@return 0 in case of success, 1 if geometry is not of polygon type, 2 if avoid intersection would change the geometry type, \
30
3 other error during intersection removal*/
31
int avoidIntersectons( QgsGeometry* g );