author | zautrix <zautrix> | 2005-06-20 06:01:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-20 06:01:55 (UTC) |
commit | 3876e95ff79298e9d95c506973c69790290b611e (patch) (side-by-side diff) | |
tree | 654477f1cf73911d57fff86f0e087faf4021e113 /kabc | |
parent | 19768fad9c35bd2611512dcdb426c879ad080493 (diff) | |
download | kdepimpi-3876e95ff79298e9d95c506973c69790290b611e.zip kdepimpi-3876e95ff79298e9d95c506973c69790290b611e.tar.gz kdepimpi-3876e95ff79298e9d95c506973c69790290b611e.tar.bz2 |
fixes in contact selection
-rw-r--r-- | kabc/addresseedialog.cpp | 18 | ||||
-rw-r--r-- | kabc/addresseedialog.h | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index e89584d..3e7b72c 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -46,2 +46,3 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : setText( Email, addressee.preferredEmail() ); + setText( Category, addressee.categories().join(";") ); } @@ -82,2 +83,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : mAddresseeList->addColumn( i18n("Email") ); + mAddresseeList->addColumn( i18n("Category") ); mAddresseeList->setAllColumnsShowFocus( true ); @@ -88,3 +90,4 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : - mAddresseeEdit = new QLineEdit( listWidget ); + QHBox* searchBox = new QHBox ( listWidget ); + mAddresseeEdit = new QLineEdit( searchBox ); connect( mAddresseeEdit, SIGNAL( returnPressed() ), @@ -92,4 +95,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : mAddresseeEdit->setFocus(); + QPushButton *searchButton = new QPushButton( i18n("Search!"), searchBox ); + connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); - listLayout->addWidget( mAddresseeEdit ); + listLayout->addWidget( searchBox ); @@ -109,5 +114,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : mSelectedList->setFullWidth( true ); - connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), + //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), + // SLOT( removeSelected() ) ); + connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), + SLOT( removeSelected() ) ); + connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ), SLOT( removeSelected() ) ); +#if 0 QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup ); @@ -115,2 +125,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : +#endif connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), @@ -166,2 +177,3 @@ void AddresseeDialog::loadAddressBook() name += (*it).preferredEmail(); + name += (*it).categories().join(";"); #if QT_VERSION >= 0x030000 diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h index 99c74bd..6fab62d 100644 --- a/kabc/addresseedialog.h +++ b/kabc/addresseedialog.h @@ -45,3 +45,3 @@ class AddresseeItem : public QListViewItem */ - enum columns { Name = 0, Email = 1 }; + enum columns { Name = 0, Email = 1,Category = 2 }; |