Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 485

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractEventDispatcher Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractEventDispatcher Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QAbstractEventDispatcher class provides an interface to
manage Qt's event queue. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#QAbstractEventDispatcher">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#closingDown">closingDown</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstracteventdispatcher.html#filterEvent">filterEvent</a></b> (<i>self</i>, sip.voidptr&#160;<i>message</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#flush">flush</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstracteventdispatcher.html#hasPendingEvents">hasPendingEvents</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#interrupt">interrupt</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstracteventdispatcher.html#processEvents">processEvents</a></b> (<i>self</i>, QEventLoop.ProcessEventsFlags&#160;<i>flags</i>)</li><li><div class="fn" />list-of-tuple-of-int-int <b><a href="qabstracteventdispatcher.html#registeredTimers">registeredTimers</a></b> (<i>self</i>, QObject&#160;<i>object</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#registerSocketNotifier">registerSocketNotifier</a></b> (<i>self</i>, QSocketNotifier&#160;<i>notifier</i>)</li><li><div class="fn" />int <b><a href="qabstracteventdispatcher.html#registerTimer">registerTimer</a></b> (<i>self</i>, int&#160;<i>interval</i>, QObject&#160;<i>object</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#registerTimer-2">registerTimer</a></b> (<i>self</i>, int&#160;<i>timerId</i>, int&#160;<i>interval</i>, QObject&#160;<i>object</i>)</li><li><div class="fn" />callable <b><a href="qabstracteventdispatcher.html#setEventFilter">setEventFilter</a></b> (<i>self</i>, callable&#160;<i>filter</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#startingUp">startingUp</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#unregisterSocketNotifier">unregisterSocketNotifier</a></b> (<i>self</i>, QSocketNotifier&#160;<i>notifier</i>)</li><li><div class="fn" />bool <b><a href="qabstracteventdispatcher.html#unregisterTimer">unregisterTimer</a></b> (<i>self</i>, int&#160;<i>timerId</i>)</li><li><div class="fn" />bool <b><a href="qabstracteventdispatcher.html#unregisterTimers">unregisterTimers</a></b> (<i>self</i>, QObject&#160;<i>object</i>)</li><li><div class="fn" /><b><a href="qabstracteventdispatcher.html#wakeUp">wakeUp</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QAbstractEventDispatcher <b><a href="qabstracteventdispatcher.html#instance">instance</a></b> (QThread&#160;<i>thread</i>&#160;=&#160;None)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qabstracteventdispatcher.html#aboutToBlock">aboutToBlock</a></b> ()</li><li><div class="fn" />void <b><a href="qabstracteventdispatcher.html#awake">awake</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractEventDispatcher class provides an interface to
manage Qt's event queue.</p>
<p>An event dispatcher receives events from the window system and
other sources. It then sends them to the <a href="qcoreapplication.html">QCoreApplication</a> or <a href="qapplication.html">QApplication</a> instance for processing and
delivery. QAbstractEventDispatcher provides fine-grained control
over event delivery.</p>
<p>For simple control of event processing use <a href="qcoreapplication.html#processEvents">QCoreApplication.processEvents</a>().</p>
<p>For finer control of the application's event loop, call <a href="qabstracteventdispatcher.html#instance">instance</a>() and call
functions on the QAbstractEventDispatcher object that is returned.
If you want to use your own instance of QAbstractEventDispatcher or
of a QAbstractEventDispatcher subclass, you must create your
instance <i>before</i> you create the <a href="qapplication.html">QApplication</a> object.</p>
<p>The main event loop is started by calling <a href="qcoreapplication.html#exec">QCoreApplication.exec</a>(), and
stopped by calling <a href="qcoreapplication.html#exit">QCoreApplication.exit</a>(). Local
event loops can be created using <a href="qeventloop.html">QEventLoop</a>.</p>
<p>Programs that perform long operations can call <a href="qabstracteventdispatcher.html#processEvents">processEvents</a>()
with a bitwise OR combination of various <a href="qeventloop.html#ProcessEventsFlag-enum">QEventLoop.ProcessEventsFlag</a>
values to control which events should be delivered.</p>
<p>QAbstractEventDispatcher also allows the integration of an
external event loop with the Qt event loop. For example, the Motif
Extension includes a reimplementation of QAbstractEventDispatcher
that merges Qt and Motif events together.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractEventDispatcher" />QAbstractEventDispatcher.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new event dispatcher with the given
<i>parent</i>.</p>


