44 |
44 |
45 public: |
45 public: |
46 HbInputMethod(); |
46 HbInputMethod(); |
47 virtual ~HbInputMethod(); |
47 virtual ~HbInputMethod(); |
48 |
48 |
49 static bool initializeFramework(QApplication& app); |
49 static bool initializeFramework(QApplication &app); |
50 static void forceUnfocus(); |
50 static void forceUnfocus(); |
51 static HbInputMethod* activeInputMethod(); |
51 static HbInputMethod *activeInputMethod(); |
52 static QList<HbInputMethodDescriptor> listCustomInputMethods(); |
52 static QList<HbInputMethodDescriptor> listCustomInputMethods(); |
|
53 static QList<HbInputMethodDescriptor> listCustomInputMethods(Qt::Orientation orientation, const HbInputLanguage &language); |
|
54 static HbInputMethodDescriptor defaultInputMethod(Qt::Orientation orientation); |
53 |
55 |
54 virtual void focusReceived(); |
56 virtual void focusReceived(); |
55 virtual void focusLost(bool focusSwitch = true); |
57 virtual void focusLost(bool focusSwitch = true); |
56 |
58 |
57 bool isActiveMethod() const; |
59 bool isActiveMethod() const; |
58 |
60 |
59 HbInputFocusObject* focusObject() const; |
61 HbInputFocusObject *focusObject() const; |
60 void setFocusObject(HbInputFocusObject* focusObject); |
62 void setFocusObject(HbInputFocusObject *focusObject); |
61 |
63 |
62 void lockFocus(); |
64 void lockFocus(); |
63 void unlockFocus(); |
65 void unlockFocus(); |
64 |
66 |
65 // From QInputContext (do not override). |
67 // From QInputContext (do not override). |
66 void widgetDestroyed(QWidget* widget); |
68 void widgetDestroyed(QWidget *widget); |
67 void setFocusWidget(QWidget* widget); |
69 void setFocusWidget(QWidget *widget); |
68 |
70 |
69 HbInputState inputState() const; |
71 HbInputState inputState() const; |
70 |
72 |
71 bool activateState(const HbInputState& state); |
73 bool activateState(const HbInputState &state); |
72 void updateState(); |
74 void updateState(); |
73 void editorRootState(HbInputState &result) const; |
75 void editorRootState(HbInputState &result) const; |
74 bool automaticTextCaseNeeded() const; |
76 bool automaticTextCaseNeeded() const; |
75 bool activateInputMethod(const HbInputMethodDescriptor &inputMethod); |
77 bool activateInputMethod(const HbInputMethodDescriptor &inputMethod); |
76 |
78 |
77 protected: |
79 protected: |
78 virtual void inputStateActivated(const HbInputState& newState); |
80 virtual void inputStateActivated(const HbInputState &newState); |
79 virtual void inputLanguageChanged(const HbInputLanguage &newLanguage); |
81 virtual void inputLanguageChanged(const HbInputLanguage &newLanguage); |
80 virtual void secondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
82 virtual void secondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
81 bool stateChangeInProgress() const; |
83 bool stateChangeInProgress() const; |
82 |
84 |
83 HbInputLanguage activeLanguage() const; |
85 HbInputLanguage activeLanguage() const; |
84 |
86 |
85 bool modeAllowedInEditor(HbInputModeType mode) const; |
87 bool modeAllowedInEditor(HbInputModeType mode) const; |
86 void inputStateToEditor(const HbInputState& source); |
88 void inputStateToEditor(const HbInputState &source); |
87 |
89 |
88 void constructLatinState(HbInputState &result) const; |
90 void constructLatinState(HbInputState &result) const; |
|
91 |
|
92 HbInputMethodDescriptor descriptor() const; |
89 |
93 |
90 public slots: |
94 public slots: |
91 void globalInputLanguageChanged(const HbInputLanguage &newLanguage); |
95 void globalInputLanguageChanged(const HbInputLanguage &newLanguage); |
92 void globalSecondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
96 void globalSecondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
93 void activeKeyboardChanged(HbKeyboardType newKeyboard); |
97 void activeKeyboardChanged(HbKeyboardType newKeyboard); |
94 void orientationChanged(Qt::Orientation orientation); |
98 void orientationChanged(Qt::Orientation orientation); |
95 virtual void orientationAboutToChange(); |
99 virtual void orientationAboutToChange(); |
96 void editorDeleted(QObject *obj); |
100 void editorDeleted(QObject *obj); |
97 |
101 |
98 protected: |
102 protected: |