15 #define LOC QString("VirtualKeyboard: ")
23 setFrameStyle(QFrame::Panel | QFrame::Raised);
34 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No edit receiving output");
39 QString language = lang.toLower();
41 QString theme_file = QString(
"keyboard/%1_").arg(language);
45 LOG(VB_GENERAL, LOG_WARNING,
LOC +
46 QString(
"Cannot find layout for '%1'").arg(language));
51 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Cannot find layout for US English");
63 LOG(VB_GENERAL, LOG_ERR,
LOC +
64 "Cannot find the 'keyboard_container' in your theme");
75 QWidget *tlw = pw->topLevelWidget();
76 QRect pwg = pw->geometry();
77 QRect tlwg = tlw->frameGeometry();
104 if (pw->mapTo(tlw, QPoint(0,pwg.height() +
m_popupHeight + 5)).y()
107 newpos = QPoint(pwg.width() / 2 -
m_popupWidth / 2, pwg.height() + 5);
123 newpos = QPoint(pwg.width() / 2 -
m_popupWidth / 2, pwg.height() + 5);
128 newpos = QPoint(tlwg.width() / 2 -
m_popupWidth / 2, 5);
146 int delx = pw->mapTo(tlw,newpos).x() +
m_popupWidth - tlwg.width() + 5;
147 newpos = QPoint(newpos.x() - (delx > 0 ? delx : 0), newpos.y());
148 delx = pw->mapTo(tlw, newpos).x();
149 newpos = QPoint(newpos.x() - (delx < 0 ? delx : 0), newpos.y());
154 newpos.setX(newpos.x() -
xbase);
155 newpos.setY(newpos.y() -
ybase);
157 this->move( pw->mapToGlobal( newpos ) );
164 LOG(VB_GENERAL, LOG_ERR,
LOC +
165 "Cannot find the UIKeyboardType in your theme");
220 bool handled =
false;
224 for (
int i = 0; i < actions.size() && !handled; i++)
226 QString
action = actions[i];
228 if (action ==
"ESCAPE")