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

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

The newest version!
package io.qt.core;


/**
 * 

Means of entering and leaving an event loop

*

Java wrapper for Qt class QEventLoop

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

Java wrapper for Qt enum QEventLoop::ProcessEventsFlag

* * @see ProcessEventsFlags */ public enum ProcessEventsFlag implements io.qt.QtFlagEnumerator { AllEvents(0), ExcludeUserInputEvents(1), ExcludeSocketNotifiers(2), WaitForMoreEvents(4), X11ExcludeTimers(8), EventLoopExec(32), DialogExec(64), ApplicationExec(128); private ProcessEventsFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public ProcessEventsFlags asFlags() { return new ProcessEventsFlags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public ProcessEventsFlags combined(ProcessEventsFlag e) { return new ProcessEventsFlags(this, e); } /** * Creates a new {@link ProcessEventsFlags} from the entries. * @param values entries * @return new flag */ public static ProcessEventsFlags flags(ProcessEventsFlag ... values) { return new ProcessEventsFlags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static ProcessEventsFlag resolve(int value) { switch (value) { case 0: return AllEvents; case 1: return ExcludeUserInputEvents; case 2: return ExcludeSocketNotifiers; case 4: return WaitForMoreEvents; case 8: return X11ExcludeTimers; case 32: return EventLoopExec; case 64: return DialogExec; case 128: return ApplicationExec; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link ProcessEventsFlag} */ public static final class ProcessEventsFlags extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0xf6b9be84f034fdcaL; /** * Creates a new ProcessEventsFlags where the flags in args are set. * @param args enum entries */ public ProcessEventsFlags(ProcessEventsFlag ... args){ super(args); } /** * Creates a new ProcessEventsFlags with given value. * @param value */ public ProcessEventsFlags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new ProcessEventsFlags */ @Override public final ProcessEventsFlags combined(ProcessEventsFlag e){ return new ProcessEventsFlags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final ProcessEventsFlags setFlag(ProcessEventsFlag e){ super.setFlag(e); return this; } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final ProcessEventsFlags setFlag(ProcessEventsFlag e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this ProcessEventsFlags. * @return array of enum entries */ @Override public final ProcessEventsFlag[] flags(){ return super.flags(ProcessEventsFlag.values()); } /** * {@inheritDoc} */ @Override public final ProcessEventsFlags clone(){ return new ProcessEventsFlags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(ProcessEventsFlags other){ return Integer.compare(value(), other.value()); } } /** *

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

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

See QEventLoop::QEventLoop(QObject*)

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

Overloaded function for {@link #exec(io.qt.core.QEventLoop.ProcessEventsFlags)}.

*/ @io.qt.QtUninvokable public final int exec(io.qt.core.QEventLoop.ProcessEventsFlag ... flags){ return exec(new io.qt.core.QEventLoop.ProcessEventsFlags(flags)); } /** *

Overloaded function for {@link #exec(io.qt.core.QEventLoop.ProcessEventsFlags)} * with flags = new io.qt.core.QEventLoop.ProcessEventsFlags(0).

*/ @io.qt.QtUninvokable public final int exec() { return exec(new io.qt.core.QEventLoop.ProcessEventsFlags(0)); } /** *

See QEventLoop::exec(ProcessEventsFlags)

*/ @io.qt.QtUninvokable public final int exec(io.qt.core.QEventLoop.ProcessEventsFlags flags){ return exec_native_QFlags_QEventLoop_ProcessEventsFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value()); } @io.qt.QtUninvokable private native int exec_native_QFlags_QEventLoop_ProcessEventsFlag_(long __this__nativeId, int flags); /** *

Overloaded function for {@link #exit(int)} * with returnCode = 0.

*/ public final void exit() { exit((int)0); } /** *

See QEventLoop::exit(int)

*/ public final void exit(int returnCode){ exit_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), returnCode); } private native void exit_native_int(long __this__nativeId, int returnCode); /** *

See QEventLoop::isRunning()const

*/ @io.qt.QtUninvokable public final boolean isRunning(){ return isRunning_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean isRunning_native_constfct(long __this__nativeId); /** *

Overloaded function for {@link #processEvents(io.qt.core.QEventLoop.ProcessEventsFlags)}.

*/ @io.qt.QtUninvokable public final boolean processEvents(io.qt.core.QEventLoop.ProcessEventsFlag ... flags){ return processEvents(new io.qt.core.QEventLoop.ProcessEventsFlags(flags)); } /** *

Overloaded function for {@link #processEvents(io.qt.core.QEventLoop.ProcessEventsFlags)} * with flags = new io.qt.core.QEventLoop.ProcessEventsFlags(0).

*/ @io.qt.QtUninvokable public final boolean processEvents() { return processEvents(new io.qt.core.QEventLoop.ProcessEventsFlags(0)); } /** *

See QEventLoop::processEvents(ProcessEventsFlags)

*/ @io.qt.QtUninvokable public final boolean processEvents(io.qt.core.QEventLoop.ProcessEventsFlags flags){ return processEvents_native_QFlags_QEventLoop_ProcessEventsFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value()); } @io.qt.QtUninvokable private native boolean processEvents_native_QFlags_QEventLoop_ProcessEventsFlag_(long __this__nativeId, int flags); /** *

See QEventLoop::processEvents(ProcessEventsFlags,int)

*/ @io.qt.QtUninvokable public final void processEvents(io.qt.core.QEventLoop.ProcessEventsFlags flags, int maximumTime){ processEvents_native_QFlags_QEventLoop_ProcessEventsFlag__int(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value(), maximumTime); } @io.qt.QtUninvokable private native void processEvents_native_QFlags_QEventLoop_ProcessEventsFlag__int(long __this__nativeId, int flags, int maximumTime); /** *

See QEventLoop::quit()

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

See QEventLoop::wakeUp()

*/ @io.qt.QtUninvokable public final void wakeUp(){ wakeUp_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void wakeUp_native(long __this__nativeId); /** *

See QObject::event(QEvent*)

*/ @io.qt.QtUninvokable public boolean event(io.qt.core.QEvent event){ return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event)); } @io.qt.QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long event); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QEventLoop(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 QEventLoop(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @io.qt.QtUninvokable private static native void initialize_native(QEventLoop instance, QDeclarativeConstructor constructor); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy