class KCharset

KDE charset support class. More...

Definition#include <kcharsets.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A class representing a charset.

 KCharset ()

Default constructor

 KCharset (const char *name)

Prepares charset of given name

Parameters:
nameName of the charset

 KCharset (const QString)

Prepares charset of given name

Parameters:
nameName of the charset

 KCharset (QFont::CharSet id)

Prepares charset from Qt's charset id

Parameters:
idQt's id of the charset

 KCharset ( const KCharset& )

Copy constructor for KCharset

KCharset&  operator= ( const KCharset& )

Assignment operator for KCharset

const char * name ()

[const]

Gives name of the charset

Returns: name of the charset

 operator const char * ()

[const]

For casting KCharset into string

Returns: name of the charset

 operator QString ()

[const]

For casting KCharset into QString

Returns: name of the charset

bool  isDisplayable ()

Check if charset is displayable

Returns: TRUE if it is displayable

bool  isDisplayable (const char *font)

Check if charset is displayable using given font

Parameters:
familyname of the font

Returns: TRUE if it is displayable

bool  isAvailable ()

[const]

Check if charset is defined for use with KDE (in charsets classes or in charsets config files)

Returns: TRUE if it is available

bool  ok ()

[const]

Check if charset is OK. In fact the same as isAvailable

Returns: TRUE if it is available

bool  isRegistered ()

[const]

Check if charset is registered for use in mime messages. TRUE also for some not-yet-registered charsets (UTF-7 and UTF-8)

Returns: TRUE if it is registered

QFont & setQFont (QFont& fnt)

Set charset of QFont to this. Should be used instead of QFont::setCharSet()

Parameters:
fntFont we want set charset of

Returns: The font after setting the charset

QFont::CharSet  qtCharset ()

[const]

Get QT's id of charset. Qt has id defined only for ISO-8859-* charsets, so their charset functions should not be used

Returns: The Qt font charset id

int  bits ()

[const]

Get nuber of bits needed to represent a character. As for now only 8-bit characters are supported well

Returns: Number of bits per character

bool  printable (int chr)

check if character is printable in selected charset

Parameters:
chrCharacter to check

Returns: TRUE if it is printable

bool  operator == (const KCharset& kch)

[const]

compares charsets

Parameters:
kchCharacter to compare to

Returns: TRUE this and kch are the same charset

QString  xCharset ()

Gets X charset identifier (last two fields of X font name)

Returns: string representing X charset name

 KCharset (const KCharsetEntry *)

For internal use only

 operator const KCharsetEntry * ()

[const]

For internal use only