java.lang.Object
io.qt.internal.QtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>
io.qt.core.QObject.MultiSignal
- Direct Known Subclasses:
QCompleter.MultiSignal_activated,QCompleter.MultiSignal_highlighted,QDesignerIntegrationInterface.MultiSignal_navigateToSlot
- Enclosing class:
- QObject
public abstract class QObject.MultiSignal
extends QtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>
Wrapper class supporting the definition of overloaded signal in a class.
To implement multi signals subclass this MultiSignal class and add overloaded emit methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal QMetaObject.Connectionconnect(QMetaObject.AbstractPublicSignal0 signal, Qt.ConnectionType... connectionType) Initializes a connection to the signal.final QMetaObject.Connectionconnect(QMetaObject.Connectable0 signal, Qt.ConnectionType... connectionType) Initializes a connection to the signal.final QMetaObject.Connectionconnect(QMetaObject.Slot0 slot, Qt.ConnectionType... connectionType) Initializes a connection to the slot.final QMetaObject.Connectionconnect(Object receiver, String method, Qt.ConnectionType... type) Connects the signal to a method in an object.final QObjectReturns the object containing this signal.final booleanRemoves the connection to the given signal.final booleandisconnect(QMetaObject.Connectable0 signal) Removes the connection to the given signal.final booleandisconnect(QMetaObject.Connection connection) Removes the given connection from this signal.final booleandisconnect(QMetaObject.Slot0 slot) Removes the connection to the given slot.final booleandisconnect(Object receiver, String method) Disconnects the signal from a method in an object if the two were previously connected by a call to connect.final booleanDisconnects all overloaded signals.
-
Constructor Details
-
MultiSignal
protected MultiSignal()
-
-
Method Details
-
containingObject
Returns the object containing this signal.- Overrides:
containingObjectin classQtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>- Returns:
- the signal containing object
-
disconnect
Removes the given connection from this signal.- Overrides:
disconnectin classQtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>- Parameters:
connection- the connection to be removed- Returns:
trueif the disconnection was successful.
-
disconnectAll
public final boolean disconnectAll()Disconnects all overloaded signals.- Overrides:
disconnectAllin classQtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>- Returns:
trueif any disconnection was successful.
-
connect
public final QMetaObject.Connection connect(Object receiver, String method, Qt.ConnectionType... type) Connects the signal to a method in an object. Whenever it is emitted, the method will be invoked on the given object.- Overrides:
connectin classQtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>- Parameters:
receiver- The object that owns the methodmethod- The signature of the method excluding return type and argument names, such as "setText(String)".connectionType- One of the connection types defined in the Qt interface.- Throws:
QNoSuchSlotException- Raised if the method passed in the slot object was not foundRuntimeException- Raised if the signal object could not be successfully introspected or if the signatures of the signal and slot are incompatible.
-
disconnect
Disconnects the signal from a method in an object if the two were previously connected by a call to connect.- Overrides:
disconnectin classQtJambiSignals.AbstractMultiSignal<io.qt.core.QMetaObject.SignalAccess.AbstractSignal>- Parameters:
receiver- The object to which the signal is connectedmethod- The method in the receiver object to which the signal is connected- Returns:
- true if the connection was successfully removed, otherwise false. The method will return false if the connection has not been previously established by a call to connect.
- Throws:
QNoSuchSlotException- Raised if the method passed in the slot object was not found
-
connect
public final QMetaObject.Connection connect(QMetaObject.Slot0 slot, Qt.ConnectionType... connectionType) throws QNoSuchSignalException Initializes a connection to the slot.- Parameters:
slot- the slot to be connectedconnectionType- type of connection- Returns:
- connection if successful or
nullotherwise - Throws:
QMisfittingSignatureException- Raised if their signatures are incompatible.QUninvokableSlotException- Raised if slot is annotated@QtUninvokable.QNoSuchSignalException
-
disconnect
Removes the connection to the given slot.- Parameters:
slot- the slot to be disconnected- Returns:
trueif successfully disconnected, orfalseotherwise.
-
connect
public final QMetaObject.Connection connect(QMetaObject.Connectable0 signal, Qt.ConnectionType... connectionType) throws QNoSuchSignalException Initializes a connection to the signal.- Parameters:
signal- the signal to be connectedconnectionType- type of connection- Returns:
- connection if successful or
nullotherwise - Throws:
QMisfittingSignatureException- Raised if their signatures are incompatible.QNoSuchSignalException
-
disconnect
Removes the connection to the given signal.- Parameters:
signal- the signal to be disconnected- Returns:
trueif successfully disconnected, orfalseotherwise.
-
connect
public final QMetaObject.Connection connect(QMetaObject.AbstractPublicSignal0 signal, Qt.ConnectionType... connectionType) throws QNoSuchSignalException Initializes a connection to the signal.- Parameters:
signal- the signal to be connectedconnectionType- type of connection- Returns:
- connection if successful or
nullotherwise - Throws:
QMisfittingSignatureException- Raised if their signatures are incompatible.QNoSuchSignalException
-
disconnect
Removes the connection to the given signal.- Parameters:
signal- the signal to be disconnected- Returns:
trueif successfully disconnected, orfalseotherwise.
-