--- a/src/hbinput/inputwidgets/hbinputsctkeyboard.cpp Fri Sep 17 08:32:10 2010 +0300
+++ b/src/hbinput/inputwidgets/hbinputsctkeyboard.cpp Mon Oct 04 00:38:12 2010 +0300
@@ -35,6 +35,7 @@
#include <hbframedrawer.h>
#include <hbinputsettingproxy.h>
#include <hbmainwindow.h>
+#include <hbwidgetfeedback.h>
#include "hbinputbuttongroup.h"
#include "hbinputbutton.h"
@@ -130,7 +131,7 @@
#endif
/*!
-@proto
+@stable
@hbinput
\class HbSctKeyboard
\brief Touch keyboard for special characters
@@ -436,6 +437,23 @@
return totalKeys;
}
+void HbSctKeyboardPrivate::changePage(HbInputVkbWidget::HbFlickDirection flickDirection)
+{
+ if (mFlickAnimation) {
+ int direction = 1;
+ if (flickDirection == HbInputVkbWidget::HbFlickDirectionRight) {
+ direction = -1;
+ }
+
+ mActivePage = (mActivePage + direction) % mPages;
+ if (mActivePage < 0) {
+ mActivePage = mPages - 1;
+ }
+ updateButtons();
+ updateKeyCodes();
+ }
+}
+
/*!
Constructs the object. owner is the owning input method implementation. Keymap
is key mapping data to be used to display button texts. Key mapping data can be
@@ -564,18 +582,12 @@
{
Q_D(HbSctKeyboard);
- if (d->mFlickAnimation) {
- int direction = 1;
- if (flickDirection == HbInputVkbWidget::HbFlickDirectionRight) {
- direction = -1;
- }
-
- d->mActivePage = (d->mActivePage + direction) % d->mPages;
- if (d->mActivePage < 0) {
- d->mActivePage = d->mPages - 1;
- }
- d->updateButtons();
- d->updateKeyCodes();
+ if (d->mFlickAnimation &&
+ (flickDirection == HbInputVkbWidget::HbFlickDirectionRight ||
+ flickDirection == HbInputVkbWidget::HbFlickDirectionLeft)) {
+
+ HbWidgetFeedback::triggered(this, Hb::InstantFlicked);
+ d->changePage(flickDirection);
}
}
@@ -595,8 +607,10 @@
*/
void HbSctKeyboard::sendKeyReleaseEvent(const QKeyEvent &event)
{
+ Q_D(HbSctKeyboard);
+
if (event.key() == HbInputButton::ButtonKeyCodePageChange) {
- changePage(HbInputVkbWidget::HbFlickDirectionLeft);
+ d->changePage(HbInputVkbWidget::HbFlickDirectionLeft);
} else if (event.key() == HbInputButton::ButtonKeyCodeSmiley) {
showSmileyPicker();
} else {