📄 qchar.3qt
字号:
'\" t.TH QChar 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQChar \- Lightweight Unicode character.PP\fC#include <qstring.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQChar\fR ()".br.ti -1c.BI "\fBQChar\fR ( char c )".br.ti -1c.BI "\fBQChar\fR ( uchar c )".br.ti -1c.BI "\fBQChar\fR ( uchar c, uchar r )".br.ti -1c.BI "\fBQChar\fR ( const QChar & c )".br.ti -1c.BI "\fBQChar\fR ( ushort rc )".br.ti -1c.BI "\fBQChar\fR ( short rc )".br.ti -1c.BI "\fBQChar\fR ( uint rc )".br.ti -1c.BI "\fBQChar\fR ( int rc )".br.ti -1c.BI "enum \fBCategory\fR { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }".br.ti -1c.BI "enum \fBDirection\fR { DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN }".br.ti -1c.BI "enum \fBDecomposition\fR { Single, Canonical, Font, NoBreak, Initial, Medial, Final, Isolated, Circle, Super, Sub, Vertical, Wide, Narrow, Small, Square, Compat, Fraction }".br.ti -1c.BI "enum \fBJoining\fR { OtherJoining, Dual, Right, Center }".br.ti -1c.BI "enum \fBCombiningClass\fR { Combining_BelowLeftAttached = 200, Combining_BelowAttached = 202, Combining_BelowRightAttached = 204, Combining_LeftAttached = 208, Combining_RightAttached = 210, Combining_AboveLeftAttached = 212, Combining_AboveAttached = 214, Combining_AboveRightAttached = 216, Combining_BelowLeft = 218, Combining_Below = 220, Combining_BelowRight = 222, Combining_Left = 224, Combining_Right = 226, Combining_AboveLeft = 228, Combining_Above = 230, Combining_AboveRight = 232, Combining_DoubleBelow = 233, Combining_DoubleAbove = 234, Combining_IotaSubscript = 240 }".br.ti -1c.BI "int \fBdigitValue\fR () const".br.ti -1c.BI "QChar \fBlower\fR () const".br.ti -1c.BI "QChar \fBupper\fR () const".br.ti -1c.BI "Category \fBcategory\fR () const".br.ti -1c.BI "Direction \fBdirection\fR () const".br.ti -1c.BI "Joining \fBjoining\fR () const".br.ti -1c.BI "bool \fBmirrored\fR () const".br.ti -1c.BI "QChar \fBmirroredChar\fR () const".br.ti -1c.BI "const QString & \fBdecomposition\fR () const".br.ti -1c.BI "Decomposition \fBdecompositionTag\fR () const".br.ti -1c.BI "unsigned char \fBcombiningClass\fR () const".br.ti -1c.BI "char \fBlatin1\fR () const".br.ti -1c.BI "ushort \fBunicode\fR () const".br.ti -1c.BI "ushort & \fBunicode\fR ()".br.ti -1c.BI "\fBoperator char\fR () const".br.ti -1c.BI "bool \fBisNull\fR () const".br.ti -1c.BI "bool \fBisPrint\fR () const".br.ti -1c.BI "bool \fBisPunct\fR () const".br.ti -1c.BI "bool \fBisSpace\fR () const".br.ti -1c.BI "bool \fBisMark\fR () const".br.ti -1c.BI "bool \fBisLetter\fR () const".br.ti -1c.BI "bool \fBisNumber\fR () const".br.ti -1c.BI "bool \fBisLetterOrNumber\fR () const".br.ti -1c.BI "bool \fBisDigit\fR () const".br.ti -1c.BI "bool \fBisSymbol\fR () const".br.ti -1c.BI "uchar \fBcell\fR () const".br.ti -1c.BI "uchar \fBrow\fR () const".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "bool \fBnetworkOrdered\fR ()".br.in -1c.SH RELATED FUNCTION DOCUMENTATION.in +1c.ti -1c.BI "bool \fBoperator==\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "bool \fBoperator==\fR ( char ch, QChar c )".br.ti -1c.BI "bool \fBoperator==\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator!=\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "int \fBoperator!=\fR ( char ch, QChar c )".br.ti -1c.BI "int \fBoperator!=\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator<=\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "int \fBoperator<=\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator<=\fR ( char ch, QChar c )".br.ti -1c.BI "int \fBoperator>=\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "int \fBoperator>=\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator>=\fR ( char ch, QChar c )".br.ti -1c.BI "int \fBoperator<\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "int \fBoperator<\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator<\fR ( char ch, QChar c )".br.ti -1c.BI "int \fBoperator>\fR ( QChar c1, QChar c2 )".br.ti -1c.BI "int \fBoperator>\fR ( QChar c, char ch )".br.ti -1c.BI "int \fBoperator>\fR ( char ch, QChar c )".br.in -1c.SH DESCRIPTIONThe QChar class provides a lightweight Unicode character..PPUnicode characters are (so far) 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 "short int." (In a few years it may be necessary to make QChar 32-bit when more than 65536 Unicode code points have been defined and come into use.).PPQChar 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..PPThe classification functions include functions like those in 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 U+0000), 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), isLetterOrNumber(), and isDigit() (decimal digits). All of these are wrappers around category() which return the Unicode-defined category of each character..PPQChar further 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 mirrored(), which indicates whether the character needs to be mirrored when it is printed in its "unnatural" writing direction..PPComposed Unicode characters (like å) can be converted to decomposed Unicode ("a" followed by "ring above") by using decomposition()..PPIn 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. Qt tries, but not very hard: operator== and friends will do comparison based purely on the numeric Unicode value (code point) of the characters, and upper() and lower() will do case changes when the character has a well-defined upper/lower-case equivalent. There is no provision for locale-dependent case folding rules or comparison; these functions are meant to be fast so they can be used unambiguously in data structures..PPThe conversion functions include unicode() (to a scalar), latin1() (to scalar, but converts all non-Latin1 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..PPMore information can be found in the document About Unicode..PPSee also QString, QCharRef and Text Related Classes..SS "Member Type Documentation".SH "QChar::Category"This enum maps the Unicode character categories. The following characters are normative in Unicode:.TP\fCQChar::Mark_NonSpacing\fR - Unicode class name Mn.TP\fCQChar::Mark_SpacingCombining\fR - Unicode class name Mc.TP\fCQChar::Mark_Enclosing\fR - Unicode class name Me.TP\fCQChar::Number_DecimalDigit\fR - Unicode class name Nd.TP\fCQChar::Number_Letter\fR - Unicode class name Nl.TP\fCQChar::Number_Other\fR - Unicode class name No.TP\fCQChar::Separator_Space\fR - Unicode class name Zs.TP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -