~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qabstractmessagehandler.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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="../pyqt4ref.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">QAbstractMessageHandler Class Reference<br /><sup><sup>[<a href="qtxmlpatterns.html">QtXmlPatterns</a> module]</sup></sup></h1><p>The QAbstractMessageHandler class provides a callback interface for handling messages. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractmessagehandler.html#QAbstractMessageHandler">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qabstractmessagehandler.html#handleMessage">handleMessage</a></b> (<i>self</i>, QtMsgType, QString, QUrl, QSourceLocation)</li><li><div class="fn" /><b><a href="qabstractmessagehandler.html#message">message</a></b> (<i>self</i>, QtMsgType, QString, QUrl&#160;<i>identifier</i>&#160;=&#160;QUrl(), QSourceLocation&#160;<i>sourceLocation</i>&#160;=&#160;QSourceLocation())</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractMessageHandler class provides a callback interface for handling messages.</p>
11
 
<p>QAbstractMessageHandler is an abstract base class that provides a callback interface for handling messages. For example, class <a href="qxmlquery.html">QXmlQuery</a> parses and runs an XQuery. When it detects a compile or runtime error, it generates an appropriate error message, but rather than output the message itself, it passes the message to the <a href="qabstractmessagehandler.html#message">message</a>() function of its QAbstractMessageHandler. See <a href="qxmlquery.html#setMessageHandler">QXmlQuery.setMessageHandler</a>().</p>
12
 
<p>You create a message handler by subclassing QAbstractMessageHandler and implementing <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>(). You then pass a pointer to an instance of your subclass to any classes that must generate messages. The messages are sent to the message handler via the <a href="qabstractmessagehandler.html#message">message</a>() function, which forwards them to your handleMessge(). The effect is to serialize the handling of all messages, which means your QAbstractMessageHandler subclass is thread safe.</p>
13
 
<p>A single instance of QAbstractMessageHandler can be called on to handle messages from multiple sources. Hence, the content of a message, which is the <i>description</i> parameter passed to <a href="qabstractmessagehandler.html#message">message</a>() and <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>(), must be interpreted in light of the context that required the message to be sent. That context is specified by the <i>identifier</i> and <i>sourceLocation</i> parameters to <a href="qabstractmessagehandler.html#message">message</a>() <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>().</p>
14
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractMessageHandler" />QAbstractMessageHandler.__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 <a href="qabstractmessagehandler.html">QAbstractMessageHandler</a>. The <i>parent</i> is passed to the <a href="qobject.html">QObject</a> base class constructor.</p>
15
 
<a name="//apple_ref/cpp/instm/QAbstractMessageHandler/~QAbstractMessageHandler" />
16
 
