summaryrefslogtreecommitdiff
path: root/noncore
authoribotty <ibotty>2002-10-13 21:37:12 (UTC)
committer ibotty <ibotty>2002-10-13 21:37:12 (UTC)
commit49269558da49b0429e4b13f4ed8ac2b3ac4f3513 (patch) (unidiff)
tree799475cf2819088c12714258307ceb72652e6895 /noncore
parent5a6ecdac2e62708b55300ca6eef8441fea0a7b05 (diff)
downloadopie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.zip
opie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.tar.gz
opie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.tar.bz2
added additional functionality (dont really know what anymore....)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/widget_layer.cpp8
-rw-r--r--noncore/apps/opie-console/widget_layer.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp
index 6682708..e4b0ede 100644
--- a/noncore/apps/opie-console/widget_layer.cpp
+++ b/noncore/apps/opie-console/widget_layer.cpp
@@ -59,31 +59,31 @@ void WidgetLayer::bell()
59{ 59{
60 QApplication::beep(); 60 QApplication::beep();
61} 61}
62 62
63bool WidgetLayer::eventFilter( QObject *obj, QEvent *e ) 63bool WidgetLayer::eventFilter( QObject *obj, QEvent *e )
64{ 64{
65 if ( (e->type() == QEvent::Accel || 65 if ( (e->type() == QEvent::Accel ||
66 e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) { 66 e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) {
67 static_cast<QKeyEvent *>( e )->ignore(); 67 static_cast<QKeyEvent *>( e )->ignore();
68 return true; 68 return true;
69 } 69 }
70 if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) 70 if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ )
71 return FALSE; // not us 71 return false; // not us
72 72
73#ifdef FAKE_CTRL_AND_ALT 73#ifdef FAKE_CTRL_AND_ALT
74 static bool control = FALSE; 74 static bool control = false;
75 static bool alt = FALSE; 75 static bool alt = false;
76// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); 76// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:");
77 bool dele=FALSE; 77 bool dele = false;
78 if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { 78 if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
79 QKeyEvent* ke = (QKeyEvent*)e; 79 QKeyEvent* ke = (QKeyEvent*)e;
80 bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); 80 bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat();
81 switch (ke->key()) { 81 switch (ke->key()) {
82 case Key_F9: // let this be "Control" 82 case Key_F9: // let this be "Control"
83 control = keydown; 83 control = keydown;
84 e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); 84 e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state());
85 dele=TRUE; 85 dele=TRUE;
86 break; 86 break;
87 case Key_F13: // let this be "Alt" 87 case Key_F13: // let this be "Alt"
88 alt = keydown; 88 alt = keydown;
89 e = new QKeyEvent(QEvent::KeyPress, Key_Alt, 0, ke->state()); 89 e = new QKeyEvent(QEvent::KeyPress, Key_Alt, 0, ke->state());
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h
index 1d96bf4..0c290f3 100644
--- a/noncore/apps/opie-console/widget_layer.h
+++ b/noncore/apps/opie-console/widget_layer.h
@@ -111,25 +111,25 @@ public:
111 111
112 112
113 /** 113 /**
114 * sets the scrollbar (if implemented by successor of this class) 114 * sets the scrollbar (if implemented by successor of this class)
115 */ 115 */
116 virtual void setScroll( int cursor, int slines ) = 0; 116 virtual void setScroll( int cursor, int slines ) = 0;
117 117
118 /** 118 /**
119 * scrolls (if implemented, by successor of this class) 119 * scrolls (if implemented, by successor of this class)
120 * @param int value, how much the widget should scroll up (positive value) or down (negative value) 120 * @param int value, how much the widget should scroll up (positive value) or down (negative value)
121 */ 121 */
122 virtual void scroll( int value ) = 0; 122 virtual void scroll( int value ) = 0;
123 123
124 124
125 virtual bool eventFilter( QObject *obj, QEvent *event ); 125 virtual bool eventFilter( QObject *obj, QEvent *event );
126signals: 126signals:
127 127
128 /** 128 /**
129 * key was pressed 129 * key was pressed
130 */ 130 */
131 void keyPressed( QKeyEvent *e ); 131 void keyPressed( QKeyEvent *e );
132 132
133 /** 133 /**
134 * whenever Mouse selects something 134 * whenever Mouse selects something
135 * @param int button, the button that us pressed : 135 * @param int button, the button that us pressed :