QNodeEditor.graphics.socket.SocketGraphics#

class QNodeEditor.graphics.socket.SocketGraphics(socket: Socket, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#

Bases: QGraphicsItem

Extension of QGraphicsItem for drawing a socket.

Properties

theme

Get or set the socket theme.

Methods

__init__

Create new socket graphics.

boundingRect

Get the bounding rectangle of the socket.

get_scene_position

Get the position of this socket in scene coordinates.

paint

Draw the socket.

update_position

Update the position of the socket relative to the entry it is in.

__init__(socket: Socket, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#

Create new socket graphics.

Parameters:
  • socket (Socket) – Socket these graphics are for

  • theme (Type[Theme], optional) – Theme for the socket (default: DarkTheme)

get_scene_position() QPointF#

Get the position of this socket in scene coordinates.

Returns:

Scene position of this socket

Return type:

QPointF

update_position() None#

Update the position of the socket relative to the entry it is in.

Return type:

None

property theme: Type[Theme]#

Get or set the socket theme.