<class name="QAbstractEventDispatcher" doc="/** <p>The <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> class manages Qt's event queue, excluding GUI-related events.</p> <p>An event dispatcher receives events from the window system and other sources. It then sends them to the <a href="QCoreApplication.html"><tt>QCoreApplication</tt></a> or <a href="%2E%2E/gui/QApplication.html"><tt>QApplication</tt></a> instance for processing and delivery. <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> provides fine-grained control over event delivery.</p> <p>For simple control of event processing use QCoreApplication::processEvents().</p> <p>For finer control of the application's event loop, call <a href="QAbstractEventDispatcher.html#instance(java.lang.Thread)"><tt>instance</tt></a> and call functions on the <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> object that is returned. If you want to use your own instance of <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> or of a <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> subclass, you must create your instance <i>before</i> you create the <a href="%2E%2E/gui/QApplication.html"><tt>QApplication</tt></a> object.</p> <p>The main event loop is started by calling QCoreApplication::exec(), and stopped by calling QCoreApplication::exit(). Local event loops can be created using <a href="QEventLoop.html"><tt>QEventLoop</tt></a>.</p> <p>Programs that perform long operations can call <a href="QAbstractEventDispatcher.html#processEvents(com.trolltech.qt.core.QEventLoop.ProcessEventsFlags)"><tt>processEvents</tt></a> with a bitwise OR combination of various QEventLoop::ProcessEventsFlag values to control which events should be delivered.</p> <p><a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> also allows the integration of an external event loop with the Qt event loop. For example, the Motif Extension included with Qt includes a reimplementation of <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a> that merges Qt and Motif events together.</p> @see <a href="QEventLoop.html"><tt>QEventLoop</tt></a> @see <a href="QCoreApplication.html"><tt>QCoreApplication</tt></a> */"> <signal name="protected final void aboutToBlock()" doc="/** <p>This signal is emitted before the event loop calls a function that could block.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAbstractEventDispatcher.html#awake()"><tt>awake</tt></a></dd> </dl> */"/> <signal name="protected final void awake()" doc="/** <p>This signal is emitted after the event loop returns from a function that could block.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAbstractEventDispatcher.html#wakeUp()"><tt>wakeUp</tt></a>, <a href="QAbstractEventDispatcher.html#aboutToBlock()"><tt>aboutToBlock</tt></a></dd> </dl> */"/> <method name="public QAbstractEventDispatcher(com.trolltech.qt.core.QObject parent)" doc="/** <p>Constructs a new event dispatcher with the given <tt>parent</tt>.</p> */"/> <method name="public QAbstractEventDispatcher()" doc="/** <p>Equivalent to <a href="QAbstractEventDispatcher.html#QAbstractEventDispatcher(com.trolltech.qt.core.QObject)"><tt>QAbstractEventDispatcher</tt></a>(0). */"/> <method name="public final int registerTimer(int interval, com.trolltech.qt.core.QObject object)" doc="/** <p>Registers a timer with the specified <tt>interval</tt> for the given <tt>object</tt>.</p> */"/> <method name="public void closingDown()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public abstract void flush()" doc="/** <p>Flushes the event queue. This normally returns almost immediately. Does nothing on platforms other than X11.</p> */"/> <method name="public abstract boolean hasPendingEvents()" doc="/** <p>Returns true if there is an event waiting; otherwise returns false.</p> */"/> <method name="public abstract void interrupt()" doc="/** <p>Interrupts event dispatching; i.e&#x2e; the event dispatcher will return from <a href="QAbstractEventDispatcher.html#processEvents(com.trolltech.qt.core.QEventLoop.ProcessEventsFlags)"><tt>processEvents</tt></a> as soon as possible.</p> */"/> <method name="public abstract boolean processEvents(com.trolltech.qt.core.QEventLoop.ProcessEventsFlags flags)" doc="/** <p>Processes pending events that match <tt>flags</tt> until there are no more events to process. Returns true if an event was processed; otherwise returns false.</p> <p>This function is especially useful if you have a long running operation and want to show its progress without allowing user input; i.e&#x2e; by using the QEventLoop::ExcludeUserInputEvents flag.</p> <p>If the QEventLoop::WaitForMoreEvents flag is set in <tt>flags</tt>, the behavior of this function is as follows:</p> <ul> <li>If events are available, this function returns after processing them.</li> <li>If no events are available, this function will wait until more are available and return after processing newly available events.</li> </ul> <p>If the QEventLoop::WaitForMoreEvents flag is not set in <tt>flags</tt>, and no events are available, this function will return immediately.</p> <p><b>Note:</b> This function does not process events continuously; it returns after all available events are processed.</p> @see <a href="QAbstractEventDispatcher.html#hasPendingEvents()"><tt>hasPendingEvents</tt></a> */"/> <method name="public abstract void registerSocketNotifier(com.trolltech.qt.core.QSocketNotifier notifier)" doc="/** <p>Registers <tt>notifier</tt> with the event loop. Subclasses must implement this method to tie a socket notifier into another event loop.</p> */"/> <method name="public abstract void registerTimer(int timerId, int interval, com.trolltech.qt.core.QObject object)" doc="/** <p>Register a timer with the specified <tt>timerId</tt> and <tt>interval</tt> for the given <tt>object</tt>.</p> */"/> <method name="public abstract java.util.List<com.trolltech.qt.QPair<java.lang.Integer, java.lang.Integer>> registeredTimers(com.trolltech.qt.core.QObject object)" doc="/** <p>Returns a list of registered timers for <tt>object</tt>. The timer ID is the first member in each pair; the interval is the second.</p> */"/> <method name="public void startingUp()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public abstract void unregisterSocketNotifier(com.trolltech.qt.core.QSocketNotifier notifier)" doc="/** <p>Unregisters <tt>notifier</tt> from the event dispatcher. Subclasses must reimplement this method to tie a socket notifier into another event loop. Reimplementations must call the base implementation.</p> */"/> <method name="public abstract boolean unregisterTimer(int timerId)" doc="/** <p>Unregisters the timer with the given <tt>timerId</tt>. Returns true if successful; otherwise returns false.</p> @see <a href="QAbstractEventDispatcher.html#registerTimer(int, int, com.trolltech.qt.core.QObject)"><tt>registerTimer</tt></a> @see <a href="QAbstractEventDispatcher.html#unregisterTimers(com.trolltech.qt.core.QObject)"><tt>unregisterTimers</tt></a> */"/> <method name="public abstract boolean unregisterTimers(com.trolltech.qt.core.QObject object)" doc="/** <p>Unregisters all the timers associated with the given <tt>object</tt>. Returns true if all timers were successful removed; otherwise returns false.</p> @see <a href="QAbstractEventDispatcher.html#unregisterTimer(int)"><tt>unregisterTimer</tt></a> @see <a href="QAbstractEventDispatcher.html#registeredTimers(com.trolltech.qt.core.QObject)"><tt>registeredTimers</tt></a> */"/> <method name="public abstract void wakeUp()" doc="/** <p>Wakes up the event loop.</p> @see <a href="QAbstractEventDispatcher.html#awake()"><tt>awake</tt></a> */"/> <method name="public native static com.trolltech.qt.core.QAbstractEventDispatcher instance(java.lang.Thread thread)" doc="/** <p>Returns a pointer to the event dispatcher object for the specified <tt>thread</tt>. If <tt>thread</tt> is zero, the current thread is used. If no event dispatcher exists for the specified thread, this function returns 0.</p> <p><b>Note:</b> If Qt is built without thread support, the <tt>thread</tt> argument is ignored.</p> */"/> <method name="public static com.trolltech.qt.core.QAbstractEventDispatcher instance()" doc="/** <p>Equivalent to <a href="QAbstractEventDispatcher.html#instance(java.lang.Thread)">instance</tt></a>(0). */"/> </class>