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<QgsPoint>::const_iterator list_it = vertices.constBegin();
111 for ( ; list_it != vertices.constEnd(); ++list_it )
134 QVector<QgsPointXY>::const_iterator list_it = vertices.constBegin();
135 for ( ; list_it != vertices.constEnd(); ++list_it )
148 QColor color( settings.
value( QStringLiteral(
"qgis/digitizing/line_color_red" ), 255 ).toInt(),
149 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_green" ), 0 ).toInt(),
150 settings.
value( QStringLiteral(
"qgis/digitizing/line_color_blue" ), 0 ).toInt() );
151 double myAlpha = settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha" ), 200 ).toInt() / 255.0;
152 if ( alternativeBand )
154 myAlpha = myAlpha * settings.
value( QStringLiteral(
"qgis/digitizing/line_color_alpha_scale" ), 0.75 ).toDouble();
157 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:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
void setLineStyle(Qt::PenStyle penStyle)
Sets the style of the line.
#define Q_NOWARN_DEPRECATED_PUSH
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.
#define Q_NOWARN_DEPRECATED_POP
A rubberband class for QgsAbstractGeometry (considering curved geometries)
void setLineStyle(Qt::PenStyle penStyle)
Sets pen style.
Represents a vector layer which manages a vector based data sets.