<h3 class="fn"><a name="handleMessage" />QAbstractMessageHandler.handleMessage (<i>self</i>, <a href="qtcore.html#QtMsgType-enum">QtMsgType</a>, QString, <a href="qurl.html">QUrl</a>, <a href="qsourcelocation.html">QSourceLocation</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This function must be implemented by the sub-class. <a href="qabstractmessagehandler.html#message">message</a>() will call this function, passing in its parameters, <i>type</i>, <i>description</i>, <i>identifier</i> and <i>sourceLocation</i> unmodified.</p>
17
 
<a name="//apple_ref/cpp/instm/QAbstractMessageHandler/message" />
18
 
<h3 class="fn"><a name="message" />QAbstractMessageHandler.message (<i>self</i>, <a href="qtcore.html#QtMsgType-enum">QtMsgType</a>, QString, <a href="qurl.html">QUrl</a>&#160;<i>identifier</i>&#160;=&#160;QUrl(), <a href="qsourcelocation.html">QSourceLocation</a>&#160;<i>sourceLocation</i>&#160;=&#160;QSourceLocation())</h3><p>Sends a message to this message handler. <i>type</i> is the kind of message being sent. <i>description</i> is the message content. The <i>identifier</i> is a URI that identifies the message and is the key to interpreting the other arguments.</p>
19
 
<p>Typically, this class is used for reporting errors, as is the case for <a href="qxmlquery.html">QXmlQuery</a>, which uses a <a href="qabstractmessagehandler.html">QAbstractMessageHandler</a> to report compile and runtime XQuery errors. Hence, using a <a href="qurl.html">QUrl</a> as the message <i>identifier</i> is was inspired by the explanation of <a href="http://www.w3.org/TR/xquery/#errors">error handling in the XQuery language</a>. Because the <i>identifier</i> is composed of a namespace URI and a local part, identifiers with the same local part are unique. The caller is responsible for ensuring that <i>identifier</i> is either a valid <a href="qurl.html">QUrl</a> or a default constructed <a href="qurl.html">QUrl</a>.</p>
20
 
<p><i>sourceLocation</i> identifies a location in a resource (i.e., file or document) where the need for reporting a message was detected.</p>
21
 
<p>This function unconditionally calls <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>(), passing all its parameters unmodified.</p>
 
9
</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="../pyqt4ref.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">QAbstractMessageHandler Class Reference<br /><sup><sup>[<a href="qtxmlpatterns.html">QtXmlPatterns</a> module]</sup></sup></h1><p>The QAbstractMessageHandler class provides a callback interface
 
10
for handling messages. <a href="#details">More...</a></p>
 
11
 
 
12
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractmessagehandler.html#QAbstractMessageHandler">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qabstractmessagehandler.html#handleMessage">handleMessage</a></b> (<i>self</i>, QtMsgType, QString, QUrl, QSourceLocation)</li><li><div class="fn" /><b><a href="qabstractmessagehandler.html#message">message</a></b> (<i>self</i>, QtMsgType, QString, QUrl&#160;<i>identifier</i>&#160;=&#160;QUrl(), QSourceLocation&#160;<i>sourceLocation</i>&#160;=&#160;QSourceLocation())</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractMessageHandler class provides a callback interface
 
13
for handling messages.</p>
 
14
<p>QAbstractMessageHandler is an abstract base class that provides
 
15
a callback interface for handling messages. For example, class
 
16
<a href="qxmlquery.html">QXmlQuery</a> parses and runs an XQuery.
 
17
When it detects a compile or runtime error, it generates an
 
18
appropriate error message, but rather than output the message
 
19
itself, it passes the message to the <a href="qabstractmessagehandler.html#message">message</a>() function of
 
20
its QAbstractMessageHandler. See <a href="qxmlquery.html#setMessageHandler">QXmlQuery.setMessageHandler</a>().</p>
 
21
<p>You create a message handler by subclassing
 
22
QAbstractMessageHandler and implementing <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>().
 
23
You then pass a pointer to an instance of your subclass to any
 
24
classes that must generate messages. The messages are sent to the
 
25
message handler via the <a href="qabstractmessagehandler.html#message">message</a>() function,
 
26
which forwards them to your handleMessge(). The effect is to
 
27
serialize the handling of all messages, which means your
 
28
QAbstractMessageHandler subclass is thread safe.</p>
 
29
<p>A single instance of QAbstractMessageHandler can be called on to
 
30
handle messages from multiple sources. Hence, the content of a
 
31
message, which is the <i>description</i> parameter passed to
 
32
<a href="qabstractmessagehandler.html#message">message</a>() and
 
33
<a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>(),
 
34
must be interpreted in light of the context that required the
 
35
message to be sent. That context is specified by the
 
36
<i>identifier</i> and <i>sourceLocation</i> parameters to <a href="qabstractmessagehandler.html#message">message</a>() <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>().</p>
 
37
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractMessageHandler" />QAbstractMessageHandler.__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 <a href="qabstractmessagehandler.html">QAbstractMessageHandler</a>. The
 
38
<i>parent</i> is passed to the <a href="qobject.html">QObject</a>
 
39
base class constructor.</p>
 
40
 
 
41
 
 
42
<h3 class="fn"><a name="handleMessage" />QAbstractMessageHandler.handleMessage (<i>self</i>, <a href="qtcore.html#QtMsgType-enum">QtMsgType</a>, QString, <a href="qurl.html">QUrl</a>, <a href="qsourcelocation.html">QSourceLocation</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This function must be implemented by the sub-class. <a href="qabstractmessagehandler.html#message">message</a>() will call this
 
43
function, passing in its parameters, <i>type</i>,
 
44
<i>description</i>, <i>identifier</i> and <i>sourceLocation</i>
 
45
unmodified.</p>
 
46
 
 
47
 
 
48
<h3 class="fn"><a name="message" />QAbstractMessageHandler.message (<i>self</i>, <a href="qtcore.html#QtMsgType-enum">QtMsgType</a>, QString, <a href="qurl.html">QUrl</a>&#160;<i>identifier</i>&#160;=&#160;QUrl(), <a href="qsourcelocation.html">QSourceLocation</a>&#160;<i>sourceLocation</i>&#160;=&#160;QSourceLocation())</h3><p>Sends a message to this message handler. <i>type</i> is the kind
 
49
of message being sent. <i>description</i> is the message content.
 
50
The <i>identifier</i> is a URI that identifies the message and is
 
51
the key to interpreting the other arguments.</p>
 
52
<p>Typically, this class is used for reporting errors, as is the
 
53
case for <a href="qxmlquery.html">QXmlQuery</a>, which uses a
 
54
<a href="qabstractmessagehandler.html">QAbstractMessageHandler</a>
 
55
to report compile and runtime XQuery errors. Hence, using a
 
56
<a href="qurl.html">QUrl</a> as the message <i>identifier</i> is
 
57
was inspired by the explanation of <a href="http://www.w3.org/TR/xquery/#errors">error handling in the XQuery
 
58
language</a>. Because the <i>identifier</i> is composed of a
 
59
namespace URI and a local part, identifiers with the same local
 
60
part are unique. The caller is responsible for ensuring that
 
61
<i>identifier</i> is either a valid <a href="qurl.html">QUrl</a> or
 
62
a default constructed <a href="qurl.html">QUrl</a>.</p>
 
63
<p><i>sourceLocation</i> identifies a location in a resource (i.e.,
 
64
file or document) where the need for reporting a message was
 
65
detected.</p>
 
66
<p>This function unconditionally calls <a href="qabstractmessagehandler.html#handleMessage">handleMessage</a>(),
 
67
passing all its parameters unmodified.</p>
22
68
<p>See also <a href="http://www.w3.org/TR/xquery/#errors">http://www.w3.org/TR/xquery/#errors</a>.</p>
23
 
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 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> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
69
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 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> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'