summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/widget_layer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp
index 0364e66..6682708 100644
--- a/noncore/apps/opie-console/widget_layer.cpp
+++ b/noncore/apps/opie-console/widget_layer.cpp
@@ -29,34 +29,39 @@ WidgetLayer::WidgetLayer( const Profile &config, QWidget *parent, const char *na
29 // when data on clipboard changes, clear selection 29 // when data on clipboard changes, clear selection
30 QObject::connect( (QObject*) m_clipboard, SIGNAL( dataChanged() ), 30 QObject::connect( (QObject*) m_clipboard, SIGNAL( dataChanged() ),
31 (QObject*)this, SLOT( onClearSelection() ) ); 31 (QObject*)this, SLOT( onClearSelection() ) );
32 32
33 // initialize vars: 33 // initialize vars:
34 m_lines = 1; 34 m_lines = 1;
35 m_columns = 1; 35 m_columns = 1;
36 m_resizing = false; 36 m_resizing = false;
37 37
38 // just for demonstrating 38 // just for demonstrating
39 //m_image = QArray<Character>( m_lines * m_columns ); 39 //m_image = QArray<Character>( m_lines * m_columns );
40 m_image = QArray<Character>( 1 ); 40 m_image = QArray<Character>( 1 );
41
42 // we need to install an event filter,
43 // to emit keypresses.
44 qApp->installEventFilter( this );
41 45
42} 46}
43 47
44 48
45WidgetLayer::~WidgetLayer() 49WidgetLayer::~WidgetLayer()
46{ 50{
47 // clean up 51 // clean up
48 delete m_image; 52 delete m_image;
49} 53}
50 54
55
51/* --------------------------------- audio ---------------------------------- */ 56/* --------------------------------- audio ---------------------------------- */
52 57
53void WidgetLayer::bell() 58void WidgetLayer::bell()
54{ 59{
55 QApplication::beep(); 60 QApplication::beep();
56} 61}
57 62
58bool WidgetLayer::eventFilter( QObject *obj, QEvent *e ) 63bool WidgetLayer::eventFilter( QObject *obj, QEvent *e )
59{ 64{
60 if ( (e->type() == QEvent::Accel || 65 if ( (e->type() == QEvent::Accel ||
61 e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) { 66 e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) {
62 static_cast<QKeyEvent *>( e )->ignore(); 67 static_cast<QKeyEvent *>( e )->ignore();