author | eilers <eilers> | 2002-10-21 16:29:20 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-21 16:29:20 (UTC) |
commit | 507afe645a86191815a2f85380a452ab6797e383 (patch) (side-by-side diff) | |
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) (show 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 @@ -75,7 +75,16 @@ void PickerLabel::clearLetter() } -void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) +void PickerLabel::mousePressEvent( QMouseEvent* e ) +{ + // If one pickerlabel is was, and an other is now selected, we + // have to simulate the releaseevent.. Otherwise the new label + // will not get a highlighted letter.. + // Maybe there is a more intelligent solution, but this works and I am tired.. (se) + if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e ); +} + +void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ ) { QString tmpStr; @@ -84,9 +93,9 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) switch (currentLetter) { case 0: - tmpStr = "<qt><font color=\"#7F0000\">"; + tmpStr = "<qt><u><font color=\"#7F0000\">"; tmpStr += letter1; - tmpStr += "</font>"; + tmpStr += "</font></u>"; tmpStr += letter2; tmpStr += letter3; tmpStr += "</qt>"; @@ -101,9 +110,9 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) case 1: tmpStr = "<qt>"; tmpStr += letter1; - tmpStr += "<font color=\"#7F0000\">"; + tmpStr += "<u><font color=\"#7F0000\">"; tmpStr += letter2; - tmpStr += "</font>"; + tmpStr += "</font></u>"; tmpStr += letter3; tmpStr += "</qt>"; @@ -118,9 +127,9 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) tmpStr = "<qt>"; tmpStr += letter1; tmpStr += letter2; - tmpStr += "<font color=\"#7F0000\">"; + tmpStr += "<u><font color=\"#7F0000\">"; tmpStr += letter3; - tmpStr += "</font></qt>"; + tmpStr += "</font></u></qt>"; setText(tmpStr); @@ -224,6 +233,7 @@ void LetterPicker::clear() void LetterPicker::newLetter( char letter ) { + qWarning("LetterClicked"); emit letterClicked( letter ); } |