Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index c1020fa..8e529a3 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -208,17 +208,19 @@ void MainWindow::initUI() { | |||
208 | m_keyBar->hide(); | 208 | m_keyBar->hide(); |
209 | 209 | ||
210 | m_kb = new FunctionKeyboard(m_keyBar); | 210 | m_kb = new FunctionKeyboard(m_keyBar); |
211 | connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool, ushort, ushort)), | 211 | connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), |
212 | this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool, ushort, ushort))); | 212 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); |
213 | 213 | ||
214 | m_buttonBar = new QToolBar( this ); | 214 | m_buttonBar = new QToolBar( this ); |
215 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); | 215 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); |
216 | m_buttonBar->setHorizontalStretchable( TRUE ); | 216 | m_buttonBar->setHorizontalStretchable( TRUE ); |
217 | m_buttonBar->hide(); | 217 | m_buttonBar->hide(); |
218 | 218 | ||
219 | /* | ||
219 | m_qb = new QuickButton( m_buttonBar ); | 220 | m_qb = new QuickButton( m_buttonBar ); |
220 | connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ), | 221 | connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ), |
221 | this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); | 222 | this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); |
223 | */ | ||
222 | 224 | ||
223 | 225 | ||
224 | m_connect->setEnabled( false ); | 226 | m_connect->setEnabled( false ); |
@@ -520,9 +522,7 @@ void MainWindow::slotFullscreen() { | |||
520 | } | 522 | } |
521 | 523 | ||
522 | 524 | ||
523 | void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, ushort, ushort) { | 525 | void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { |
524 | |||
525 | //qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released"); | ||
526 | 526 | ||
527 | if ( m_curSession ) { | 527 | if ( m_curSession ) { |
528 | 528 | ||
@@ -531,7 +531,7 @@ void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, u | |||
531 | if (pressed) state = QEvent::KeyPress; | 531 | if (pressed) state = QEvent::KeyPress; |
532 | else state = QEvent::KeyRelease; | 532 | else state = QEvent::KeyRelease; |
533 | 533 | ||
534 | QKeyEvent ke(state, q, u, 0, QString(QChar(u))); | 534 | QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode))); |
535 | 535 | ||
536 | // where should i send this event? doesnt work sending it here | 536 | // where should i send this event? doesnt work sending it here |
537 | QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); | 537 | QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); |