41 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_red" ), 255 ).toInt(),
42 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_green" ), 0 ).toInt(),
43 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_blue" ), 0 ).toInt() );
44 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha" ), 200 ).toInt() / 255.0;
45 color.setAlphaF( myAlpha );
52 return settings.
value( QStringLiteral(
"qgis/digitizing/line_width" ), 1 ).toInt();
59 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_red" ), 255 ).toInt(),
60 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_green" ), 0 ).toInt(),
61 settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_blue" ), 0 ).toInt() );
62 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/fill_color_alpha" ), 30 ).toInt() / 255.0;
63 fillColor.setAlphaF( myAlpha );
74 if ( alternativeBand )
76 double alphaScale = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha_scale" ), 0.75 ).toDouble();
77 color.setAlphaF( color.alphaF() * alphaScale );
110 QVector<QgsPointXY>::const_iterator list_it = geom.constBegin();
111 for ( ; list_it != geom.constEnd(); ++list_it )
122 QColor color( settings.
value( QStringLiteral(
"qgis/digitizing/line_color_red" ), 255 ).toInt(),
123 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_green" ), 0 ).toInt(),
124 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_blue" ), 0 ).toInt() );
125 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha" ), 200 ).toInt() / 255.0;
126 if ( alternativeBand )
128 myAlpha = myAlpha * settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha_scale" ), 0.75 ).toDouble();
131 color.setAlphaF( myAlpha );
void setWidth(int width)
Sets the width of the line.
void setStrokeColor(const QColor &color)
Sets the stroke color for the rubberband.
This class is a composition of two QSettings instances:
void setLineStyle(Qt::PenStyle penStyle)
Sets the style of the line.
void setFillColor(const QColor &c)
Sets fill color for vertex markers.
void setStrokeWidth(int width)
Sets stroke width.
Map canvas is a class for displaying all GIS data types on a canvas.
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 class for drawing transient features (e.g.
void setStrokeColor(const QColor &c)
Sets stroke color for vertex markers.
void setFillColor(const QColor &color)
Sets the fill color for the rubberband.
QgsMapLayer * currentLayer()
returns current layer (set by legend widget)
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.
A rubberband class for QgsAbstractGeometry (considering curved geometries)
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), const Section section=NoSection) const
Returns the value for setting key.
void setLineStyle(Qt::PenStyle penStyle)
Sets pen style.
Represents a vector layer which manages a vector based data sets.