2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
* This component and the accompanying materials are made available
5
* under the terms of "Eclipse Public License v1.0"
6
* which accompanies this distribution, and is available
7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
9
* Initial Contributors:
10
* Nokia Corporation - initial contribution.
14
* Description: Class to hold the character to key mappings and provide
15
* conversion of strings to their numerical mappings.
19
#ifndef __CKOREANKEYMAP_H__
20
#define __CKOREANKEYMAP_H__
23
#include "mlanguagespecifickeymap.h"
29
// FORWARD DECLARATIONS
35
NONSHARABLE_CLASS(CKoreanKeyMap) : public CBase, public MLanguageSpecificKeymap
37
public: // Constructors and destructor
38
static CKoreanKeyMap* NewL();
43
virtual ~CKoreanKeyMap();
45
public: // From MLanguageSpecificKeymap
46
QString GetMappedString(QString aSource) const;
48
public: // New functions
50
* Returns ETrue if aSource contains one or more Korean characters.
52
TBool IsLanguageSupported(QString aSource) const;
54
protected: // Constructors
61
* Second phase constructor
65
private: // New functions
68
void FillKeyPressMap();
70
void MapCharacters(QString aKeySequence,
72
QChar aCompatibilityJamoChar = 0,
73
QChar aOtherJamoChar = 0);
75
TBool IsSyllable(QChar aChar) const;
78
* Extracts the Jamos from the complete Korean character (Hangeul).
80
* Returned string contains the Jamos
82
const QString ExtractJamos(QChar aChar) const;
84
const QString MapJamoToKeySequence(QChar aChar) const;
87
// Mapping between those Korean unicode characters (Naratgeul logic) and
88
// the keypresses used to produce the character.
89
QMap<QChar, QString> iKeyPressMap;
93
QTextCodec* iLatinCodec;
94
QTextCodec* iKoreanCodec;
98
friend class UT_CKoreanKeyMap;
101
#endif // __CKOREANKEYMAP_H__