Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QChar class provides a 16-bit Unicode character. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QChar () | |
| |
QChar (QLatin1Char ch) | |
| |
QChar (QChar copy) | |
| |
QChar (ushort rc) | |
| |
QChar (short rc) | |
| |
QChar (uint rc) | |
| |
QChar (int rc) | |
| |
QChar (QChar.SpecialCharacter sc) | |
| |
QChar (byte c, byte r) | |
| |
virtual void | CreateProxy () |
new QChar.Category | category () |
| |
new byte | combiningClass () |
| |
new string | decomposition () |
| |
new QChar.Decomposition | DecompositionTag () |
| |
new int | DigitValue () |
| |
new QChar.Direction | direction () |
| |
new bool | HasMirrored () |
| |
new bool | IsDigit () |
| |
new bool | IsHighSurrogate () |
| |
new bool | IsLetter () |
| |
new bool | IsLetterOrNumber () |
| |
new bool | IsLowSurrogate () |
| |
new bool | IsLower () |
| |
new bool | IsMark () |
| |
new bool | IsNull () |
| |
new bool | IsNumber () |
| |
new bool | IsPrint () |
| |
new bool | IsPunct () |
| |
new bool | IsSpace () |
| |
new bool | IsSymbol () |
| |
new bool | IsTitleCase () |
| |
new bool | IsUpper () |
| |
new QChar.Joining | joining () |
| |
new QChar | MirroredChar () |
| |
new sbyte | ToAscii () |
| |
new QChar | ToCaseFolded () |
| |
new sbyte | ToLatin1 () |
| |
new QChar | ToLower () |
| |
new QChar | ToTitleCase () |
| |
new QChar | ToUpper () |
| |
new ushort | Unicode () |
| |
new QChar.UnicodeVersion | unicodeVersion () |
| |
new void | Dispose () |
Static Public Member Functions | |
static QChar.Category | category (uint ucs4) |
| |
static QChar.Category | category (ushort ucs2) |
| |
static byte | combiningClass (uint ucs4) |
| |
static byte | combiningClass (ushort ucs2) |
| |
static QChar.UnicodeVersion | CurrentUnicodeVersion () |
| |
static string | decomposition (uint ucs4) |
| |
static QChar.Decomposition | DecompositionTag (uint ucs4) |
| |
static int | DigitValue (uint ucs4) |
| |
static int | DigitValue (ushort ucs2) |
| |
static QChar.Direction | direction (uint ucs4) |
| |
static QChar.Direction | direction (ushort ucs2) |
| |
static QChar | FromAscii (sbyte c) |
| |
static QChar | FromLatin1 (sbyte c) |
| |
static ushort | HighSurrogate (uint ucs4) |
| |
static bool | IsHighSurrogate (uint ucs4) |
| |
static bool | IsLowSurrogate (uint ucs4) |
| |
static QChar.Joining | joining (uint ucs4) |
| |
static QChar.Joining | joining (ushort ucs2) |
| |
static ushort | LowSurrogate (uint ucs4) |
| |
static uint | MirroredChar (uint ucs4) |
| |
static ushort | MirroredChar (ushort ucs2) |
| |
static bool | RequiresSurrogates (uint ucs4) |
| |
static uint | SurrogateToUcs4 (QChar high, QChar low) |
| |
static uint | SurrogateToUcs4 (ushort high, ushort low) |
| |
static uint | ToCaseFolded (uint ucs4) |
| |
static ushort | ToCaseFolded (ushort ucs2) |
| |
static uint | ToLower (uint ucs4) |
| |
static ushort | ToLower (ushort ucs2) |
| |
static uint | ToTitleCase (uint ucs4) |
| |
static ushort | ToTitleCase (ushort ucs2) |
| |
static uint | ToUpper (uint ucs4) |
| |
static ushort | ToUpper (ushort ucs2) |
| |
static QChar.UnicodeVersion | unicodeVersion (uint ucs4) |
| |
static QChar.UnicodeVersion | unicodeVersion (ushort ucs2) |
| |
static bool | operator!= (QChar arg1, QChar arg2) |
static string | operator+ (QChar arg1, string arg2) |
static bool | operator< (QChar arg1, QChar arg2) |
static bool | operator<= (QChar arg1, QChar arg2) |
static bool | operator== (QChar arg1, QChar arg2) |
static bool | operator> (QChar arg1, QChar arg2) |
static bool | operator>= (QChar arg1, QChar arg2) |
Protected Member Functions | |
QChar (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new byte | Cell [get, set] |
| |
new byte | Row [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
The QChar class provides a 16-bit Unicode character.
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 unsigned short.
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.
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 isNull() (returns true if the character is '\0'), isPrint() (true if the character is any sort of printable character, including whitespace), isPunct() (any sort of punctation), isMark() (Unicode Mark), isLetter() (a letter), isNumber() (any sort of numeric character, not just 0-9), isLetterOrNumber(), and isDigit() (decimal digits). All of these are wrappers around category() which return the Unicode-defined category of each character.
QChar also provides direction(), which indicates the "natural" writing direction of this character. The joining() function indicates how the character joins with its neighbors (needed mostly for Arabic) and finally hasMirrored(), which indicates whether the character needs to be mirrored when it is printed in its "unnatural" writing direction.
Composed Unicode characters (like å) can be converted to decomposed Unicode ("a" followed by "ring above") by using decomposition().
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 toUpper() and toLower() will do case changes when the character has a well-defined uppercase/lowercase equivalent. For locale-dependent comparisons, use QString::localeAwareCompare().
The conversion functions include unicode() (to a scalar), toLatin1() (to scalar, but converts all non-Latin-1 characters to 0), row() (gives the Unicode row), cell() (gives the Unicode cell), digitValue() (gives the integer value of any of the numerous digit characters), and a host of constructors.
QChar provides constructors and cast operators that make it easy to convert to and from traditional 8-bit chars. If you defined QT_NO_CAST_FROM_ASCII and QT_NO_CAST_TO_ASCII, as explained in the QString documentation, you will need to explicitly call fromAscii() or fromLatin1(), or use QLatin1Char, to construct a QChar from an 8-bit char, and you will need to call toAscii() or toLatin1() to get the 8-bit value back.
See also QString, Unicode, and QLatin1Char.
This enum maps the Unicode character categories.
The following characters are normative in Unicode:
The following categories are informative in Unicode:
See also category().
Letter_Lowercase |
Unicode class name Ll |
Letter_Modifier |
Unicode class name Lm |
Letter_Other |
Unicode class name Lo |
Letter_Titlecase |
Unicode class name Lt |
Letter_Uppercase |
Unicode class name Lu |
Mark_Enclosing |
Unicode class name Me |
Mark_NonSpacing |
Unicode class name Mn |
Mark_SpacingCombining |
Unicode class name Mc |
NoCategory |
Qt cannot find an appropriate category for the character. |
Number_DecimalDigit |
Unicode class name Nd |
Number_Letter |
Unicode class name Nl |
Number_Other |
Unicode class name No |
Other_Control |
Unicode class name Cc |
Other_Format |
Unicode class name Cf |
Other_NotAssigned |
Unicode class name Cn |
Other_PrivateUse |
Unicode class name Co |
Other_Surrogate |
Unicode class name Cs |
Punctuation_Close |
Unicode class name Pe |
Punctuation_Connector |
Unicode class name Pc |
Punctuation_Dash |
Unicode class name Pd |
Punctuation_Dask | |
Punctuation_FinalQuote |
Unicode class name Pf |
Punctuation_InitialQuote |
Unicode class name Pi |
Punctuation_Open |
Unicode class name Ps |
Punctuation_Other |
Unicode class name Po |
Separator_Line |
Unicode class name Zl |
Separator_Paragraph |
Unicode class name Zp |
Separator_Space |
Unicode class name Zs |
Symbol_Currency |
Unicode class name Sc |
Symbol_Math |
Unicode class name Sm |
Symbol_Modifier |
Unicode class name Sk |
Symbol_Other |
Unicode class name So |
This enum type defines the Unicode decomposition attributes. See the Unicode Standard for a description of the values.
See also decomposition().
This enum type defines the Unicode direction attributes. See the Unicode Standard for a description of the values.
In order to conform to C/C++ naming conventions "Dir" is prepended to the codes used in the Unicode Standard.
See also direction().
enum QtCore.QChar.Joining |
This enum type defines the Unicode joining attributes. See the Unicode Standard for a description of the values.
See also joining().
ByteOrderMark | |
ByteOrderSwapped | |
LineSeparator | |
Nbsp |
Non-breaking space. |
Null |
A QChar with this value isNull(). |
ObjectReplacementCharacter |
Used to represent an object such as an image when such objects cannot be presented. |
ParagraphSeparator | |
ReplacementCharacter |
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. |
Specifies which version of the Unicode standard introduced a certain character.
See also unicodeVersion().
|
protected |
QtCore.QChar.QChar | ( | ) |
Constructs a null QChar ('\0').
See also isNull().
QtCore.QChar.QChar | ( | QLatin1Char | ch | ) |
Constructs a QChar corresponding to ASCII/Latin-1 character ch.
QtCore.QChar.QChar | ( | ushort | rc | ) |
Constructs a null QChar ('\0').
See also isNull().
QtCore.QChar.QChar | ( | short | rc | ) |
Constructs a QChar for the character with Unicode code point code.
QtCore.QChar.QChar | ( | uint | rc | ) |
Constructs a null QChar ('\0').
See also isNull().
QtCore.QChar.QChar | ( | int | rc | ) |
Constructs a QChar for the character with Unicode code point code.
QtCore.QChar.QChar | ( | QChar.SpecialCharacter | sc | ) |
Constructs a QChar for the predefined character value ch.
QtCore.QChar.QChar | ( | byte | c, |
byte | r | ||
) |
Constructs a null QChar ('\0').
See also isNull().
new QChar.Category QtCore.QChar.category | ( | ) |
Returns the character's category.
|
static |
Returns the character's category.
|
static |
Returns the character's category.
new byte QtCore.QChar.combiningClass | ( | ) |
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.
The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.
|
static |
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.
The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.
|
static |
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.
The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.
|
virtual |
|
static |
Returns the most recent supported Unicode version.
This function was introduced in Qt 4.8.
new string QtCore.QChar.decomposition | ( | ) |
Decomposes a character into its parts. Returns an empty string if no decomposition exists.
|
static |
Decomposes a character into its parts. Returns an empty string if no decomposition exists.
new QChar.Decomposition QtCore.QChar.DecompositionTag | ( | ) |
Returns the tag defining the composition of the character. Returns QChar::Single if no decomposition exists.
|
static |
Returns the tag defining the composition of the character. Returns QChar::Single if no decomposition exists.
new int QtCore.QChar.DigitValue | ( | ) |
Returns the numeric value of the digit, or -1 if the character is not a digit.
|
static |
Returns the numeric value of the digit, or -1 if the character is not a digit.
|
static |
Returns the numeric value of the digit, or -1 if the character is not a digit.
new QChar.Direction QtCore.QChar.direction | ( | ) |
Returns the character's direction.
|
static |
Returns the character's direction.
|
static |
Returns the character's direction.
new void QtCore.QChar.Dispose | ( | ) |
override bool QtCore.QChar.Equals | ( | object | o | ) |
|
static |
Converts the ASCII character c to its equivalent QChar. This is mainly useful for non-internationalized software.
An alternative is to use QLatin1Char.
See also fromLatin1(), unicode(), and QTextCodec::codecForCStrings().
|
static |
Converts the Latin-1 character c to its equivalent QChar. This is mainly useful for non-internationalized software.
See also fromAscii(), unicode(), and QTextCodec::codecForCStrings().
override int QtCore.QChar.GetHashCode | ( | ) |
new bool QtCore.QChar.HasMirrored | ( | ) |
Returns true if the character should be reversed if the text direction is reversed; otherwise returns false.
Same as (ch.mirroredChar() != ch).
See also mirroredChar().
|
static |
Returns the high surrogate value of a ucs4 code point. The returned result is undefined if ucs4 is smaller than 0x10000.
new bool QtCore.QChar.IsDigit | ( | ) |
Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false.
new bool QtCore.QChar.IsHighSurrogate | ( | ) |
Returns true if the QChar is the high part of a utf16 surrogate (ie. if its code point is between 0xd800 and 0xdbff, inclusive).
|
static |
Returns true if the QChar is the high part of a utf16 surrogate (ie. if its code point is between 0xd800 and 0xdbff, inclusive).
new bool QtCore.QChar.IsLetter | ( | ) |
Returns true if the character is a letter (Letter_* categories); otherwise returns false.
new bool QtCore.QChar.IsLetterOrNumber | ( | ) |
Returns true if the character is a letter or number (Letter_* or Number_* categories); otherwise returns false.
new bool QtCore.QChar.IsLower | ( | ) |
Returns true if the character is a lowercase letter, i.e. category() is Letter_Lowercase.
See also isUpper(), toLower(), and toUpper().
new bool QtCore.QChar.IsLowSurrogate | ( | ) |
Returns true if the QChar is the low part of a utf16 surrogate (ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
|
static |
Returns true if the QChar is the low part of a utf16 surrogate (ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
new bool QtCore.QChar.IsMark | ( | ) |
Returns true if the character is a mark (Mark_* categories); otherwise returns false.
See QChar::Category for more information regarding marks.
new bool QtCore.QChar.IsNull | ( | ) |
Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false.
new bool QtCore.QChar.IsNumber | ( | ) |
Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns false.
See also isDigit().
new bool QtCore.QChar.IsPrint | ( | ) |
Returns true if the character is a printable character; otherwise returns false. This is any character not of category Cc or Cn.
Note that this gives no indication of whether the character is available in a particular font.
new bool QtCore.QChar.IsPunct | ( | ) |
Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns false.
new bool QtCore.QChar.IsSpace | ( | ) |
Returns true if the character is a separator character (Separator_* categories); otherwise returns false.
new bool QtCore.QChar.IsSymbol | ( | ) |
Returns true if the character is a symbol (Symbol_* categories); otherwise returns false.
new bool QtCore.QChar.IsTitleCase | ( | ) |
Returns true if the character is a titlecase letter, i.e. category() is Letter_Titlecase.
This function was introduced in Qt 4.3.
See also isLower(), toUpper(), toLower(), and toTitleCase().
new bool QtCore.QChar.IsUpper | ( | ) |
Returns true if the character is an uppercase letter, i.e. category() is Letter_Uppercase.
See also isLower(), toUpper(), and toLower().
new QChar.Joining QtCore.QChar.joining | ( | ) |
Returns information about the joining properties of the character (needed for certain languages such as Arabic).
|
static |
Returns information about the joining properties of the character (needed for certain languages such as Arabic).
|
static |
Returns information about the joining properties of the character (needed for certain languages such as Arabic).
|
static |
Returns the low surrogate value of a ucs4 code point. The returned result is undefined if ucs4 is smaller than 0x10000.
new QChar QtCore.QChar.MirroredChar | ( | ) |
Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.
See also hasMirrored().
|
static |
Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.
See also hasMirrored().
|
static |
Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.
See also hasMirrored().
|
static |
|
static |
Returns true if the UCS-4-encoded character specified by ucs4 can be split into the high and low parts of a utf16 surrogate (ie. if its code point is greater than or equals to 0x10000).
This function was introduced in Qt 4.7.
Converts a utf16 surrogate pair (high, low) to its ucs4 code point.
|
static |
Converts a UTF16 surrogate pair with the given high and low values to its UCS-4 code point.
new sbyte QtCore.QChar.ToAscii | ( | ) |
Returns the character value of the QChar 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.
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.
See also toLatin1(), unicode(), and QTextCodec::codecForCStrings().
new QChar QtCore.QChar.ToCaseFolded | ( | ) |
Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLowerCase().
|
static |
Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLowerCase().
|
static |
Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLowerCase().
new sbyte QtCore.QChar.ToLatin1 | ( | ) |
Returns the Latin-1 character equivalent to the QChar, or 0. This is mainly useful for non-internationalized software.
See also toAscii(), unicode(), and QTextCodec::codecForCStrings().
new QChar QtCore.QChar.ToLower | ( | ) |
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.
|
static |
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.
|
static |
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.
new QChar QtCore.QChar.ToTitleCase | ( | ) |
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.
|
static |
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.
|
static |
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.
new QChar QtCore.QChar.ToUpper | ( | ) |
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.
|
static |
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.
|
static |
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.
new ushort QtCore.QChar.Unicode | ( | ) |
Returns a reference to the numeric Unicode value of the QChar.
new QChar.UnicodeVersion QtCore.QChar.unicodeVersion | ( | ) |
Returns the Unicode version that introduced this character.
|
static |
Returns the Unicode version that introduced this character.
|
static |
Returns the Unicode version that introduced this character.
|
protected |
|
getset |
Returns the cell (least significant byte) of the Unicode character.
|
getset |
Returns the row (most significant byte) of the Unicode character.
|
getset |