<h3 class="fn"><a name="closingDown" />QAbstractEventDispatcher.closingDown (<i>self</i>)</h3><h3 class="fn"><a name="filterEvent" />bool QAbstractEventDispatcher.filterEvent (<i>self</i>, sip.voidptr&#160;<i>message</i>)</h3><p>Sends <i>message</i> through the event filter that was set by
<a href="qabstracteventdispatcher.html#setEventFilter">setEventFilter</a>().
If no event filter has been set, this function returns false;
otherwise, this function returns the result of the event filter
function.</p>
<p>Subclasses of <a href="qabstracteventdispatcher.html">QAbstractEventDispatcher</a>
<i>must</i> call this function for <i>all</i> messages received
from the system to ensure compatibility with any extensions that
may be used in the application.</p>
<p>Note that the type of <i>message</i> is platform dependent. See
<a href="qabstracteventdispatcher.html#EventFilter-typedef">QAbstractEventDispatcher.EventFilter</a>
for details.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#setEventFilter">setEventFilter</a>().</p>


<h3 class="fn"><a name="flush" />QAbstractEventDispatcher.flush (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Flushes the event queue. This normally returns almost
immediately. Does nothing on platforms other than X11.</p>


<h3 class="fn"><a name="hasPendingEvents" />bool QAbstractEventDispatcher.hasPendingEvents (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns true if there is an event waiting; otherwise returns
false.</p>


<h3 class="fn"><a name="instance" /><a href="qabstracteventdispatcher.html">QAbstractEventDispatcher</a> QAbstractEventDispatcher.instance (<a href="qthread.html">QThread</a>&#160;<i>thread</i>&#160;=&#160;None)</h3><p>Returns a pointer to the event dispatcher object for the
specified <i>thread</i>. If <i>thread</i> 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
<i>thread</i> argument is ignored.</p>


<h3 class="fn"><a name="interrupt" />QAbstractEventDispatcher.interrupt (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Interrupts event dispatching; i.e. the event dispatcher will
return from <a href="qabstracteventdispatcher.html#processEvents">processEvents</a>()
as soon as possible.</p>


<h3 class="fn"><a name="processEvents" />bool QAbstractEventDispatcher.processEvents (<i>self</i>, <a href="qeventloop-processeventsflags.html">QEventLoop.ProcessEventsFlags</a>&#160;<i>flags</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Processes pending events that match <i>flags</i> 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. by using the <a href="qeventloop.html#ProcessEventsFlag-enum">QEventLoop.ExcludeUserInputEvents</a>
flag.</p>
<p>If the <a href="qeventloop.html#ProcessEventsFlag-enum">QEventLoop.WaitForMoreEvents</a>
flag is set in <i>flags</i>, 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 <a href="qeventloop.html#ProcessEventsFlag-enum">QEventLoop.WaitForMoreEvents</a>
flag is not set in <i>flags</i>, 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>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#hasPendingEvents">hasPendingEvents</a>().</p>


<h3 class="fn"><a name="registeredTimers" />list-of-tuple-of-int-int QAbstractEventDispatcher.registeredTimers (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns a list of registered timers for <i>object</i>. The timer
ID is the first member in each pair; the interval is the
second.</p>


<h3 class="fn"><a name="registerSocketNotifier" />QAbstractEventDispatcher.registerSocketNotifier (<i>self</i>, <a href="qsocketnotifier.html">QSocketNotifier</a>&#160;<i>notifier</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Registers <i>notifier</i> with the event loop. Subclasses must
implement this method to tie a socket notifier into another event
loop.</p>


<h3 class="fn"><a name="registerTimer" />int QAbstractEventDispatcher.registerTimer (<i>self</i>, int&#160;<i>interval</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>)</h3><p>Registers a timer with the specified <i>interval</i> for the
given <i>object</i>.</p>


<h3 class="fn"><a name="registerTimer-2" />QAbstractEventDispatcher.registerTimer (<i>self</i>, int&#160;<i>timerId</i>, int&#160;<i>interval</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Register a timer with the specified <i>timerId</i> and
<i>interval</i> for the given <i>object</i>.</p>


<h3 class="fn"><a name="setEventFilter" />callable QAbstractEventDispatcher.setEventFilter (<i>self</i>, callable&#160;<i>filter</i>)</h3><p>The <i>filter</i> argument may also be None.</p><p>Replaces the event filter function for this <a href="qabstracteventdispatcher.html">QAbstractEventDispatcher</a> with
<i>filter</i> and returns the replaced event filter function. Only
the current event filter function is called. If you want to use
both filter functions, save the replaced <a href="qabstracteventdispatcher.html#EventFilter-typedef">EventFilter</a>
in a place where yours can call it.</p>
<p>The event filter function set here is called for all messages
taken from the system event loop before the event is dispatched to
the respective target, including the messages not meant for Qt
objects.</p>
<p>The event filter function should return true if the message
should be filtered, (i.e. stopped). It should return false to allow
processing the message to continue.</p>
<p>By default, no event filter function is set (i.e., this function
returns a null <a href="qabstracteventdispatcher.html#EventFilter-typedef">EventFilter</a>
the first time it is called).</p>


<h3 class="fn"><a name="startingUp" />QAbstractEventDispatcher.startingUp (<i>self</i>)</h3><h3 class="fn"><a name="unregisterSocketNotifier" />QAbstractEventDispatcher.unregisterSocketNotifier (<i>self</i>, <a href="qsocketnotifier.html">QSocketNotifier</a>&#160;<i>notifier</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Unregisters <i>notifier</i> 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>


<h3 class="fn"><a name="unregisterTimer" />bool QAbstractEventDispatcher.unregisterTimer (<i>self</i>, int&#160;<i>timerId</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Unregisters the timer with the given <i>timerId</i>. Returns
true if successful; otherwise returns false.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#registerTimer">registerTimer</a>()
and <a href="qabstracteventdispatcher.html#unregisterTimers">unregisterTimers</a>().</p>


<h3 class="fn"><a name="unregisterTimers" />bool QAbstractEventDispatcher.unregisterTimers (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Unregisters all the timers associated with the given
<i>object</i>. Returns true if all timers were successful removed;
otherwise returns false.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#unregisterTimer">unregisterTimer</a>()
and <a href="qabstracteventdispatcher.html#registeredTimers">registeredTimers</a>().</p>


<h3 class="fn"><a name="wakeUp" />QAbstractEventDispatcher.wakeUp (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Wakes up the event loop.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#awake">awake</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="aboutToBlock" />void aboutToBlock ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted before the event loop calls a function
that could block.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#awake">awake</a>().</p>


<h3 class="fn"><a name="awake" />void awake ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted after the event loop returns from a
function that could block.</p>
<p><b>See also</b> <a href="qabstracteventdispatcher.html#wakeUp">wakeUp</a>() and <a href="qabstracteventdispatcher.html#aboutToBlock">aboutToBlock</a>().</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>