Class: QgsModelDesignerFlatButtonGraphicItem

class qgis.gui.QgsModelDesignerFlatButtonGraphicItem

Bases: PyQt5.QtWidgets.QGraphicsObject

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

Warning

Not stable API

New in version 3.14.

QgsModelDesignerFlatButtonGraphicItem(parent: QGraphicsItem, picture: QPicture, position: Union[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.

Methods

boundingRect

rtype:

QRectF

childEvent

connectNotify

contextMenuEvent

customEvent

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

event

focusInEvent

focusOutEvent

hoverEnterEvent

param event:

hoverLeaveEvent

param event:

hoverMoveEvent

inputMethodEvent

inputMethodQuery

isSignalConnected

itemChange

keyPressEvent

keyReleaseEvent

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

param event:

mouseReleaseEvent

paint

param painter:

prepareGeometryChange

receivers

sceneEvent

sceneEventFilter

sender

senderSignalIndex

setPicture

Sets the picture to render for the button graphics.

setPosition

Sets the button's position.

timerEvent

updateMicroFocus

view

Returns the associated model view.

wheelEvent

Signals

clicked

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

boundingRect(self) QRectF
Return type:

QRectF

childEvent(self, QChildEvent)
clicked

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

connectNotify(self, QMetaMethod)
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
event(self, QEvent) bool
focusInEvent(self, QFocusEvent)
focusOutEvent(self, QFocusEvent)
hoverEnterEvent(self, event: QGraphicsSceneHoverEvent)
Parameters:

event (QGraphicsSceneHoverEvent) –

hoverLeaveEvent(self, event: QGraphicsSceneHoverEvent)
Parameters:

event (QGraphicsSceneHoverEvent) –

hoverMoveEvent(self, QGraphicsSceneHoverEvent)
inputMethodEvent(self, QInputMethodEvent)
inputMethodQuery(self, Qt.InputMethodQuery) Any
isSignalConnected(self, QMetaMethod) bool
itemChange(self, QGraphicsItem.GraphicsItemChange, Any) Any
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, event: QGraphicsSceneMouseEvent)
Parameters:

event (QGraphicsSceneMouseEvent) –

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

  • option (QStyleOptionGraphicsItem) –

  • widget (QWidget = None) –

prepareGeometryChange(self)
receivers(self, PYQT_SIGNAL) int
sceneEvent(self, QEvent) bool
sceneEventFilter(self, QGraphicsItem, QEvent) bool
sender(self) QObject
senderSignalIndex(self) int
setPicture(self, picture: QPicture)

Sets the picture to render for the button graphics.

Parameters:

picture (QPicture) –

setPosition(self, position: QPointF | QPoint)

Sets the button’s position.

Parameters:

position (Union[QPointF) –

timerEvent(self, QTimerEvent)
updateMicroFocus(self)
view(self) QgsModelGraphicsView

Returns the associated model view.

Return type:

QgsModelGraphicsView

wheelEvent(self, QGraphicsSceneWheelEvent)