Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index d4dcf7b..97b26db 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -131,4 +131,5 @@ AbTable::AbTable( const QValueList<int> *order, QWidget *parent, const char *nam currFindRow( -1 ), mCat( 0 ), + m_inSearch (false), m_contactdb ("addressbook", 0l, 0l, false) // Handle syncing myself.. ! { @@ -261,4 +262,8 @@ void AbTable::keyPressEvent( QKeyEvent *e ) moveTo( key ); + if ( m_inSearch ) { + // Running in seach-mode, therefore we will interprete + // some key differently + qWarning("Received key in search mode"); switch( e->key() ) { case Qt::Key_Space: @@ -267,7 +272,29 @@ void AbTable::keyPressEvent( QKeyEvent *e ) emit details(); break; + case Qt::Key_Up: + qWarning("a"); + emit signalSearchBackward(); + break; + case Qt::Key_Down: + qWarning("b"); + emit signalSearchNext(); + break; default: QTable::keyPressEvent( e ); } + + } else { + qWarning("Received key in NON search mode"); + + switch( e->key() ) { + case Qt::Key_Space: + case Qt::Key_Return: + case Qt::Key_Enter: + emit details(); + break; + default: + QTable::keyPressEvent( e ); + } + } } |