Référence de la classe KoHyphenator

The KoHyphenator class provides an interface to the libhnj hyphenation library. Plus de détails...

#include <kohyphen.h>

Graphe de collaboration de KoHyphenator:

[légende]
Liste de tous les membres

Fonctions membres publiques

 ~KoHyphenator ()
bool checkHyphenPos (const QString &str, int pos, const QString &lang) const
char * hyphens (const QString &str, const QString &lang) const
QString hyphenate (const QString &str, const QString &lang) const

Fonctions membres publiques statiques

static KoHyphenatorself ()

Types privés

typedef QMap< QString, EncodingStructEncodingMap

Fonctions membres privées

QTextCodec * codecForLang (const QString &lang) const
 KoHyphenator ()
HyphenDictdict (const QString &lang) const

Attributs privés

QMap< QString, HyphenDict * > dicts
EncodingMap encodings

Attributs privés statiques

static KoHyphenators_self

Classes

struct  EncodingStruct

Description détaillée

The KoHyphenator class provides an interface to the libhnj hyphenation library.

Auteur:
Alexander Dymo (cloudtemple@mksat.net)

Lukas Tinkl (lukas.tinkl@suse.cz)

The KoHyphenator class provides an interface to the libhnj hyphenation library.

Libhnj library was written for TeX and adopted to use with OpenOffice. This library tries to adopt it for KDE.

It handles the hyphenation dictionary loading for the specified language. QString -> char* conversion is done by using of settings in dicts.xml file in datadir/koffice/hyphdicts (dictionaries are also located there).

The hyphenate() functions returns QString containing hyphenation chars (0xad) or char* in format of hnj_hyphen_hyphenate() function from libhnj library.

Définition à la ligne 59 du fichier kohyphen.h.


Documentation des définition de type membres

typedef QMap<QString, EncodingStruct> KoHyphenator::EncodingMap [private]

Définition à la ligne 126 du fichier kohyphen.h.


Documentation des contructeurs et destructeur

KoHyphenator::~KoHyphenator (  ) 

Définition à la ligne 89 du fichier kohyphen.cpp.

Références dicts, et hnj_hyphen_free().

Voici le graphe d'appel pour cette fonction :

KoHyphenator::KoHyphenator (  )  [private]

Définition à la ligne 48 du fichier kohyphen.cpp.

Références encodings, et gensymbolfontmap::f.


Documentation des fonctions membres

KoHyphenator * KoHyphenator::self (  )  [static]

Returns the single KoHyphenator instance (singleton pattern) Beware that this might throw an exception in case of an installation problem! Catch KoHyphenatorExceptions!

Définition à la ligne 41 du fichier kohyphen.cpp.

Références kohyphensd, et s_self.

Référencé par KoTextFormatter::KoTextFormatter(), et main().

Voici le graphe d'appel pour cette fonction :

bool KoHyphenator::checkHyphenPos ( const QString &  str,
int  pos,
const QString &  lang 
) const

Checks if the letter in position pos is placed before the hyphen.

Can be used to check if the line break at given position should be forced and automatic hyphen added.

Définition à la ligne 153 du fichier kohyphen.cpp.

Références hyphens().

Voici le graphe d'appel pour cette fonction :

char * KoHyphenator::hyphens ( const QString &  str,
const QString &  lang 
) const

Returns the pointer to the string in hnj_hyphen_hyphenate() format (that is hyphenation function from underlying libhnj library).

The string is array of integer numbers. Each odd number marks that hyphen can be added after the character in the position of that number. The returned string must be deleted with "delete[] x;"

For example, for the string "example" the returning value is "01224400".

Paramètres:
str String to be hyphenated.
lang Language for the hyphenation dictionary to be loaded. Language: two chars containing the ISO 639-1 code (for example "en", "uk", etc.) (could be lang_COUNTRY as well).

Définition à la ligne 98 du fichier kohyphen.cpp.

Références codecForLang(), dict(), hnj_hyphen_hyphenate(), et KoHyphenatorException::message().

Référencé par checkHyphenPos(), et KoTextFormatterCore::format().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QString KoHyphenator::hyphenate ( const QString &  str,
const QString &  lang 
) const

Hyphenates the string str and returns the string with hyphenation marks in it.

Paramètres:
str String to be hyphenated.
lang Language for the hyphenation dictionary to be loaded. Language: two chars containing the ISO 639-1 code (for example "en", "uk", etc.) (could be lang_COUNTRY as well).

Définition à la ligne 118 du fichier kohyphen.cpp.

Références codecForLang(), dict(), hnj_hyphen_hyphenate(), et KoHyphenatorException::message().

Référencé par check_hyphenation(), et main().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QTextCodec * KoHyphenator::codecForLang ( const QString &  lang  )  const [private]

Renvoie:
the encoding of dictionary for the language lang.

Définition à la ligne 211 du fichier kohyphen.cpp.

Références encodings.

Référencé par hyphenate(), et hyphens().

Voici le graphe d'appel pour cette fonction :

HyphenDict * KoHyphenator::dict ( const QString &  lang  )  const [private]

Définition à la ligne 170 du fichier kohyphen.cpp.

Références dicts, encodings, et hnj_hyphen_load().

Référencé par hyphenate(), et hyphens().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

QMap<QString, HyphenDict*> KoHyphenator::dicts [private]

Définition à la ligne 117 du fichier kohyphen.h.

Référencé par dict(), et ~KoHyphenator().

EncodingMap KoHyphenator::encodings [mutable, private]

Définition à la ligne 127 du fichier kohyphen.h.

Référencé par codecForLang(), dict(), et KoHyphenator().

KoHyphenator * KoHyphenator::s_self [static, private]

Définition à la ligne 129 du fichier kohyphen.h.

Référencé par self().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:46:01 2006 pour KPlato par  doxygen 1.5.1-p1