author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/opie-console/TEWidget.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/apps/opie-console/TEWidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/TEWidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp index e535296..d168a5e 100644 --- a/noncore/apps/opie-console/TEWidget.cpp +++ b/noncore/apps/opie-console/TEWidget.cpp | |||
@@ -1024,17 +1024,17 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1024 | return FALSE; // not us | 1024 | return FALSE; // not us |
1025 | if ( e->type() == QEvent::Wheel) { | 1025 | if ( e->type() == QEvent::Wheel) { |
1026 | QApplication::sendEvent(scrollbar, e); | 1026 | QApplication::sendEvent(scrollbar, e); |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | #ifdef FAKE_CTRL_AND_ALT | 1029 | #ifdef FAKE_CTRL_AND_ALT |
1030 | static bool control = FALSE; | 1030 | static bool control = FALSE; |
1031 | static bool alt = FALSE; | 1031 | static bool alt = FALSE; |
1032 | // qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); | 1032 | // odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; |
1033 | bool dele=FALSE; | 1033 | bool dele=FALSE; |
1034 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 1034 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { |
1035 | QKeyEvent* ke = (QKeyEvent*)e; | 1035 | QKeyEvent* ke = (QKeyEvent*)e; |
1036 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); | 1036 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); |
1037 | switch (ke->key()) { | 1037 | switch (ke->key()) { |
1038 | case Key_F9: // let this be "Control" | 1038 | case Key_F9: // let this be "Control" |
1039 | control = keydown; | 1039 | control = keydown; |
1040 | e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); | 1040 | e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); |
@@ -1063,21 +1063,21 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1063 | } | 1063 | } |
1064 | #endif | 1064 | #endif |
1065 | 1065 | ||
1066 | if ( e->type() == QEvent::KeyPress ) { | 1066 | if ( e->type() == QEvent::KeyPress ) { |
1067 | QKeyEvent* ke = (QKeyEvent*)e; | 1067 | QKeyEvent* ke = (QKeyEvent*)e; |
1068 | actSel=0; // Key stroke implies a screen update, so TEWidget won't | 1068 | actSel=0; // Key stroke implies a screen update, so TEWidget won't |
1069 | // know where the current selection is. | 1069 | // know where the current selection is. |
1070 | 1070 | ||
1071 | // qDebug("key pressed is 0x%x",ke->key()); | 1071 | // odebug << "key pressed is 0x" << ke->key() << "" << oendl; |
1072 | 1072 | ||
1073 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker | 1073 | if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker |
1074 | 1074 | ||
1075 | // qDebug("key pressed 2 is 0x%x",ke->key()); | 1075 | // odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl; |
1076 | emitText("\\"); // expose | 1076 | emitText("\\"); // expose |
1077 | } else | 1077 | } else |
1078 | emit keyPressedSignal(ke); // expose | 1078 | emit keyPressedSignal(ke); // expose |
1079 | ke->accept(); | 1079 | ke->accept(); |
1080 | #ifdef FAKE_CTRL_AND_ALT | 1080 | #ifdef FAKE_CTRL_AND_ALT |
1081 | if ( dele ) delete e; | 1081 | if ( dele ) delete e; |
1082 | #endif | 1082 | #endif |
1083 | return true; // stop the event | 1083 | return true; // stop the event |