~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/app/qgsmaptooladdfeature.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    qgsmaptooladdfeature.h  -  map tool for adding point/line/polygon features
 
3
    ---------------------
 
4
    begin                : April 2007
 
5
    copyright            : (C) 2007 by Marco Hugentobler
 
6
    email                : marco dot hugentobler at karto dot baug dot ethz dot ch
 
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
/* $Id$ */
 
16
 
 
17
#include "qgsmaptoolcapture.h"
 
18
 
 
19
/**This tool adds new point/line/polygon features to already existing vector layers*/
 
20
class QgsMapToolAddFeature: public QgsMapToolCapture
 
21
{
 
22
    Q_OBJECT
 
23
  public:
 
24
    QgsMapToolAddFeature( QgsMapCanvas* canvas, enum CaptureTool tool );
 
25
    virtual ~QgsMapToolAddFeature();
 
26
    void canvasReleaseEvent( QMouseEvent * e );
 
27
  private:
 
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 );
 
32
};