365 Setting proxy emits a signal when any of the monitored settings changes. This |
365 Setting proxy emits a signal when any of the monitored settings changes. This |
366 method connects those signals to given object. |
366 method connects those signals to given object. |
367 |
367 |
368 \sa disconnectObservingObject |
368 \sa disconnectObservingObject |
369 \sa globalInputLanguageChanged |
369 \sa globalInputLanguageChanged |
370 \sa activeHwKeyboardChanged |
|
371 \sa predictiveInputStateChanged |
370 \sa predictiveInputStateChanged |
372 \sa orientationAboutToChange |
371 \sa orientationAboutToChange |
373 \sa orientationChanged |
372 \sa orientationChanged |
374 \sa characterPreviewStateForQwertyChanged |
373 \sa characterPreviewStateForQwertyChanged |
375 \sa keypressTimeoutChanged |
374 \sa keypressTimeoutChanged |
381 { |
380 { |
382 if (aObserver) { |
381 if (aObserver) { |
383 connect(this, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalInputLanguageChanged(const HbInputLanguage &))); |
382 connect(this, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalInputLanguageChanged(const HbInputLanguage &))); |
384 connect(this, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalSecondaryInputLanguageChanged(const HbInputLanguage &))); |
383 connect(this, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalSecondaryInputLanguageChanged(const HbInputLanguage &))); |
385 connect(this, SIGNAL(activeKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeKeyboardChanged(HbKeyboardType))); |
384 connect(this, SIGNAL(activeKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeKeyboardChanged(HbKeyboardType))); |
386 connect(this, SIGNAL(activeHwKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeHwKeyboardChanged(HbKeyboardType))); |
|
387 connect(this, SIGNAL(activeTouchKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeTouchKeyboardChanged(HbKeyboardType))); |
|
388 connect(this, SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), aObserver, SLOT(predictiveInputStateChanged(HbKeyboardSettingFlags, bool))); |
|
389 connect(this, SIGNAL(orientationAboutToChange()), aObserver, SLOT(orientationAboutToChange())); |
385 connect(this, SIGNAL(orientationAboutToChange()), aObserver, SLOT(orientationAboutToChange())); |
390 connect(this, SIGNAL(orientationChanged(Qt::Orientation)), aObserver, SLOT(orientationChanged(Qt::Orientation))); |
386 connect(this, SIGNAL(orientationChanged(Qt::Orientation)), aObserver, SLOT(orientationChanged(Qt::Orientation))); |
391 /* Setting listeners not implemented yet |
|
392 connect(this, SIGNAL(characterPreviewStateForQwertyChanged(bool)), aObserver, SLOT(characterPreviewStateForQwertyChanged(bool))); |
|
393 connect(this, SIGNAL(keypressTimeoutChanged(int)), aObserver, SLOT(keypressTimeoutChanged(int))); |
|
394 connect(this, SIGNAL(autocompletionStateChanged(HbKeyboardSettingFlags, bool)), aObserver, SLOT(autocompletionStateChanged(HbKeyboardSettingFlags, bool))); |
|
395 connect(this, SIGNAL(typingCorrectionLevelChanged(HbTypingCorrectionLevel)), aObserver, SLOT(typingCorrectionLevelChanged(HbTypingCorrectionLevel))); |
|
396 connect(this, SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), aObserver, SLOT(primaryCandidateModeChanged(HbPrimaryCandidateMode))); |
|
397 */ |
|
398 } |
387 } |
399 } |
388 } |
400 |
389 |
401 /*! |
390 /*! |
402 Disconnects given object from the setting proxy. |
391 Disconnects given object from the setting proxy. |
406 void HbInputSettingProxy::disconnectObservingObject(QObject* aObserver) |
395 void HbInputSettingProxy::disconnectObservingObject(QObject* aObserver) |
407 { |
396 { |
408 if (aObserver) { |
397 if (aObserver) { |
409 disconnect(this, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalInputLanguageChanged(const HbInputLanguage &))); |
398 disconnect(this, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalInputLanguageChanged(const HbInputLanguage &))); |
410 disconnect(this, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalSecondaryInputLanguageChanged(const HbInputLanguage &))); |
399 disconnect(this, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), aObserver, SLOT(globalSecondaryInputLanguageChanged(const HbInputLanguage &))); |
411 disconnect(this, SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), aObserver, SLOT(predictiveInputStateChanged(HbKeyboardSettingFlags, bool))); |
|
412 disconnect(this, SIGNAL(activeKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeKeyboardChanged(HbKeyboardType))); |
400 disconnect(this, SIGNAL(activeKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeKeyboardChanged(HbKeyboardType))); |
413 disconnect(this, SIGNAL(activeHwKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeHwKeyboardChanged(HbKeyboardType))); |
|
414 disconnect(this, SIGNAL(activeTouchKeyboardChanged(HbKeyboardType)), aObserver, SLOT(activeTouchKeyboardChanged(HbKeyboardType))); |
|
415 disconnect(this, SIGNAL(orientationAboutToChange()), aObserver, SLOT(orientationAboutToChange())); |
401 disconnect(this, SIGNAL(orientationAboutToChange()), aObserver, SLOT(orientationAboutToChange())); |
416 disconnect(this, SIGNAL(orientationChanged(Qt::Orientation)), aObserver, SLOT(orientationChanged(Qt::Orientation))); |
402 disconnect(this, SIGNAL(orientationChanged(Qt::Orientation)), aObserver, SLOT(orientationChanged(Qt::Orientation))); |
417 /* Setting listeners not implemented yet |
|
418 disconnect(this, SIGNAL(characterPreviewStateForQwertyChanged(bool)), aObserver, SLOT(characterPreviewStateForQwertyChanged(bool))); |
|
419 disconnect(this, SIGNAL(keypressTimeoutChanged(int)), aObserver, SLOT(keypressTimeoutChanged(int))); |
|
420 disconnect(this, SIGNAL(autocompletionStateChanged(HbKeyboardSettingFlags, bool)), aObserver, SLOT(autocompletionStateChanged(HbKeyboardSettingFlags, bool))); |
|
421 disconnect(this, SIGNAL(typingCorrectionLevelChanged(HbTypingCorrectionLevel)), aObserver, SLOT(typingCorrectionLevelChanged(HbTypingCorrectionLevel))); |
|
422 disconnect(this, SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), aObserver, SLOT(primaryCandidateModeChanged(HbPrimaryCandidateMode))); |
|
423 */ |
|
424 } |
403 } |
425 } |
404 } |
426 |
405 |
427 /*! |
406 /*! |
428 Returns active input language. This is system wide value, an editor and input state machine may override this by defining |
407 Returns active input language. This is system wide value, an editor and input state machine may override this by defining |
654 d->unlock(); |
631 d->unlock(); |
655 if (notify) { |
632 if (notify) { |
656 emit activeKeyboardChanged(keyboard); |
633 emit activeKeyboardChanged(keyboard); |
657 } |
634 } |
658 } |
635 } |
659 } |
|
660 |
|
661 /*! |
|
662 \deprecated HbInputSettingProxy::predictiveInputStatus() |
|
663 is deprecated. Use predictiveInputStatusForITUT or predictiveInputStatusForQwerty instead. |
|
664 */ |
|
665 int HbInputSettingProxy::predictiveInputStatus() const |
|
666 { |
|
667 return predictiveInputStatusForActiveKeyboard(); |
|
668 } |
|
669 |
|
670 /*! |
|
671 \deprecated HbInputSettingProxy::setPredictiveInputStatus(int newStatus) |
|
672 is deprecated. Use setPredictiveInputStatusForITUT or setPredictiveInputStatusForQwerty instead. |
|
673 */ |
|
674 void HbInputSettingProxy::setPredictiveInputStatus(int newStatus) |
|
675 { |
|
676 setPredictiveInputStatusForActiveKeyboard(newStatus); |
|
677 } |
636 } |
678 |
637 |
679 /*! |
638 /*! |
680 Returns the status of predictive input feature. Returns true if any one of given |
639 Returns the status of predictive input feature. Returns true if any one of given |
681 keyboard types has the prediction enabled. An editor instance may still forbid |
640 keyboard types has the prediction enabled. An editor instance may still forbid |