Class: QgsVertexMarker¶
- class qgis.gui.QgsVertexMarker¶
Bases:
QgsMapCanvasItem
A class for marking vertices of features using e.g. circles or ‘x’.
Methods
- rtype:
QRectF
Returns the center point of the marker, in map coordinates.
Returns the stroke color for the marker.
Returns the fill
color
for the marker.- param p:
Sets the center
point
of the marker, in map coordinates.Sets the stroke
color
for the marker.Sets the fill
color
for the marker.- param iconSize:
- param iconType:
- param width:
Sets render context parameters
schedules map canvas for repaint
Signals
Attributes
- ICON_BOX = 3¶
- ICON_CIRCLE = 4¶
- ICON_CROSS = 1¶
- ICON_DOUBLE_TRIANGLE = 5¶
- ICON_INVERTED_TRIANGLE = 8¶
- 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
Added in version 3.18.
- Return type:
- color(self) QColor ¶
Returns the stroke color for the marker.
See also
See also
Added in version 3.0.
- Return type:
QColor
- contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)¶
- dragEnterEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dragLeaveEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dragMoveEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- dropEvent(self, event: QGraphicsSceneDragDropEvent | None)¶
- fillColor(self) QColor ¶
Returns the fill
color
for the marker. This setting only applies to some icon types.See also
See also
Added in version 3.0.
- Return type:
QColor
- focusInEvent(self, event: QFocusEvent | None)¶
- focusOutEvent(self, event: QFocusEvent | None)¶
- hoverEnterEvent(self, event: QGraphicsSceneHoverEvent | None)¶
- hoverLeaveEvent(self, event: QGraphicsSceneHoverEvent | None)¶
- hoverMoveEvent(self, event: QGraphicsSceneHoverEvent | None)¶
- inputMethodEvent(self, event: QInputMethodEvent | None)¶
- inputMethodQuery(self, query: Qt.InputMethodQuery) Any ¶
- itemChange(self, change: QGraphicsItem.GraphicsItemChange, value: Any) Any ¶
- keyPressEvent(self, event: QKeyEvent | None)¶
- keyReleaseEvent(self, event: QKeyEvent | None)¶
- mouseDoubleClickEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- mouseMoveEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- mousePressEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- mouseReleaseEvent(self, event: QGraphicsSceneMouseEvent | None)¶
- paint(self, p: QPainter | None)¶
- Parameters:
p (Optional[QPainter])
- prepareGeometryChange(self)¶
- sceneEvent(self, event: QEvent | None) bool ¶
- sceneEventFilter(self, watched: QGraphicsItem | None, event: QEvent | None) bool ¶
- setCenter(self, point: QgsPointXY)¶
Sets the center
point
of the marker, in map coordinates.See also
- Parameters:
point (QgsPointXY)
- setColor(self, color: QColor | Qt.GlobalColor)¶
Sets the stroke
color
for the marker.See also
See also
- Parameters:
color (Union[QColor)
- setFillColor(self, color: QColor | Qt.GlobalColor)¶
Sets the fill
color
for the marker. This setting only applies to some icon types.See also
See also
Added 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 | None, 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, event: QGraphicsSceneWheelEvent | None)¶