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/picker.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/picker.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/picker.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/core/pim/addressbook/picker.cpp b/core/pim/addressbook/picker.cpp index a165451..7f4acb0 100644 --- a/core/pim/addressbook/picker.cpp +++ b/core/pim/addressbook/picker.cpp | |||
@@ -76,5 +76,14 @@ void PickerLabel::clearLetter() | |||
76 | } | 76 | } |
77 | 77 | ||
78 | void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) | 78 | void PickerLabel::mousePressEvent( QMouseEvent* e ) |
79 | { | ||
80 | // If one pickerlabel is was, and an other is now selected, we | ||
81 | // have to simulate the releaseevent.. Otherwise the new label | ||
82 | // will not get a highlighted letter.. | ||
83 | // Maybe there is a more intelligent solution, but this works and I am tired.. (se) | ||
84 | if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e ); | ||
85 | } | ||
86 | |||
87 | void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ ) | ||
79 | { | 88 | { |
80 | QString tmpStr; | 89 | QString tmpStr; |
@@ -85,7 +94,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) | |||
85 | switch (currentLetter) { | 94 | switch (currentLetter) { |
86 | case 0: | 95 | case 0: |
87 | tmpStr = "<qt><font color=\"#7F0000\">"; | 96 | tmpStr = "<qt><u><font color=\"#7F0000\">"; |
88 | tmpStr += letter1; | 97 | tmpStr += letter1; |
89 | tmpStr += "</font>"; | 98 | tmpStr += "</font></u>"; |
90 | tmpStr += letter2; | 99 | tmpStr += letter2; |
91 | tmpStr += letter3; | 100 | tmpStr += letter3; |
@@ -102,7 +111,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) | |||
102 | tmpStr = "<qt>"; | 111 | tmpStr = "<qt>"; |
103 | tmpStr += letter1; | 112 | tmpStr += letter1; |
104 | tmpStr += "<font color=\"#7F0000\">"; | 113 | tmpStr += "<u><font color=\"#7F0000\">"; |
105 | tmpStr += letter2; | 114 | tmpStr += letter2; |
106 | tmpStr += "</font>"; | 115 | tmpStr += "</font></u>"; |
107 | tmpStr += letter3; | 116 | tmpStr += letter3; |
108 | tmpStr += "</qt>"; | 117 | tmpStr += "</qt>"; |
@@ -119,7 +128,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) | |||
119 | tmpStr += letter1; | 128 | tmpStr += letter1; |
120 | tmpStr += letter2; | 129 | tmpStr += letter2; |
121 | tmpStr += "<font color=\"#7F0000\">"; | 130 | tmpStr += "<u><font color=\"#7F0000\">"; |
122 | tmpStr += letter3; | 131 | tmpStr += letter3; |
123 | tmpStr += "</font></qt>"; | 132 | tmpStr += "</font></u></qt>"; |
124 | 133 | ||
125 | setText(tmpStr); | 134 | setText(tmpStr); |
@@ -225,4 +234,5 @@ void LetterPicker::clear() | |||
225 | void LetterPicker::newLetter( char letter ) | 234 | void LetterPicker::newLetter( char letter ) |
226 | { | 235 | { |
236 | qWarning("LetterClicked"); | ||
227 | emit letterClicked( letter ); | 237 | emit letterClicked( letter ); |
228 | 238 | ||