Signal

Class representing a signal defined in an object.

Constructors

Signal

Signal ( )

Signal

Signal ( Signal from )

Signal

Signal ( Object object, StringName signal )

Methods

int

connect ( Callable callable, int flags=0 )

void

disconnect ( Callable callable )

void

emit ( ... ) vararg const

Array

get_connections ( ) const

StringName

get_name ( ) const

Object

get_object ( ) const

int

get_object_id ( ) const

bool

is_connected ( Callable callable ) const

bool

is_null ( ) const

Constructor Descriptions

Constructs a null Signal with no object nor signal name bound.


Constructs a Signal as a copy of the given Signal.


Creates a new Signal with the name signal in the specified object.

Method Descriptions

Connects this signal to the specified Callable, optionally providing connection flags. You can provide additional arguments to the connected method call by using Callable.bind.

for button in $Buttons.get_children():
    button.pressed.connect(on_pressed.bind(button))

func on_pressed(button):
    print(button.name, " was pressed")

Disconnects this signal from the specified Callable.


  • void emit ( ... ) vararg const

Emits this signal to all connected objects.


  • Array get_connections ( ) const

Returns the list of Callables connected to this signal.


Returns the name of this signal.


Returns the object emitting this signal.


  • int get_object_id ( ) const

Returns the ID of the object emitting this signal (see Object.get_instance_id).


Returns true if the specified Callable is connected to this signal.


  • bool is_null ( ) const

Operator Descriptions

  • bool operator != ( )



  • bool operator == ( )