QGIS API Documentation 3.43.0-Master (8fc5848dca1)
qgsmaptoolcapturelayergeometry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaptoolcapturelayergeometry.h - base class for map tools digitizing layer geometries
3 ---------------------
4 begin : January 2022
5 copyright : (C) Denis Rouzaud
6 email : denis@opengis.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
16#ifndef QGSMAPTOOLCAPTURELAYERGEOMETRY_H
17#define QGSMAPTOOLCAPTURELAYERGEOMETRY_H
18
19#include "qgsmaptoolcapture.h"
20
22class QgsMapCanvas;
23
32{
33 Q_OBJECT
34 public:
37 : QgsMapToolCapture( canvas, cadDockWidget, mode )
38 {}
39
45 virtual void layerGeometryCaptured( const QgsGeometry &geometry ) { Q_UNUSED( geometry ) }
46
52 virtual void layerPointCaptured( const QgsPoint &point ) { Q_UNUSED( point ) }
53
59 virtual void layerLineCaptured( const QgsCurve *line ) { Q_UNUSED( line ) }
60
66 virtual void layerPolygonCaptured( const QgsCurvePolygon *polygon ) { Q_UNUSED( polygon ) }
67
68 void geometryCaptured( const QgsGeometry &geometry ) override;
69};
70
71#endif // QGSMAPTOOLCAPTURELAYERGEOMETRY_H
A dockable widget used to handle the CAD tools on top of a selection of map tools.
Curve polygon geometry type.
Abstract base class for curved geometry type.
Definition qgscurve.h:35
A geometry is the spatial representation of a feature.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for map tools digitizing layer geometries.
virtual void layerGeometryCaptured(const QgsGeometry &geometry)
Called when the geometry is captured.
virtual void layerPolygonCaptured(const QgsCurvePolygon *polygon)
Called when a polygon is captured.
QgsMapToolCaptureLayerGeometry(QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode)
Constructor.
virtual void layerLineCaptured(const QgsCurve *line)
Called when a line is captured.
virtual void layerPointCaptured(const QgsPoint &point)
Called when a point is captured.
Base class for map tools capable of capturing point, lines and polygons.
virtual void geometryCaptured(const QgsGeometry &geometry)
Called when the geometry is captured.
CaptureMode
Different capture modes.
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49