summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Side-by-side diff
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() {
m_keyBar = new QToolBar(this);
addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE );
m_keyBar->setHorizontalStretchable( TRUE );
m_keyBar->hide();
m_kb = new FunctionKeyboard(m_keyBar);
- connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool, ushort, ushort)),
- this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool, ushort, ushort)));
+ connect(m_kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)),
+ this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool)));
m_buttonBar = new QToolBar( this );
addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE );
m_buttonBar->setHorizontalStretchable( TRUE );
m_buttonBar->hide();
+ /*
m_qb = new QuickButton( m_buttonBar );
connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ),
this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) );
+ */
m_connect->setEnabled( false );
m_disconnect->setEnabled( false );
m_terminate->setEnabled( false );
m_transfer->setEnabled( false );
@@ -517,24 +519,22 @@ void MainWindow::slotFullscreen() {
}
m_isFullscreen = !m_isFullscreen;
}
-void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool, ushort, ushort) {
-
- //qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released");
+void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
if ( m_curSession ) {
QEvent::Type state;
if (pressed) state = QEvent::KeyPress;
else state = QEvent::KeyRelease;
- QKeyEvent ke(state, q, u, 0, QString(QChar(u)));
+ QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode)));
// where should i send this event? doesnt work sending it here
QApplication::sendEvent((QObject *)m_curSession->widget(), &ke);
ke.ignore();
}
}