Skip to content

Class RubberbandShape

ClassList > RubberbandShape

The RubberbandShape class is used to provide the shape data to draw rubber bands on the map canvas using the QML Shape item. It is aimed to be used with either aVertexModel or aRubberbandModel .

  • #include <rubberbandshape.h>

Inherits the following classes: QQuickItem

Inherited by the following classes: Rubberband

Public Properties

Type Name
property QColor color
Color of the rubberband.
property bool freeze
When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.
property Qgis::GeometryType geometryType
Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)
property qreal lineWidth
Line width of the rubberband.
property QgsQuickMapSettings * mapSettings
property RubberbandModel * model
property QColor outlineColor
Color of the rubberband outline.
property QList< QPolygonF > polylines
List of polylines representing the rubber band.
property Qgis::GeometryType polylinesType
The geometry type associated to the polylines.
property VertexModel * vertexModel

Public Signals

Type Name
signal void colorChanged
Color of the rubberband.
signal void freezeChanged
When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.
signal void geometryTypeChanged
Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)
signal void lineWidthChanged
Line width of the rubberband.
signal void mapSettingsChanged
signal void modelChanged
signal void outlineColorChanged
Color of the rubberband outline.
signal void polylinesChanged
List of polylines representing the rubber band.
signal void polylinesTypeChanged
The geometry type associated to the polylines.
signal void vertexModelChanged

Public Functions

Type Name
RubberbandShape (QQuickItem * parent=nullptr)
QColor color () const
Color of the rubberband.
bool freeze () const
When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.
Qgis::GeometryType geometryType () const
Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)
float lineWidth () const
Line width of the rubberband.
QgsQuickMapSettings * mapSettings () const
RubberbandModel * model () const
QColor outlineColor () const
Color of the rubberband outline.
QList< QPolygonF > polylines () const
List of polylines representing the rubber band.
Qgis::GeometryType polylinesType () const
The geometry type associated to the polylines.
void setColor (const QColor & color)
Color of the rubberband.
void setFreeze (bool freeze)
When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.
void setGeometryType (const Qgis::GeometryType geometryType)
Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)
void setLineWidth (float width)
Line width of the rubberband.
void setMapSettings (QgsQuickMapSettings * mapSettings)
void setModel (RubberbandModel * model)
void setOutlineColor (const QColor & color)
Color of the rubberband outline.
void setVertexModel (VertexModel * vertexModel)
VertexModel * vertexModel () const

Public Properties Documentation

property color [1/2]

Color of the rubberband.

QColor RubberbandShape::color;

property freeze [1/2]

When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.

bool RubberbandShape::freeze;

property geometryType [1/2]

Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)

Qgis::GeometryType RubberbandShape::geometryType;

property lineWidth [1/2]

Line width of the rubberband.

qreal RubberbandShape::lineWidth;

property mapSettings [1/2]

QgsQuickMapSettings * RubberbandShape::mapSettings;

property model [1/2]

RubberbandModel * RubberbandShape::model;

property outlineColor [1/2]

Color of the rubberband outline.

QColor RubberbandShape::outlineColor;

property polylines [1/2]

List of polylines representing the rubber band.

QList<QPolygonF> RubberbandShape::polylines;

property polylinesType [1/2]

The geometry type associated to the polylines.

Qgis::GeometryType RubberbandShape::polylinesType;

property vertexModel [1/2]

VertexModel * RubberbandShape::vertexModel;

Public Signals Documentation

signal colorChanged

Color of the rubberband.

void RubberbandShape::colorChanged;

signal freezeChanged

When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.

void RubberbandShape::freezeChanged;

signal geometryTypeChanged

Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)

void RubberbandShape::geometryTypeChanged;

signal lineWidthChanged

Line width of the rubberband.

void RubberbandShape::lineWidthChanged;

signal mapSettingsChanged

void RubberbandShape::mapSettingsChanged;

signal modelChanged

void RubberbandShape::modelChanged;

signal outlineColorChanged

Color of the rubberband outline.

void RubberbandShape::outlineColorChanged;

signal polylinesChanged

List of polylines representing the rubber band.

void RubberbandShape::polylinesChanged;

signal polylinesTypeChanged

The geometry type associated to the polylines.

void RubberbandShape::polylinesTypeChanged;

signal vertexModelChanged

void RubberbandShape::vertexModelChanged;

Public Functions Documentation

function RubberbandShape

explicit RubberbandShape::RubberbandShape (
    QQuickItem * parent=nullptr
) 

function color [2/2]

Color of the rubberband.

QColor RubberbandShape::color () const

function freeze [2/2]

When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.

bool RubberbandShape::freeze () const

function geometryType [2/2]

Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)

inline Qgis::GeometryType RubberbandShape::geometryType () const

function lineWidth [2/2]

Line width of the rubberband.

float RubberbandShape::lineWidth () const

function mapSettings [2/2]

QgsQuickMapSettings * RubberbandShape::mapSettings () const

function model [2/2]

RubberbandModel * RubberbandShape::model () const

function outlineColor [2/2]

Color of the rubberband outline.

QColor RubberbandShape::outlineColor () const

function polylines [2/2]

List of polylines representing the rubber band.

inline QList< QPolygonF > RubberbandShape::polylines () const

function polylinesType [2/2]

The geometry type associated to the polylines.

inline Qgis::GeometryType RubberbandShape::polylinesType () const

function setColor

Color of the rubberband.

void RubberbandShape::setColor (
    const QColor & color
) 

function setFreeze

When set to TRUE, changes to the linked rubber band or vertex model as well as map settings will be ignored and the rubber band shape data will be left untouched.

void RubberbandShape::setFreeze (
    bool freeze
) 

function setGeometryType

Geometry type used to render the rubber band (if not provided or set to null geometry, the type provided by the rubber band or vertex model will be used)

void RubberbandShape::setGeometryType (
    const Qgis::GeometryType geometryType
) 

function setLineWidth

Line width of the rubberband.

void RubberbandShape::setLineWidth (
    float width
) 

function setMapSettings

void RubberbandShape::setMapSettings (
    QgsQuickMapSettings * mapSettings
) 

function setModel

void RubberbandShape::setModel (
    RubberbandModel * model
) 

function setOutlineColor

Color of the rubberband outline.

void RubberbandShape::setOutlineColor (
    const QColor & color
) 

function setVertexModel

void RubberbandShape::setVertexModel (
    VertexModel * vertexModel
) 

function vertexModel [2/2]

VertexModel * RubberbandShape::vertexModel () const


The documentation for this class was generated from the following file src/core/rubberbandshape.h