46 #define HB_DIGIT_ARABIC_INDIC_START_VALUE 0x0660 |
46 #define HB_DIGIT_ARABIC_INDIC_START_VALUE 0x0660 |
47 #define HB_DIGIT_EASTERN_ARABIC_START_VALUE 0x06F0 |
47 #define HB_DIGIT_EASTERN_ARABIC_START_VALUE 0x06F0 |
48 |
48 |
49 |
49 |
50 /*! |
50 /*! |
|
51 @stable |
|
52 @hbcore |
51 \class HbInputUtils |
53 \class HbInputUtils |
52 \brief A collection input related utility methods. |
54 \brief The HbInputUtils class is a collection of input related utility functions. |
53 |
55 |
54 This class contains a collection of static input related utility methods that do not |
56 This class contains a collection of static input related utility functions |
55 naturally belong to any other scope. There are convenience methods for testing |
57 that do not naturally belong to any other scope. There are convenience functions |
56 attributes of keyboard and input mode types, instantiating plugins etc. |
58 for testing keyboard attributes and input mode types, instantiating plugins, and so on. |
57 |
59 |
58 \sa HbInputMethod |
60 \sa HbInputMethod |
59 \sa QInputContextPlugin |
61 \sa QInputContextPlugin |
60 */ |
62 */ |
61 |
63 |
62 /*! |
64 /*! |
63 Finds the fist number character bound to key using given mapping data. |
65 Finds the first number character bound to \a key using the given mapping data. |
64 */ |
66 */ |
65 QChar HbInputUtils::findFirstNumberCharacterBoundToKey(const HbMappedKey *key, |
67 QChar HbInputUtils::findFirstNumberCharacterBoundToKey(const HbMappedKey *key, |
66 const HbInputLanguage language, |
68 const HbInputLanguage language, |
67 const HbInputDigitType digitType) |
69 const HbInputDigitType digitType) |
68 { |
70 { |
136 } |
138 } |
137 } |
139 } |
138 } |
140 } |
139 |
141 |
140 /*! |
142 /*! |
141 Creates an instance of given language database plugin, if valid. |
143 Creates an instance of the given language database plugin, if valid. |
142 */ |
144 */ |
143 HbLanguageDatabaseInterface *HbInputUtils::languageDatabasePluginInstance(const QString &pluginFileName, const QString &subfolder) |
145 HbLanguageDatabaseInterface *HbInputUtils::languageDatabasePluginInstance(const QString &pluginFileName, const QString &subfolder) |
144 { |
146 { |
145 if (!QLibrary::isLibrary(pluginFileName)) { |
147 if (!QLibrary::isLibrary(pluginFileName)) { |
146 qDebug("HbInputUtils::languageDatabasePluginInstance: Not a library!"); |
148 qDebug("HbInputUtils::languageDatabasePluginInstance: Not a library!"); |
168 |
170 |
169 return res; |
171 return res; |
170 } |
172 } |
171 |
173 |
172 /*! |
174 /*! |
173 Lists all the input languages that the set of available input methods supports. Excludes custom input methods. |
175 Lists all the input languages supported by the set of available input methods. Excludes custom input methods. |
174 */ |
176 */ |
175 void HbInputUtils::listSupportedInputLanguages(QList<HbInputLanguage>& results) |
177 void HbInputUtils::listSupportedInputLanguages(QList<HbInputLanguage>& results) |
176 { |
178 { |
177 results = HbInputModeCache::instance()->listInputLanguages(); |
179 results = HbInputModeCache::instance()->listInputLanguages(); |
178 } |
180 } |
179 |
181 |
180 /*! |
182 /*! |
181 This method creates an instance of QWidget and wraps given graphics widget inside it. |
183 This function creates a QWidget instance and wraps the given graphics widget |
182 It creates QGraphicsScene, adds given widget there and creates a view to the scene |
184 inside it. It creates a QGraphicsScene object, adds \a graphicsWidget there, |
183 inside returned QWidget. This is utility method is mainly for internal use. |
185 and creates a view to the scene inside the returned %QWidget. This utility |
|
186 function is mainly for the internal use of the input framework. |
184 */ |
187 */ |
185 QWidget *HbInputUtils::createWrapperWidget(QGraphicsWidget *graphicsWidget) |
188 QWidget *HbInputUtils::createWrapperWidget(QGraphicsWidget *graphicsWidget) |
186 { |
189 { |
187 QWidget *ret = 0; |
190 QWidget *ret = 0; |
188 |
191 |
246 return digitType; |
250 return digitType; |
247 } |
251 } |
248 |
252 |
249 |
253 |
250 /*! |
254 /*! |
251 Returns the proxy widget of the embedded widget in a graphics view ; |
255 Returns the proxy widget of the embedded widget in a graphics view. |
252 if widget does not have the proxy widget then it returns the proxy widget of its window. |
256 If the widget does not have a proxy widget it returns the proxy widget of its window. |
253 otherwise returns 0. |
257 Otherwise returns 0. |
254 */ |
258 */ |
255 QGraphicsProxyWidget *HbInputUtils::graphicsProxyWidget(const QWidget *w) |
259 QGraphicsProxyWidget *HbInputUtils::graphicsProxyWidget(const QWidget *w) |
256 { |
260 { |
257 QGraphicsProxyWidget *pw = w ? w->graphicsProxyWidget() : 0; |
261 QGraphicsProxyWidget *pw = w ? w->graphicsProxyWidget() : 0; |
258 if (w && !pw) { |
262 if (w && !pw) { |
259 pw = w->window() ? w->window()->graphicsProxyWidget() : w->graphicsProxyWidget(); |
263 pw = w->window() ? w->window()->graphicsProxyWidget() : w->graphicsProxyWidget(); |
260 } |
264 } |
261 return pw; |
265 return pw; |
262 } |
266 } |
263 |
267 |
|
268 /*! |
|
269 \fn bool HbInputUtils::isChineseInputMode(HbInputModeType inputMode) |
|
270 Returns \c true if \a inputMode is the Chinese input mode. |
|
271 */ |
|
272 |
|
273 /*! |
|
274 \fn bool HbInputUtils::isQwertyKeyboard(HbKeyboardType keyboardType) |
|
275 Returns \c true if \a keyboardType is a QWERTY keyboard type. |
|
276 */ |
|
277 |
|
278 /*! |
|
279 \fn bool HbInputUtils::isTouchKeyboard(HbKeyboardType keyboardType) |
|
280 Returns \c true if \a keyboardType is a virtual keyboard type. |
|
281 */ |
264 |
282 |
265 // End of file |
283 // End of file |
266 |
284 |