Class: QgsVertexMarker

class qgis.gui.QgsVertexMarker

Bases: QgsMapCanvasItem

A class for marking vertices of features using e.g. circles or ‘x’.

Methods

boundingRect

rtype

QRectF

center

Returns the center point of the marker, in map coordinates.

color

Returns the stroke color for the marker.

contextMenuEvent

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

fillColor

Returns the fill color for the marker.

focusInEvent

focusOutEvent

hoverEnterEvent

hoverLeaveEvent

hoverMoveEvent

inputMethodEvent

inputMethodQuery

itemChange

keyPressEvent

keyReleaseEvent

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

paint

param p

prepareGeometryChange

sceneEvent

sceneEventFilter

setCenter

Sets the center point of the marker, in map coordinates.

setColor

Sets the stroke color for the marker.

setFillColor

Sets the fill color for the marker.

setIconSize

param iconSize

setIconType

param iconType

setPenWidth

param width

setRenderContextVariables

Sets render context parameters

updateCanvas

schedules map canvas for repaint

updateMicroFocus

updatePosition

wheelEvent

Attributes

ICON_BOX

ICON_CIRCLE

ICON_CROSS

ICON_DOUBLE_TRIANGLE

ICON_NONE

ICON_RHOMBUS

ICON_TRIANGLE

ICON_X

ICON_BOX = 3
ICON_CIRCLE = 4
ICON_CROSS = 1
ICON_DOUBLE_TRIANGLE = 5
ICON_NONE = 0
ICON_RHOMBUS = 7
ICON_TRIANGLE = 6
ICON_X = 2
class IconType

Bases: int

boundingRect(self)QRectF
Return type

QRectF

center(self)QgsPointXY

Returns the center point of the marker, in map coordinates.

See also

setCenter()

New in version 3.18.

Return type

QgsPointXY

color(self)QColor

Returns the stroke color for the marker.

See also

setColor()

See also

fillColor()

New in version 3.0.

Return type

QColor

contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
fillColor(self)QColor

Returns the fill color for the marker. This setting only applies to some icon types.

See also

setFillColor()

See also

color()

New in version 3.0.

Return type

QColor

focusInEvent(self, QFocusEvent)
focusOutEvent(self, QFocusEvent)
hoverEnterEvent(self, QGraphicsSceneHoverEvent)
hoverLeaveEvent(self, QGraphicsSceneHoverEvent)
hoverMoveEvent(self, QGraphicsSceneHoverEvent)
inputMethodEvent(self, QInputMethodEvent)
inputMethodQuery(self, Qt.InputMethodQuery)Any
itemChange(self, QGraphicsItem.GraphicsItemChange, Any)Any
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
paint(self, p: QPainter)
Parameters

p (QPainter) –

prepareGeometryChange(self)
sceneEvent(self, QEvent)bool
sceneEventFilter(self, QGraphicsItem, QEvent)bool
setCenter(self, point: QgsPointXY)

Sets the center point of the marker, in map coordinates.

See also

center()

Parameters

point (QgsPointXY) –

setColor(self, color: Union[QColor, Qt.GlobalColor, QGradient])

Sets the stroke color for the marker.

See also

color()

See also

setFillColor()

Parameters

color (Union[QColor) –

setFillColor(self, color: Union[QColor, Qt.GlobalColor, QGradient])

Sets the fill color for the marker. This setting only applies to some icon types.

See also

fillColor()

See also

setColor()

New in version 3.0.

Parameters

color (Union[QColor) –

setIconSize(self, iconSize: int)
Parameters

iconSize (int) –

setIconType(self, iconType: int)
Parameters

iconType (int) –

setPenWidth(self, width: int)
Parameters

width (int) –

setRenderContextVariables(self, p: QPainter, context: QgsRenderContext)bool

Sets render context parameters

Parameters
  • p – painter for rendering

  • context – out: configured context

Returns

True in case of success

updateCanvas(self)

schedules map canvas for repaint

updateMicroFocus(self)
updatePosition(self)
wheelEvent(self, QGraphicsSceneWheelEvent)