summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp12
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
@@ -205,23 +205,25 @@ void MainWindow::initUI() {
205 m_keyBar = new QToolBar(this); 205 m_keyBar = new QToolBar(this);
206 addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); 206 addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE );
207 m_keyBar->setHorizontalStretchable( TRUE ); 207 m_keyBar->setHorizontalStretchable( TRUE );
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 );
225 m_disconnect->setEnabled( false ); 227 m_disconnect->setEnabled( false );
226 m_terminate->setEnabled( false ); 228 m_terminate->setEnabled( false );
227 m_transfer->setEnabled( false ); 229 m_transfer->setEnabled( false );
@@ -517,24 +519,22 @@ void MainWindow::slotFullscreen() {
517 } 519 }
518 520
519 m_isFullscreen = !m_isFullscreen; 521 m_isFullscreen = !m_isFullscreen;
520} 522}
521 523
522 524
523void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, ushort, ushort) { 525void 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
529 QEvent::Type state; 529 QEvent::Type state;
530 530
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);
538 ke.ignore(); 538 ke.ignore();
539 } 539 }
540} 540}