-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | kabc/addresseedialog.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 12 | ||||
-rw-r--r-- | kaddressbook/imagewidget.cpp | 28 | ||||
-rw-r--r-- | kaddressbook/imagewidget.h | 2 |
5 files changed, 40 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index d8f8323..e53127c 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -26,6 +26,9 @@ You should exclude journals, if you do not want them to sync with a public cale KA/Pi: Added the possibility to in/exclude public/private/confidential contacts to a filter. If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... +Added printing of card view and details view on desktop. +Printing of list view is not working... +Added button for removing pictures in contact editor. ********** VERSION 1.9.17 ************ diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index ae67968..9ea9d04 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -41,7 +41,7 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : { QString name = addressee.familyName()+", "+ addressee.givenName(); if ( name.length() == 2 ) - name = addressee.realName(); + name = addressee.organization(); setText( Name,name); setText( Email, addressee.preferredEmail() ); } diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index c6993e9..bd32859 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -998,6 +998,16 @@ void AddresseeEditorWidget::load() mFormattedNameLabel->setText( mAddressee.formattedName() ); + mAConfig->setUid( mAddressee.uid() ); + if ( mAConfig->automaticNameParsing() ) { + mNameLabel->hide(); + mNameEdit->show(); + } else { + mNameEdit->hide(); + mNameLabel->setText( mNameEdit->text() ); + mNameLabel->show(); + } + mRoleEdit->setText( mAddressee.role() ); mOrgEdit->setText( mAddressee.organization() ); @@ -1205,9 +1215,9 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text ) mAddressee.setSuffix( addr.suffix() ); } } - nameBoxChanged(); + emitModified(); } diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 48370e3..9ee4eac 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -41,6 +41,7 @@ #include <qlabel.h> #include <qlayout.h> #include <qpixmap.h> +#include <qpushbutton.h> #include <qapplication.h> #include "imagewidget.h" @@ -52,7 +53,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) KDialog::spacingHint() ); QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); - QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2, + QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 4, 2, KDialog::spacingHint() ); boxLayout->setRowStretch( 2, 1 ); @@ -63,7 +64,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); mPhotoLabel->setScaledContents( true ); mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - boxLayout->addMultiCellWidget( mPhotoLabel, 0, 2, 0, 0 ); + boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); mPhotoUrl = new KURLRequester( photoBox ); #ifndef KAB_EMBEDDED @@ -79,17 +80,22 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mUsePhotoUrl->setEnabled( false ); boxLayout->addWidget( mUsePhotoUrl, 1, 1 ); + QPushButton * pb = new QPushButton( i18n( "Remove" ), photoBox ); + connect( pb, SIGNAL( clicked() ),this, SLOT( removePhoto() ) ); + boxLayout->addWidget( pb, 2, 1 ); + boxLayout->addWidget( new QLabel( photoBox ), 3, 1 ); + topLayout->addWidget( photoBox, 0, 0 ); QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); - boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); + boxLayout = new QGridLayout( logoBox->layout(), 4, 2, KDialog::spacingHint() ); boxLayout->setRowStretch( 2, 1 ); mLogoLabel = new QLabel( logoBox ); mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); mLogoLabel->setScaledContents( true ); mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - boxLayout->addMultiCellWidget( mLogoLabel, 0, 2, 0, 0 ); + boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); mLogoUrl = new KURLRequester( logoBox ); #ifndef KAB_EMBEDDED @@ -103,6 +109,10 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mUseLogoUrl->setEnabled( false ); boxLayout->addWidget( mUseLogoUrl, 1, 1 ); + pb = new QPushButton( i18n( "Remove" ), logoBox ); + connect( pb, SIGNAL( clicked() ),this, SLOT( removeLogo() ) ); + boxLayout->addWidget( pb, 2, 1 ); + boxLayout->addWidget( new QLabel( logoBox ), 3, 1 ); topLayout->addWidget( logoBox, 1, 0 ); connect( mPhotoUrl, SIGNAL( textChanged( const QString& ) ), @@ -238,9 +248,17 @@ KABC::Picture ImageWidget::logo() const } } - return logo; } +void ImageWidget::removePhoto() +{ + setPhoto(KABC::Picture() ); +} + +void ImageWidget::removeLogo() +{ + setLogo(KABC::Picture() ); +} void ImageWidget::loadPhoto() { diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index b3ca0bd..afb9aa7 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h @@ -69,6 +69,8 @@ class ImageWidget : public QWidget private slots: void loadPhoto(); void loadLogo(); + void removePhoto(); + void removeLogo(); void updateGUI(); private: |