88 |
88 |
89 #if defined(USE_ORBIT_KEYMAP) |
89 #if defined(USE_ORBIT_KEYMAP) |
90 /** |
90 /** |
91 * Construct mappings between keys and characters. |
91 * Construct mappings between keys and characters. |
92 */ |
92 */ |
93 TBool ContructKeyboardMappings(); |
93 void ContructKeyboardMappings(); |
94 |
94 |
95 /** |
95 /** |
96 * Returns a list of languages installed on the phone. |
96 * Returns a list of languages installed on the phone. |
97 */ |
97 */ |
98 QList<HbInputLanguage> AvailableLanguages() const; |
98 QList<HbInputLanguage> AvailableLanguages() const; |
106 * Returns the numeric key id corresponding to a specific character |
106 * Returns the numeric key id corresponding to a specific character |
107 * Considers possible multiple matches for some phone variants |
107 * Considers possible multiple matches for some phone variants |
108 */ |
108 */ |
109 TChar KeyForCharacter(const TChar& aChar) const; |
109 TChar KeyForCharacter(const TChar& aChar) const; |
110 |
110 |
|
111 #if defined(_DEBUG) |
111 TInt KeyIdToNumber(TInt aKeyId) const; |
112 TInt KeyIdToNumber(TInt aKeyId) const; |
112 |
113 #endif // #if defined(_DEBUG) |
|
114 |
113 TChar ArrayIndexToNumberChar(TInt aArrayIndex) const; |
115 TChar ArrayIndexToNumberChar(TInt aArrayIndex) const; |
114 #else // #if defined(USE_ORBIT_KEYMAP) |
116 #else // #if defined(USE_ORBIT_KEYMAP) |
115 TChar GetNumericValueForChar(TChar input) const; |
117 TChar GetNumericValueForChar(TChar input) const; |
116 #endif // #if defined(USE_ORBIT_KEYMAP) |
118 #endif // #if defined(USE_ORBIT_KEYMAP) |
117 |
119 |
118 private: // Data |
120 private: // Data |
119 |
121 |
120 #if defined(USE_ORBIT_KEYMAP) |
122 #if defined(USE_ORBIT_KEYMAP) |
121 // One QString for each key of the keyboard (1-9,0). |
123 // One QString for each key of the keyboard (1-9,0,*,#). |
122 // Each contains all the characters that can originate from that key, |
124 // Each contains all the characters that can originate from that key, |
123 // considering the languages available on the device. |
125 // considering the languages available on the device. |
|
126 // |
|
127 // iKeyMapping[0] has mappings for 1-key, iKeyMapping[1] for 2-key, ... |
|
128 // iKeyMapping[8] for 9-key, iKeyMapping[9] for 0-key, |
|
129 // iKeyMapping[10] for *-key, iKeyMapping[11] for #-key. |
124 QList<QString> iKeyMapping; |
130 QList<QString> iKeyMapping; |
|
131 |
|
132 // Characters that have been hardcoded to certain keys, regardless of |
|
133 // actual keymap. |
|
134 QString iHardcodedChars; |
125 #endif // #if defined(USE_ORBIT_KEYMAP) |
135 #endif // #if defined(USE_ORBIT_KEYMAP) |
126 |
136 |
127 // For unit testing |
137 // For unit testing |
128 friend class UT_CPcsKeyMap; |
138 friend class UT_CPcsKeyMap; |
129 }; |
139 }; |