author | eilers <eilers> | 2002-10-21 16:29:20 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-21 16:29:20 (UTC) |
commit | 507afe645a86191815a2f85380a452ab6797e383 (patch) (unidiff) | |
tree | e69293f25af3d6d8e2125b0f92a097615ddb0a38 /core/pim/addressbook/ablabel.cpp | |
parent | 71c7800e8ae5dc2d701242828ceb8c11bcd96fbe (diff) | |
download | opie-507afe645a86191815a2f85380a452ab6797e383.zip opie-507afe645a86191815a2f85380a452ab6797e383.tar.gz opie-507afe645a86191815a2f85380a452ab6797e383.tar.bz2 |
Some usability updates in picker and find..
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/ablabel.cpp | 43 |
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 | |||
@@ -38,16 +38,53 @@ void AbLabel::init( const OContact &entry ) | |||
38 | { | 38 | { |
39 | ent = entry; | 39 | ent = entry; |
40 | } | 40 | } |
41 | 41 | ||
42 | void AbLabel::sync() | 42 | void AbLabel::sync() |
43 | { | 43 | { |
44 | QString text = ent.toRichText(); | 44 | QString text = ent.toRichText(); |
45 | setText( text ); | 45 | setText( text ); |
46 | } | 46 | } |
47 | 47 | ||
48 | void AbLabel::keyPressEvent( QKeyEvent *e ) | 48 | void AbLabel::keyPressEvent( QKeyEvent *e ) |
49 | { | 49 | { |
50 | if ( e->key() == Qt::Key_F33 ) { | 50 | // Commonly handled keys |
51 | emit okPressed(); | 51 | switch( e->key() ) { |
52 | } | 52 | case Qt::Key_Left: |
53 | qWarning( "Left.."); | ||
54 | case Qt::Key_F33: | ||
55 | qWarning( "OK.."); | ||
56 | emit okPressed(); | ||
57 | break; | ||
58 | } | ||
59 | |||
60 | |||
61 | if ( /* m_inSearch */ false ) { | ||
62 | // Running in seach-mode, therefore we will interprete | ||
63 | // some key differently | ||
64 | qWarning("Received key in search mode"); | ||
65 | switch( e->key() ) { | ||
66 | case Qt::Key_Up: | ||
67 | qWarning("a"); | ||
68 | // emit signalSearchBackward(); | ||
69 | break; | ||
70 | case Qt::Key_Down: | ||
71 | qWarning("b"); | ||
72 | // emit signalSearchNext(); | ||
73 | break; | ||
74 | } | ||
75 | |||
76 | } else { | ||
77 | qWarning("Received key in NON search mode"); | ||
78 | |||
79 | switch( e->key() ) { | ||
80 | case Qt::Key_Up: | ||
81 | qWarning("a"); | ||
82 | // emit signalSearchBackward(); | ||
83 | break; | ||
84 | case Qt::Key_Down: | ||
85 | qWarning("b"); | ||
86 | // emit signalSearchNext(); | ||
87 | break; | ||
88 | } | ||
89 | } | ||
53 | } | 90 | } |