22 #include "qgssettingsregistrycore.h"
39 return QgsSettingsRegistryCore::settingsDigitizingDefaultZValue.value();
49 return QColor( QgsSettingsRegistryCore::settingsDigitizingLineColorRed.value(),
50 QgsSettingsRegistryCore::settingsDigitizingLineColorGreen.value(),
51 QgsSettingsRegistryCore::settingsDigitizingLineColorBlue.value(),
52 QgsSettingsRegistryCore::settingsDigitizingLineColorAlpha.value() );
57 return QgsSettingsRegistryCore::settingsDigitizingLineWidth.value();
62 return QColor( QgsSettingsRegistryCore::settingsDigitizingFillColorRed.value(),
63 QgsSettingsRegistryCore::settingsDigitizingFillColorGreen.value(),
64 QgsSettingsRegistryCore::settingsDigitizingFillColorBlue.value(),
65 QgsSettingsRegistryCore::settingsDigitizingFillColorAlpha.value() );
75 if ( alternativeBand )
77 double alphaScale = QgsSettingsRegistryCore::settingsDigitizingLineColorAlphaScale.value();
78 color.setAlphaF( color.alphaF() * alphaScale );
111 QVector<QgsPoint>::const_iterator list_it = vertices.constBegin();
112 for ( ; list_it != vertices.constEnd(); ++list_it )
135 QVector<QgsPointXY>::const_iterator list_it = vertices.constBegin();
136 for ( ; list_it != vertices.constEnd(); ++list_it )
148 QColor color( QgsSettingsRegistryCore::settingsDigitizingLineColorRed.value(),
149 QgsSettingsRegistryCore::settingsDigitizingLineColorGreen.value(),
150 QgsSettingsRegistryCore::settingsDigitizingLineColorBlue.value() );
151 double myAlpha = QgsSettingsRegistryCore::settingsDigitizingLineColorAlpha.value() / 255.0;
152 if ( alternativeBand )
154 myAlpha = myAlpha * QgsSettingsRegistryCore::settingsDigitizingLineColorAlphaScale.value();
157 color.setAlphaF( myAlpha );
175 void QgsMapToolEdit::connectLayers(
const QList<QgsMapLayer *> &layers )
187 void QgsMapToolEdit::cleanCanvas()
189 if ( editableVectorLayers().isEmpty() )
195 QList<QgsVectorLayer *> QgsMapToolEdit::editableVectorLayers()
197 QList<QgsVectorLayer *> editableLayers;
205 editableLayers << vlayer;
208 return editableLayers;
static const double DEFAULT_M_COORDINATE
Default M coordinate value.
A rubberband class for QgsAbstractGeometry (considering curved geometries).
void setStrokeColor(const QColor &c)
Sets stroke color for vertex markers.
void setLineStyle(Qt::PenStyle penStyle)
Sets pen style.
void setStrokeWidth(int width)
Sets stroke width.
void setFillColor(const QColor &c)
Sets fill color for vertex markers.
Map canvas is a class for displaying all GIS data types on a canvas.
QgsProject * project()
Returns the project linked to this canvas.
QgsMapLayer * currentLayer()
returns current layer (set by legend widget)
Base class for all map layer types.
void layersAdded(const QList< QgsMapLayer * > &layers)
Emitted when one or more layers were added to the registry.
QMap< QString, QgsMapLayer * > mapLayers(const bool validOnly=false) const
Returns a map of all registered layers by layer ID.
A class for drawing transient features (e.g.
void setWidth(int width)
Sets the width of the line.
void setStrokeColor(const QColor &color)
Sets the stroke color for the rubberband.
void setLineStyle(Qt::PenStyle penStyle)
Sets the style of the line.
void setFillColor(const QColor &color)
Sets the fill color for the rubberband.
Represents a vector layer which manages a vector based data sets.
void editingStopped()
Emitted when edited changes have been successfully written to the data provider.
bool isSpatial() const FINAL
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeome...
bool isEditable() const FINAL
Returns true if the provider is in editing mode.
int addTopologicalPoints(const QgsGeometry &geom)
Adds topological points for every vertex of the geometry.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH