summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abtable.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp26
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 ) {