io.qt.core.QSocketNotifier Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Support for monitoring activity on a file descriptor
* Java wrapper for Qt class QSocketNotifier
*/
public class QSocketNotifier extends io.qt.core.QObject
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSocketNotifier.class);
/**
* Java wrapper for Qt enum QSocketNotifier::Type
*/
@QtUnlistedEnum
public enum Type implements QtEnumerator {
/**
* Representing QSocketNotifier:: Read
*/
Read(0),
/**
* Representing QSocketNotifier:: Write
*/
Write(1),
/**
* Representing QSocketNotifier:: Exception
*/
Exception(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Type(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Type resolve(int value) {
switch (value) {
case 0: return Read;
case 1: return Write;
case 2: return Exception;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QSocketNotifier:: activated(QSocketDescriptor, QSocketNotifier::Type)
*/
public final @NonNull PrivateSignal2 activated = new PrivateSignal2<>();
/**
* See QSocketNotifier:: QSocketNotifier(QSocketNotifier::Type, QObject*)
*/
public QSocketNotifier(io.qt.core.QSocketNotifier.@NonNull Type arg__1, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, arg__1, parent);
}
private native static void initialize_native(QSocketNotifier instance, io.qt.core.QSocketNotifier.Type arg__1, io.qt.core.QObject parent);
/**
* See QSocketNotifier:: QSocketNotifier(qintptr, QSocketNotifier::Type, QObject*)
*/
public QSocketNotifier(long socket, io.qt.core.QSocketNotifier.@NonNull Type arg__2, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, socket, arg__2, parent);
}
private native static void initialize_native(QSocketNotifier instance, long socket, io.qt.core.QSocketNotifier.Type arg__2, io.qt.core.QObject parent);
/**
* See QSocketNotifier:: isEnabled()const
*/
@QtUninvokable
public final boolean isEnabled(){
return isEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isEnabled_native_constfct(long __this__nativeId);
/**
* See QSocketNotifier:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QSocketNotifier:: setEnabled(bool)
*/
public final void setEnabled(boolean arg__1){
setEnabled_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
private native void setEnabled_native_bool(long __this__nativeId, boolean arg__1);
/**
* See QSocketNotifier:: setSocket(qintptr)
*/
@QtUninvokable
public final void setSocket(long socket){
setSocket_native_qintptr(QtJambi_LibraryUtilities.internal.nativeId(this), socket);
}
@QtUninvokable
private native void setSocket_native_qintptr(long __this__nativeId, long socket);
/**
* See QSocketNotifier:: socket()const
*/
@QtUninvokable
public final long socket(){
return socket_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long socket_native_constfct(long __this__nativeId);
/**
* See QSocketNotifier:: type()const
*/
@QtUninvokable
public final io.qt.core.QSocketNotifier.@NonNull Type type(){
return io.qt.core.QSocketNotifier.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int type_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent arg__1){
return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native boolean event_native_QEvent_ptr(long __this__nativeId, long arg__1);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QSocketNotifier(QPrivateConstructor p) { super(p); }
/**
* Overloaded constructor for {@link #QSocketNotifier(io.qt.core.QSocketNotifier.Type, io.qt.core.QObject)}
* with parent = null
.
*/
public QSocketNotifier(io.qt.core.QSocketNotifier.@NonNull Type arg__1) {
this(arg__1, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QSocketNotifier(long, io.qt.core.QSocketNotifier.Type, io.qt.core.QObject)}
* with parent = null
.
*/
public QSocketNotifier(long socket, io.qt.core.QSocketNotifier.@NonNull Type arg__2) {
this(socket, arg__2, (io.qt.core.QObject)null);
}
}