Class: QgsModelDesignerFlatButtonGraphicItem

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

Warning

Not stable API

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsModelDesignerFlatButtonGraphicItem

Base classes

QGraphicsObject

QObject

QGraphicsItem

Subclasses

QgsModelDesignerFoldButtonGraphicItem

A button allowing folding or expanding component graphics in the Processing model designer.

QgsModelDesignerSocketGraphicItem

A socket allowing linking component together.

Methods

position

Returns the button's position.

setPicture

Sets the picture to render for the button graphics.

setPosition

Sets the button's position.

view

Returns the associated model view.

Signals

clicked

Emitted when the button is clicked.

class qgis.gui.QgsModelDesignerFlatButtonGraphicItem[source]

Bases: QGraphicsObject

__init__(parent: QGraphicsItem | None, picture: QPicture, position: QPointF | QPoint, size: QSizeF = QSizeF(16, 16))

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.

Parameters:
  • parent (Optional[QGraphicsItem])

  • picture (QPicture)

  • position (Union[QPointF, QPoint])

  • size (QSizeF = QSizeF(16, 16))

signal clicked[source]

Emitted when the button is clicked.

position(self) QPointF[source]

Returns the button’s position.

Return type:

QPointF

setPicture(self, picture: QPicture)[source]

Sets the picture to render for the button graphics.

Parameters:

picture (QPicture)

setPosition(self, position: QPointF | QPoint)[source]

Sets the button’s position.

Parameters:

position (Union[QPointF, QPoint])

view(self) QgsModelGraphicsView | None[source]

Returns the associated model view.

Return type:

Optional[QgsModelGraphicsView]