16 */ |
16 */ |
17 |
17 |
18 #ifndef LOGSPREDICTIVELATIN12KEYTRANSLATOR_H |
18 #ifndef LOGSPREDICTIVELATIN12KEYTRANSLATOR_H |
19 #define LOGSPREDICTIVELATIN12KEYTRANSLATOR_H |
19 #define LOGSPREDICTIVELATIN12KEYTRANSLATOR_H |
20 |
20 |
21 #include <QObject> |
21 #include "logspredictive12keytranslator.h" |
22 #include <QChar> |
|
23 #include <QHash> |
22 #include <QHash> |
24 |
23 |
25 #include "logspredictive12keytranslator.h" |
|
26 class HbInputLanguage; |
|
27 |
24 |
28 //Name: ISO_8859-1:1987 [RFC1345,KXS2] |
25 //Name: ISO_8859-1:1987 [RFC1345,KXS2] |
29 //MIBenum: 4 |
26 //MIBenum: 4 |
30 //Source: ECMA registry |
27 //Source: ECMA registry |
31 const int MIBenumLatin = 4; |
28 const int MIBenumLatin = 4; |
43 explicit LogsPredictiveLatin12KeyTranslator( const HbInputLanguage& lang ); |
40 explicit LogsPredictiveLatin12KeyTranslator( const HbInputLanguage& lang ); |
44 ~LogsPredictiveLatin12KeyTranslator(); |
41 ~LogsPredictiveLatin12KeyTranslator(); |
45 |
42 |
46 public: //from LogsPredictiveTranslator |
43 public: //from LogsPredictiveTranslator |
47 |
44 |
|
45 QStringList patternTokens( const QString& pattern ) const; |
|
46 int hasPatternSeparators( const QString& pattern ) const; |
|
47 QString& trimPattern( QString& pattern, bool tailOnly ) const; |
48 QStringList nameTokens( const QString& name ) const; |
48 QStringList nameTokens( const QString& name ) const; |
49 inline int mib() const {return MIBenumLatin;} |
49 inline int mib() const {return MIBenumLatin;} |
50 |
50 const QString translateChar( const QChar character, bool& ok ) const; |
51 |
|
52 public: //from LogsPredictive12KeyTranslator |
|
53 |
|
54 const QChar translateChar( const QChar character, bool& ok ) const; |
|
55 |
51 |
56 private: |
52 private: |
57 |
53 |
58 void createSpecialMapping(); |
54 void createSpecialMapping(); |
59 |
55 void splitPattern( const QString& pattern, QString& car, QString& cdr ) const; |
|
56 |
60 private: |
57 private: |
61 |
58 |
62 QHash<QChar,QChar> mSpecialKeyMap; |
59 QHash<QChar,QChar> mSpecialKeyMap; |
63 friend class UT_LogsPredictiveLatin12KeyTranslator; |
60 friend class UT_LogsPredictiveLatin12KeyTranslator; |
64 |
61 |