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() } -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; @@ -85,7 +94,7 @@ 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; @@ -102,7 +111,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) tmpStr = "<qt>"; tmpStr += letter1; - tmpStr += "<font color=\"#7F0000\">"; + tmpStr += "<u><font color=\"#7F0000\">"; tmpStr += letter2; - tmpStr += "</font>"; + tmpStr += "</font></u>"; tmpStr += letter3; tmpStr += "</qt>"; @@ -119,7 +128,7 @@ void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) tmpStr += letter1; tmpStr += letter2; - tmpStr += "<font color=\"#7F0000\">"; + tmpStr += "<u><font color=\"#7F0000\">"; tmpStr += letter3; - tmpStr += "</font></qt>"; + tmpStr += "</font></u></qt>"; setText(tmpStr); @@ -225,4 +234,5 @@ void LetterPicker::clear() void LetterPicker::newLetter( char letter ) { + qWarning("LetterClicked"); emit letterClicked( letter ); |