CHAPTER 5. LOCALIZATION
5.2 INPUT METHOD
A. Overview
To use MIZI Prizm 2.0 Input method, you just need to learn about hide()
and show() functions since MIZI Prizm 2.0 SDK contains most
of libraries regarding to Input Method.
In the system library of MIZI Prizm 2.0, keyboard is settled to be shown(show
()) by default. Therefore, just set focus to be located in text input
area. On the other hand, set hide() if input method is no use.
Note) MIZI Prizm 2.0 currently supports Chinese (simplified / traditional),
English and Korean input method.
See following example :
B. Example
void MzTabWidgetEditor::slotCurrentChanged(QWidget *p)
{
if ((MzAddressbookEditorPhone*)p == m_pPhone) {
dprintf("Keyboard HIDE\n");
MzApplication::instance()->mainWindow ()->inputMethodControl ()->hide();
emit signalChangeView(2);
} else if ((MzAddressbookEditorGeneral*)p == m_pGeneral) {
dprintf("Keyboard SHOW\n");
MzApplication::instance()->mainWindow ()->inputMethodControl ()->show();
emit signalChangeView(0);
} else if ((MzAddressbookEditorDetail*)p == m_pDetail) {
dprintf("Keyboard SHOW\n");
MzApplication::instance()->mainWindow ()->inputMethodControl ()->show();
emit signalChangeView(1);
} else if ((MzAddressbookEditorNote*)p == m_pNote) {
dprintf("Keyboard SHOW\n");
MzApplication::instance()->mainWindow ()->inputMethodControl ()->show();
emit signalChangeView(3);
}
}
|
If input method is required, then
MzApplication::instance()->mainWindow ()->inputMethodControl ()->show();
If input method is NOT required, then
MzApplication::instance()->mainWindow ()->inputMethodControl ()->hide();
|