Class: QgsModelDesignerFlatButtonGraphicItem

class qgis.gui.QgsModelDesignerFlatButtonGraphicItem(parent: QGraphicsItem, picture: QPicture, position: Union[QPointF, QPoint], size: QSizeF = QSizeF(16, 16))

Bases: PyQt5.QtWidgets.QGraphicsObject

Constructor for QgsModelDesignerFlatButtonGraphicItem, with the specified parent item.

The picture argument specifies a QPicture object containing the graphic to render for the button. The button will be rendered at the specified position and size.

A flat button graphic item for use in the Processing model designer.

Warning

Not stable API

New in version 3.14.

Parameters
  • parent (QGraphicsItem) –

  • picture (QPicture) –

  • position (Union[QPointF) –

  • size

boundingRect(self) → QRectF
Return type

QRectF

childEvent()
clicked

Emitted when the button is clicked. [signal]

connectNotify()
contextMenuEvent()
customEvent()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
event()
focusInEvent()
focusOutEvent()
hoverEnterEvent(self, event: QGraphicsSceneHoverEvent)
Parameters

event (QGraphicsSceneHoverEvent) –

hoverLeaveEvent(self, event: QGraphicsSceneHoverEvent)
Parameters

event (QGraphicsSceneHoverEvent) –

hoverMoveEvent()
inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent(self, event: QGraphicsSceneMouseEvent)
Parameters

event (QGraphicsSceneMouseEvent) –

mouseReleaseEvent()
paint(self, painter: QPainter, option: QStyleOptionGraphicsItem, widget: QWidget = None)
Parameters
  • painter (QPainter) –

  • option (QStyleOptionGraphicsItem) –

  • widget (QWidget = None) –

prepareGeometryChange()
receivers()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setPicture(self, picture: QPicture)

Sets the picture to render for the button graphics.

Parameters

picture (QPicture) –

setPosition(self, position: Union[QPointF, QPoint])

Sets the button’s position.

Parameters

position (Union[QPointF) –

timerEvent()
updateMicroFocus()
view(self)QgsModelGraphicsView

Returns the associated model view.

Return type

QgsModelGraphicsView

wheelEvent()