- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

# QTextCodec Class Reference

Search for all occurrences

## Detailed Description

Definition at line 62 of file qtextcodec.h.

`#include <qtextcodec.h>`

List of all members.

## Classes
struct | ConverterState
## Public Types
enum | ConversionFlag { DefaultConversion, ConvertInvalidToNull = 0x80000000, IgnoreHeader = 0x1, FreeFunction = 0x2 }
## Public Member Functions
bool | canEncode (QChar) const
bool | canEncode (const QString &) const
QString | toUnicode (const QByteArray &) const
QString | toUnicode (const char *chars) const
QByteArray | fromUnicode (const QString &uc) const
QString | toUnicode (const char *in, int length, ConverterState *state=0) const
QByteArray | fromUnicode (const QChar *in, int length, ConverterState *state=0) const
QTextDecoder * | makeDecoder () const
QTextDecoder * | makeDecoder (ConversionFlags flags) const
QTextEncoder * | makeEncoder () const
QTextEncoder * | makeEncoder (ConversionFlags flags) const
virtual QByteArray | name () const =0
virtual QList< QByteArray > | aliases () const
virtual int | mibEnum () const =0
## Static Public Member Functions
static QTextCodec * | codecForName (const QByteArray &name)
static QTextCodec * | codecForName (const char *name)
static QTextCodec * | codecForMib (int mib)
static QList< QByteArray > | availableCodecs ()
static QList< int > | availableMibs ()
static QTextCodec * | codecForLocale ()
static void | setCodecForLocale (QTextCodec *c)
static QTextCodec * | codecForTr ()
static void | setCodecForTr (QTextCodec *c)
static QTextCodec * | codecForCStrings ()
static void | setCodecForCStrings (QTextCodec *c)
static QTextCodec * | codecForHtml (const QByteArray &ba)
static QTextCodec * | codecForHtml (const QByteArray &ba, QTextCodec *defaultCodec)
static QTextCodec * | codecForUtfText (const QByteArray &ba)
static QTextCodec * | codecForUtfText (const QByteArray &ba, QTextCodec *defaultCodec)
## Protected Member Functions
virtual QString | convertToUnicode (const char *in, int length, ConverterState *state) const =0
virtual QByteArray | convertFromUnicode (const QChar *in, int length, ConverterState *state) const =0
| QTextCodec ()
virtual | ~QTextCodec ()
## Friends
class | QTextCodecCleanup

## Member Enumeration Documentation

enum ConversionFlag

Search for all occurrences

Enumerator:

  DefaultConversion | Search for all occurrences
  ConvertInvalidToNull | Search for all occurrences
  IgnoreHeader | Search for all occurrences
  FreeFunction | Search for all occurrences

Definition at line 94 of file qtextcodec.h.

                            {
            DefaultConversion,
            ConvertInvalidToNull = 0x80000000,
            IgnoreHeader = 0x1,
            FreeFunction = 0x2
        };

## Constructor & Destructor Documentation

QTextCodec | ( |  | ) | `[protected]`

virtual ~QTextCodec | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

static QTextCodec* codecForName | ( | const QByteArray & | name | ) | `[static]`

Search for all occurrences

static QTextCodec* codecForName | ( | const char * | name | ) | `[inline, static]`

Search for all occurrences

Definition at line 67 of file qtextcodec.h.

    { return codecForName(QByteArray(name)); }

static QTextCodec* codecForMib | ( | int | mib | ) | `[static]`

Search for all occurrences

static QList<QByteArray> availableCodecs | ( |  | ) | `[static]`

Search for all occurrences

static QList<int> availableMibs | ( |  | ) | `[static]`

Search for all occurrences

static QTextCodec* codecForLocale | ( |  | ) | `[static]`

Search for all occurrences

static void setCodecForLocale | ( | QTextCodec * | c | ) | `[static]`

Search for all occurrences

QTextCodec * codecForTr | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 155 of file qtextcodec.h.

    { return validCodecs() ? cftr : 0; }

void setCodecForTr | ( | QTextCodec * | c | ) | `[inline, static]`

Search for all occurrences

Definition at line 156 of file qtextcodec.h.

    { cftr = c; }

QTextCodec * codecForCStrings | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 157 of file qtextcodec.h.

    { return validCodecs() ? QString::codecForCStrings : 0; }

void setCodecForCStrings | ( | QTextCodec * | c | ) | `[inline, static]`

Search for all occurrences

Definition at line 158 of file qtextcodec.h.

    { QString::codecForCStrings = c; }

static QTextCodec* codecForHtml | ( | const QByteArray & | ba | ) | `[static]`

Search for all occurrences

static QTextCodec* codecForHtml | ( | const QByteArray & | ba,
|  | QTextCodec * | defaultCodec
| ) |  | `[static]`

Search for all occurrences

static QTextCodec* codecForUtfText | ( | const QByteArray & | ba | ) | `[static]`

Search for all occurrences

static QTextCodec* codecForUtfText | ( | const QByteArray & | ba,
|  | QTextCodec * | defaultCodec
| ) |  | `[static]`

Search for all occurrences

bool canEncode | ( | QChar |  | ) | const

Search for all occurrences

bool canEncode | ( | const QString & |  | ) | const

Search for all occurrences

QString toUnicode | ( | const QByteArray & |  | ) | const

Search for all occurrences

QString toUnicode | ( | const char * | chars | ) | const

Search for all occurrences

QByteArray fromUnicode | ( | const QString & | uc | ) | const

Search for all occurrences

QString toUnicode | ( | const char * | in,
|  | int | length,
|  | ConverterState * | state = `0`
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 115 of file qtextcodec.h.

            { return convertToUnicode(in, length, state); }

QByteArray fromUnicode | ( | const QChar * | in,
|  | int | length,
|  | ConverterState * | state = `0`
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 117 of file qtextcodec.h.

            { return convertFromUnicode(in, length, state); }

QTextDecoder* makeDecoder | ( |  | ) | const

Search for all occurrences

QTextDecoder* makeDecoder | ( | ConversionFlags | flags | ) | const

Search for all occurrences

QTextEncoder* makeEncoder | ( |  | ) | const

Search for all occurrences

QTextEncoder* makeEncoder | ( | ConversionFlags | flags | ) | const

Search for all occurrences

virtual QByteArray name | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual QList<QByteArray> aliases | ( |  | ) | const `[virtual]`

Search for all occurrences

virtual int mibEnum | ( |  | ) | const `[pure virtual]`

Search for all occurrences

virtual QString convertToUnicode | ( | const char * | in,
|  | int | length,
|  | ConverterState * | state
| ) |  | const `[protected, pure virtual]`

Search for all occurrences

virtual QByteArray convertFromUnicode | ( | const QChar * | in,
|  | int | length,
|  | ConverterState * | state
| ) |  | const `[protected, pure virtual]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QTextCodecCleanup `[friend]`

Search for all occurrences

Definition at line 149 of file qtextcodec.h.

The documentation for this class was generated from the following file:

- QtCore/qtextcodec.h

QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec
QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec QTextCodec