author | tux_mike <tux_mike> | 2002-04-17 20:46:18 (UTC) |
---|---|---|
committer | tux_mike <tux_mike> | 2002-04-17 20:46:18 (UTC) |
commit | 7b19e1d98d5acf01102ac057ec077fc036c034c6 (patch) (side-by-side diff) | |
tree | a5ec8752ba8cbf9c5c037f1ec3552be544cc8b3f /core/pim/addressbook/picker.cpp | |
parent | 106073977316103f057930daf45f3a083114d48d (diff) | |
download | opie-7b19e1d98d5acf01102ac057ec077fc036c034c6.zip opie-7b19e1d98d5acf01102ac057ec077fc036c034c6.tar.gz opie-7b19e1d98d5acf01102ac057ec077fc036c034c6.tar.bz2 |
Added a Letter Picker
Diffstat (limited to 'core/pim/addressbook/picker.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/picker.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/pim/addressbook/picker.cpp b/core/pim/addressbook/picker.cpp index 06dcc7d..a165451 100644 --- a/core/pim/addressbook/picker.cpp +++ b/core/pim/addressbook/picker.cpp @@ -70,76 +70,72 @@ void PickerLabel::clearLetter() tmpStr += "</qt>"; setText(tmpStr); currentLetter = 0; } void PickerLabel::mouseReleaseEvent( QMouseEvent *e ) { QString tmpStr; - if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3) + if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3 && lastLetter != '\0') QTimer::singleShot( 0, this, SLOT(emitClearSignal()) ); - qDebug( "a" ); switch (currentLetter) { case 0: tmpStr = "<qt><font color=\"#7F0000\">"; tmpStr += letter1; tmpStr += "</font>"; tmpStr += letter2; tmpStr += letter3; tmpStr += "</qt>"; setText(tmpStr); currentLetter++; lastLetter = letter1; emit selectedLetter( letter1 ); - qDebug( "PickerLabel::mouseReleaseEvent %c", letter1 ); break; case 1: tmpStr = "<qt>"; tmpStr += letter1; tmpStr += "<font color=\"#7F0000\">"; tmpStr += letter2; tmpStr += "</font>"; tmpStr += letter3; tmpStr += "</qt>"; setText(tmpStr); currentLetter++; lastLetter = letter2; emit selectedLetter( letter2 ); - qDebug( "PickerLabel::mouseReleaseEvent %c", letter2 ); break; case 2: tmpStr = "<qt>"; tmpStr += letter1; tmpStr += letter2; tmpStr += "<font color=\"#7F0000\">"; tmpStr += letter3; tmpStr += "</font></qt>"; setText(tmpStr); currentLetter++; lastLetter = letter3; emit selectedLetter( letter3 ); - qDebug( "PickerLabel::mouseReleaseEvent %c", letter3 ); break; default: clearLetter(); lastLetter = '\0'; emit selectedLetter( '\0' ); } } void PickerLabel::emitClearSignal() { @@ -219,16 +215,15 @@ void LetterPicker::clear() lblDEF->clearLetter(); lblGHI->clearLetter(); lblJKL->clearLetter(); lblMNO->clearLetter(); lblPQR->clearLetter(); lblSTU->clearLetter(); lblVWX->clearLetter(); lblYZ->clearLetter(); } void LetterPicker::newLetter( char letter ) { - qDebug( "LetterPicker::newLetter %c", letter ); emit letterClicked( letter ); } |