16#ifndef QGSMAPTOOLCAPTURERUBBERBAND_H
17#define QGSMAPTOOLCAPTURERUBBERBAND_H
26class QgsMapToolCaptureRubberBand;
44 ~QgsMapToolCaptureRubberBand()
override;
57 bool curveIsComplete() const;
64 void reset(
Qgis::GeometryType geomType =
Qgis::GeometryType::Line,
Qgis::WkbType stringType =
Qgis::WkbType::LineString, const
QgsPoint &firstPolygonPoint =
QgsPoint() );
67 void setRubberBandGeometryType(
Qgis::GeometryType geomType );
70 void addPoint( const
QgsPoint &point,
bool doUpdate = true );
73 void movePoint( const
QgsPoint &point );
76 void movePoint(
int index, const
QgsPoint &point );
79 int pointsCount() const;
82 Qgis::WkbType stringType() const;
85 void setStringType(
Qgis::WkbType type );
91 QgsPoint pointFromEnd(
int posFromEnd ) const;
94 void removeLastPoint();
101 double weight(
int index ) const;
109 bool setWeight(
int index,
double weight );
115 const QVector<
double> &weights()
const {
return mWeights; }
120 void setGeometry( QgsAbstractGeometry *geom )
override;
123 QgsCurve *createLinearString();
124 QgsCurve *createCircularString();
125 QgsCurve *createNurbsCurve();
128 QVector<double> mWeights;
129 QgsPoint mFirstPolygonPoint;
130 std::unique_ptr<QgsRubberBand> mControlPolygonRubberBand;
132 void updateControlPolygon();
Provides global constants and enumerations for use throughout the application.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
WkbType
The WKB type describes the number of dimensions a geometry has.
Abstract base class for curved geometry type.
A rubberband class for QgsAbstractGeometry (considering curved geometries).
virtual void setGeometry(QgsAbstractGeometry *geom)
Sets geometry (takes ownership). Geometry is expected to be in map coordinates.
Map canvas is a class for displaying all GIS data types on a canvas.
Point geometry type, with support for z-dimension and m-values.
Responsible for drawing transient features (e.g.
QVector< QgsPoint > QgsPointSequence