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

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

package io.qt.core;

import java.util.Objects;

import io.qt.NonNull;
import io.qt.Nullable;
import io.qt.QNoImplementationException;

/**
 * 

Allows monitoring a QFuture using signals and slots

*

Java wrapper for Qt class QFutureWatcher

*/ public final class QFutureWatcher extends io.qt.core.QFutureWatcherBase { /** * This variable stores the meta-object for the class. */ public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QFutureWatcher.class); /** *

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

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

See QFutureWatcher::QFutureWatcher(QObject*)

*/ public QFutureWatcher(io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); long[] functions = {0,0,0}; initialize_native(this, parent, functions); this.futureSetter = functions[0]; this.futureResult = functions[1]; this.futureGetter = functions[2]; } private native static void initialize_native(QFutureWatcher instance, io.qt.core.QObject parent, long[] functions); /** *

See QFutureWatcher::future()const

*/ @io.qt.QtUninvokable public final io.qt.core.@NonNull QFuture future(){ return future(QtJambi_LibraryUtilities.internal.nativeId(this), futureGetter); } @io.qt.QtUninvokable private static native io.qt.core.QFuture future(long nativeId, long futureGetter); /** *

See QFutureWatcher::result()const

*/ @io.qt.QtUninvokable public final T result(){ return resultAt(0); } /** *

See QFutureWatcher::resultAt(int)const

*/ @io.qt.QtUninvokable public final T resultAt(int index){ if(futureResult==0) throw new QNoImplementationException("resultAt(int) not available for QFutureWatcher."); return resultAt(QtJambi_LibraryUtilities.internal.nativeId(this), futureResult, index); } @io.qt.QtUninvokable private static native T resultAt(long nativeId, long futureResult, int index); /** *

See QFutureWatcher::setFuture(QFuture<T>)

*/ @io.qt.QtUninvokable public final void setFuture(io.qt.core.@NonNull QFuture future){ setFuture(QtJambi_LibraryUtilities.internal.nativeId(this), futureSetter, Objects.requireNonNull(future, "Argument 'future': null not expected.")); } @io.qt.QtUninvokable private static native void setFuture(long nativeId, long futureSetter, io.qt.core.QFuture future); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess private QFutureWatcher(long futureSetter, long futureResult, long futureGetter) { super((QPrivateConstructor)null); this.futureSetter = futureSetter; this.futureResult = futureResult; this.futureGetter = futureGetter; } private final long futureSetter; private final long futureResult; private final long futureGetter; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy