author | tux_mike <tux_mike> | 2002-04-17 19:45:48 (UTC) |
---|---|---|
committer | tux_mike <tux_mike> | 2002-04-17 19:45:48 (UTC) |
commit | c2c343110573bd8b4d59fbff577969ff23d5c544 (patch) (side-by-side diff) | |
tree | 79cff133d04fa7df83783482e27557191ee2e199 /core/pim/addressbook/abtable.cpp | |
parent | b94bcfb586b838885d7d0503623ea36ee0054464 (diff) | |
download | opie-c2c343110573bd8b4d59fbff577969ff23d5c544.zip opie-c2c343110573bd8b4d59fbff577969ff23d5c544.tar.gz opie-c2c343110573bd8b4d59fbff577969ff23d5c544.tar.bz2 |
Added preliminary version of the Picker
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 17277b4..759cb48 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -152,2 +152,3 @@ void AbTable::init() { + showChar = '\0'; setNumRows( 0 ); @@ -454,3 +455,3 @@ void AbTable::addEntry( const Contact &newCnt ) void AbTable::resizeRows( int size ) { - +/* if (numRows()) { @@ -459,3 +460,4 @@ void AbTable::resizeRows( int size ) { } - } + }*/ + updateVisible(); } @@ -1010,2 +1012,9 @@ void AbTable::setShowCategory( const QString &c ) +void AbTable::setShowByLetter( char c ) +{ + showChar = tolower(c); + qDebug( "AbTable::setShowByLetter %c", showChar); + updateVisible(); +} + QString AbTable::showCategory() const @@ -1034,2 +1043,4 @@ void AbTable::updateVisible() Contact *cnt; + QString fileAsName; + QString tmpStr; visible = 0; @@ -1045,2 +1056,3 @@ void AbTable::updateVisible() cats = cnt->categories(); + fileAsName = cnt->fileAs(); hide = false; @@ -1064,2 +1076,12 @@ void AbTable::updateVisible() } + if ( showChar != '\0' ) { + tmpStr = fileAsName.left(1); + tmpStr = tmpStr.lower(); + qDebug( "updateVisible "); + qDebug( tmpStr ); + qDebug( "updateVisible2 %c", showChar ); + if ( tmpStr != QString(QChar(showChar)) ) { + hide = true; + } + } if ( hide ) { |