QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsmaptooldigitizefeature.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaptooldigitizegeometry.h
3 
4  ---------------------
5  begin : 7.12.2017
6  copyright : (C) 2017 by David Signer
7  email : david at opengis dot ch
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSMAPTOOLDIGITIZEFEATURE_H
17 #define QGSMAPTOOLDIGITIZEFEATURE_H
18 
19 #include "qgsmaptoolcapture.h"
20 #include "qgis_gui.h"
21 
22 class QgsFeature;
23 
32 {
33  Q_OBJECT
34 
35  public:
36 
44 
45  QgsMapToolCapture::Capabilities capabilities() const override;
46 
47  void cadCanvasReleaseEvent( QgsMapMouseEvent *e ) override;
48 
53  void setLayer( QgsMapLayer *vl );
54 
55  void activate() override;
56  void deactivate() override;
57 
58  signals:
59 
64  void digitizingCompleted( const QgsFeature &feature );
65 
70  void digitizingFinished( );
71 
72  protected:
73 
78  bool checkGeometryType() const;
79 
84  void setCheckGeometryType( bool checkGeometryType );
85 
86  private:
87 
92  virtual void digitized( const QgsFeature &f );
93 
97  QgsMapLayer *mLayer = nullptr;
98 
102  QgsMapLayer *mCurrentLayer = nullptr;
103 
107  bool mCheckGeometryType;
108 
109  friend class TestQgsRelationReferenceWidget;
110 };
111 
112 #endif // QGSMAPTOOLDIGITIZEFEATURE_H
QgsMapToolCapture::CaptureMode
CaptureMode
Different capture modes.
Definition: qgsmaptoolcapture.h:48
QgsMapCanvas
Definition: qgsmapcanvas.h:83
QgsMapToolCapture::activate
void activate() override
Registers this maptool with the cad dock widget.
Definition: qgsmaptoolcapture.cpp:87
QgsMapToolCapture::capabilities
virtual QgsMapToolCapture::Capabilities capabilities() const
Returns flags containing the supported capabilities.
Definition: qgsmaptoolcapture.cpp:82
QgsMapToolDigitizeFeature
This tool digitizes geometry of new point/line/polygon features on already existing vector layers Onc...
Definition: qgsmaptooldigitizefeature.h:31
QgsAdvancedDigitizingDockWidget
The QgsAdvancedDigitizingDockWidget class is a dockable widget used to handle the CAD tools on top of...
Definition: qgsadvanceddigitizingdockwidget.h:48
QgsMapMouseEvent
Definition: qgsmapmouseevent.h:35
QgsMapLayer
Definition: qgsmaplayer.h:81
QgsMapToolCapture::CaptureNone
@ CaptureNone
Do not capture / determine mode from layer geometry type.
Definition: qgsmaptoolcapture.h:50
qgsmaptoolcapture.h
QgsFeature
Definition: qgsfeature.h:55
QgsMapToolCapture::deactivate
void deactivate() override
Unregisters this maptool from the cad dock widget.
Definition: qgsmaptoolcapture.cpp:96
QgsMapToolCapture
Definition: qgsmaptoolcapture.h:41
QgsMapToolAdvancedDigitizing::cadCanvasReleaseEvent
virtual void cadCanvasReleaseEvent(QgsMapMouseEvent *e)
Override this method when subclassing this class.
Definition: qgsmaptooladvanceddigitizing.h:134