45 #include <QtCore/qglobal.h> 59 #ifdef Q_COMPILER_MANGLES_RETURN_TYPE 60 inline const char toLatin1()
const {
return ch; }
75 #ifndef QT_NO_CAST_FROM_ASCII 88 ReplacementCharacter = 0xfffd,
89 ObjectReplacementCharacter = 0xfffc,
90 ByteOrderMark = 0xfeff,
91 ByteOrderSwapped = 0xfffe,
94 replacement = ReplacementCharacter,
95 byteOrderMark = ByteOrderMark,
96 byteOrderSwapped = ByteOrderSwapped,
99 ParagraphSeparator = 0x2029,
100 LineSeparator = 0x2028
147 Punctuation_Dask = Punctuation_Dash
152 DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS,
DirWS, DirON,
153 DirLRE, DirLRO, DirAL, DirRLE,
DirRLO, DirPDF, DirNSM, DirBN
178 , Single = NoDecomposition
189 Combining_BelowLeftAttached = 200,
190 Combining_BelowAttached = 202,
191 Combining_BelowRightAttached = 204,
192 Combining_LeftAttached = 208,
193 Combining_RightAttached = 210,
194 Combining_AboveLeftAttached = 212,
195 Combining_AboveAttached = 214,
196 Combining_AboveRightAttached = 216,
198 Combining_BelowLeft = 218,
199 Combining_Below = 220,
200 Combining_BelowRight = 222,
201 Combining_Left = 224,
202 Combining_Right = 226,
203 Combining_AboveLeft = 228,
204 Combining_Above = 230,
205 Combining_AboveRight = 232,
207 Combining_DoubleBelow = 233,
208 Combining_DoubleAbove = 234,
209 Combining_IotaSubscript = 240
229 bool hasMirrored()
const;
230 unsigned char combiningClass()
const;
232 QChar mirroredChar()
const;
236 int digitValue()
const;
237 QChar toLower()
const;
238 QChar toUpper()
const;
239 QChar toTitleCase()
const;
240 QChar toCaseFolded()
const;
244 #ifdef Q_COMPILER_MANGLES_RETURN_TYPE 245 const char toAscii()
const;
249 char toAscii()
const;
253 #ifdef Q_NO_PACKED_REFERENCE 259 static QChar fromAscii(
char c);
260 static QChar fromLatin1(
char c);
262 inline bool isNull()
const {
return ucs == 0; }
263 bool isPrint()
const;
264 bool isPunct()
const;
265 bool isSpace()
const;
267 bool isLetter()
const;
269 bool isLetterOrNumber()
const;
271 bool isSymbol()
const;
272 inline bool isLower()
const {
return category() == Letter_Lowercase; }
273 inline bool isUpper()
const {
return category() == Letter_Uppercase; }
274 inline bool isTitleCase()
const {
return category() == Letter_Titlecase; }
277 return ((ucs & 0xfc00) == 0xd800);
280 return ((ucs & 0xfc00) == 0xdc00);
285 inline void setCell(
uchar cell);
286 inline void setRow(
uchar row);
289 return ((ucs4 & 0xfffffc00) == 0xd800);
292 return ((ucs4 & 0xfffffc00) == 0xdc00);
295 return (ucs4 >= 0x10000);
298 return (
uint(high)<<10) + low - 0x35fdc00;
301 return (
uint(high.
ucs)<<10) + low.
ucs - 0x35fdc00;
304 return ushort((ucs4>>10) + 0xd7c0);
307 return ushort(ucs4%0x400 + 0xdc00);
342 inline QT3_SUPPORT
bool mirrored()
const {
return hasMirrored(); }
343 inline QT3_SUPPORT QChar lower()
const {
return toLower(); }
344 inline QT3_SUPPORT QChar upper()
const {
return toUpper(); }
345 static inline QT3_SUPPORT
bool networkOrdered() {
346 return QSysInfo::ByteOrder == QSysInfo::BigEndian;
348 #ifdef Q_COMPILER_MANGLES_RETURN_TYPE 349 inline QT3_SUPPORT
const char latin1()
const {
return toLatin1(); }
350 inline QT3_SUPPORT
const char ascii()
const {
return toAscii(); }
352 inline QT3_SUPPORT
char latin1()
const {
return toLatin1(); }
353 inline QT3_SUPPORT
char ascii()
const {
return toAscii(); }
358 #ifdef QT_NO_CAST_FROM_ASCII 364 #if (defined(__arm__) && defined(QT_NO_ARM_EABI)) 373 #ifdef Q_COMPILER_MANGLES_RETURN_TYPE 399 #ifndef QT_NO_DATASTREAM
int operator>(QChar c1, QChar c2)
Returns true if the numeric Unicode value of c1 is greater than that of c2; otherwise returns false...
Joining
This enum type defines the Unicode joining attributes.
Category
This enum maps the Unicode character categories.
QChar()
Constructs a null QChar ('\0').
#define QT_END_NAMESPACE
This macro expands to.
QChar(ushort rc)
Constructs a QChar for the character with Unicode code point code.
int operator<=(QChar c1, QChar c2)
Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise return...
char toLatin1() const
Converts a Latin-1 character to an 8-bit ASCII representation of the character.
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isNull() const
Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false...
int operator!=(QChar c1, QChar c2)
Returns true if c1 and c2 are not the same Unicode character; otherwise returns false.
static bool isHighSurrogate(uint ucs4)
Returns true if the UCS-4-encoded character specified by ucs4 is the high part of a utf16 surrogate (...
bool operator==(QChar c1, QChar c2)
Returns true if c1 and c2 are the same Unicode character; otherwise returns false.
bool isLowSurrogate() const
Returns true if the QChar is the low part of a utf16 surrogate (ie.
int operator<(QChar c1, QChar c2)
Returns true if the numeric Unicode value of c1 is less than that of c2; otherwise returns false...
static bool isNumber(char s)
static bool isLowSurrogate(uint ucs4)
Returns true if the UCS-4-encoded character specified by ucs4 is the low part of a utf16 surrogate (i...
The QString class provides a Unicode character string.
bool isHighSurrogate() const
Returns true if the QChar is the high part of a utf16 surrogate (ie.
The QChar class provides a 16-bit Unicode character.
bool isLower() const
Returns true if the character is a lowercase letter, i.
static ushort highSurrogate(uint ucs4)
Returns the high surrogate value of a ucs4 code point.
static ushort lowSurrogate(uint ucs4)
Returns the low surrogate value of a ucs4 code point.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool requiresSurrogates(uint ucs4)
Returns true if the UCS-4-encoded character specified by ucs4 can be split into the high and low part...
Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE)
static QChar fromLatin1(char c)
Converts the Latin-1 character c to its equivalent QChar.
#define QT_ASCII_CAST_WARN_CONSTRUCTOR
static bool isDigit(ushort ch)
QDataStream & operator>>(QDataStream &in, QChar &chr)
Reads a char from the stream in into char chr.
UnicodeVersion
Specifies which version of the [Unicode standard](http://www.
CombiningClass
This enum type defines names for some of the Unicode combining classes.
bool isUpper() const
Returns true if the character is an uppercase letter, i.
ushort unicode() const
Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.
Direction
This enum type defines the Unicode direction attributes.
int operator>=(QChar c1, QChar c2)
Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise ret...
QLatin1Char(char c)
Constructs a Latin-1 character for c.
uchar cell() const
Returns the cell (least significant byte) of the Unicode character.
static uint surrogateToUcs4(QChar high, QChar low)
Converts a utf16 surrogate pair (high, low) to its ucs4 code point.
static uint surrogateToUcs4(ushort high, ushort low)
Converts a UTF16 surrogate pair with the given high and low values to its UCS-4 code point...
char toLatin1() const
Returns the Latin-1 character equivalent to the QChar, or 0.
The QDataStream class provides serialization of binary data to a QIODevice.
ushort & unicode()
Returns a reference to the numeric Unicode value of the QChar.
bool isTitleCase() const
Returns true if the character is a titlecase letter, i.
QDataStream & operator<<(QDataStream &out, const QChar &chr)
Writes the char chr to the stream out.
uchar row() const
Returns the row (most significant byte) of the Unicode character.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Qt::LayoutDirection direction
Decomposition
This enum type defines the Unicode decomposition attributes.