summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-20 06:01:55 (UTC)
committer zautrix <zautrix>2005-06-20 06:01:55 (UTC)
commit3876e95ff79298e9d95c506973c69790290b611e (patch) (unidiff)
tree654477f1cf73911d57fff86f0e087faf4021e113
parent19768fad9c35bd2611512dcdb426c879ad080493 (diff)
downloadkdepimpi-3876e95ff79298e9d95c506973c69790290b611e.zip
kdepimpi-3876e95ff79298e9d95c506973c69790290b611e.tar.gz
kdepimpi-3876e95ff79298e9d95c506973c69790290b611e.tar.bz2
fixes in contact selection
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--kabc/addresseedialog.cpp18
-rw-r--r--kabc/addresseedialog.h2
3 files changed, 18 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 0ebd853..c4557ef 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -12,2 +12,4 @@ KA/Pi:
12In the addressee selection dialog now the formatted name is shown, if not empty. 12In the addressee selection dialog now the formatted name is shown, if not empty.
13Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
14Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
13 15
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 ) :
46 setText( Email, addressee.preferredEmail() ); 46 setText( Email, addressee.preferredEmail() );
47 setText( Category, addressee.categories().join(";") );
47} 48}
@@ -82,2 +83,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
82 mAddresseeList->addColumn( i18n("Email") ); 83 mAddresseeList->addColumn( i18n("Email") );
84 mAddresseeList->addColumn( i18n("Category") );
83 mAddresseeList->setAllColumnsShowFocus( true ); 85 mAddresseeList->setAllColumnsShowFocus( true );
@@ -88,3 +90,4 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
88 90
89 mAddresseeEdit = new QLineEdit( listWidget ); 91 QHBox* searchBox = new QHBox ( listWidget );
92 mAddresseeEdit = new QLineEdit( searchBox );
90 connect( mAddresseeEdit, SIGNAL( returnPressed() ), 93 connect( mAddresseeEdit, SIGNAL( returnPressed() ),
@@ -92,4 +95,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
92 mAddresseeEdit->setFocus(); 95 mAddresseeEdit->setFocus();
96 QPushButton *searchButton = new QPushButton( i18n("Search!"), searchBox );
97 connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) );
93 98
94 listLayout->addWidget( mAddresseeEdit ); 99 listLayout->addWidget( searchBox );
95 100
@@ -109,5 +114,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
109 mSelectedList->setFullWidth( true ); 114 mSelectedList->setFullWidth( true );
110 connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), 115 //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
116 // SLOT( removeSelected() ) );
117 connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ),
118 SLOT( removeSelected() ) );
119 connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ),
111 SLOT( removeSelected() ) ); 120 SLOT( removeSelected() ) );
112 121
122#if 0
113 QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup ); 123 QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup );
@@ -115,2 +125,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
115 125
126#endif
116 connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), 127 connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ),
@@ -166,2 +177,3 @@ void AddresseeDialog::loadAddressBook()
166 name += (*it).preferredEmail(); 177 name += (*it).preferredEmail();
178 name += (*it).categories().join(";");
167#if QT_VERSION >= 0x030000 179#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
45 */ 45 */
46 enum columns { Name = 0, Email = 1 }; 46 enum columns { Name = 0, Email = 1,Category = 2 };
47 47