46 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_red" ), 255 ).toInt(),
47 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_green" ), 0 ).toInt(),
48 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_blue" ), 0 ).toInt() );
49 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha" ), 200 ).toInt() / 255.0;
50 color.setAlphaF( myAlpha );
57 return settings.
value( QStringLiteral(
"qgis/digitizing/line_width" ), 1 ).toInt();
64 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_red" ), 255 ).toInt(),
65 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_green" ), 0 ).toInt(),
66 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_blue" ), 0 ).toInt() );
67 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_alpha" ), 30 ).toInt() / 255.0;
68 fillColor.setAlphaF( myAlpha );
79 if ( alternativeBand )
81 double alphaScale = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha_scale" ), 0.75 ).toDouble();
82 color.setAlphaF( color.alphaF() * alphaScale );
115 QVector<QgsPoint>::const_iterator list_it = vertices.constBegin();
116 for ( ; list_it != vertices.constEnd(); ++list_it )
139 QVector<QgsPointXY>::const_iterator list_it = vertices.constBegin();
140 for ( ; list_it != vertices.constEnd(); ++list_it )
153 QColor color( settings.
value( QStringLiteral(
"qgis/digitizing/line_color_red" ), 255 ).toInt(),
154 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_green" ), 0 ).toInt(),
155 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_blue" ), 0 ).toInt() );
156 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha" ), 200 ).toInt() / 255.0;
157 if ( alternativeBand )
159 myAlpha = myAlpha * settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha_scale" ), 0.75 ).toDouble();
162 color.setAlphaF( myAlpha );
180 void QgsMapToolEdit::connectLayers(
const QList<QgsMapLayer *> &layers )
192 void QgsMapToolEdit::cleanCanvas()
194 if ( editableVectorLayers().isEmpty() )
200 QList<QgsVectorLayer *> QgsMapToolEdit::editableVectorLayers()
202 QList<QgsVectorLayer *> editableLayers;
210 editableLayers << vlayer;
213 return editableLayers;
static const double DEFAULT_Z_COORDINATE
Default Z coordinate value for 2.5d geometry This value have to be assigned to the Z coordinate for t...
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.
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
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