Implementation of a Teletext character set. More...
Public Member Functions | |
QtsTeletextCharset () | |
Constructor. More... | |
quint16 | g2AccentToUcs2 (quint8 c, quint8 accent) const |
Translate a G2 character into UCS-2. More... | |
quint16 | g2ToUcs2 (quint8 c) const |
Translate a G2 character into UCS-2. More... | |
void | resetX28 (quint8 fallback) |
Reset the X/28 character set to undefined. More... | |
void | setM29 (quint8 charset) |
Set the M/29 character set and use it as current character set if X/28 is not defined. More... | |
void | setX28 (quint8 charset) |
Set the X/28 character set and use it as current character set. More... | |
quint16 | teletextToUcs2 (quint8 c) const |
Check parity and translate any reasonable Teletext character into UCS-2. More... | |
Static Public Attributes | |
static const size_t | CHAR_COUNT = 96 |
Number of characters per charset. More... | |
Private Types | |
typedef quint16 | G0CharsetData[G0_COUNT][CHAR_COUNT] |
G0 charsets data. More... | |
enum | G0CharsetIndex { LATIN = 0, CYRILLIC1 = 1, CYRILLIC2 = 2, CYRILLIC3 = 3, GREEK = 4, ARABIC = 5, HEBREW = 6, G0_COUNT = 7 } |
Index of G0 character sets in G0 table. More... | |
Private Member Functions | |
void | remapG0 (quint8 charset) |
Remap the GO character set. More... | |
Private Attributes | |
quint8 | _current |
Current charset index. More... | |
G0CharsetData | _G0 |
Current character set data. More... | |
quint8 | _g0m29 |
M/29 charset. More... | |
quint8 | _g0x28 |
X/28 charset. More... | |
Static Private Attributes | |
static const G0CharsetData | G0Base |
Initial base content of a charset. More... | |
static const quint8 | UNDEFINED = 0xFF |
Undefined charset index. More... | |
Implementation of a Teletext character set.
|
private |
G0 charsets data.
|
private |
QtsTeletextCharset::QtsTeletextCharset | ( | ) |
Constructor.
quint16 QtsTeletextCharset::teletextToUcs2 | ( | quint8 | c | ) | const |
Check parity and translate any reasonable Teletext character into UCS-2.
[in] | c | Teletext character. |
quint16 QtsTeletextCharset::g2AccentToUcs2 | ( | quint8 | c, |
quint8 | accent | ||
) | const |
Translate a G2 character into UCS-2.
[in] | c | Teletext character. |
[in] | accent | Accent mode (0 to 14) if c is a letter. |
quint16 QtsTeletextCharset::g2ToUcs2 | ( | quint8 | c | ) | const |
Translate a G2 character into UCS-2.
[in] | c | Teletext character. |
void QtsTeletextCharset::setX28 | ( | quint8 | charset | ) |
Set the X/28 character set and use it as current character set.
[in] | charset | Charactet set index. |
void QtsTeletextCharset::setM29 | ( | quint8 | charset | ) |
Set the M/29 character set and use it as current character set if X/28 is not defined.
[in] | charset | Charactet set index. |
void QtsTeletextCharset::resetX28 | ( | quint8 | fallback | ) |
Reset the X/28 character set to undefined.
Use M/29 as current character or use fallback if M/29 is undefined.
[in] | fallback | Fallback charactet set index if M/29 is undefined. |
|
private |
Remap the GO character set.
[in] | charset | Charactet set index. |
|
static |
Number of characters per charset.
|
staticprivate |
Initial base content of a charset.
Charset can be – and always is – changed during transmission.
|
staticprivate |
Undefined charset index.
|
private |
Current charset index.
|
private |
M/29 charset.
|
private |
X/28 charset.
|
private |
Current character set data.