7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QChar Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QChar class provides a 16-bit Unicode character. <a href="#details">More...</a></p>
10
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qchar.html#Category-enum">Category</a></b> { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, ..., Punctuation_Dask }</li><li><div class="fn" />enum <b><a href="qchar.html#CombiningClass-enum">CombiningClass</a></b> { Combining_BelowLeftAttached, Combining_BelowAttached, Combining_BelowRightAttached, Combining_LeftAttached, ..., Combining_IotaSubscript }</li><li><div class="fn" />enum <b><a href="qchar.html#Decomposition-enum">Decomposition</a></b> { NoDecomposition, Canonical, Font, NoBreak, ..., Fraction }</li><li><div class="fn" />enum <b><a href="qchar.html#Direction-enum">Direction</a></b> { DirL, DirR, DirEN, DirES, ..., DirBN }</li><li><div class="fn" />enum <b><a href="qchar.html#Joining-enum">Joining</a></b> { OtherJoining, Dual, Right, Center }</li><li><div class="fn" />enum <b><a href="qchar.html#SpecialCharacter-enum">SpecialCharacter</a></b> { Null, Nbsp, ReplacementCharacter, ObjectReplacementCharacter, ..., LineSeparator }</li><li><div class="fn" />enum <b><a href="qchar.html#UnicodeVersion-enum">UnicodeVersion</a></b> { Unicode_Unassigned, Unicode_1_1, Unicode_2_0, Unicode_2_1_2, ..., Unicode_5_0 }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qchar.html#QChar">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qchar.html#QChar-2">__init__</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qchar.html#QChar-3">__init__</a></b> (<i>self</i>, QLatin1Char)</li><li><div class="fn" /><b><a href="qchar.html#QChar-4">__init__</a></b> (<i>self</i>, str, str)</li><li><div class="fn" /><b><a href="qchar.html#QChar-5">__init__</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qchar.html#QChar-6">__init__</a></b> (<i>self</i>, SpecialCharacter)</li><li><div class="fn" /><b><a href="qchar.html#QChar-7">__init__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />Category <b><a href="qchar.html#category">category</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#cell">cell</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#combiningClass">combiningClass</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qchar.html#decomposition">decomposition</a></b> (<i>self</i>)</li><li><div class="fn" />Decomposition <b><a href="qchar.html#decompositionTag">decompositionTag</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qchar.html#digitValue">digitValue</a></b> (<i>self</i>)</li><li><div class="fn" />Direction <b><a href="qchar.html#direction">direction</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#hasMirrored">hasMirrored</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isDigit">isDigit</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isHighSurrogate">isHighSurrogate</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLetter">isLetter</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLetterOrNumber">isLetterOrNumber</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLower">isLower</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLowSurrogate">isLowSurrogate</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isMark">isMark</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isNumber">isNumber</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isPrint">isPrint</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isPunct">isPunct</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isSpace">isSpace</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isSymbol">isSymbol</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isTitleCase">isTitleCase</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isUpper">isUpper</a></b> (<i>self</i>)</li><li><div class="fn" />Joining <b><a href="qchar.html#joining">joining</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#mirroredChar">mirroredChar</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#row">row</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qchar.html#setCell">setCell</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qchar.html#setRow">setRow</a></b> (<i>self</i>, str)</li><li><div class="fn" />str <b><a href="qchar.html#toAscii">toAscii</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toCaseFolded">toCaseFolded</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#toLatin1">toLatin1</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toLower">toLower</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toTitleCase">toTitleCase</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toUpper">toUpper</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qchar.html#unicode">unicode</a></b> (<i>self</i>)</li><li><div class="fn" />UnicodeVersion <b><a href="qchar.html#unicodeVersion">unicodeVersion</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />Category <b><a href="qchar.html#category-2">category</a></b> (int)</li><li><div class="fn" />str <b><a href="qchar.html#combiningClass-2">combiningClass</a></b> (int)</li><li><div class="fn" />QString <b><a href="qchar.html#decomposition-2">decomposition</a></b> (int)</li><li><div class="fn" />Decomposition <b><a href="qchar.html#decompositionTag-2">decompositionTag</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#digitValue-2">digitValue</a></b> (int)</li><li><div class="fn" />Direction <b><a href="qchar.html#direction-2">direction</a></b> (int)</li><li><div class="fn" />QChar <b><a href="qchar.html#fromAscii">fromAscii</a></b> (str)</li><li><div class="fn" />QChar <b><a href="qchar.html#fromLatin1">fromLatin1</a></b> (str)</li><li><div class="fn" />int <b><a href="qchar.html#highSurrogate">highSurrogate</a></b> (int)</li><li><div class="fn" />Joining <b><a href="qchar.html#joining-2">joining</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#lowSurrogate">lowSurrogate</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#mirroredChar-2">mirroredChar</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#surrogateToUcs4">surrogateToUcs4</a></b> (int, int)</li><li><div class="fn" />int <b><a href="qchar.html#surrogateToUcs4-2">surrogateToUcs4</a></b> (QChar, QChar)</li><li><div class="fn" />int <b><a href="qchar.html#toCaseFolded-2">toCaseFolded</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toLower-2">toLower</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toTitleCase-2">toTitleCase</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toUpper-2">toUpper</a></b> (int)</li><li><div class="fn" />UnicodeVersion <b><a href="qchar.html#unicodeVersion-2">unicodeVersion</a></b> (int)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />QString <b><a href="qchar.html#__add__">__add__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qchar.html#__eq__">__eq__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__ge__">__ge__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__gt__">__gt__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />int <b><a href="qchar.html#__hash__">__hash__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#__le__">__le__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__lt__">__lt__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__ne__">__ne__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />str <b><a href="qchar.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 QChar class provides a 16-bit Unicode character.</p>
11
<p>In Qt, Unicode characters are 16-bit entities without any markup or structure. This class represents such an entity. It is lightweight, so it can be used everywhere. Most compilers treat it like a <tt>unsigned short</tt>.</p>
12
<p>QChar provides a full complement of testing/classification functions, converting to and from other formats, converting from composed to decomposed Unicode, and trying to compare and case-convert if you ask it to.</p>
13
<p>The classification functions include functions like those in the standard C++ header <cctype> (formerly <ctype.h>), but operating on the full range of Unicode characters. They all return true if the character is a certain type of character; otherwise they return false. These classification functions are <a href="qchar.html#isNull">isNull</a>() (returns true if the character is '\0'), <a href="qchar.html#isPrint">isPrint</a>() (true if the character is any sort of printable character, including whitespace), <a href="qchar.html#isPunct">isPunct</a>() (any sort of punctation), <a href="qchar.html#isMark">isMark</a>() (Unicode Mark), <a href="qchar.html#isLetter">isLetter</a>() (a letter), <a href="qchar.html#isNumber">isNumber</a>() (any sort of numeric character, not just 0-9), <a href="qchar.html#isLetterOrNumber">isLetterOrNumber</a>(), and <a href="qchar.html#isDigit">isDigit</a>() (decimal digits). All of these are wrappers around <a href="qchar.html#category">category</a>() which return the Unicode-defined category of each character.</p>
14
<p>QChar also provides <a href="qchar.html#direction">direction</a>(), which indicates the "natural" writing direction of this character. The <a href="qchar.html#joining">joining</a>() function indicates how the character joins with its neighbors (needed mostly for Arabic) and finally <a href="qchar.html#hasMirrored">hasMirrored</a>(), which indicates whether the character needs to be mirrored when it is printed in its "unnatural" writing direction.</p>
15
<p>Composed Unicode characters (like å) can be converted to decomposed Unicode ("a" followed by "ring above") by using <a href="qchar.html#decomposition">decomposition</a>().</p>
16
<p>In Unicode, comparison is not necessarily possible and case conversion is very difficult at best. Unicode, covering the "entire" world, also includes most of the world's case and sorting problems. operator==() and friends will do comparison based purely on the numeric Unicode value (code point) of the characters, and <a href="qchar.html#toUpper">toUpper</a>() and <a href="qchar.html#toLower">toLower</a>() will do case changes when the character has a well-defined uppercase/lowercase equivalent. For locale-dependent comparisons, use <a href="qstring.html#localeAwareCompare">QString.localeAwareCompare</a>().</p>
17
<p>The conversion functions include <a href="qchar.html#unicode">unicode</a>() (to a scalar), <a href="qchar.html#toLatin1">toLatin1</a>() (to scalar, but converts all non-Latin-1 characters to 0), <a href="qchar.html#row">row</a>() (gives the Unicode row), <a href="qchar.html#cell">cell</a>() (gives the Unicode cell), <a href="qchar.html#digitValue">digitValue</a>() (gives the integer value of any of the numerous digit characters), and a host of constructors.</p>
18
<p>QChar provides constructors and cast operators that make it easy to convert to and from traditional 8-bit <tt>char</tt>s. If you defined <tt>QT_NO_CAST_FROM_ASCII</tt> and <tt>QT_NO_CAST_TO_ASCII</tt>, as explained in the <a href="qstring.html">QString</a> documentation, you will need to explicitly call <a href="qchar.html#fromAscii">fromAscii</a>() or <a href="qchar.html#fromLatin1">fromLatin1</a>(), or use <a href="qlatin1char.html">QLatin1Char</a>, to construct a QChar from an 8-bit <tt>char</tt>, and you will need to call <a href="qchar.html#toAscii">toAscii</a>() or <a href="qchar.html#toLatin1">toLatin1</a>() to get the 8-bit value back.</p>
19
<p>See also <a href="qstring.html">QString</a>, <a href="unicode.html#unicode">Unicode</a>, and <a href="qlatin1char.html">QLatin1Char</a>.</p>
11
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qchar.html#Category-enum">Category</a></b> { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, ..., Punctuation_Dask }</li><li><div class="fn" />enum <b><a href="qchar.html#CombiningClass-enum">CombiningClass</a></b> { Combining_BelowLeftAttached, Combining_BelowAttached, Combining_BelowRightAttached, Combining_LeftAttached, ..., Combining_IotaSubscript }</li><li><div class="fn" />enum <b><a href="qchar.html#Decomposition-enum">Decomposition</a></b> { NoDecomposition, Canonical, Font, NoBreak, ..., Fraction }</li><li><div class="fn" />enum <b><a href="qchar.html#Direction-enum">Direction</a></b> { DirL, DirR, DirEN, DirES, ..., DirBN }</li><li><div class="fn" />enum <b><a href="qchar.html#Joining-enum">Joining</a></b> { OtherJoining, Dual, Right, Center }</li><li><div class="fn" />enum <b><a href="qchar.html#SpecialCharacter-enum">SpecialCharacter</a></b> { Null, Nbsp, ReplacementCharacter, ObjectReplacementCharacter, ..., LineSeparator }</li><li><div class="fn" />enum <b><a href="qchar.html#UnicodeVersion-enum">UnicodeVersion</a></b> { Unicode_Unassigned, Unicode_1_1, Unicode_2_0, Unicode_2_1_2, ..., Unicode_5_0 }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qchar.html#QChar">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qchar.html#QChar-2">__init__</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qchar.html#QChar-3">__init__</a></b> (<i>self</i>, QLatin1Char)</li><li><div class="fn" /><b><a href="qchar.html#QChar-4">__init__</a></b> (<i>self</i>, str, str)</li><li><div class="fn" /><b><a href="qchar.html#QChar-5">__init__</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qchar.html#QChar-6">__init__</a></b> (<i>self</i>, SpecialCharacter)</li><li><div class="fn" /><b><a href="qchar.html#QChar-7">__init__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />Category <b><a href="qchar.html#category">category</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#cell">cell</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#combiningClass">combiningClass</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qchar.html#decomposition">decomposition</a></b> (<i>self</i>)</li><li><div class="fn" />Decomposition <b><a href="qchar.html#decompositionTag">decompositionTag</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qchar.html#digitValue">digitValue</a></b> (<i>self</i>)</li><li><div class="fn" />Direction <b><a href="qchar.html#direction">direction</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#hasMirrored">hasMirrored</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isDigit">isDigit</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isHighSurrogate">isHighSurrogate</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLetter">isLetter</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLetterOrNumber">isLetterOrNumber</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLower">isLower</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLowSurrogate">isLowSurrogate</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isMark">isMark</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isNumber">isNumber</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isPrint">isPrint</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isPunct">isPunct</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isSpace">isSpace</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isSymbol">isSymbol</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isTitleCase">isTitleCase</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isUpper">isUpper</a></b> (<i>self</i>)</li><li><div class="fn" />Joining <b><a href="qchar.html#joining">joining</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#mirroredChar">mirroredChar</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#row">row</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qchar.html#setCell">setCell</a></b> (<i>self</i>, str)</li><li><div class="fn" /><b><a href="qchar.html#setRow">setRow</a></b> (<i>self</i>, str)</li><li><div class="fn" />str <b><a href="qchar.html#toAscii">toAscii</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toCaseFolded">toCaseFolded</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qchar.html#toLatin1">toLatin1</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toLower">toLower</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toTitleCase">toTitleCase</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qchar.html#toUpper">toUpper</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qchar.html#unicode">unicode</a></b> (<i>self</i>)</li><li><div class="fn" />UnicodeVersion <b><a href="qchar.html#unicodeVersion">unicodeVersion</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />Category <b><a href="qchar.html#category-2">category</a></b> (int)</li><li><div class="fn" />str <b><a href="qchar.html#combiningClass-2">combiningClass</a></b> (int)</li><li><div class="fn" />QString <b><a href="qchar.html#decomposition-2">decomposition</a></b> (int)</li><li><div class="fn" />Decomposition <b><a href="qchar.html#decompositionTag-2">decompositionTag</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#digitValue-2">digitValue</a></b> (int)</li><li><div class="fn" />Direction <b><a href="qchar.html#direction-2">direction</a></b> (int)</li><li><div class="fn" />QChar <b><a href="qchar.html#fromAscii">fromAscii</a></b> (str)</li><li><div class="fn" />QChar <b><a href="qchar.html#fromLatin1">fromLatin1</a></b> (str)</li><li><div class="fn" />int <b><a href="qchar.html#highSurrogate">highSurrogate</a></b> (int)</li><li><div class="fn" />bool <b><a href="qchar.html#isHighSurrogate-2">isHighSurrogate</a></b> (int <i>ucs4</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#isLowSurrogate-2">isLowSurrogate</a></b> (int <i>ucs4</i>)</li><li><div class="fn" />Joining <b><a href="qchar.html#joining-2">joining</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#lowSurrogate">lowSurrogate</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#mirroredChar-2">mirroredChar</a></b> (int)</li><li><div class="fn" />bool <b><a href="qchar.html#requiresSurrogates">requiresSurrogates</a></b> (int <i>ucs4</i>)</li><li><div class="fn" />int <b><a href="qchar.html#surrogateToUcs4">surrogateToUcs4</a></b> (int, int)</li><li><div class="fn" />int <b><a href="qchar.html#surrogateToUcs4-2">surrogateToUcs4</a></b> (QChar, QChar)</li><li><div class="fn" />int <b><a href="qchar.html#toCaseFolded-2">toCaseFolded</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toLower-2">toLower</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toTitleCase-2">toTitleCase</a></b> (int)</li><li><div class="fn" />int <b><a href="qchar.html#toUpper-2">toUpper</a></b> (int)</li><li><div class="fn" />UnicodeVersion <b><a href="qchar.html#unicodeVersion-2">unicodeVersion</a></b> (int)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />QString <b><a href="qchar.html#__add__">__add__</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qchar.html#__eq__">__eq__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__ge__">__ge__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__gt__">__gt__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />int <b><a href="qchar.html#__hash__">__hash__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchar.html#__le__">__le__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__lt__">__lt__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />bool <b><a href="qchar.html#__ne__">__ne__</a></b> (<i>self</i>, QChar)</li><li><div class="fn" />str <b><a href="qchar.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 QChar class provides a 16-bit Unicode character.</p>
12
<p>In Qt, Unicode characters are 16-bit entities without any markup
13
or structure. This class represents such an entity. It is
14
lightweight, so it can be used everywhere. Most compilers treat it
15
like a <tt>unsigned short</tt>.</p>
16
<p>QChar provides a full complement of testing/classification
17
functions, converting to and from other formats, converting from
18
composed to decomposed Unicode, and trying to compare and
19
case-convert if you ask it to.</p>
20
<p>The classification functions include functions like those in the
21
standard C++ header <cctype> (formerly <ctype.h>), but
22
operating on the full range of Unicode characters. They all return
23
true if the character is a certain type of character; otherwise
24
they return false. These classification functions are <a href="qchar.html#isNull">isNull</a>() (returns true if the character is
25
'\0'), <a href="qchar.html#isPrint">isPrint</a>() (true if the
26
character is any sort of printable character, including
27
whitespace), <a href="qchar.html#isPunct">isPunct</a>() (any sort
28
of punctation), <a href="qchar.html#isMark">isMark</a>() (Unicode
29
Mark), <a href="qchar.html#isLetter">isLetter</a>() (a letter),
30
<a href="qchar.html#isNumber">isNumber</a>() (any sort of numeric
31
character, not just 0-9), <a href="qchar.html#isLetterOrNumber">isLetterOrNumber</a>(), and <a href="qchar.html#isDigit">isDigit</a>() (decimal digits). All of these
32
are wrappers around <a href="qchar.html#category">category</a>()
33
which return the Unicode-defined category of each character.</p>
34
<p>QChar also provides <a href="qchar.html#direction">direction</a>(), which indicates the
35
"natural" writing direction of this character. The <a href="qchar.html#joining">joining</a>() function indicates how the
36
character joins with its neighbors (needed mostly for Arabic) and
37
finally <a href="qchar.html#hasMirrored">hasMirrored</a>(), which
38
indicates whether the character needs to be mirrored when it is
39
printed in its "unnatural" writing direction.</p>
40
<p>Composed Unicode characters (like å) can be converted to
41
decomposed Unicode ("a" followed by "ring above") by using <a href="qchar.html#decomposition">decomposition</a>().</p>
42
<p>In Unicode, comparison is not necessarily possible and case
43
conversion is very difficult at best. Unicode, covering the
44
"entire" world, also includes most of the world's case and sorting
45
problems. operator==() and friends will do comparison based purely
46
on the numeric Unicode value (code point) of the characters, and
47
<a href="qchar.html#toUpper">toUpper</a>() and <a href="qchar.html#toLower">toLower</a>() will do case changes when the
48
character has a well-defined uppercase/lowercase equivalent. For
49
locale-dependent comparisons, use <a href="qstring.html#localeAwareCompare">QString.localeAwareCompare</a>().</p>
50
<p>The conversion functions include <a href="qchar.html#unicode">unicode</a>() (to a scalar), <a href="qchar.html#toLatin1">toLatin1</a>() (to scalar, but converts all
51
non-Latin-1 characters to 0), <a href="qchar.html#row">row</a>()
52
(gives the Unicode row), <a href="qchar.html#cell">cell</a>()
53
(gives the Unicode cell), <a href="qchar.html#digitValue">digitValue</a>() (gives the integer value
54
of any of the numerous digit characters), and a host of
56
<p>QChar provides constructors and cast operators that make it easy
57
to convert to and from traditional 8-bit <tt>char</tt>s. If you
58
defined <tt>QT_NO_CAST_FROM_ASCII</tt> and
59
<tt>QT_NO_CAST_TO_ASCII</tt>, as explained in the <a href="qstring.html">QString</a> documentation, you will need to
60
explicitly call <a href="qchar.html#fromAscii">fromAscii</a>() or
61
<a href="qchar.html#fromLatin1">fromLatin1</a>(), or use <a href="qlatin1char.html">QLatin1Char</a>, to construct a QChar from an
62
8-bit <tt>char</tt>, and you will need to call <a href="qchar.html#toAscii">toAscii</a>() or <a href="qchar.html#toLatin1">toLatin1</a>() to get the 8-bit value
20
64
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Category-enum" />QChar.Category</h3><p>This enum maps the Unicode character categories.</p>
21
65
<p>The following characters are normative in Unicode:</p>
22
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
23
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
24
<tr><td valign="top"><tt>QChar.Mark_NonSpacing</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Unicode class name Mn</td></tr>
25
<tr><td valign="top"><tt>QChar.Mark_SpacingCombining</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Unicode class name Mc</td></tr>
26
<tr><td valign="top"><tt>QChar.Mark_Enclosing</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Unicode class name Me</td></tr>
27
<tr><td valign="top"><tt>QChar.Number_DecimalDigit</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Unicode class name Nd</td></tr>
28
<tr><td valign="top"><tt>QChar.Number_Letter</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">Unicode class name Nl</td></tr>
29
<tr><td valign="top"><tt>QChar.Number_Other</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">Unicode class name No</td></tr>
30
<tr><td valign="top"><tt>QChar.Separator_Space</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">Unicode class name Zs</td></tr>
31
<tr><td valign="top"><tt>QChar.Separator_Line</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Unicode class name Zl</td></tr>
32
<tr><td valign="top"><tt>QChar.Separator_Paragraph</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">Unicode class name Zp</td></tr>
33
<tr><td valign="top"><tt>QChar.Other_Control</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top">Unicode class name Cc</td></tr>
34
<tr><td valign="top"><tt>QChar.Other_Format</tt></td><td align="center" valign="top"><tt>11</tt></td><td valign="top">Unicode class name Cf</td></tr>
35
<tr><td valign="top"><tt>QChar.Other_Surrogate</tt></td><td align="center" valign="top"><tt>12</tt></td><td valign="top">Unicode class name Cs</td></tr>
36
<tr><td valign="top"><tt>QChar.Other_PrivateUse</tt></td><td align="center" valign="top"><tt>13</tt></td><td valign="top">Unicode class name Co</td></tr>
37
<tr><td valign="top"><tt>QChar.Other_NotAssigned</tt></td><td align="center" valign="top"><tt>14</tt></td><td valign="top">Unicode class name Cn</td></tr>
66
<table class="valuelist">
71
<th class="tblConst">Constant</th>
72
<th class="tblval">Value</th>
73
<th class="tbldscr">Description</th>
76
<td class="topAlign"><tt>QChar.Mark_NonSpacing</tt></td>
77
<td class=" topAlign"><tt>1</tt></td>
78
<td class="topAlign">Unicode class name Mn</td>
81
<td class="topAlign"><tt>QChar.Mark_SpacingCombining</tt></td>
82
<td class=" topAlign"><tt>2</tt></td>
83
<td class="topAlign">Unicode class name Mc</td>
86
<td class="topAlign"><tt>QChar.Mark_Enclosing</tt></td>
87
<td class=" topAlign"><tt>3</tt></td>
88
<td class="topAlign">Unicode class name Me</td>
91
<td class="topAlign"><tt>QChar.Number_DecimalDigit</tt></td>
92
<td class=" topAlign"><tt>4</tt></td>
93
<td class="topAlign">Unicode class name Nd</td>
96
<td class="topAlign"><tt>QChar.Number_Letter</tt></td>
97
<td class=" topAlign"><tt>5</tt></td>
98
<td class="topAlign">Unicode class name Nl</td>
101
<td class="topAlign"><tt>QChar.Number_Other</tt></td>
102
<td class=" topAlign"><tt>6</tt></td>
103
<td class="topAlign">Unicode class name No</td>
106
<td class="topAlign"><tt>QChar.Separator_Space</tt></td>
107
<td class=" topAlign"><tt>7</tt></td>
108
<td class="topAlign">Unicode class name Zs</td>
111
<td class="topAlign"><tt>QChar.Separator_Line</tt></td>
112
<td class=" topAlign"><tt>8</tt></td>
113
<td class="topAlign">Unicode class name Zl</td>
116
<td class="topAlign"><tt>QChar.Separator_Paragraph</tt></td>
117
<td class=" topAlign"><tt>9</tt></td>
118
<td class="topAlign">Unicode class name Zp</td>
121
<td class="topAlign"><tt>QChar.Other_Control</tt></td>
122
<td class=" topAlign"><tt>10</tt></td>
123
<td class="topAlign">Unicode class name Cc</td>
126
<td class="topAlign"><tt>QChar.Other_Format</tt></td>
127
<td class=" topAlign"><tt>11</tt></td>
128
<td class="topAlign">Unicode class name Cf</td>
131
<td class="topAlign"><tt>QChar.Other_Surrogate</tt></td>
132
<td class=" topAlign"><tt>12</tt></td>
133
<td class="topAlign">Unicode class name Cs</td>
136
<td class="topAlign"><tt>QChar.Other_PrivateUse</tt></td>
137
<td class=" topAlign"><tt>13</tt></td>
138
<td class="topAlign">Unicode class name Co</td>
141
<td class="topAlign"><tt>QChar.Other_NotAssigned</tt></td>
142
<td class=" topAlign"><tt>14</tt></td>
143
<td class="topAlign">Unicode class name Cn</td>
39
146
<p>The following categories are informative in Unicode:</p>
40
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
41
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
42
<tr><td valign="top"><tt>QChar.Letter_Uppercase</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top">Unicode class name Lu</td></tr>
43
<tr><td valign="top"><tt>QChar.Letter_Lowercase</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top">Unicode class name Ll</td></tr>
44
<tr><td valign="top"><tt>QChar.Letter_Titlecase</tt></td><td align="center" valign="top"><tt>17</tt></td><td valign="top">Unicode class name Lt</td></tr>
45
<tr><td valign="top"><tt>QChar.Letter_Modifier</tt></td><td align="center" valign="top"><tt>18</tt></td><td valign="top">Unicode class name Lm</td></tr>
46
<tr><td valign="top"><tt>QChar.Letter_Other</tt></td><td align="center" valign="top"><tt>19</tt></td><td valign="top">Unicode class name Lo</td></tr>
47
<tr><td valign="top"><tt>QChar.Punctuation_Connector</tt></td><td align="center" valign="top"><tt>20</tt></td><td valign="top">Unicode class name Pc</td></tr>
48
<tr><td valign="top"><tt>QChar.Punctuation_Dash</tt></td><td align="center" valign="top"><tt>21</tt></td><td valign="top">Unicode class name Pd</td></tr>
49
<tr><td valign="top"><tt>QChar.Punctuation_Open</tt></td><td align="center" valign="top"><tt>22</tt></td><td valign="top">Unicode class name Ps</td></tr>
50
<tr><td valign="top"><tt>QChar.Punctuation_Close</tt></td><td align="center" valign="top"><tt>23</tt></td><td valign="top">Unicode class name Pe</td></tr>
51
<tr><td valign="top"><tt>QChar.Punctuation_InitialQuote</tt></td><td align="center" valign="top"><tt>24</tt></td><td valign="top">Unicode class name Pi</td></tr>
52
<tr><td valign="top"><tt>QChar.Punctuation_FinalQuote</tt></td><td align="center" valign="top"><tt>25</tt></td><td valign="top">Unicode class name Pf</td></tr>
53
<tr><td valign="top"><tt>QChar.Punctuation_Other</tt></td><td align="center" valign="top"><tt>26</tt></td><td valign="top">Unicode class name Po</td></tr>
54
<tr><td valign="top"><tt>QChar.Symbol_Math</tt></td><td align="center" valign="top"><tt>27</tt></td><td valign="top">Unicode class name Sm</td></tr>
55
<tr><td valign="top"><tt>QChar.Symbol_Currency</tt></td><td align="center" valign="top"><tt>28</tt></td><td valign="top">Unicode class name Sc</td></tr>
56
<tr><td valign="top"><tt>QChar.Symbol_Modifier</tt></td><td align="center" valign="top"><tt>29</tt></td><td valign="top">Unicode class name Sk</td></tr>
57
<tr><td valign="top"><tt>QChar.Symbol_Other</tt></td><td align="center" valign="top"><tt>30</tt></td><td valign="top">Unicode class name So</td></tr>
58
<tr><td valign="top"><tt>QChar.NoCategory</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Qt cannot find an appropriate category for the character.</td></tr>
147
<table class="valuelist">
152
<th class="tblConst">Constant</th>
153
<th class="tblval">Value</th>
154
<th class="tbldscr">Description</th>
157
<td class="topAlign"><tt>QChar.Letter_Uppercase</tt></td>
158
<td class=" topAlign"><tt>15</tt></td>
159
<td class="topAlign">Unicode class name Lu</td>
162
<td class="topAlign"><tt>QChar.Letter_Lowercase</tt></td>
163
<td class=" topAlign"><tt>16</tt></td>
164
<td class="topAlign">Unicode class name Ll</td>
167
<td class="topAlign"><tt>QChar.Letter_Titlecase</tt></td>
168
<td class=" topAlign"><tt>17</tt></td>
169
<td class="topAlign">Unicode class name Lt</td>
172
<td class="topAlign"><tt>QChar.Letter_Modifier</tt></td>
173
<td class=" topAlign"><tt>18</tt></td>
174
<td class="topAlign">Unicode class name Lm</td>
177
<td class="topAlign"><tt>QChar.Letter_Other</tt></td>
178
<td class=" topAlign"><tt>19</tt></td>
179
<td class="topAlign">Unicode class name Lo</td>
182
<td class="topAlign"><tt>QChar.Punctuation_Connector</tt></td>
183
<td class=" topAlign"><tt>20</tt></td>
184
<td class="topAlign">Unicode class name Pc</td>
187
<td class="topAlign"><tt>QChar.Punctuation_Dash</tt></td>
188
<td class=" topAlign"><tt>21</tt></td>
189
<td class="topAlign">Unicode class name Pd</td>
192
<td class="topAlign"><tt>QChar.Punctuation_Open</tt></td>
193
<td class=" topAlign"><tt>22</tt></td>
194
<td class="topAlign">Unicode class name Ps</td>
197
<td class="topAlign"><tt>QChar.Punctuation_Close</tt></td>
198
<td class=" topAlign"><tt>23</tt></td>
199
<td class="topAlign">Unicode class name Pe</td>
202
<td class="topAlign"><tt>QChar.Punctuation_InitialQuote</tt></td>
203
<td class=" topAlign"><tt>24</tt></td>
204
<td class="topAlign">Unicode class name Pi</td>
207
<td class="topAlign"><tt>QChar.Punctuation_FinalQuote</tt></td>
208
<td class=" topAlign"><tt>25</tt></td>
209
<td class="topAlign">Unicode class name Pf</td>
212
<td class="topAlign"><tt>QChar.Punctuation_Other</tt></td>
213
<td class=" topAlign"><tt>26</tt></td>
214
<td class="topAlign">Unicode class name Po</td>
217
<td class="topAlign"><tt>QChar.Symbol_Math</tt></td>
218
<td class=" topAlign"><tt>27</tt></td>
219
<td class="topAlign">Unicode class name Sm</td>
222
<td class="topAlign"><tt>QChar.Symbol_Currency</tt></td>
223
<td class=" topAlign"><tt>28</tt></td>
224
<td class="topAlign">Unicode class name Sc</td>
227
<td class="topAlign"><tt>QChar.Symbol_Modifier</tt></td>
228
<td class=" topAlign"><tt>29</tt></td>
229
<td class="topAlign">Unicode class name Sk</td>
232
<td class="topAlign"><tt>QChar.Symbol_Other</tt></td>
233
<td class=" topAlign"><tt>30</tt></td>
234
<td class="topAlign">Unicode class name So</td>
237
<td class="topAlign"><tt>QChar.NoCategory</tt></td>
238
<td class=" topAlign"><tt>0</tt></td>
239
<td class="topAlign">Qt cannot find an appropriate category for the
60
243
<p>See also <a href="qchar.html#category">category</a>().</p>
61
<a name="//apple_ref/cpp/tag/QChar/Decomposition" />
62
<a name="//apple_ref/cpp/econst/QChar/NoDecomposition" />
63
<a name="//apple_ref/cpp/econst/QChar/Canonical" />
64
<a name="//apple_ref/cpp/econst/QChar/Circle" />
65
<a name="//apple_ref/cpp/econst/QChar/Compat" />
66
<a name="//apple_ref/cpp/econst/QChar/Final" />
67
<a name="//apple_ref/cpp/econst/QChar/Font" />
68
<a name="//apple_ref/cpp/econst/QChar/Fraction" />
69
<a name="//apple_ref/cpp/econst/QChar/Initial" />
70
<a name="//apple_ref/cpp/econst/QChar/Isolated" />
71
<a name="//apple_ref/cpp/econst/QChar/Medial" />
72
<a name="//apple_ref/cpp/econst/QChar/Narrow" />
73
<a name="//apple_ref/cpp/econst/QChar/NoBreak" />
74
<a name="//apple_ref/cpp/econst/QChar/Small" />
75
<a name="//apple_ref/cpp/econst/QChar/Square" />
76
<a name="//apple_ref/cpp/econst/QChar/Sub" />
77
<a name="//apple_ref/cpp/econst/QChar/Super" />
78
<a name="//apple_ref/cpp/econst/QChar/Vertical" />
79
<a name="//apple_ref/cpp/econst/QChar/Wide" />
80
<a name="//apple_ref/cpp/econst/QChar/Single" />
81
<h3 class="fn"><a name="CombiningClass-enum" />QChar.CombiningClass</h3><h3 class="fn"><a name="Decomposition-enum" />QChar.Decomposition</h3><p>This enum type defines the Unicode decomposition attributes. See the <a href="http://www.unicode.org/">Unicode Standard</a> for a description of the values.</p>
82
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="40%">
83
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
84
<tr><td valign="top"><tt>QChar.NoDecomposition</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
85
<tr><td valign="top"><tt>QChar.Canonical</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
86
<tr><td valign="top"><tt>QChar.Circle</tt></td><td align="center" valign="top"><tt>8</tt></td></tr>
87
<tr><td valign="top"><tt>QChar.Compat</tt></td><td align="center" valign="top"><tt>16</tt></td></tr>
88
<tr><td valign="top"><tt>QChar.Final</tt></td><td align="center" valign="top"><tt>6</tt></td></tr>
89
<tr><td valign="top"><tt>QChar.Font</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
90
<tr><td valign="top"><tt>QChar.Fraction</tt></td><td align="center" valign="top"><tt>17</tt></td></tr>
91
<tr><td valign="top"><tt>QChar.Initial</tt></td><td align="center" valign="top"><tt>4</tt></td></tr>
92
<tr><td valign="top"><tt>QChar.Isolated</tt></td><td align="center" valign="top"><tt>7</tt></td></tr>
93
<tr><td valign="top"><tt>QChar.Medial</tt></td><td align="center" valign="top"><tt>5</tt></td></tr>
94
<tr><td valign="top"><tt>QChar.Narrow</tt></td><td align="center" valign="top"><tt>13</tt></td></tr>
95
<tr><td valign="top"><tt>QChar.NoBreak</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
96
<tr><td valign="top"><tt>QChar.Small</tt></td><td align="center" valign="top"><tt>14</tt></td></tr>
97
<tr><td valign="top"><tt>QChar.Square</tt></td><td align="center" valign="top"><tt>15</tt></td></tr>
98
<tr><td valign="top"><tt>QChar.Sub</tt></td><td align="center" valign="top"><tt>10</tt></td></tr>
99
<tr><td valign="top"><tt>QChar.Super</tt></td><td align="center" valign="top"><tt>9</tt></td></tr>
100
<tr><td valign="top"><tt>QChar.Vertical</tt></td><td align="center" valign="top"><tt>11</tt></td></tr>
101
<tr><td valign="top"><tt>QChar.Wide</tt></td><td align="center" valign="top"><tt>12</tt></td></tr>
246
<h3 class="fn"><a name="CombiningClass-enum" />QChar.CombiningClass</h3><h3 class="fn"><a name="Decomposition-enum" />QChar.Decomposition</h3><p>This enum type defines the Unicode decomposition attributes. See
247
the <a href="http://www.unicode.org/">Unicode Standard</a> for a
248
description of the values.</p>
249
<table class="valuelist">
251
<th class="tblConst">Constant</th>
252
<th class="tblVal">Value</th>
255
<td class="topAlign"><tt>QChar.NoDecomposition</tt></td>
256
<td class=" topAlign"><tt>0</tt></td>
259
<td class="topAlign"><tt>QChar.Canonical</tt></td>
260
<td class=" topAlign"><tt>1</tt></td>
263
<td class="topAlign"><tt>QChar.Circle</tt></td>
264
<td class=" topAlign"><tt>8</tt></td>
267
<td class="topAlign"><tt>QChar.Compat</tt></td>
268
<td class=" topAlign"><tt>16</tt></td>
271
<td class="topAlign"><tt>QChar.Final</tt></td>
272
<td class=" topAlign"><tt>6</tt></td>
275
<td class="topAlign"><tt>QChar.Font</tt></td>
276
<td class=" topAlign"><tt>2</tt></td>
279
<td class="topAlign"><tt>QChar.Fraction</tt></td>
280
<td class=" topAlign"><tt>17</tt></td>
283
<td class="topAlign"><tt>QChar.Initial</tt></td>
284
<td class=" topAlign"><tt>4</tt></td>
287
<td class="topAlign"><tt>QChar.Isolated</tt></td>
288
<td class=" topAlign"><tt>7</tt></td>
291
<td class="topAlign"><tt>QChar.Medial</tt></td>
292
<td class=" topAlign"><tt>5</tt></td>
295
<td class="topAlign"><tt>QChar.Narrow</tt></td>
296
<td class=" topAlign"><tt>13</tt></td>
299
<td class="topAlign"><tt>QChar.NoBreak</tt></td>
300
<td class=" topAlign"><tt>3</tt></td>
303
<td class="topAlign"><tt>QChar.Small</tt></td>
304
<td class=" topAlign"><tt>14</tt></td>
307
<td class="topAlign"><tt>QChar.Square</tt></td>
308
<td class=" topAlign"><tt>15</tt></td>
311
<td class="topAlign"><tt>QChar.Sub</tt></td>
312
<td class=" topAlign"><tt>10</tt></td>
315
<td class="topAlign"><tt>QChar.Super</tt></td>
316
<td class=" topAlign"><tt>9</tt></td>
319
<td class="topAlign"><tt>QChar.Vertical</tt></td>
320
<td class=" topAlign"><tt>11</tt></td>
323
<td class="topAlign"><tt>QChar.Wide</tt></td>
324
<td class=" topAlign"><tt>12</tt></td>
103
327
<p>See also <a href="qchar.html#decomposition">decomposition</a>().</p>
104
<a name="//apple_ref/cpp/tag/QChar/Direction" />
105
<a name="//apple_ref/cpp/econst/QChar/DirAL" />
106
<a name="//apple_ref/cpp/econst/QChar/DirAN" />
107
<a name="//apple_ref/cpp/econst/QChar/DirB" />
108
<a name="//apple_ref/cpp/econst/QChar/DirBN" />
109
<a name="//apple_ref/cpp/econst/QChar/DirCS" />
110
<a name="//apple_ref/cpp/econst/QChar/DirEN" />
111
<a name="//apple_ref/cpp/econst/QChar/DirES" />
112
<a name="//apple_ref/cpp/econst/QChar/DirET" />
113
<a name="//apple_ref/cpp/econst/QChar/DirL" />
114
<a name="//apple_ref/cpp/econst/QChar/DirLRE" />
115
<a name="//apple_ref/cpp/econst/QChar/DirLRO" />
116
<a name="//apple_ref/cpp/econst/QChar/DirNSM" />
117
<a name="//apple_ref/cpp/econst/QChar/DirON" />
118
<a name="//apple_ref/cpp/econst/QChar/DirPDF" />
119
<a name="//apple_ref/cpp/econst/QChar/DirR" />
120
<a name="//apple_ref/cpp/econst/QChar/DirRLE" />
121
<a name="//apple_ref/cpp/econst/QChar/DirRLO" />
122
<a name="//apple_ref/cpp/econst/QChar/DirS" />
123
<a name="//apple_ref/cpp/econst/QChar/DirWS" />
124
<h3 class="fn"><a name="Direction-enum" />QChar.Direction</h3><p>This enum type defines the Unicode direction attributes. See the <a href="http://www.unicode.org/">Unicode Standard</a> for a description of the values.</p>
125
<p>In order to conform to C/C++ naming conventions "Dir" is prepended to the codes used in the Unicode Standard.</p>
126
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="40%">
127
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
128
<tr><td valign="top"><tt>QChar.DirAL</tt></td><td align="center" valign="top"><tt>13</tt></td></tr>
129
<tr><td valign="top"><tt>QChar.DirAN</tt></td><td align="center" valign="top"><tt>5</tt></td></tr>
130
<tr><td valign="top"><tt>QChar.DirB</tt></td><td align="center" valign="top"><tt>7</tt></td></tr>
131
<tr><td valign="top"><tt>QChar.DirBN</tt></td><td align="center" valign="top"><tt>18</tt></td></tr>
132
<tr><td valign="top"><tt>QChar.DirCS</tt></td><td align="center" valign="top"><tt>6</tt></td></tr>
133
<tr><td valign="top"><tt>QChar.DirEN</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
134
<tr><td valign="top"><tt>QChar.DirES</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
135
<tr><td valign="top"><tt>QChar.DirET</tt></td><td align="center" valign="top"><tt>4</tt></td></tr>
136
<tr><td valign="top"><tt>QChar.DirL</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
137
<tr><td valign="top"><tt>QChar.DirLRE</tt></td><td align="center" valign="top"><tt>11</tt></td></tr>
138
<tr><td valign="top"><tt>QChar.DirLRO</tt></td><td align="center" valign="top"><tt>12</tt></td></tr>
139
<tr><td valign="top"><tt>QChar.DirNSM</tt></td><td align="center" valign="top"><tt>17</tt></td></tr>
140
<tr><td valign="top"><tt>QChar.DirON</tt></td><td align="center" valign="top"><tt>10</tt></td></tr>
141
<tr><td valign="top"><tt>QChar.DirPDF</tt></td><td align="center" valign="top"><tt>16</tt></td></tr>
142
<tr><td valign="top"><tt>QChar.DirR</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
143
<tr><td valign="top"><tt>QChar.DirRLE</tt></td><td align="center" valign="top"><tt>14</tt></td></tr>
144
<tr><td valign="top"><tt>QChar.DirRLO</tt></td><td align="center" valign="top"><tt>15</tt></td></tr>
145
<tr><td valign="top"><tt>QChar.DirS</tt></td><td align="center" valign="top"><tt>8</tt></td></tr>
146
<tr><td valign="top"><tt>QChar.DirWS</tt></td><td align="center" valign="top"><tt>9</tt></td></tr>
330
<h3 class="fn"><a name="Direction-enum" />QChar.Direction</h3><p>This enum type defines the Unicode direction attributes. See the
331
<a href="http://www.unicode.org/">Unicode Standard</a> for a
332
description of the values.</p>
333
<p>In order to conform to C/C++ naming conventions "Dir" is
334
prepended to the codes used in the Unicode Standard.</p>
335
<table class="valuelist">
337
<th class="tblConst">Constant</th>
338
<th class="tblVal">Value</th>
341
<td class="topAlign"><tt>QChar.DirAL</tt></td>
342
<td class=" topAlign"><tt>13</tt></td>
345
<td class="topAlign"><tt>QChar.DirAN</tt></td>
346
<td class=" topAlign"><tt>5</tt></td>
349
<td class="topAlign"><tt>QChar.DirB</tt></td>
350
<td class=" topAlign"><tt>7</tt></td>
353
<td class="topAlign"><tt>QChar.DirBN</tt></td>
354
<td class=" topAlign"><tt>18</tt></td>
357
<td class="topAlign"><tt>QChar.DirCS</tt></td>
358
<td class=" topAlign"><tt>6</tt></td>
361
<td class="topAlign"><tt>QChar.DirEN</tt></td>
362
<td class=" topAlign"><tt>2</tt></td>
365
<td class="topAlign"><tt>QChar.DirES</tt></td>
366
<td class=" topAlign"><tt>3</tt></td>
369
<td class="topAlign"><tt>QChar.DirET</tt></td>
370
<td class=" topAlign"><tt>4</tt></td>
373
<td class="topAlign"><tt>QChar.DirL</tt></td>
374
<td class=" topAlign"><tt>0</tt></td>
377
<td class="topAlign"><tt>QChar.DirLRE</tt></td>
378
<td class=" topAlign"><tt>11</tt></td>
381
<td class="topAlign"><tt>QChar.DirLRO</tt></td>
382
<td class=" topAlign"><tt>12</tt></td>
385
<td class="topAlign"><tt>QChar.DirNSM</tt></td>
386
<td class=" topAlign"><tt>17</tt></td>
389
<td class="topAlign"><tt>QChar.DirON</tt></td>
390
<td class=" topAlign"><tt>10</tt></td>
393
<td class="topAlign"><tt>QChar.DirPDF</tt></td>
394
<td class=" topAlign"><tt>16</tt></td>
397
<td class="topAlign"><tt>QChar.DirR</tt></td>
398
<td class=" topAlign"><tt>1</tt></td>
401
<td class="topAlign"><tt>QChar.DirRLE</tt></td>
402
<td class=" topAlign"><tt>14</tt></td>
405
<td class="topAlign"><tt>QChar.DirRLO</tt></td>
406
<td class=" topAlign"><tt>15</tt></td>
409
<td class="topAlign"><tt>QChar.DirS</tt></td>
410
<td class=" topAlign"><tt>8</tt></td>
413
<td class="topAlign"><tt>QChar.DirWS</tt></td>
414
<td class=" topAlign"><tt>9</tt></td>
148
417
<p>See also <a href="qchar.html#direction">direction</a>().</p>
149
<a name="//apple_ref/cpp/tag/QChar/Joining" />
150
<a name="//apple_ref/cpp/econst/QChar/Center" />
151
<a name="//apple_ref/cpp/econst/QChar/Dual" />
152
<a name="//apple_ref/cpp/econst/QChar/OtherJoining" />
153
<a name="//apple_ref/cpp/econst/QChar/Right" />
154
<h3 class="fn"><a name="Joining-enum" />QChar.Joining</h3><p>This enum type defines the Unicode joining attributes. See the <a href="http://www.unicode.org/">Unicode Standard</a> for a description of the values.</p>
155
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="40%">
156
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
157
<tr><td valign="top"><tt>QChar.Center</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
158
<tr><td valign="top"><tt>QChar.Dual</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
159
<tr><td valign="top"><tt>QChar.OtherJoining</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
160
<tr><td valign="top"><tt>QChar.Right</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
420
<h3 class="fn"><a name="Joining-enum" />QChar.Joining</h3><p>This enum type defines the Unicode joining attributes. See the
421
<a href="http://www.unicode.org/">Unicode Standard</a> for a
422
description of the values.</p>
423
<table class="valuelist">
425
<th class="tblConst">Constant</th>
426
<th class="tblVal">Value</th>
429
<td class="topAlign"><tt>QChar.Center</tt></td>
430
<td class=" topAlign"><tt>3</tt></td>
433
<td class="topAlign"><tt>QChar.Dual</tt></td>
434
<td class=" topAlign"><tt>1</tt></td>
437
<td class="topAlign"><tt>QChar.OtherJoining</tt></td>
438
<td class=" topAlign"><tt>0</tt></td>
441
<td class="topAlign"><tt>QChar.Right</tt></td>
442
<td class=" topAlign"><tt>2</tt></td>
162
445
<p>See also <a href="qchar.html#joining">joining</a>().</p>
163
<a name="//apple_ref/cpp/tag/QChar/SpecialCharacter" />
164
<a name="//apple_ref/cpp/econst/QChar/Null" />
165
<a name="//apple_ref/cpp/econst/QChar/Nbsp" />
166
<a name="//apple_ref/cpp/econst/QChar/ReplacementCharacter" />
167
<a name="//apple_ref/cpp/econst/QChar/ObjectReplacementCharacter" />
168
<a name="//apple_ref/cpp/econst/QChar/ByteOrderMark" />
169
<a name="//apple_ref/cpp/econst/QChar/ByteOrderSwapped" />
170
<a name="//apple_ref/cpp/econst/QChar/ParagraphSeparator" />
171
<a name="//apple_ref/cpp/econst/QChar/LineSeparator" />
172
<a name="//apple_ref/cpp/econst/QChar/null" />
173
<a name="//apple_ref/cpp/econst/QChar/replacement" />
174
<a name="//apple_ref/cpp/econst/QChar/byteOrderMark" />
175
<a name="//apple_ref/cpp/econst/QChar/byteOrderSwapped" />
176
<a name="//apple_ref/cpp/econst/QChar/nbsp" />
177
<h3 class="fn"><a name="SpecialCharacter-enum" />QChar.SpecialCharacter</h3><p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
178
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
179
<tr><td valign="top"><tt>QChar.Null</tt></td><td align="center" valign="top"><tt>0x0000</tt></td><td valign="top">A <a href="qchar.html">QChar</a> with this value <a href="qchar.html#isNull">isNull</a>().</td></tr>
180
<tr><td valign="top"><tt>QChar.Nbsp</tt></td><td align="center" valign="top"><tt>0x00a0</tt></td><td valign="top">Non-breaking space.</td></tr>
181
<tr><td valign="top"><tt>QChar.ReplacementCharacter</tt></td><td align="center" valign="top"><tt>0xfffd</tt></td><td valign="top">The character shown when a font has no glyph for a certain codepoint. A special question mark character is often used. Codecs use this codepoint when input data cannot be represented in Unicode.</td></tr>
182
<tr><td valign="top"><tt>QChar.ObjectReplacementCharacter</tt></td><td align="center" valign="top"><tt>0xfffc</tt></td><td valign="top">Used to represent an object such as an image when such objects cannot be presented.</td></tr>
183
<tr><td valign="top"><tt>QChar.ByteOrderMark</tt></td><td align="center" valign="top"><tt>0xfeff</tt></td><td valign="top"> </td></tr>
184
<tr><td valign="top"><tt>QChar.ByteOrderSwapped</tt></td><td align="center" valign="top"><tt>0xfffe</tt></td><td valign="top"> </td></tr>
185
<tr><td valign="top"><tt>QChar.ParagraphSeparator</tt></td><td align="center" valign="top"><tt>0x2029</tt></td><td valign="top"> </td></tr>
186
<tr><td valign="top"><tt>QChar.LineSeparator</tt></td><td align="center" valign="top"><tt>0x2028</tt></td><td valign="top"> </td></tr>
188
<a name="//apple_ref/cpp/tag/QChar/UnicodeVersion" />
189
<a name="//apple_ref/cpp/econst/QChar/Unicode_1_1" />
190
<a name="//apple_ref/cpp/econst/QChar/Unicode_2_0" />
191
<a name="//apple_ref/cpp/econst/QChar/Unicode_2_1_2" />
192
<a name="//apple_ref/cpp/econst/QChar/Unicode_3_0" />
193
<a name="//apple_ref/cpp/econst/QChar/Unicode_3_1" />
194
<a name="//apple_ref/cpp/econst/QChar/Unicode_3_2" />
195
<a name="//apple_ref/cpp/econst/QChar/Unicode_4_0" />
196
<a name="//apple_ref/cpp/econst/QChar/Unicode_4_1" />
197
<a name="//apple_ref/cpp/econst/QChar/Unicode_5_0" />
198
<a name="//apple_ref/cpp/econst/QChar/Unicode_Unassigned" />
199
<h3 class="fn"><a name="UnicodeVersion-enum" />QChar.UnicodeVersion</h3><p>Specifies which version of the <a href="http://www.unicode.org/">Unicode standard</a> introduced a certain character.</p>
200
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
201
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
202
<tr><td valign="top"><tt>QChar.Unicode_1_1</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Version 1.1</td></tr>
203
<tr><td valign="top"><tt>QChar.Unicode_2_0</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Version 2.0</td></tr>
204
<tr><td valign="top"><tt>QChar.Unicode_2_1_2</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Version 2.1.2</td></tr>
205
<tr><td valign="top"><tt>QChar.Unicode_3_0</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Version 3.0</td></tr>
206
<tr><td valign="top"><tt>QChar.Unicode_3_1</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">Version 3.1</td></tr>
207
<tr><td valign="top"><tt>QChar.Unicode_3_2</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">Version 3.2</td></tr>
208
<tr><td valign="top"><tt>QChar.Unicode_4_0</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">Version 4.0</td></tr>
209
<tr><td valign="top"><tt>QChar.Unicode_4_1</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Version 4.1</td></tr>
210
<tr><td valign="top"><tt>QChar.Unicode_5_0</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">Version 5.0</td></tr>
211
<tr><td valign="top"><tt>QChar.Unicode_Unassigned</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The value is not assigned to any character in version 5.0 of Unicode.</td></tr>
448
<h3 class="fn"><a name="SpecialCharacter-enum" />QChar.SpecialCharacter</h3><table class="valuelist">
453
<th class="tblConst">Constant</th>
454
<th class="tblval">Value</th>
455
<th class="tbldscr">Description</th>
458
<td class="topAlign"><tt>QChar.Null</tt></td>
459
<td class=" topAlign"><tt>0x0000</tt></td>
460
<td class="topAlign">A <a href="qchar.html">QChar</a> with this
461
value <a href="qchar.html#isNull">isNull</a>().</td>
464
<td class="topAlign"><tt>QChar.Nbsp</tt></td>
465
<td class=" topAlign"><tt>0x00a0</tt></td>
466
<td class="topAlign">Non-breaking space.</td>
469
<td class="topAlign"><tt>QChar.ReplacementCharacter</tt></td>
470
<td class=" topAlign"><tt>0xfffd</tt></td>
471
<td class="topAlign">The character shown when a font has no glyph
472
for a certain codepoint. A special question mark character is often
473
used. Codecs use this codepoint when input data cannot be
474
represented in Unicode.</td>
477
<td class="topAlign">
478
<tt>QChar.ObjectReplacementCharacter</tt></td>
479
<td class=" topAlign"><tt>0xfffc</tt></td>
480
<td class="topAlign">Used to represent an object such as an image
481
when such objects cannot be presented.</td>
484
<td class="topAlign"><tt>QChar.ByteOrderMark</tt></td>
485
<td class=" topAlign"><tt>0xfeff</tt></td>
486
<td class="topAlign"> </td>
489
<td class="topAlign"><tt>QChar.ByteOrderSwapped</tt></td>
490
<td class=" topAlign"><tt>0xfffe</tt></td>
491
<td class="topAlign"> </td>
494
<td class="topAlign"><tt>QChar.ParagraphSeparator</tt></td>
495
<td class=" topAlign"><tt>0x2029</tt></td>
496
<td class="topAlign"> </td>
499
<td class="topAlign"><tt>QChar.LineSeparator</tt></td>
500
<td class=" topAlign"><tt>0x2028</tt></td>
501
<td class="topAlign"> </td>
506
<h3 class="fn"><a name="UnicodeVersion-enum" />QChar.UnicodeVersion</h3><p>Specifies which version of the <a href="http://www.unicode.org/">Unicode standard</a> introduced a certain
508
<table class="valuelist">
513
<th class="tblConst">Constant</th>
514
<th class="tblval">Value</th>
515
<th class="tbldscr">Description</th>
518
<td class="topAlign"><tt>QChar.Unicode_1_1</tt></td>
519
<td class=" topAlign"><tt>1</tt></td>
520
<td class="topAlign">Version 1.1</td>
523
<td class="topAlign"><tt>QChar.Unicode_2_0</tt></td>
524
<td class=" topAlign"><tt>2</tt></td>
525
<td class="topAlign">Version 2.0</td>
528
<td class="topAlign"><tt>QChar.Unicode_2_1_2</tt></td>
529
<td class=" topAlign"><tt>3</tt></td>
530
<td class="topAlign">Version 2.1.2</td>
533
<td class="topAlign"><tt>QChar.Unicode_3_0</tt></td>
534
<td class=" topAlign"><tt>4</tt></td>
535
<td class="topAlign">Version 3.0</td>
538
<td class="topAlign"><tt>QChar.Unicode_3_1</tt></td>
539
<td class=" topAlign"><tt>5</tt></td>
540
<td class="topAlign">Version 3.1</td>
543
<td class="topAlign"><tt>QChar.Unicode_3_2</tt></td>
544
<td class=" topAlign"><tt>6</tt></td>
545
<td class="topAlign">Version 3.2</td>
548
<td class="topAlign"><tt>QChar.Unicode_4_0</tt></td>
549
<td class=" topAlign"><tt>7</tt></td>
550
<td class="topAlign">Version 4.0</td>
553
<td class="topAlign"><tt>QChar.Unicode_4_1</tt></td>
554
<td class=" topAlign"><tt>8</tt></td>
555
<td class="topAlign">Version 4.1</td>
558
<td class="topAlign"><tt>QChar.Unicode_5_0</tt></td>
559
<td class=" topAlign"><tt>9</tt></td>
560
<td class="topAlign">Version 5.0</td>
563
<td class="topAlign"><tt>QChar.Unicode_Unassigned</tt></td>
564
<td class=" topAlign"><tt>0</tt></td>
565
<td class="topAlign">The value is not assigned to any character in
566
version 5.0 of Unicode.</td>
213
569
<p>See also <a href="qchar.html#unicodeVersion">unicodeVersion</a>().</p>
214
570
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QChar" />QChar.__init__ (<i>self</i>)</h3><p>Constructs a null <a href="qchar.html">QChar</a> ('\0').</p>
215
571
<p>See also <a href="qchar.html#isNull">isNull</a>().</p>
216
<h3 class="fn"><a name="QChar-2" />QChar.__init__ (<i>self</i>, str)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to ASCII/Latin-1 character <i>ch</i>.</p>
217
<h3 class="fn"><a name="QChar-3" />QChar.__init__ (<i>self</i>, <a href="qlatin1char.html">QLatin1Char</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to ASCII/Latin-1 character <i>ch</i>.</p>
218
<h3 class="fn"><a name="QChar-4" />QChar.__init__ (<i>self</i>, str, str)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to ASCII/Latin-1 character <i>ch</i>.</p>
219
<h3 class="fn"><a name="QChar-5" />QChar.__init__ (<i>self</i>, int)</h3><p>Constructs a <a href="qchar.html">QChar</a> for Unicode cell <i>cell</i> in row <i>row</i>.</p>
574
<h3 class="fn"><a name="QChar-2" />QChar.__init__ (<i>self</i>, str)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to
575
ASCII/Latin-1 character <i>ch</i>.</p>
578
<h3 class="fn"><a name="QChar-3" />QChar.__init__ (<i>self</i>, <a href="qlatin1char.html">QLatin1Char</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to
579
ASCII/Latin-1 character <i>ch</i>.</p>
582
<h3 class="fn"><a name="QChar-4" />QChar.__init__ (<i>self</i>, str, str)</h3><p>Constructs a <a href="qchar.html">QChar</a> corresponding to
583
ASCII/Latin-1 character <i>ch</i>.</p>
586
<h3 class="fn"><a name="QChar-5" />QChar.__init__ (<i>self</i>, int)</h3><p>Constructs a <a href="qchar.html">QChar</a> for Unicode cell
587
<i>cell</i> in row <i>row</i>.</p>
220
588
<p>See also <a href="qchar.html#cell">cell</a>() and <a href="qchar.html#row">row</a>().</p>
221
<h3 class="fn"><a name="QChar-6" />QChar.__init__ (<i>self</i>, <a href="qchar.html#SpecialCharacter-enum">SpecialCharacter</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> for the character with Unicode code point <i>code</i>.</p>
222
<h3 class="fn"><a name="QChar-7" />QChar.__init__ (<i>self</i>, <a href="qchar.html">QChar</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> for the character with Unicode code point <i>code</i>.</p>
591
<h3 class="fn"><a name="QChar-6" />QChar.__init__ (<i>self</i>, <a href="qchar.html#SpecialCharacter-enum">SpecialCharacter</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> for the character
592
with Unicode code point <i>code</i>.</p>
595
<h3 class="fn"><a name="QChar-7" />QChar.__init__ (<i>self</i>, <a href="qchar.html">QChar</a>)</h3><p>Constructs a <a href="qchar.html">QChar</a> for the character
596
with Unicode code point <i>code</i>.</p>
223
599
<h3 class="fn"><a name="category" /><a href="qchar.html#Category-enum">Category</a> QChar.category (<i>self</i>)</h3><p>Returns the character's category.</p>
224
602
<h3 class="fn"><a name="category-2" /><a href="qchar.html#Category-enum">Category</a> QChar.category (int)</h3><p>This is an overloaded function.</p>
225
<p>Returns the category of the UCS-4-encoded character specified by <i>ucs4</i>.</p>
603
<p>Returns the category of the UCS-4-encoded character specified by
226
605
<p>This function was introduced in Qt 4.3.</p>
227
<h3 class="fn"><a name="cell" />str QChar.cell (<i>self</i>)</h3><p>Returns the cell (least significant byte) of the Unicode character.</p>
608
<h3 class="fn"><a name="cell" />str QChar.cell (<i>self</i>)</h3><p>Returns the cell (least significant byte) of the Unicode
228
610
<p>See also <a href="qchar.html#row">row</a>().</p>
229
<a name="//apple_ref/cpp/instm/QChar/combiningClass" />
230
<h3 class="fn"><a name="combiningClass" />str QChar.combiningClass (<i>self</i>)</h3><p>Returns the combining class for the character as defined in the Unicode standard. This is mainly useful as a positioning hint for marks attached to a base character.</p>
231
<p>The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.</p>
613
<h3 class="fn"><a name="combiningClass" />str QChar.combiningClass (<i>self</i>)</h3><p>Returns the combining class for the character as defined in the
614
Unicode standard. This is mainly useful as a positioning hint for
615
marks attached to a base character.</p>
616
<p>The Qt text rendering engine uses this information to correctly
617
position non-spacing marks around a base character.</p>
232
620
<h3 class="fn"><a name="combiningClass-2" />str QChar.combiningClass (int)</h3><p>This is an overloaded function.</p>
233
<p>Returns the combining class for the UCS-4-encoded character specified by <i>ucs4</i>, as defined in the Unicode standard.</p>
234
<h3 class="fn"><a name="decomposition" />QString QChar.decomposition (<i>self</i>)</h3><p>Decomposes a character into its parts. Returns an empty string if no decomposition exists.</p>
621
<p>Returns the combining class for the UCS-4-encoded character
622
specified by <i>ucs4</i>, as defined in the Unicode standard.</p>
625
<h3 class="fn"><a name="decomposition" />QString QChar.decomposition (<i>self</i>)</h3><p>Decomposes a character into its parts. Returns an empty string
626
if no decomposition exists.</p>
235
629
<h3 class="fn"><a name="decomposition-2" />QString QChar.decomposition (int)</h3><p>This is an overloaded function.</p>
236
<p>Decomposes the UCS-4-encoded character specified by <i>ucs4</i> into its constituent parts. Returns an empty string if no decomposition exists.</p>
237
<a name="//apple_ref/cpp/instm/QChar/decompositionTag" />
238
<h3 class="fn"><a name="decompositionTag" /><a href="qchar.html#Decomposition-enum">Decomposition</a> QChar.decompositionTag (<i>self</i>)</h3><p>Returns the tag defining the composition of the character. Returns <a href="qchar.html#Decomposition-enum">QChar.Single</a> if no decomposition exists.</p>
630
<p>Decomposes the UCS-4-encoded character specified by <i>ucs4</i>
631
into its constituent parts. Returns an empty string if no
632
decomposition exists.</p>
635
<h3 class="fn"><a name="decompositionTag" /><a href="qchar.html#Decomposition-enum">Decomposition</a> QChar.decompositionTag (<i>self</i>)</h3><p>Returns the tag defining the composition of the character.
636
Returns <a href="qchar.html#Decomposition-enum">QChar.Single</a>
637
if no decomposition exists.</p>
239
640
<h3 class="fn"><a name="decompositionTag-2" /><a href="qchar.html#Decomposition-enum">Decomposition</a> QChar.decompositionTag (int)</h3><p>This is an overloaded function.</p>
240
<p>Returns the tag defining the composition of the UCS-4-encoded character specified by <i>ucs4</i>. Returns <a href="qchar.html#Decomposition-enum">QChar.Single</a> if no decomposition exists.</p>
241
<a name="//apple_ref/cpp/instm/QChar/digitValue" />
242
<h3 class="fn"><a name="digitValue" />int QChar.digitValue (<i>self</i>)</h3><p>Returns the numeric value of the digit, or -1 if the character is not a digit.</p>
641
<p>Returns the tag defining the composition of the UCS-4-encoded
642
character specified by <i>ucs4</i>. Returns <a href="qchar.html#Decomposition-enum">QChar.Single</a> if no
643
decomposition exists.</p>
646
<h3 class="fn"><a name="digitValue" />int QChar.digitValue (<i>self</i>)</h3><p>Returns the numeric value of the digit, or -1 if the character
243
650
<h3 class="fn"><a name="digitValue-2" />int QChar.digitValue (int)</h3><p>This is an overloaded function.</p>
244
<p>Returns the numeric value of the digit, specified by the UCS-2-encoded character, <i>ucs2</i>, or -1 if the character is not a digit.</p>
651
<p>Returns the numeric value of the digit, specified by the
652
UCS-2-encoded character, <i>ucs2</i>, or -1 if the character is not
245
656
<h3 class="fn"><a name="direction" /><a href="qchar.html#Direction-enum">Direction</a> QChar.direction (<i>self</i>)</h3><p>Returns the character's direction.</p>
246
659
<h3 class="fn"><a name="direction-2" /><a href="qchar.html#Direction-enum">Direction</a> QChar.direction (int)</h3><p>This is an overloaded function.</p>
247
<p>Returns the direction of the UCS-4-encoded character specified by <i>ucs4</i>.</p>
248
<h3 class="fn"><a name="fromAscii" />QChar QChar.fromAscii (str)</h3><p>Converts the ASCII character <i>c</i> to its equivalent <a href="qchar.html">QChar</a>. This is mainly useful for non-internationalized software.</p>
660
<p>Returns the direction of the UCS-4-encoded character specified
664
<h3 class="fn"><a name="fromAscii" />QChar QChar.fromAscii (str)</h3><p>Converts the ASCII character <i>c</i> to its equivalent <a href="qchar.html">QChar</a>. This is mainly useful for
665
non-internationalized software.</p>
249
666
<p>An alternative is to use <a href="qlatin1char.html">QLatin1Char</a>.</p>
250
<p>See also <a href="qchar.html#fromLatin1">fromLatin1</a>(), <a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
251
<a name="//apple_ref/cpp/clm/QChar/fromLatin1" />
252
<h3 class="fn"><a name="fromLatin1" />QChar QChar.fromLatin1 (str)</h3><p>Converts the Latin-1 character <i>c</i> to its equivalent <a href="qchar.html">QChar</a>. This is mainly useful for non-internationalized software.</p>
253
<p>See also <a href="qchar.html#fromAscii">fromAscii</a>(), <a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
254
<a name="//apple_ref/cpp/instm/QChar/hasMirrored" />
255
<h3 class="fn"><a name="hasMirrored" />bool QChar.hasMirrored (<i>self</i>)</h3><p>Returns true if the character should be reversed if the text direction is reversed; otherwise returns false.</p>
256
<p>Same as (ch.<a href="qchar.html#mirroredChar">mirroredChar</a>() != ch).</p>
667
<p>See also <a href="qchar.html#fromLatin1">fromLatin1</a>(),
668
<a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
671
<h3 class="fn"><a name="fromLatin1" />QChar QChar.fromLatin1 (str)</h3><p>Converts the Latin-1 character <i>c</i> to its equivalent
672
<a href="qchar.html">QChar</a>. This is mainly useful for
673
non-internationalized software.</p>
674
<p>See also <a href="qchar.html#fromAscii">fromAscii</a>(),
675
<a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
678
<h3 class="fn"><a name="hasMirrored" />bool QChar.hasMirrored (<i>self</i>)</h3><p>Returns true if the character should be reversed if the text
679
direction is reversed; otherwise returns false.</p>
680
<p>Same as (ch.<a href="qchar.html#mirroredChar">mirroredChar</a>()
257
682
<p>See also <a href="qchar.html#mirroredChar">mirroredChar</a>().</p>
258
<a name="//apple_ref/cpp/clm/QChar/highSurrogate" />
259
<h3 class="fn"><a name="highSurrogate" />int QChar.highSurrogate (int)</h3><p>Returns the high surrogate value of a ucs4 code point. The returned result is undefined if <i>ucs4</i> is smaller than 0x10000.</p>
260
<a name="//apple_ref/cpp/instm/QChar/isDigit" />
261
<h3 class="fn"><a name="isDigit" />bool QChar.isDigit (<i>self</i>)</h3><p>Returns true if the character is a decimal digit (<a href="qchar.html#Category-enum">Number_DecimalDigit</a>); otherwise returns false.</p>
262
<a name="//apple_ref/cpp/instm/QChar/isHighSurrogate" />
263
<h3 class="fn"><a name="isHighSurrogate" />bool QChar.isHighSurrogate (<i>self</i>)</h3><p>Returns true if the <a href="qchar.html">QChar</a> is the high part of a utf16 surrogate (ie. if its code point is between 0xd800 and 0xdbff).</p>
264
<a name="//apple_ref/cpp/instm/QChar/isLetter" />
265
<h3 class="fn"><a name="isLetter" />bool QChar.isLetter (<i>self</i>)</h3><p>Returns true if the character is a letter (Letter_* categories); otherwise returns false.</p>
266
<a name="//apple_ref/cpp/instm/QChar/isLetterOrNumber" />
267
<h3 class="fn"><a name="isLetterOrNumber" />bool QChar.isLetterOrNumber (<i>self</i>)</h3><p>Returns true if the character is a letter or number (Letter_* or <a href="stylesheet-reference.html#number">Number_</a>* categories); otherwise returns false.</p>
268
<a name="//apple_ref/cpp/instm/QChar/isLowSurrogate" />
269
<h3 class="fn"><a name="isLower" />bool QChar.isLower (<i>self</i>)</h3><p>Returns true if the character is a lowercase letter, i.e. <a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Lowercase</a>.</p>
685
<h3 class="fn"><a name="highSurrogate" />int QChar.highSurrogate (int)</h3><p>Returns the high surrogate value of a ucs4 code point. The
686
returned result is undefined if <i>ucs4</i> is smaller than
690
<h3 class="fn"><a name="isDigit" />bool QChar.isDigit (<i>self</i>)</h3><p>Returns true if the character is a decimal digit (<a href="qchar.html#Category-enum">Number_DecimalDigit</a>); otherwise
694
<h3 class="fn"><a name="isHighSurrogate" />bool QChar.isHighSurrogate (<i>self</i>)</h3><p>Returns true if the <a href="qchar.html">QChar</a> is the high
695
part of a utf16 surrogate (ie. if its code point is between 0xd800
696
and 0xdbff, inclusive).</p>
699
<h3 class="fn"><a name="isHighSurrogate-2" />bool QChar.isHighSurrogate (int <i>ucs4</i>)</h3><p>Returns true if the UCS-4-encoded character specified by
700
<i>ucs4</i> is the high part of a utf16 surrogate (ie. if its code
701
point is between 0xd800 and 0xdbff, inclusive).</p>
702
<p>This function was introduced in Qt 4.7.</p>
705
<h3 class="fn"><a name="isLetter" />bool QChar.isLetter (<i>self</i>)</h3><p>Returns true if the character is a letter (Letter_* categories);
706
otherwise returns false.</p>
709
<h3 class="fn"><a name="isLetterOrNumber" />bool QChar.isLetterOrNumber (<i>self</i>)</h3><p>Returns true if the character is a letter or number (Letter_* or
710
<a href="stylesheet-reference.html#number">Number_</a>*
711
categories); otherwise returns false.</p>
714
<h3 class="fn"><a name="isLower" />bool QChar.isLower (<i>self</i>)</h3><p>Returns true if the character is a lowercase letter, i.e.
715
<a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Lowercase</a>.</p>
270
716
<p>See also <a href="qchar.html#isUpper">isUpper</a>(), <a href="qchar.html#toLower">toLower</a>(), and <a href="qchar.html#toUpper">toUpper</a>().</p>
271
<a name="//apple_ref/cpp/instm/QChar/isMark" />
272
<h3 class="fn"><a name="isLowSurrogate" />bool QChar.isLowSurrogate (<i>self</i>)</h3><p>Returns true if the <a href="qchar.html">QChar</a> is the low part of a utf16 surrogate (ie. if its code point is between 0xdc00 and 0xdfff).</p>
273
<a name="//apple_ref/cpp/instm/QChar/isLower" />
274
<h3 class="fn"><a name="isMark" />bool QChar.isMark (<i>self</i>)</h3><p>Returns true if the character is a mark (Mark_* categories); otherwise returns false.</p>
275
<p>See <a href="qchar.html#Category-enum">QChar.Category</a> for more information regarding marks.</p>
276
<a name="//apple_ref/cpp/instm/QChar/isNull" />
277
<h3 class="fn"><a name="isNull" />bool QChar.isNull (<i>self</i>)</h3><p>Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false.</p>
278
<a name="//apple_ref/cpp/instm/QChar/isNumber" />
279
<h3 class="fn"><a name="isNumber" />bool QChar.isNumber (<i>self</i>)</h3><p>Returns true if the character is a number (<a href="stylesheet-reference.html#number">Number_</a>* categories, not just 0-9); otherwise returns false.</p>
719
<h3 class="fn"><a name="isLowSurrogate" />bool QChar.isLowSurrogate (<i>self</i>)</h3><p>Returns true if the <a href="qchar.html">QChar</a> is the low
720
part of a utf16 surrogate (ie. if its code point is between 0xdc00
721
and 0xdfff, inclusive).</p>
724
<h3 class="fn"><a name="isLowSurrogate-2" />bool QChar.isLowSurrogate (int <i>ucs4</i>)</h3><p>Returns true if the UCS-4-encoded character specified by
725
<i>ucs4</i> is the high part of a utf16 surrogate (ie. if its code
726
point is between 0xdc00 and 0xdfff, inclusive).</p>
727
<p>This function was introduced in Qt 4.7.</p>
730
<h3 class="fn"><a name="isMark" />bool QChar.isMark (<i>self</i>)</h3><p>Returns true if the character is a mark (Mark_* categories);
731
otherwise returns false.</p>
732
<p>See <a href="qchar.html#Category-enum">QChar.Category</a> for
733
more information regarding marks.</p>
736
<h3 class="fn"><a name="isNull" />bool QChar.isNull (<i>self</i>)</h3><p>Returns true if the character is the Unicode character 0x0000
737
('\0'); otherwise returns false.</p>
740
<h3 class="fn"><a name="isNumber" />bool QChar.isNumber (<i>self</i>)</h3><p>Returns true if the character is a number (<a href="stylesheet-reference.html#number">Number_</a>* categories, not
741
just 0-9); otherwise returns false.</p>
280
742
<p>See also <a href="qchar.html#isDigit">isDigit</a>().</p>
281
<a name="//apple_ref/cpp/instm/QChar/isPrint" />
282
<h3 class="fn"><a name="isPrint" />bool QChar.isPrint (<i>self</i>)</h3><p>Returns true if the character is a printable character; otherwise returns false. This is any character not of category Cc or Cn.</p>
283
<p>Note that this gives no indication of whether the character is available in a particular font.</p>
284
<a name="//apple_ref/cpp/instm/QChar/isPunct" />
285
<h3 class="fn"><a name="isPunct" />bool QChar.isPunct (<i>self</i>)</h3><p>Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns false.</p>
286
<a name="//apple_ref/cpp/instm/QChar/isSpace" />
287
<h3 class="fn"><a name="isSpace" />bool QChar.isSpace (<i>self</i>)</h3><p>Returns true if the character is a separator character (Separator_* categories); otherwise returns false.</p>
288
<a name="//apple_ref/cpp/instm/QChar/isSymbol" />
289
<h3 class="fn"><a name="isSymbol" />bool QChar.isSymbol (<i>self</i>)</h3><p>Returns true if the character is a symbol (Symbol_* categories); otherwise returns false.</p>
290
<a name="//apple_ref/cpp/instm/QChar/isTitleCase" />
291
<h3 class="fn"><a name="isTitleCase" />bool QChar.isTitleCase (<i>self</i>)</h3><p>Returns true if the character is a titlecase letter, i.e. <a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Titlecase</a>.</p>
745
<h3 class="fn"><a name="isPrint" />bool QChar.isPrint (<i>self</i>)</h3><p>Returns true if the character is a printable character;
746
otherwise returns false. This is any character not of category Cc
748
<p>Note that this gives no indication of whether the character is
749
available in a particular font.</p>
752
<h3 class="fn"><a name="isPunct" />bool QChar.isPunct (<i>self</i>)</h3><p>Returns true if the character is a punctuation mark
753
(Punctuation_* categories); otherwise returns false.</p>
756
<h3 class="fn"><a name="isSpace" />bool QChar.isSpace (<i>self</i>)</h3><p>Returns true if the character is a separator character
757
(Separator_* categories); otherwise returns false.</p>
760
<h3 class="fn"><a name="isSymbol" />bool QChar.isSymbol (<i>self</i>)</h3><p>Returns true if the character is a symbol (Symbol_* categories);
761
otherwise returns false.</p>
764
<h3 class="fn"><a name="isTitleCase" />bool QChar.isTitleCase (<i>self</i>)</h3><p>Returns true if the character is a titlecase letter, i.e.
765
<a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Titlecase</a>.</p>
292
766
<p>This function was introduced in Qt 4.3.</p>
293
767
<p>See also <a href="qchar.html#isLower">isLower</a>(), <a href="qchar.html#toUpper">toUpper</a>(), <a href="qchar.html#toLower">toLower</a>(), and <a href="qchar.html#toTitleCase">toTitleCase</a>().</p>
294
<a name="//apple_ref/cpp/instm/QChar/isUpper" />
295
<h3 class="fn"><a name="isUpper" />bool QChar.isUpper (<i>self</i>)</h3><p>Returns true if the character is an uppercase letter, i.e. <a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Uppercase</a>.</p>
770
<h3 class="fn"><a name="isUpper" />bool QChar.isUpper (<i>self</i>)</h3><p>Returns true if the character is an uppercase letter, i.e.
771
<a href="qchar.html#category">category</a>() is <a href="qchar.html#Category-enum">Letter_Uppercase</a>.</p>
296
772
<p>See also <a href="qchar.html#isLower">isLower</a>(), <a href="qchar.html#toUpper">toUpper</a>(), and <a href="qchar.html#toLower">toLower</a>().</p>
297
<a name="//apple_ref/cpp/instm/QChar/joining" />
298
<h3 class="fn"><a name="joining" /><a href="qchar.html#Joining-enum">Joining</a> QChar.joining (<i>self</i>)</h3><p>Returns information about the joining properties of the character (needed for certain languages such as Arabic).</p>
775
<h3 class="fn"><a name="joining" /><a href="qchar.html#Joining-enum">Joining</a> QChar.joining (<i>self</i>)</h3><p>Returns information about the joining properties of the
776
character (needed for certain languages such as Arabic).</p>
299
779
<h3 class="fn"><a name="joining-2" /><a href="qchar.html#Joining-enum">Joining</a> QChar.joining (int)</h3><p>This is an overloaded function.</p>
300
<p>Returns information about the joining properties of the UCS-4-encoded character specified by <i>ucs4</i> (needed for certain languages such as Arabic).</p>
301
<h3 class="fn"><a name="lowSurrogate" />int QChar.lowSurrogate (int)</h3><p>Returns the low surrogate value of a ucs4 code point. The returned result is undefined if <i>ucs4</i> is smaller than 0x10000.</p>
302
<a name="//apple_ref/cpp/instm/QChar/mirroredChar" />
303
<h3 class="fn"><a name="mirroredChar" />QChar QChar.mirroredChar (<i>self</i>)</h3><p>Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.</p>
780
<p>Returns information about the joining properties of the
781
UCS-4-encoded character specified by <i>ucs4</i> (needed for
782
certain languages such as Arabic).</p>
785
<h3 class="fn"><a name="lowSurrogate" />int QChar.lowSurrogate (int)</h3><p>Returns the low surrogate value of a ucs4 code point. The
786
returned result is undefined if <i>ucs4</i> is smaller than
790
<h3 class="fn"><a name="mirroredChar" />QChar QChar.mirroredChar (<i>self</i>)</h3><p>Returns the mirrored character if this character is a mirrored
791
character; otherwise returns the character itself.</p>
304
792
<p>See also <a href="qchar.html#hasMirrored">hasMirrored</a>().</p>
305
795
<h3 class="fn"><a name="mirroredChar-2" />int QChar.mirroredChar (int)</h3><p>This is an overloaded function.</p>
306
<p>Returns the mirrored character if the UCS-4-encoded character specified by <i>ucs4</i> is a mirrored character; otherwise returns the character itself.</p>
796
<p>Returns the mirrored character if the UCS-4-encoded character
797
specified by <i>ucs4</i> is a mirrored character; otherwise returns
798
the character itself.</p>
307
799
<p>See also <a href="qchar.html#hasMirrored">hasMirrored</a>().</p>
308
<h3 class="fn"><a name="row" />str QChar.row (<i>self</i>)</h3><p>Returns the row (most significant byte) of the Unicode character.</p>
802
<h3 class="fn"><a name="requiresSurrogates" />bool QChar.requiresSurrogates (int <i>ucs4</i>)</h3><p>Returns true if the UCS-4-encoded character specified by
803
<i>ucs4</i> can be splited to the high and low parts of a utf16
804
surrogate (ie. if its code point is greater than or equals to
806
<p>This function was introduced in Qt 4.7.</p>
809
<h3 class="fn"><a name="row" />str QChar.row (<i>self</i>)</h3><p>Returns the row (most significant byte) of the Unicode
309
811
<p>See also <a href="qchar.html#cell">cell</a>().</p>
310
<a name="//apple_ref/cpp/clm/QChar/surrogateToUcs4" />
311
<h3 class="fn"><a name="setCell" />QChar.setCell (<i>self</i>, str)</h3><h3 class="fn"><a name="setRow" />QChar.setRow (<i>self</i>, str)</h3><h3 class="fn"><a name="surrogateToUcs4" />int QChar.surrogateToUcs4 (int, int)</h3><p>Converts a UTF16 surrogate pair with the given <i>high</i> and <i>low</i> values to its UCS-4 code point.</p>
312
<h3 class="fn"><a name="surrogateToUcs4-2" />int QChar.surrogateToUcs4 (QChar, QChar)</h3><p>Converts a utf16 surrogate pair (<i>high</i>, <i>low</i>) to its ucs4 code point.</p>
313
<a name="//apple_ref/cpp/instm/QChar/toAscii" />
314
<h3 class="fn"><a name="toAscii" />str QChar.toAscii (<i>self</i>)</h3><p>Returns the character value of the <a href="qchar.html">QChar</a> obtained using the current codec used to read C strings, or 0 if the character is not representable using this codec. The default codec handles Latin-1 encoded text, but this can be changed to assist developers writing source code using other encodings.</p>
315
<p>The main purpose of this function is to preserve ASCII characters used in C strings. This is mainly useful for developers of non-internationalized software.</p>
814
<h3 class="fn"><a name="setCell" />QChar.setCell (<i>self</i>, str)</h3><h3 class="fn"><a name="setRow" />QChar.setRow (<i>self</i>, str)</h3><h3 class="fn"><a name="surrogateToUcs4" />int QChar.surrogateToUcs4 (int, int)</h3><p>Converts a UTF16 surrogate pair with the given <i>high</i> and
815
<i>low</i> values to its UCS-4 code point.</p>
818
<h3 class="fn"><a name="surrogateToUcs4-2" />int QChar.surrogateToUcs4 (QChar, QChar)</h3><p>Converts a utf16 surrogate pair (<i>high</i>, <i>low</i>) to its
822
<h3 class="fn"><a name="toAscii" />str QChar.toAscii (<i>self</i>)</h3><p>Returns the character value of the <a href="qchar.html">QChar</a> obtained using the current codec used to
823
read C strings, or 0 if the character is not representable using
824
this codec. The default codec handles Latin-1 encoded text, but
825
this can be changed to assist developers writing source code using
827
<p>The main purpose of this function is to preserve ASCII
828
characters used in C strings. This is mainly useful for developers
829
of non-internationalized software.</p>
316
830
<p>See also <a href="qchar.html#toLatin1">toLatin1</a>(), <a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
317
<a name="//apple_ref/cpp/instm/QChar/toCaseFolded" />
318
<h3 class="fn"><a name="toCaseFolded" />QChar QChar.toCaseFolded (<i>self</i>)</h3><p>Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLowerCase().</p>
833
<h3 class="fn"><a name="toCaseFolded" />QChar QChar.toCaseFolded (<i>self</i>)</h3><p>Returns the case folded equivalent of the character. For most
834
Unicode characters this is the same as toLowerCase().</p>
319
837
<h3 class="fn"><a name="toCaseFolded-2" />int QChar.toCaseFolded (int)</h3><p>This is an overloaded function.</p>
320
<p>Returns the case folded equivalent of the UCS-4-encoded character specified by <i>ucs4</i>. For most Unicode characters this is the same as toLowerCase().</p>
321
<h3 class="fn"><a name="toLatin1" />str QChar.toLatin1 (<i>self</i>)</h3><p>Returns the Latin-1 character equivalent to the <a href="qchar.html">QChar</a>, or 0. This is mainly useful for non-internationalized software.</p>
838
<p>Returns the case folded equivalent of the UCS-4-encoded
839
character specified by <i>ucs4</i>. For most Unicode characters
840
this is the same as toLowerCase().</p>
843
<h3 class="fn"><a name="toLatin1" />str QChar.toLatin1 (<i>self</i>)</h3><p>Returns the Latin-1 character equivalent to the <a href="qchar.html">QChar</a>, or 0. This is mainly useful for
844
non-internationalized software.</p>
322
845
<p>See also <a href="qchar.html#toAscii">toAscii</a>(), <a href="qchar.html#unicode">unicode</a>(), and <a href="qtextcodec.html#codecForCStrings">QTextCodec.codecForCStrings</a>().</p>
323
<a name="//apple_ref/cpp/instm/QChar/toLower" />
324
<h3 class="fn"><a name="toLower" />QChar QChar.toLower (<i>self</i>)</h3><p>Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.</p>
848
<h3 class="fn"><a name="toLower" />QChar QChar.toLower (<i>self</i>)</h3><p>Returns the lowercase equivalent if the character is uppercase
849
or titlecase; otherwise returns the character itself.</p>
325
852
<h3 class="fn"><a name="toLower-2" />int QChar.toLower (int)</h3><p>This is an overloaded function.</p>
326
<p>Returns the lowercase equivalent of the UCS-4-encoded character specified by <i>ucs4</i> if the character is uppercase or titlecase; otherwise returns the character itself.</p>
327
<h3 class="fn"><a name="toTitleCase" />QChar QChar.toTitleCase (<i>self</i>)</h3><p>Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.</p>
853
<p>Returns the lowercase equivalent of the UCS-4-encoded character
854
specified by <i>ucs4</i> if the character is uppercase or
855
titlecase; otherwise returns the character itself.</p>
858
<h3 class="fn"><a name="toTitleCase" />QChar QChar.toTitleCase (<i>self</i>)</h3><p>Returns the title case equivalent if the character is lowercase
859
or uppercase; otherwise returns the character itself.</p>
328
862
<h3 class="fn"><a name="toTitleCase-2" />int QChar.toTitleCase (int)</h3><p>This is an overloaded function.</p>
329
<p>Returns the title case equivalent of the UCS-4-encoded character specified by <i>ucs4</i> if the character is lowercase or uppercase; otherwise returns the character itself.</p>
330
<h3 class="fn"><a name="toUpper" />QChar QChar.toUpper (<i>self</i>)</h3><p>Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.</p>
863
<p>Returns the title case equivalent of the UCS-4-encoded character
864
specified by <i>ucs4</i> if the character is lowercase or
865
uppercase; otherwise returns the character itself.</p>
868
<h3 class="fn"><a name="toUpper" />QChar QChar.toUpper (<i>self</i>)</h3><p>Returns the uppercase equivalent if the character is lowercase
869
or titlecase; otherwise returns the character itself.</p>
331
872
<h3 class="fn"><a name="toUpper-2" />int QChar.toUpper (int)</h3><p>This is an overloaded function.</p>
332
<p>Returns the uppercase equivalent of the UCS-4-encoded character specified by <i>ucs4</i> if the character is lowercase or titlecase; otherwise returns the character itself.</p>
873
<p>Returns the uppercase equivalent of the UCS-4-encoded character
874
specified by <i>ucs4</i> if the character is lowercase or
875
titlecase; otherwise returns the character itself.</p>
333
878
<h3 class="fn"><a name="unicode" />int QChar.unicode (<i>self</i>)</h3><p>Returns a reference to the numeric Unicode value of the <a href="qchar.html">QChar</a>.</p>
334
881
<h3 class="fn"><a name="unicodeVersion" /><a href="qchar.html#UnicodeVersion-enum">UnicodeVersion</a> QChar.unicodeVersion (<i>self</i>)</h3><p>Returns the Unicode version that introduced this character.</p>
335
884
<h3 class="fn"><a name="unicodeVersion-2" /><a href="qchar.html#UnicodeVersion-enum">UnicodeVersion</a> QChar.unicodeVersion (int)</h3><p>This is an overloaded function.</p>
336
<p>Returns the Unicode version that introduced the character specified in its UCS-4-encoded form as <i>ucs4</i>.</p>
337
<h3 class="fn"><a name="__add__" />QString QChar.__add__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__eq__" />bool QChar.__eq__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__ge__" />bool QChar.__ge__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__gt__" />bool QChar.__gt__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__hash__" />int QChar.__hash__ (<i>self</i>)</h3><h3 class="fn"><a name="__le__" />bool QChar.__le__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__lt__" />bool QChar.__lt__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__ne__" />bool QChar.__ne__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__repr__" />str QChar.__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 4.7.7 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.3</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'
885
<p>Returns the Unicode version that introduced the character
886
specified in its UCS-4-encoded form as <i>ucs4</i>.</p>
889
<h3 class="fn"><a name="__add__" />QString QChar.__add__ (<i>self</i>, QString)</h3><h3 class="fn"><a name="__eq__" />bool QChar.__eq__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__ge__" />bool QChar.__ge__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__gt__" />bool QChar.__gt__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__hash__" />int QChar.__hash__ (<i>self</i>)</h3><h3 class="fn"><a name="__le__" />bool QChar.__le__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__lt__" />bool QChar.__lt__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__ne__" />bool QChar.__ne__ (<i>self</i>, QChar)</h3><h3 class="fn"><a name="__repr__" />str QChar.__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 4.8.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.7.0</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'