QLatin1Char Class Reference

#include <qchar.h>

List of all members.


Detailed Description

The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.

This class is only useful to avoid the codec for C strings business in the QChar(ch) constructor. You can avoid it by writing QChar(ch, 0).

See also:
QChar, QLatin1String, QString

Definition at line 35 of file qchar.h.

Public Member Functions

 QLatin1Char (char c)
const char toLatin1 () const
const ushort unicode () const

Private Attributes

char ch


Constructor & Destructor Documentation

QLatin1Char::QLatin1Char ( char  c  )  [inline, explicit]

Constructs a Latin-1 character for c. This constructor should be used when the encoding of the input character is known to be Latin-1.

Definition at line 38 of file qchar.h.

00038 : ch(c) {}


Member Function Documentation

const char QLatin1Char::toLatin1 (  )  const [inline]

Converts a Latin-1 character to an 8-bit ASCII representation of the character.

Definition at line 39 of file qchar.h.

00039 { return ch; }

const ushort QLatin1Char::unicode (  )  const [inline]

Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.

Definition at line 40 of file qchar.h.

00040 { return ushort(uchar(ch)); }


Member Data Documentation

char QLatin1Char::ch [private]

Definition at line 43 of file qchar.h.


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 18:08:13 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1