Corrade::Interconnect::Connection class

Connection.

Returned by Interconnect::connect(), allows to remove or reestablish the connection. Destruction of Connection object does not remove the connection, after that the only possibility to remove the connection is to disconnect whole emitter or receiver or disconnect everything connected to given signal using Emitter::disconnectSignal(), Emitter::disconnectAllSignals() or Receiver::disconnectAllSlots() or destroy either emitter or receiver object.

Constructors, destructors, conversion operators

Connection(const Connection&) deleted
Copying is not allowed.
Connection(Connection&& other) noexcept
Move constructor.
~Connection()
Destructor.

Public functions

auto operator=(const Connection&) -> Connection& deleted
Copying is not allowed.
auto operator=(Connection&& other) -> Connection& noexcept
Move assignment.
auto isConnectionPossible() const -> bool
Whether connection is possible.
auto isConnected() const -> bool
Whether the connection exists.
auto connect() -> bool
Establish the connection.
void disconnect()
Remove the connection.

Function documentation

Corrade::Interconnect::Connection::~Connection()

Destructor.

Does not remove the connection.

bool Corrade::Interconnect::Connection::isConnectionPossible() const

Whether connection is possible.

Returns false if either emitter or receiver object (if applicable) doesn't exist anymore, true otherwise.

bool Corrade::Interconnect::Connection::isConnected() const

Whether the connection exists.

bool Corrade::Interconnect::Connection::connect()

Establish the connection.

If connection is not possible, returns false, otherwise creates the connection (if not already connected) and returns true.

void Corrade::Interconnect::Connection::disconnect()

Remove the connection.

Disconnects if connection exists.