KCharset Class Reference

[kdecore Index] [kdecore Hierarchy] [Headers]


KDE charset support class More...

#include <kcharsets.h>

Public Members

Private Members


Detailed Description

A class representing a charset.


KCharset() [public]

Default constructor

KCharset(const char *name) [public]

Prepares charset of given name

Parameters:
name Name of the charset

KCharset(const QString) [public]

Prepares charset of given name

Parameters:
name Name of the charset

KCharset(QFont::CharSet id) [public]

Prepares charset from Qt's charset id

Parameters:
id Qt's id of the charset

KCharset( const KCharset& ) [public]

Copy constructor for KCharset

KCharset& operator=( const KCharset& ) [public]

Assignment operator for KCharset

const char* name() const [public]

Gives name of the charset

Returns:
name of the charset

operator const char *() const [public]

For casting KCharset into string

Returns:
name of the charset

operator QString ()() const [public]

For casting KCharset into QString

Returns:
name of the charset

bool isDisplayable() [public]

Check if charset is displayable

Returns:
TRUE if it is displayable

bool isDisplayable(const char *font) [public]

Check if charset is displayable using given font

Parameters:
family name of the font
Returns:
TRUE if it is displayable

bool isAvailable() const [public]

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 [public]

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

Returns:
TRUE if it is available

bool isRegistered() const [public]

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) [public]

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

Parameters:
fnt Font we want set charset of
Returns:
The font after setting the charset

QFont::CharSet qtCharset() const [public]

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 [public]

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) [public]

check if character is printable in selected charset

Parameters:
chr Character to check
Returns:
TRUE if it is printable

bool operator ==(const KCharset& kch) const [public]

compares charsets

Parameters:
kch Character to compare to
Returns:
TRUE this and kch are the same charset

QString xCharset() [public]

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

Returns:
string representing X charset name

KCharset(const KCharsetEntry *) [public]

For internal use only

operator const KCharsetEntry *() const [public]

For internal use only


  • Author: Jacek Konieczny <jacus@zeus.polsl.gliwice.pl>
  • Version: $Id: kcharsets.h,v 1.19.4.1 1999/03/22 17:16:16 porten Exp $
  • Documentation generated by root@darkstar.lst.de on Wed Sep 8 17:38:18 CEST 1999
Kdoc