All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QSignalMapper Maven / Gradle / Ivy

package io.qt.core;


/**
 * 

Bundles signals from identifiable senders

*

Java wrapper for Qt class QSignalMapper

*/ public class QSignalMapper extends io.qt.core.QObject { @io.qt.QtPropertyMember(enabled=false) private java.util.Collection __rcMappings; /** * This variable stores the meta-object for the class. */ public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSignalMapper.class); /** *

Wrapper class for overloaded signals:

*
    *
  • mapped(QObject * arg__1)
  • *
  • mapped(QWidget * arg__1)
  • *
  • mapped(const QString & arg__1)
  • *
  • mapped(int arg__1)
  • *
*/ public final class MultiSignal_mapped extends MultiSignal{ private MultiSignal_mapped(){ super(); } /** *

Provides an overloaded signal by parameter type.

*

The only valid calls are:

    *
  • mapped.overload(io.qt.core.QObject.class)
  • *
  • mapped.overload(io.qt.widgets.QWidget.class)
  • *
  • mapped.overload(java.lang.String.class)
  • *
  • mapped.overload(int.class)
  • *
*

{@link io.qt.QNoSuchSignalException} is thrown otherwise.

* @param signal parameter type * @param type1 value of type A * @return overloaded signal * @throws io.qt.QNoSuchSignalException if signal is not available */ @io.qt.QtAllowedTypeSet({io.qt.core.QObject.class}) @io.qt.QtAllowedTypeSet({io.qt.widgets.QWidget.class}) @io.qt.QtAllowedTypeSet({java.lang.String.class}) @io.qt.QtAllowedTypeSet({int.class}) public final Signal1 overload(Class type1) throws io.qt.QNoSuchSignalException{ return (Signal1)super.overload(type1); } /** * Initializes a connection to the slot. * * @param slot the slot to be connected * @param connectionType type of connection * @return connection if successful or null otherwise * @throws io.qt.QMisfittingSignatureException Raised if their signatures are incompatible. * @throws io.qt.QUninvokableSlotException Raised if slot is annotated @QtUninvokable. */ public final io.qt.core.QMetaObject.Connection connect(io.qt.core.QMetaObject.Slot1 slot, io.qt.core.Qt.ConnectionType... connectionType) throws io.qt.QNoSuchSignalException{ return super.connect(slot, connectionType); } /** * Removes the connection to the given slot. * * @param slot the slot to be disconnected * @return true if successfully disconnected, or false otherwise. */ public final boolean disconnect(io.qt.core.QMetaObject.Slot1 slot) { return super.disconnect(slot); } /** * Creates a connection from this signal to another. Whenever this signal is emitted, it will cause the second * signal to be emitted as well. * * @param signal The second signal. This will be emitted whenever this signal is emitted. * @param connectionType One of the connection types defined in the Qt interface. * @return connection if successful or null otherwise * @throws io.qt.QMisfittingSignatureException Raised if their signatures are incompatible. */ public final io.qt.core.QMetaObject.Connection connect(io.qt.core.QMetaObject.Connectable1 signal, io.qt.core.Qt.ConnectionType... connectionType) throws io.qt.QNoSuchSignalException{ return super.connect((io.qt.core.QMetaObject.AbstractSignal)signal, connectionType); } /** * Disconnects a signal from another signal if the two were previously connected by a call to connect. * A call to this function will assure that the emission of the first signal will not cause the emission of the second. * * @param signal The second signal. * @return true if the two signals were successfully disconnected, or false otherwise. */ public final boolean disconnect(io.qt.core.QMetaObject.Connectable1 signal) { return super.disconnect((io.qt.core.QMetaObject.AbstractSignal)signal); } /** * Creates a connection from this signal to another. Whenever this signal is emitted, it will cause the second * signal to be emitted as well. * * @param signal The second signal. This will be emitted whenever this signal is emitted. * @param connectionType One of the connection types defined in the Qt interface. * @return connection if successful or null otherwise * @throws io.qt.QMisfittingSignatureException Raised if their signatures are incompatible. */ public final io.qt.core.QMetaObject.Connection connect(io.qt.core.QMetaObject.AbstractPublicSignal1 signal, io.qt.core.Qt.ConnectionType... connectionType) throws io.qt.QNoSuchSignalException{ return super.connect((io.qt.core.QMetaObject.AbstractSignal)signal, connectionType); } /** * Disconnects a signal from another signal if the two were previously connected by a call to connect. * A call to this function will assure that the emission of the first signal will not cause the emission of the second. * * @param signal The second signal. * @return true if the two signals were successfully disconnected, or false otherwise. */ public final boolean disconnect(io.qt.core.QMetaObject.AbstractPublicSignal1 signal) { return super.disconnect((io.qt.core.QMetaObject.AbstractSignal)signal); } /** *

See QSignalMapper::mapped(QObject*)

* * @deprecated Use QSignalMapper::mappedObject(QObject *) instead */ @Deprecated public final void emit(io.qt.core.QObject arg__1) { ((Signal1)overload(io.qt.core.QObject.class)).emit(arg__1); } /** *

See QSignalMapper::mapped(QWidget*)

* * @deprecated Use QSignalMapper::mappedWidget(QWidget *) instead */ @Deprecated public final void emit(io.qt.widgets.QWidget arg__1) { ((Signal1)overload(io.qt.widgets.QWidget.class)).emit(arg__1); } /** *

See QSignalMapper::mapped(QString)

* * @deprecated Use QSignalMapper::mappedString(const QString&) instead */ @Deprecated public final void emit(java.lang.String arg__1) { ((Signal1)overload(java.lang.String.class)).emit(arg__1); } /** *

See QSignalMapper::mapped(int)

* * @deprecated Use QSignalMapper::mappedInt(int) instead */ @Deprecated public final void emit(int arg__1) { ((Signal1)overload(int.class)).emit(arg__1); } }; /** *

Overloaded signals:

*
    *
  • mapped(QObject * arg__1)
  • *
  • mapped(QWidget * arg__1)
  • *
  • mapped(const QString & arg__1)
  • *
  • mapped(int arg__1)
  • *
*/ public final MultiSignal_mapped mapped = new MultiSignal_mapped(); /** *

See QSignalMapper::mappedInt(int)

*/ public final Signal1<@io.qt.QtPrimitiveType Integer> mappedInt = new Signal1<>(); /** *

See QSignalMapper::mappedObject(QObject*)

*/ public final Signal1 mappedObject = new Signal1<>(); /** *

See QSignalMapper::mappedString(QString)

*/ public final Signal1 mappedString = new Signal1<>(); /** *

See QSignalMapper::mappedWidget(QWidget*)

*/ public final Signal1 mappedWidget = new Signal1<>(); /** *

Overloaded constructor for {@link #QSignalMapper(io.qt.core.QObject)} * with parent = null.

*/ public QSignalMapper() { this((io.qt.core.QObject)null); } /** *

See QSignalMapper::QSignalMapper(QObject*)

*/ public QSignalMapper(io.qt.core.QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QSignalMapper instance, io.qt.core.QObject parent); /** *

See QSignalMapper::map()

*/ public final void map(){ map_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native void map_native(long __this__nativeId); /** *

See QSignalMapper::map(QObject*)

*/ public final void map(io.qt.core.QObject sender){ map_native_QObject_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender)); } private native void map_native_QObject_ptr(long __this__nativeId, long sender); /** *

See QSignalMapper::mapping(QObject*)const

*/ @io.qt.QtUninvokable public final io.qt.core.QObject mapping(io.qt.core.QObject object){ return mapping_native_QObject_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(object)); } @io.qt.QtUninvokable private native io.qt.core.QObject mapping_native_QObject_ptr_constfct(long __this__nativeId, long object); /** *

See QSignalMapper::mapping(QWidget*)const

*/ @io.qt.QtUninvokable public final io.qt.core.QObject mapping(io.qt.widgets.QWidget widget){ return mapping_native_QWidget_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), widget); } @io.qt.QtUninvokable private native io.qt.core.QObject mapping_native_QWidget_ptr_constfct(long __this__nativeId, io.qt.widgets.QWidget widget); /** *

See QSignalMapper::mapping(QString)const

*/ @io.qt.QtUninvokable public final io.qt.core.QObject mapping(java.lang.String text){ return mapping_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @io.qt.QtUninvokable private native io.qt.core.QObject mapping_native_cref_QString_constfct(long __this__nativeId, java.lang.String text); /** *

See QSignalMapper::mapping(int)const

*/ @io.qt.QtUninvokable public final io.qt.core.QObject mapping(int id){ return mapping_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), id); } @io.qt.QtUninvokable private native io.qt.core.QObject mapping_native_int_constfct(long __this__nativeId, int id); /** *

See QSignalMapper::removeMappings(QObject*)

*/ @io.qt.QtUninvokable public final void removeMappings(io.qt.core.QObject sender){ removeMappings_native_QObject_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender)); if (sender != null) { while (__rcMappings != null && __rcMappings.remove(sender)) ; } if (__rcObjectForObject!=null) __rcObjectForObject.remove(sender); } @io.qt.QtUninvokable private native void removeMappings_native_QObject_ptr(long __this__nativeId, long sender); /** *

See QSignalMapper::setMapping(QObject*,QObject*)

*/ @io.qt.QtUninvokable public final void setMapping(io.qt.core.QObject sender, io.qt.core.QObject object){ setMapping_native_QObject_ptr_QObject_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender), QtJambi_LibraryUtilities.internal.checkedNativeId(object)); if (sender != null) { if(__rcMappings==null) __rcMappings = QtJambi_LibraryUtilities.internal.newRCList(); __rcMappings.add(sender); } if (object == null) if(__rcObjectForObject!=null) __rcObjectForObject.remove(sender); else{ if(__rcObjectForObject==null) __rcObjectForObject = new java.util.HashMap<>(); __rcObjectForObject.put(sender,object); } } @io.qt.QtUninvokable private native void setMapping_native_QObject_ptr_QObject_ptr(long __this__nativeId, long sender, long object); /** *

See QSignalMapper::setMapping(QObject*,QWidget*)

*/ @io.qt.QtUninvokable public final void setMapping(io.qt.core.QObject sender, io.qt.widgets.QWidget widget){ setMapping_native_QObject_ptr_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender), widget); if (sender != null) { if(__rcMappings==null) __rcMappings = QtJambi_LibraryUtilities.internal.newRCList(); __rcMappings.add(sender); } if (widget == null) if(__rcObjectForObject!=null) __rcObjectForObject.remove(sender); else{ if(__rcObjectForObject==null) __rcObjectForObject = new java.util.HashMap<>(); __rcObjectForObject.put(sender,widget); } } @io.qt.QtUninvokable private native void setMapping_native_QObject_ptr_QWidget_ptr(long __this__nativeId, long sender, io.qt.widgets.QWidget widget); /** *

See QSignalMapper::setMapping(QObject*,QString)

*/ @io.qt.QtUninvokable public final void setMapping(io.qt.core.QObject sender, java.lang.String text){ setMapping_native_QObject_ptr_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender), text); if (sender != null) { if(__rcMappings==null) __rcMappings = QtJambi_LibraryUtilities.internal.newRCList(); __rcMappings.add(sender); } } @io.qt.QtUninvokable private native void setMapping_native_QObject_ptr_cref_QString(long __this__nativeId, long sender, java.lang.String text); /** *

See QSignalMapper::setMapping(QObject*,int)

*/ @io.qt.QtUninvokable public final void setMapping(io.qt.core.QObject sender, int id){ setMapping_native_QObject_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sender), id); if (sender != null) { if(__rcMappings==null) __rcMappings = QtJambi_LibraryUtilities.internal.newRCList(); __rcMappings.add(sender); } } @io.qt.QtUninvokable private native void setMapping_native_QObject_ptr_int(long __this__nativeId, long sender, int id); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QSignalMapper(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. */ @io.qt.NativeAccess protected QSignalMapper(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @io.qt.QtUninvokable private static native void initialize_native(QSignalMapper instance, QDeclarativeConstructor constructor); private java.util.HashMap __rcObjectForObject; }