31 #include <hbinputpredictioncallback.h> |
31 #include <hbinputpredictioncallback.h> |
32 #include <hbinputvirtualrocker.h> |
32 #include <hbinputvirtualrocker.h> |
33 #include <hbinputvkbwidget.h> |
33 #include <hbinputvkbwidget.h> |
34 |
34 |
35 class QTimer; |
35 class QTimer; |
36 class HbQwertyKeyboard; |
36 class HbQwertyNumericKeyboard; |
|
37 class HbQwerty10x4Keyboard; |
|
38 class HbQwerty11x4Keyboard; |
37 class HbKeyMapData; |
39 class HbKeyMapData; |
38 class HbPredictionEngine; |
40 class HbPredictionEngine; |
39 class HbCandidateList; |
41 class HbCandidateList; |
40 class HbExactWordPopup; |
42 class HbExactWordPopup; |
41 class HbInputSctLandscape; |
43 class HbSctKeyboard; |
42 |
44 |
43 class HbInputModeHandler; |
45 class HbInputModeHandler; |
44 class HbInputBasicQwertyHandler; |
46 class HbInputBasicQwertyHandler; |
45 class HbInputPredictionQwertyHandler; |
47 class HbInputPredictionQwertyHandler; |
46 class HbInputNumericQwertyHandler; |
48 class HbInputNumericQwertyHandler; |
60 void reset(); |
62 void reset(); |
61 void mouseHandler(int x, QMouseEvent* aEvent); |
63 void mouseHandler(int x, QMouseEvent* aEvent); |
62 bool filterEvent(const QEvent* event); |
64 bool filterEvent(const QEvent* event); |
63 |
65 |
64 public slots: |
66 public slots: |
65 void sctCharacterSelected(QString aChar); |
|
66 void orientationAboutToChange(); |
67 void orientationAboutToChange(); |
67 void rockerDirection(int aDirection, HbInputVirtualRocker::RockerSelectionMode aSelectionMode); |
68 void rockerDirection(int aDirection, HbInputVirtualRocker::RockerSelectionMode aSelectionMode); |
68 // keypad related slots |
69 // keypad related slots |
69 void keypadClosed(); |
70 void keypadClosed(); |
70 void keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod vkbCloseMethod); |
71 void keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod vkbCloseMethod); |
71 void flickEvent(HbInputVkbWidget::HbFlickDirection direction); |
72 void flickEvent(HbInputVkbWidget::HbFlickDirection direction); |
72 void mouseMovedOutOfButton(); |
73 void mouseMovedOutOfButton(); |
73 void smileySelected(QString smiley); |
74 void smileySelected(QString smiley); |
74 void predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newState); |
75 void predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newState); |
|
76 void candidatePopupClosed(int closingKey, const QString& candidate); |
75 |
77 |
76 public: // From HbInputMethod |
78 public: // From HbInputMethod |
77 void focusReceived(); |
79 void focusReceived(); |
78 void focusLost(bool focusSwitch); |
80 void focusLost(bool focusSwitch); |
79 void inputStateActivated(const HbInputState& aNewState); |
81 void inputStateActivated(const HbInputState& aNewState); |
80 void candidatePopupClosed(int closingKey); |
|
81 void inputLanguageChanged(const HbInputLanguage &aNewLanguage); |
82 void inputLanguageChanged(const HbInputLanguage &aNewLanguage); |
82 void secondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
83 void secondaryInputLanguageChanged(const HbInputLanguage &newLanguage); |
83 int displaySpecialCharacterTable(QObject* aReceiver); |
84 int displaySpecialCharacterTable(QObject* aReceiver); |
84 bool usePrediction() const; |
85 bool usePrediction() const; |
85 public: //From HbAbstractQwerty |
86 public: //From HbAbstractQwerty |
90 public: |
91 public: |
91 void initializeModeHandlers(); |
92 void initializeModeHandlers(); |
92 void launchCandidatePopup(const QStringList &candidates); |
93 void launchCandidatePopup(const QStringList &candidates); |
93 |
94 |
94 void closeKeypad(); |
95 void closeKeypad(); |
95 void launchCharacterPreviewPane(int key); |
|
96 void switchSpecialCharacterTable(); |
96 void switchSpecialCharacterTable(); |
97 void selectSpecialCharacterTableMode(); |
97 void selectSpecialCharacterTableMode(); |
98 void closeExactWordPopup(); |
98 void closeExactWordPopup(); |
99 void launchExactWordPopup(QString exactWord); |
99 void launchExactWordPopup(QString exactWord); |
100 void closeAutoCompletionPopup(); |
100 void closeAutoCompletionPopup(); |
101 void launchAutoCompletionPopup(const QStringList &candidates); |
101 void launchAutoCompletionPopup(const QStringList &candidates); |
102 |
102 HbKeyboardType currentKeyboardType() const; |
103 protected: |
|
104 void predictiveInputStatusChanged(int newStatus); |
|
105 |
103 |
106 private slots: |
104 private slots: |
107 void candidatePopupCancelled(); |
105 void candidatePopupCancelled(); |
108 |
106 |
109 private: |
107 private: |
114 QPointF getCursorCoordinatePosition(); |
112 QPointF getCursorCoordinatePosition(); |
115 void loadKeymap(const HbInputLanguage &newLanguage); |
113 void loadKeymap(const HbInputLanguage &newLanguage); |
116 |
114 |
117 private: |
115 private: |
118 void openKeypad(HbInputVkbWidget * keypadToOpen, bool inMinimizedMode = false); |
116 void openKeypad(HbInputVkbWidget * keypadToOpen, bool inMinimizedMode = false); |
119 HbQwertyKeyboard* constructKeypad(HbKeypadMode currentInputType); |
117 HbInputVkbWidget *constructKeyboard(HbKeypadMode currentInputType); |
120 |
118 |
121 private: |
119 private: |
122 // mCurrentKeypad contains currently active keypad, we dont need to have |
120 // mCurrentKeypad contains currently active keypad, we dont need to have |
123 // anyother variables to tell us which is current keypad |
121 // anyother variables to tell us which is current keypad |
124 QPointer<HbInputVkbWidget> mCurrentKeypad; |
122 QPointer<HbInputVkbWidget> mCurrentKeypad; |
125 // contains qwerty alpha keypad |
123 // contains qwerty alpha keypad |
126 QPointer<HbQwertyKeyboard> mQwertyAlphaKeypad; |
124 QPointer<HbInputVkbWidget> mQwertyAlphaKeypad; |
|
125 QPointer<HbQwerty10x4Keyboard> mQwerty10x4Keypad; |
|
126 QPointer<HbQwerty11x4Keyboard> mQwerty11x4Keypad; |
127 // contains qwerty numeric keypad |
127 // contains qwerty numeric keypad |
128 QPointer<HbQwertyKeyboard> mQwertyNumericKeypad; |
128 QPointer<HbQwertyNumericKeyboard> mQwertyNumericKeypad; |
129 // contains sct keypad |
129 // contains sct keypad |
130 QPointer<HbInputSctLandscape> mSctKeypad; |
130 QPointer<HbSctKeyboard> mSctKeypad; |
131 |
131 |
132 const HbKeymap *mKeymap; |
132 const HbKeymap *mKeymap; |
133 HbFnState mFnState; |
133 HbFnState mFnState; |
134 HbInputState mPreviousInputState; |
134 HbInputState mPreviousInputState; |
135 |
135 |
136 HbExactWordPopup *mExactWordPopup; |
136 HbExactWordPopup *mExactWordPopup; |
137 HbCandidateList *mCandidatePopup; |
137 HbCandidateList *mCandidatePopup; |
138 bool mOrientationAboutToChange; |
138 bool mOrientationAboutToChange; |
139 HbInputVkbWidget::HbSctView mSctMode; |
|
140 int mShiftKeyState; |
139 int mShiftKeyState; |
141 // mode handlers |
140 // mode handlers |
142 HbInputModeHandler *mActiveModeHandler; |
141 HbInputModeHandler *mActiveModeHandler; |
143 HbInputBasicQwertyHandler *mBasicModeHandler; |
142 HbInputBasicQwertyHandler *mBasicModeHandler; |
144 HbInputPredictionQwertyHandler *mPredictionModeHandler; |
143 HbInputPredictionQwertyHandler *mPredictionModeHandler; |