author | hash <hash> | 2002-10-15 16:25:43 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-15 16:25:43 (UTC) |
commit | d0cd09e4a68ca8dc3acf50c13a0acce39cd36b55 (patch) (unidiff) | |
tree | 7562d562c6463a9f28587af3c1138e1f780dfb3d /noncore/apps/opie-console | |
parent | 09ba4d2c79a41b185902519639032a49c85deadb (diff) | |
download | opie-d0cd09e4a68ca8dc3acf50c13a0acce39cd36b55.zip opie-d0cd09e4a68ca8dc3acf50c13a0acce39cd36b55.tar.gz opie-d0cd09e4a68ca8dc3acf50c13a0acce39cd36b55.tar.bz2 |
added a keyReceive slot so sending key events to the TE widget _might_ be possible (havent figure that out yet...)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 29dbcf3..d3b6c8a 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -207,2 +207,4 @@ void MainWindow::initUI() { | |||
207 | m_kb = new FunctionKeyboard(m_keyBar); | 207 | m_kb = new FunctionKeyboard(m_keyBar); |
208 | connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool)), | ||
209 | this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool))); | ||
208 | 210 | ||
@@ -478 +480,15 @@ void MainWindow::slotFullscreen() { | |||
478 | } | 480 | } |
481 | |||
482 | |||
483 | void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool, bool) { | ||
484 | |||
485 | qWarning("received key event! relay to TE widget"); | ||
486 | |||
487 | if ( m_curSession ) { | ||
488 | QKeyEvent ke(QEvent::KeyPress, q, u, 0); | ||
489 | |||
490 | ke.ignore(); | ||
491 | // where should i send this event? doesnt work sending it here | ||
492 | QApplication::sendEvent((QObject *)m_curSession->widgetStack(), &ke); | ||
493 | } | ||
494 | } | ||
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index e63078a..91ca147 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -66,2 +66,4 @@ private slots: | |||
66 | void slotSessionChanged( Session* ); | 66 | void slotSessionChanged( Session* ); |
67 | void slotKeyReceived(ushort, ushort, bool, bool, bool); | ||
68 | |||
67 | private: | 69 | private: |