QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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;
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
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.
Map canvas is a class for displaying all GIS data types on a canvas.
void setStrokeColor(const QColor &color)
Sets the stroke color for the rubberband.
bool isSpatial() const FINAL
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeome...
void setFillColor(const QColor &color)
Sets the fill color for the rubberband.
This class is a composition of two QSettings instances:
bool isEditable() const FINAL
Returns true if the provider is in editing mode.
#define Q_NOWARN_DEPRECATED_POP
void setFillColor(const QColor &c)
Sets fill color for vertex markers.
int addTopologicalPoints(const QgsGeometry &geom)
Adds topological points for every vertex of the geometry.
void setLineStyle(Qt::PenStyle penStyle)
Sets pen style.
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...
void setLineStyle(Qt::PenStyle penStyle)
Sets the style of the line.
A rubberband class for QgsAbstractGeometry (considering curved geometries).
void editingStopped()
Emitted when edited changes have been successfully written to the data provider.
void setWidth(int width)
Sets the width of the line.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Represents a vector layer which manages a vector based data sets.
Base class for all map layer types.
QgsProject * project()
Returns the project linked to this canvas.
void setStrokeWidth(int width)
Sets stroke width.
QgsMapLayer * currentLayer()
returns current layer (set by legend widget)
void setStrokeColor(const QColor &c)
Sets stroke color for vertex markers.
#define Q_NOWARN_DEPRECATED_PUSH