summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console
authorzecke <zecke>2004-10-13 19:50:45 (UTC)
committer zecke <zecke>2004-10-13 19:50:45 (UTC)
commit2e51b60e861912fa525597f6b9de6b83c9cedf94 (patch) (side-by-side diff)
treec212077850c4cdf9570f7d47bb2805fe33d6bfe6 /noncore/apps/opie-console
parent43fdc7bdf61f0e16be759c4083bd340afcf826f8 (diff)
downloadopie-2e51b60e861912fa525597f6b9de6b83c9cedf94.zip
opie-2e51b60e861912fa525597f6b9de6b83c9cedf94.tar.gz
opie-2e51b60e861912fa525597f6b9de6b83c9cedf94.tar.bz2
Remove odebug/owarn
Diffstat (limited to 'noncore/apps/opie-console') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/widget.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp
index c51983f..4a578be 100644
--- a/noncore/apps/opie-console/widget.cpp
+++ b/noncore/apps/opie-console/widget.cpp
@@ -974,92 +974,87 @@ void Widget::onClearSelection()
// For auto-hide, we need to get keypress-events, but we only get them when
// we have focus.
void Widget::doScroll(int lines)
{
scrollbar->setValue(scrollbar->value()+lines);
}
bool Widget::eventFilter( QObject *obj, QEvent *e )
{
if ( (e->type() == QEvent::Accel ||
e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) {
static_cast<QKeyEvent *>( e )->ignore();
return true;
}
if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ )
return FALSE; // not us
if ( e->type() == QEvent::Wheel) {
QApplication::sendEvent(scrollbar, e);
}
#ifdef FAKE_CTRL_AND_ALT
static bool control = FALSE;
static bool alt = FALSE;
-// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl;
bool dele=FALSE;
if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
QKeyEvent* ke = (QKeyEvent*)e;
bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat();
switch (ke->key()) {
case Key_F9: // let this be "Control"
control = keydown;
e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state());
dele=TRUE;
break;
case Key_F13: // let this be "Alt"
alt = keydown;
e = new QKeyEvent(QEvent::KeyPress, Key_Alt, 0, ke->state());
dele=TRUE;
break;
default:
if ( control ) {
int a = toupper(ke->ascii())-64;
if ( a >= 0 && a < ' ' ) {
e = new QKeyEvent(e->type(), ke->key(),
a, ke->state()|ControlButton, QChar(a,0));
dele=TRUE;
}
}
if ( alt ) {
e = new QKeyEvent(e->type(), ke->key(),
ke->ascii(), ke->state()|AltButton, ke->text());
dele=TRUE;
}
}
}
#endif
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent* ke = (QKeyEvent*)e;
actSel=0; // Key stroke implies a screen update, so Widget won't
// know where the current selection is.
-// odebug << "key pressed is 0x" << ke->key() << "" << oendl;
-
if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker
-
-// odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl;
emitText("\\"); // expose
} else
emit keyPressedSignal(ke); // expose
ke->accept();
#ifdef FAKE_CTRL_AND_ALT
if ( dele ) delete e;
#endif
return true; // stop the event
}
if ( e->type() == QEvent::Enter ) {
QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()),
this, SLOT(onClearSelection()) );
}
if ( e->type() == QEvent::Leave ) {
QObject::connect( (QObject*)cb, SIGNAL(dataChanged()),
this, SLOT(onClearSelection()) );
}
return QFrame::eventFilter( obj, e );
}
/* ------------------------------------------------------------------------- */
/* */
/* Frame */
/* */