summaryrefslogtreecommitdiff
authoribotty <ibotty>2002-10-13 21:37:12 (UTC)
committer ibotty <ibotty>2002-10-13 21:37:12 (UTC)
commit49269558da49b0429e4b13f4ed8ac2b3ac4f3513 (patch) (side-by-side diff)
tree799475cf2819088c12714258307ceb72652e6895
parent5a6ecdac2e62708b55300ca6eef8441fea0a7b05 (diff)
downloadopie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.zip
opie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.tar.gz
opie-49269558da49b0429e4b13f4ed8ac2b3ac4f3513.tar.bz2
added additional functionality (dont really know what anymore....)
Diffstat (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
@@ -47,55 +47,55 @@ WidgetLayer::WidgetLayer( const Profile &config, QWidget *parent, const char *na
WidgetLayer::~WidgetLayer()
{
// clean up
delete m_image;
}
/* --------------------------------- audio ---------------------------------- */
void WidgetLayer::bell()
{
QApplication::beep();
}
bool WidgetLayer::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
+ return false; // not us
#ifdef FAKE_CTRL_AND_ALT
- static bool control = FALSE;
- static bool alt = FALSE;
+ static bool control = false;
+ static bool alt = false;
// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:");
- bool dele=FALSE;
+ 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;
}
}
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
@@ -99,49 +99,49 @@ public:
/**
* paste content of clipboard
*/
void pasteClipboard();
/**
* reload configuration
* @param const Profile& config, the config to be used (may be the same as in constructor)
*/
virtual void reloadConfig( const Profile& config ) = 0;
/**
* sets the scrollbar (if implemented by successor of this class)
*/
virtual void setScroll( int cursor, int slines ) = 0;
/**
* scrolls (if implemented, by successor of this class)
* @param int value, how much the widget should scroll up (positive value) or down (negative value)
*/
virtual void scroll( int value ) = 0;
-
+
virtual bool eventFilter( QObject *obj, QEvent *event );
signals:
/**
* key was pressed
*/
void keyPressed( QKeyEvent *e );
/**
* whenever Mouse selects something
* @param int button, the button that us pressed :
* 0 left Button
* 3 Button released
* @param int x, x position
* @param int y, y position
*
* // numbering due to layout in old TEWidget
*/
void mousePressed( int button, int x, int y );
/**
* size of image changed
* @param int lines, line count of new size