QgsVertexMarker class

A class for marking vertices of features using e.g.

circles or 'x'.

Base classes

class QgsMapCanvasItem
An abstract class for items that can be placed on the map canvas.

Public types

enum IconType { ICON_NONE, ICON_CROSS, ICON_X, ICON_BOX, ICON_CIRCLE, ICON_DOUBLE_TRIANGLE }
Icons.

Public functions

auto color() const -> QColor
Returns the stroke color for the marker.
auto fillColor() const -> QColor
Returns the fill color for the marker.
void paint(QPainter* painter) override
function to be implemented by derived classes
void setColor(const QColor& color)
Sets the stroke color for the marker.
void setFillColor(const QColor& color)
Sets the fill color for the marker.
void updatePosition() override
called on changed extent or resize event to update position of the item

Enum documentation

enum QgsVertexMarker::IconType

Icons.

Enumerators
ICON_NONE
ICON_CROSS
ICON_X
ICON_BOX
ICON_CIRCLE
ICON_DOUBLE_TRIANGLE

Added in QGIS 3.0.

Function documentation

QColor QgsVertexMarker::color() const

Returns the stroke color for the marker.

QColor QgsVertexMarker::fillColor() const

Returns the fill color for the marker.

This setting only applies to some icon types.

void QgsVertexMarker::setColor(const QColor& color)

Sets the stroke color for the marker.

void QgsVertexMarker::setFillColor(const QColor& color)

Sets the fill color for the marker.

This setting only applies to some icon types.