--- a/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Thu Sep 02 20:16:15 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Fri Sep 17 08:27:32 2010 +0300
@@ -35,6 +35,7 @@
#include <hbscrollbar.h>
#include <hbdevicenotificationdialog.h>
#include <hbparameterlengthlimiter.h>
+#include <hbshrinkingvkbhost.h>
#include <QApplication>
#include <QTimer>
@@ -51,7 +52,8 @@
mViewManager(NULL),
mEditorFactory(NULL),
mCancel(NULL),
- mSaveManager(NULL)
+ mSaveManager(NULL),
+ mVirtualKeyboard(NULL)
{
bool ok;
document()->load(CNT_DETAILEDITOR_XML, &ok);
@@ -88,6 +90,8 @@
mEditorFactory = NULL;
delete mSaveManager;
mSaveManager = NULL;
+ delete mVirtualKeyboard;
+ mVirtualKeyboard = NULL;
}
void CntDetailEditor::setViewId( int aId )
@@ -163,6 +167,11 @@
mDataForm->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded);
mDataForm->setScrollingStyle(HbScrollArea::PanWithFollowOn);
mDataForm->verticalScrollBar()->setInteractive(true);
+
+ mVirtualKeyboard = new HbShrinkingVkbHost(mView);
+
+ connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
+ connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClosed()));
}
void CntDetailEditor::deactivate()
@@ -230,7 +239,7 @@
if (modelItem->contentWidgetData( "preferDigits" ).toBool())
{
- edit->setInputMethodHints( Qt::ImhPreferNumbers );
+ edit->setInputMethodHints( Qt::ImhPreferNumbers | Qt::ImhNoPredictiveText );
}
objName = mDataFormModel->detail().definitionName() + " line edit %1";
@@ -370,4 +379,21 @@
CNT_EXIT
}
+void CntDetailEditor::handleKeypadOpen()
+{
+ CNT_ENTRY
+
+ // enable full screen
+ mView->setContentFullScreen(true);
+ CNT_EXIT
+}
+
+void CntDetailEditor::handleKeypadClosed()
+{
+ CNT_ENTRY
+ // disable full screen
+ mView->setContentFullScreen(false);
+ CNT_EXIT
+}
+
// End of File