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

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

There is a newer version: 6.8.0
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Repetitive and single-shot timers

*

Java wrapper for Qt class QTimer

*/ public class QTimer 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(QTimer.class); /** *

See QTimer::timeout()

*/ public final @NonNull PrivateSignal0 timeout = new PrivateSignal0(); /** *

See QTimer::QTimer(QObject*)

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

See QTimer::bindableActive()

*/ @QtPropertyBindable(name="active") @QtUninvokable public final io.qt.core.@NonNull QBooleanBindable bindableActive(){ return bindableActive_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QBooleanBindable bindableActive_native(long __this__nativeId); /** *

See QTimer::bindableInterval()

*/ @QtPropertyBindable(name="interval") @QtUninvokable public final io.qt.core.@NonNull QIntBindable bindableInterval(){ return bindableInterval_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QIntBindable bindableInterval_native(long __this__nativeId); /** *

See QTimer::bindableSingleShot()

*/ @QtPropertyBindable(name="singleShot") @QtUninvokable public final io.qt.core.@NonNull QBooleanBindable bindableSingleShot(){ return bindableSingleShot_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QBooleanBindable bindableSingleShot_native(long __this__nativeId); /** *

See QTimer::bindableTimerType()

*/ @QtPropertyBindable(name="timerType") @QtUninvokable public final io.qt.core.@NonNull QBindable bindableTimerType(){ return bindableTimerType_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QBindable bindableTimerType_native(long __this__nativeId); /** *

See QTimer::interval()const

*/ @QtPropertyReader(name="interval") @QtUninvokable public final int interval(){ return interval_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int interval_native_constfct(long __this__nativeId); /** *

See QTimer::intervalAsDuration()const

*/ @QtUninvokable public final java.time.@NonNull Duration intervalAsDuration(){ return intervalAsDuration_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.time.Duration intervalAsDuration_native_constfct(long __this__nativeId); /** *

See QTimer::isActive()const

*/ @QtPropertyReader(name="active") @QtPropertyStored("false") @QtUninvokable public final boolean isActive(){ return isActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isActive_native_constfct(long __this__nativeId); /** *

See QTimer::isSingleShot()const

*/ @QtPropertyReader(name="singleShot") @QtUninvokable public final boolean isSingleShot(){ return isSingleShot_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isSingleShot_native_constfct(long __this__nativeId); /** *

See QTimer::remainingTime()const

*/ @QtPropertyReader(name="remainingTime") @QtUninvokable public final int remainingTime(){ return remainingTime_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int remainingTime_native_constfct(long __this__nativeId); /** *

See QTimer::remainingTimeAsDuration()const

*/ @QtUninvokable public final java.time.@NonNull Duration remainingTimeAsDuration(){ return remainingTimeAsDuration_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.time.Duration remainingTimeAsDuration_native_constfct(long __this__nativeId); /** *

See QTimer::setInterval(int)

*/ @QtPropertyWriter(name="interval") @QtUninvokable public final void setInterval(int msec){ setInterval_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msec); } @QtUninvokable private native void setInterval_native_int(long __this__nativeId, int msec); /** *

See QTimer::setInterval(std::chrono::milliseconds)

*/ @QtPropertyWriter(name="interval") @QtUninvokable public final void setInterval(java.time.temporal.@NonNull TemporalAmount value){ setInterval_native_std_chrono_milliseconds(QtJambi_LibraryUtilities.internal.nativeId(this), value); } @QtUninvokable private native void setInterval_native_std_chrono_milliseconds(long __this__nativeId, java.time.temporal.TemporalAmount value); /** *

See QTimer::setSingleShot(bool)

*/ @QtPropertyWriter(name="singleShot") @QtUninvokable public final void setSingleShot(boolean singleShot){ setSingleShot_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), singleShot); } @QtUninvokable private native void setSingleShot_native_bool(long __this__nativeId, boolean singleShot); /** *

See QTimer::setTimerType(Qt::TimerType)

*/ @QtPropertyWriter(name="timerType") @QtUninvokable public final void setTimerType(io.qt.core.Qt.@NonNull TimerType atype){ setTimerType_native_Qt_TimerType(QtJambi_LibraryUtilities.internal.nativeId(this), atype.value()); } @QtUninvokable private native void setTimerType_native_Qt_TimerType(long __this__nativeId, int atype); /** *

See QTimer::start()

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

See QTimer::start(int)

*/ public final void start(int msec){ start_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msec); } private native void start_native_int(long __this__nativeId, int msec); /** *

See QTimer::start(std::chrono::milliseconds)

*/ @QtUninvokable public final void start(java.time.temporal.@NonNull TemporalAmount value){ start_native_std_chrono_milliseconds(QtJambi_LibraryUtilities.internal.nativeId(this), value); } @QtUninvokable private native void start_native_std_chrono_milliseconds(long __this__nativeId, java.time.temporal.TemporalAmount value); /** *

See QTimer::stop()

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

See QTimer::timerId()const

*/ @QtUninvokable public final int timerId(){ return timerId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int timerId_native_constfct(long __this__nativeId); /** *

See QTimer::timerType()const

*/ @QtPropertyReader(name="timerType") @QtUninvokable public final io.qt.core.Qt.@NonNull TimerType timerType(){ return io.qt.core.Qt.TimerType.resolve(timerType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int timerType_native_constfct(long __this__nativeId); /** *

See QObject::timerEvent(QTimerEvent*)

*/ @QtUninvokable @Override protected void timerEvent(io.qt.core.@Nullable QTimerEvent arg__1){ timerEvent_native_QTimerEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @QtUninvokable private native void timerEvent_native_QTimerEvent_ptr(long __this__nativeId, long arg__1); /** *

See QTimer::singleShot(int,Qt::TimerType,const QObject*,const char*)

*/ public static void singleShot(int msec, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.@Nullable QObject receiver, java.lang.@Nullable String member){ if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { io.qt.core.QMetaMethod method = receiver.metaObject().method(member); if(method!=null && method.isValid()) { if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) member = "2" + method.cppMethodSignature(); else member = "1" + method.cppMethodSignature(); } } singleShot_native_int_Qt_TimerType_const_QObject_ptr_const_char_ptr(msec, timerType.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), member); } private native static void singleShot_native_int_Qt_TimerType_const_QObject_ptr_const_char_ptr(int msec, int timerType, long receiver, java.lang.String member); /** *

See QTimer::singleShot(int,const QObject*,const char*)

*/ public static void singleShot(int msec, io.qt.core.@Nullable QObject receiver, java.lang.@Nullable String member){ if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { io.qt.core.QMetaMethod method = receiver.metaObject().method(member); if(method!=null && method.isValid()) { if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) member = "2" + method.cppMethodSignature(); else member = "1" + method.cppMethodSignature(); } } singleShot_native_int_const_QObject_ptr_const_char_ptr(msec, QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), member); } private native static void singleShot_native_int_const_QObject_ptr_const_char_ptr(int msec, long receiver, java.lang.String member); /** *

See QTimer::singleShot(std::chrono::milliseconds,Qt::TimerType,const QObject*,const char*)

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount value, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.@Nullable QObject receiver, java.lang.@Nullable String member){ if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { io.qt.core.QMetaMethod method = receiver.metaObject().method(member); if(method!=null && method.isValid()) { if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) member = "2" + method.cppMethodSignature(); else member = "1" + method.cppMethodSignature(); } } singleShot_native_std_chrono_milliseconds_Qt_TimerType_const_QObject_ptr_const_char_ptr(value, timerType.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), member); } private native static void singleShot_native_std_chrono_milliseconds_Qt_TimerType_const_QObject_ptr_const_char_ptr(java.time.temporal.TemporalAmount value, int timerType, long receiver, java.lang.String member); /** *

See QTimer::singleShot(std::chrono::milliseconds,const QObject*,const char*)

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount value, io.qt.core.@Nullable QObject receiver, java.lang.@Nullable String member){ if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { io.qt.core.QMetaMethod method = receiver.metaObject().method(member); if(method!=null && method.isValid()) { if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) member = "2" + method.cppMethodSignature(); else member = "1" + method.cppMethodSignature(); } } singleShot_native_std_chrono_milliseconds_const_QObject_ptr_const_char_ptr(value, QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), member); } private native static void singleShot_native_std_chrono_milliseconds_const_QObject_ptr_const_char_ptr(java.time.temporal.TemporalAmount value, long receiver, java.lang.String member); /** *

See QTimer::singleShot<Duration,Functor>(Duration,Qt::TimerType,const QtPrivate::ContextTypeForFunctor::ContextType<Functor>*,Functor&&)

*/ public static void singleShot(int interval, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.@Nullable QObject receiver, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot){ io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected.")); if(metaMethod!=null && metaMethod.isValid()) { io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); if(receiver!=null && receiver==object) { switch(metaMethod.methodType()) { case Signal: singleShot(interval, timerType, receiver, "2"+metaMethod.cppMethodSignature()); return; case Method: case Slot: singleShot(interval, timerType, receiver, "1"+metaMethod.cppMethodSignature()); return; default: break; } } } java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected."); singleShot_native_int_Qt_TimerType_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(interval, timerType.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), slot); } private native static void singleShot_native_int_Qt_TimerType_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(int interval, int timerType, long receiver, io.qt.core.QMetaObject.Slot0 slot); /** *

See QTimer::singleShot<Duration,Functor>(Duration,const QtPrivate::ContextTypeForFunctor::ContextType<Functor>*,Functor&&)

*/ public static void singleShot(int interval, io.qt.core.@Nullable QObject receiver, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot){ io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected.")); if(metaMethod!=null && metaMethod.isValid()) { io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); if(receiver!=null && receiver==object) { switch(metaMethod.methodType()) { case Signal: singleShot(interval, receiver, "2"+metaMethod.cppMethodSignature()); return; case Method: case Slot: singleShot(interval, receiver, "1"+metaMethod.cppMethodSignature()); return; default: break; } } } java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected."); singleShot_native_int_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(interval, QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), slot); } private native static void singleShot_native_int_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(int interval, long receiver, io.qt.core.QMetaObject.Slot0 slot); /** *

See QTimer::singleShot<Duration,Functor>(Duration,Qt::TimerType,const QtPrivate::ContextTypeForFunctor::ContextType<Functor>*,Functor&&)

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount interval, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.@Nullable QObject receiver, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot){ io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected.")); if(metaMethod!=null && metaMethod.isValid()) { io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); if(receiver!=null && receiver==object) { switch(metaMethod.methodType()) { case Signal: singleShot(interval, timerType, receiver, "2"+metaMethod.cppMethodSignature()); return; case Method: case Slot: singleShot(interval, timerType, receiver, "1"+metaMethod.cppMethodSignature()); return; default: break; } } } java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected."); singleShot_native_std_chrono_milliseconds_Qt_TimerType_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(interval, timerType.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), slot); } private native static void singleShot_native_std_chrono_milliseconds_Qt_TimerType_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(java.time.temporal.TemporalAmount interval, int timerType, long receiver, io.qt.core.QMetaObject.Slot0 slot); /** *

See QTimer::singleShot<Duration,Functor>(Duration,const QtPrivate::ContextTypeForFunctor::ContextType<Functor>*,Functor&&)

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount interval, io.qt.core.@Nullable QObject receiver, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot){ io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected.")); if(metaMethod!=null && metaMethod.isValid()) { io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); if(receiver!=null && receiver==object) { switch(metaMethod.methodType()) { case Signal: singleShot(interval, receiver, "2"+metaMethod.cppMethodSignature()); return; case Method: case Slot: singleShot(interval, receiver, "1"+metaMethod.cppMethodSignature()); return; default: break; } } } java.util.Objects.requireNonNull(slot, "Argument 'slot': null not expected."); singleShot_native_std_chrono_milliseconds_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(interval, QtJambi_LibraryUtilities.internal.checkedNativeId(receiver), slot); } private native static void singleShot_native_std_chrono_milliseconds_const_QtPrivate_ContextTypeForFunctor_ContextType_Functor__ptr_rval_QTimer_Slot(java.time.temporal.TemporalAmount interval, long receiver, io.qt.core.QMetaObject.Slot0 slot); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QTimer(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QTimer(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QTimer instance, QDeclarativeConstructor constructor); /** *

See QTimer::callOnTimeout(Args&&...)

*/ public final QMetaObject.@NonNull Connection callOnTimeout(QMetaObject.@NonNull Slot0 slot, Qt.@NonNull ConnectionType @NonNull... type){ return timeout.connect(slot, type); } /** *

See QTimer::callOnTimeout(Args&&...)

*/ public final QMetaObject.@NonNull Connection callOnTimeout(QMetaObject.@NonNull Connectable0 connectable, Qt.@NonNull ConnectionType @NonNull... type){ return timeout.connect(connectable, type); } /** *

See QTimer::callOnTimeout(Args&&...)

*/ public final QMetaObject.@NonNull Connection callOnTimeout(@Nullable QObject receiver, @NonNull String method, Qt.@NonNull ConnectionType @NonNull... type){ return timeout.connect(receiver, method, type); } /** *

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

*/ public QTimer() { this((io.qt.core.QObject)null); } /** * @hidden *

Kotlin property getter. In Java use {@link #interval()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final int getInterval() { return interval(); } /** * @hidden *

Kotlin property getter. In Java use {@link #isActive()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final boolean getActive() { return isActive(); } /** * @hidden *

Kotlin property getter. In Java use {@link #isSingleShot()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final boolean getSingleShot() { return isSingleShot(); } /** * @hidden *

Kotlin property getter. In Java use {@link #remainingTime()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final int getRemainingTime() { return remainingTime(); } /** * @hidden *

Kotlin property getter. In Java use {@link #timerType()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.core.Qt.@NonNull TimerType getTimerType() { return timerType(); } /** *

Overloaded function for {@link #singleShot(int, io.qt.core.Qt.TimerType, io.qt.core.QObject, io.qt.core.QMetaObject.Slot0)}.

*/ public static void singleShot(int interval, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot) { singleShot(interval, timerType, QtJambi_LibraryUtilities.internal.lambdaContext(slot), slot); } /** *

Overloaded function for {@link #singleShot(int, io.qt.core.QObject, io.qt.core.QMetaObject.Slot0)}.

*/ public static void singleShot(int interval, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot) { singleShot(interval, QtJambi_LibraryUtilities.internal.lambdaContext(slot), slot); } /** *

Overloaded function for {@link #singleShot(java.time.temporal.TemporalAmount, io.qt.core.Qt.TimerType, io.qt.core.QObject, io.qt.core.QMetaObject.Slot0)}.

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount interval, io.qt.core.Qt.@NonNull TimerType timerType, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot) { singleShot(interval, timerType, QtJambi_LibraryUtilities.internal.lambdaContext(slot), slot); } /** *

Overloaded function for {@link #singleShot(java.time.temporal.TemporalAmount, io.qt.core.QObject, io.qt.core.QMetaObject.Slot0)}.

*/ public static void singleShot(java.time.temporal.@NonNull TemporalAmount interval, io.qt.core.QMetaObject.@StrictNonNull Slot0 slot) { singleShot(interval, QtJambi_LibraryUtilities.internal.lambdaContext(slot), slot); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy