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

« back to all changes in this revision

Viewing changes to doc/html/qlatin1string.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">QLatin1String Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QLatin1String class provides a thin wrapper around an ASCII/Latin-1 encoded string literal. <a href="#details">More...</a></p>
10
 
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qlatin1string.html#QLatin1String">__init__</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qlatin1string.html#QLatin1String-2">__init__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />str <b><a href="qlatin1string.html#latin1">latin1</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__">__eq__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__-2">__eq__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__-3">__eq__</a></b> (<i>self</i>, QStringRef)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ge__">__ge__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ge__-2">__ge__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__gt__">__gt__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__gt__-2">__gt__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__le__">__le__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__le__-2">__le__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__lt__">__lt__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__lt__-2">__lt__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__">__ne__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__-2">__ne__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__-3">__ne__</a></b> (<i>self</i>, QStringRef)</li><li><div class="fn" />object <b><a href="qlatin1string.html#__repr__">__repr__</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>This class can be pickled.</p><p>The QLatin1String class provides a thin wrapper around an ASCII/Latin-1 encoded string literal.</p>
11
 
<p>Many of <a href="qstring.html">QString</a>'s member functions are overloaded to accept <tt>const char *</tt> instead of <a href="qstring.html">QString</a>. This includes the copy constructor, the assignment operator, the comparison operators, and various other functions such as <a href="qstring.html#insert">insert()</a>, <a href="qstring.html#replace">replace()</a>, and <a href="qstring.html#indexOf">indexOf()</a>. These functions are usually optimized to avoid constructing a <a href="qstring.html">QString</a> object for the <tt>const char *</tt> data. For example, assuming <tt>str</tt> is a <a href="qstring.html">QString</a>,</p>
12
 
<pre> if (str == "auto" || str == "extern"
 
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">QLatin1String Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QLatin1String class provides a thin wrapper around an
 
10
US-ASCII/Latin-1 encoded string literal. <a href="#details">More...</a></p>
 
11
 
 
12
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qlatin1string.html#QLatin1String">__init__</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qlatin1string.html#QLatin1String-2">__init__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />str <b><a href="qlatin1string.html#latin1">latin1</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__">__eq__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__-2">__eq__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__eq__-3">__eq__</a></b> (<i>self</i>, QStringRef)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ge__">__ge__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ge__-2">__ge__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__gt__">__gt__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__gt__-2">__gt__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__le__">__le__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__le__-2">__le__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__lt__">__lt__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__lt__-2">__lt__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__">__ne__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__-2">__ne__</a></b> (<i>self</i>, QLatin1String)</li><li><div class="fn" />bool <b><a href="qlatin1string.html#__ne__-3">__ne__</a></b> (<i>self</i>, QStringRef)</li><li><div class="fn" />object <b><a href="qlatin1string.html#__repr__">__repr__</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>This class can be pickled.</p><p>The QLatin1String class provides a thin wrapper around an
 
13
US-ASCII/Latin-1 encoded string literal.</p>
 
14
<p>Many of <a href="qstring.html">QString</a>'s member functions
 
15
are overloaded to accept <tt>const char *</tt> instead of <a href="qstring.html">QString</a>. This includes the copy constructor, the
 
16
assignment operator, the comparison operators, and various other
 
17
functions such as <a href="qstring.html#insert">insert()</a>,
 
18
<a href="qstring.html#replace">replace()</a>, and <a href="qstring.html#indexOf">indexOf()</a>. These functions are usually
 
19
optimized to avoid constructing a <a href="qstring.html">QString</a> object for the <tt>const char *</tt>
 
20
data. For example, assuming <tt>str</tt> is a <a href="qstring.html">QString</a>,</p>
 
21
<pre class="highlightedCode brush: cpp">
 
22
 if (str == "auto" || str == "extern"
13
23
         || str == "static" || str == "register") {
14
24
     ...
15
 
 }</pre>
 
25
 }
 
26
</pre>
16
27
<p>is much faster than</p>
17
 
<pre> if (str == QString("auto") || str == QString("extern")
 
28
<pre class="highlightedCode brush: cpp">
 
29
 if (str == QString("auto") || str == QString("extern")
18
30
         || str == QString("static") || str == QString("register")) {
19
31
     ...
20
 
 }</pre>
21
 
<p>because it doesn't construct four temporary <a href="qstring.html">QString</a> objects and make a deep copy of the character data.</p>
22
 
<p>Applications that define <tt>QT_NO_CAST_FROM_ASCII</tt> (as explained in the <a href="qstring.html">QString</a> documentation) don't have access to <a href="qstring.html">QString</a>'s <tt>const char *</tt> API. To provide an efficient way of specifying constant Latin-1 strings, Qt provides the QLatin1String, which is just a very thin wrapper around a <tt>const char *</tt>. Using QLatin1String, the example code above becomes</p>
23
 
<pre> if (str == QLatin1String("auto")
 
32
 }
 
33
</pre>
 
34
<p>because it doesn't construct four temporary <a href="qstring.html">QString</a> objects and make a deep copy of the
 
35
character data.</p>
 
36
<p>Applications that define <tt>QT_NO_CAST_FROM_ASCII</tt> (as
 
37
explained in the <a href="qstring.html">QString</a> documentation)
 
38
don't have access to <a href="qstring.html">QString</a>'s <tt>const
 
39
char *</tt> API. To provide an efficient way of specifying constant
 
40
Latin-1 strings, Qt provides the QLatin1String, which is just a
 
41
very thin wrapper around a <tt>const char *</tt>. Using
 
42
QLatin1String, the example code above becomes</p>
 
43
<pre class="highlightedCode brush: cpp">
 
44
 if (str == QLatin1String("auto")
24
45
         || str == QLatin1String("extern")
25
46
         || str == QLatin1String("static")
26
47
         || str == QLatin1String("register") {
27
48
     ...
28
 
 }</pre>
29
 
<p>This is a bit longer to type, but it provides exactly the same benefits as the first version of the code, and is faster than converting the Latin-1 strings using <a href="qstring.html#fromLatin1">QString.fromLatin1</a>().</p>
30
 
<p>Thanks to the <a href="qstring.html">QString</a>(const QLatin1String &amp;) constructor, QLatin1String can be used everywhere a <a href="qstring.html">QString</a> is expected. For example:</p>
31
 
<pre> QLabel *label = new QLabel(QLatin1String("MOD"), this);</pre>
32
 
<p>See also <a href="qstring.html">QString</a> and <a href="qlatin1char.html">QLatin1Char</a>.</p>
33
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QLatin1String" />QLatin1String.__init__ (<i>self</i>, str)</h3><p>Constructs a <a href="qlatin1string.html">QLatin1String</a> object that stores <i>str</i>. Note that if <i>str</i> is 0, an empty string is created; this case is handled by <a href="qstring.html">QString</a>.</p>
34
 
<p>The string data is <i>not</i> copied. The caller must be able to guarantee that <i>str</i> will not be deleted or modified as long as the <a href="qlatin1string.html">QLatin1String</a> object exists.</p>
 
49
 }
 
50
</pre>
 
51
<p>This is a bit longer to type, but it provides exactly the same
 
52
benefits as the first version of the code, and is faster than
 
53
converting the Latin-1 strings using <a href="qstring.html#fromLatin1">QString.fromLatin1</a>().</p>
 
54
<p>Thanks to the <a href="qstring.html">QString</a>(const
 
55
QLatin1String &amp;) constructor, QLatin1String can be used
 
56
everywhere a <a href="qstring.html">QString</a> is expected. For
 
57
example:</p>
 
58
<pre class="highlightedCode brush: cpp">
 
59
 QLabel *label = new QLabel(QLatin1String("MOD"), this);
 
60
</pre><hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QLatin1String" />QLatin1String.__init__ (<i>self</i>, str)</h3><p>Constructs a <a href="qlatin1string.html">QLatin1String</a>
 
61
object that stores <i>str</i>. Note that if <i>str</i> is 0, an
 
62
empty string is created; this case is handled by <a href="qstring.html">QString</a>.</p>
 
63
<p>The string data is <i>not</i> copied. The caller must be able to
 
64
guarantee that <i>str</i> will not be deleted or modified as long
 
65
as the <a href="qlatin1string.html">QLatin1String</a> object
 
66
exists.</p>
35
67
<p>See also <a href="qlatin1string.html#latin1">latin1</a>().</p>
36
 
<a name="//apple_ref/cpp/instm/QLatin1String/latin1" />
 
68
 
 
69
 
37
70
<h3 class="fn"><a name="QLatin1String-2" />QLatin1String.__init__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="latin1" />str QLatin1String.latin1 (<i>self</i>)</h3><p>Returns the Latin-1 string stored in this object.</p>
38
 
<a name="//apple_ref/cpp/instm/QLatin1String/operator!=" />
39
 
<h3 class="fn"><a name="__eq__" />bool QLatin1String.__eq__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__eq__-2" />bool QLatin1String.__eq__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__eq__-3" />bool QLatin1String.__eq__ (<i>self</i>, QStringRef)</h3><h3 class="fn"><a name="__ge__" />bool QLatin1String.__ge__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__ge__-2" />bool QLatin1String.__ge__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__gt__" />bool QLatin1String.__gt__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__gt__-2" />bool QLatin1String.__gt__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__le__" />bool QLatin1String.__le__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__le__-2" />bool QLatin1String.__le__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__lt__" />bool QLatin1String.__lt__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__lt__-2" />bool QLatin1String.__lt__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__ne__" />bool QLatin1String.__ne__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__ne__-2" />bool QLatin1String.__ne__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__ne__-3" />bool QLatin1String.__ne__ (<i>self</i>, QStringRef)</h3><h3 class="fn"><a name="__repr__" />object QLatin1String.__repr__ (<i>self</i>)</h3><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'
 
71
 
 
72
 
 
73
<h3 class="fn"><a name="__eq__" />bool QLatin1String.__eq__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__eq__-2" />bool QLatin1String.__eq__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__eq__-3" />bool QLatin1String.__eq__ (<i>self</i>, QStringRef)</h3><h3 class="fn"><a name="__ge__" />bool QLatin1String.__ge__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__ge__-2" />bool QLatin1String.__ge__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__gt__" />bool QLatin1String.__gt__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__gt__-2" />bool QLatin1String.__gt__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__le__" />bool QLatin1String.__le__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__le__-2" />bool QLatin1String.__le__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__lt__" />bool QLatin1String.__lt__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__lt__-2" />bool QLatin1String.__lt__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__ne__" />bool QLatin1String.__ne__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__ne__-2" />bool QLatin1String.__ne__ (<i>self</i>, <a href="qlatin1string.html">QLatin1String</a>)</h3><h3 class="fn"><a name="__ne__-3" />bool QLatin1String.__ne__ (<i>self</i>, QStringRef)</h3><h3 class="fn"><a name="__repr__" />object QLatin1String.__repr__ (<i>self</i>)</h3><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'