-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 | |||
@@ -204,8 +204,10 @@ void MainWindow::initUI() { | |||
204 | m_keyBar->setHorizontalStretchable( TRUE ); | 204 | m_keyBar->setHorizontalStretchable( TRUE ); |
205 | m_keyBar->hide(); | 205 | m_keyBar->hide(); |
206 | 206 | ||
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 | ||
209 | 211 | ||
210 | 212 | ||
211 | m_connect->setEnabled( false ); | 213 | m_connect->setEnabled( false ); |
@@ -475,4 +477,18 @@ void MainWindow::slotFullscreen() { | |||
475 | 477 | ||
476 | m_isFullscreen = !m_isFullscreen; | 478 | m_isFullscreen = !m_isFullscreen; |
477 | 479 | ||
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 | |||
@@ -63,8 +63,10 @@ private slots: | |||
63 | void slotSaveScript(); | 63 | void slotSaveScript(); |
64 | void slotRunScript(); | 64 | void slotRunScript(); |
65 | void slotFullscreen(); | 65 | void slotFullscreen(); |
66 | void slotSessionChanged( Session* ); | 66 | void slotSessionChanged( Session* ); |
67 | void slotKeyReceived(ushort, ushort, bool, bool, bool); | ||
68 | |||
67 | private: | 69 | private: |
68 | void initUI(); | 70 | void initUI(); |
69 | void populateProfiles(); | 71 | void populateProfiles(); |
70 | void create( const Profile& ); | 72 | void create( const Profile& ); |