Class: QgsPlotCanvasItem¶
- class qgis.gui.QgsPlotCanvasItem¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
An abstract class for items that can be placed on a
QgsPlotCanvas
.Added in version 3.26.
QgsPlotCanvasItem(canvas: Optional[QgsPlotCanvas]) Constructor for
QgsPlotCanvasItem
for the specifiedcanvas
.Methods
Paints the item.
- 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)¶
- 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, painter: QPainter | None)¶
Paints the item. Must be implemented by derived classes.
paint(self, painter: Optional[QPainter], option: Optional[QStyleOptionGraphicsItem], widget: Optional[QWidget] = None)
- Parameters:
painter (Optional[QPainter])
- prepareGeometryChange(self)¶
- sceneEvent(self, event: QEvent | None) bool ¶
- sceneEventFilter(self, watched: QGraphicsItem | None, event: QEvent | None) bool ¶
- updateMicroFocus(self)¶
- wheelEvent(self, event: QGraphicsSceneWheelEvent | None)¶