summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/ablabel.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp43
1 files changed, 40 insertions, 3 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index cf1e39f..ea80700 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -49,5 +49,42 @@ void AbLabel::keyPressEvent( QKeyEvent *e )
{
- if ( e->key() == Qt::Key_F33 ) {
- emit okPressed();
- }
+ // Commonly handled keys
+ switch( e->key() ) {
+ case Qt::Key_Left:
+ qWarning( "Left..");
+ case Qt::Key_F33:
+ qWarning( "OK..");
+ emit okPressed();
+ break;
+ }
+
+
+ if ( /* m_inSearch */ false ) {
+ // Running in seach-mode, therefore we will interprete
+ // some key differently
+ qWarning("Received key in search mode");
+ switch( e->key() ) {
+ case Qt::Key_Up:
+ qWarning("a");
+ // emit signalSearchBackward();
+ break;
+ case Qt::Key_Down:
+ qWarning("b");
+ // emit signalSearchNext();
+ break;
+ }
+
+ } else {
+ qWarning("Received key in NON search mode");
+
+ switch( e->key() ) {
+ case Qt::Key_Up:
+ qWarning("a");
+ // emit signalSearchBackward();
+ break;
+ case Qt::Key_Down:
+ qWarning("b");
+ // emit signalSearchNext();
+ break;
+ }
+ }
}