-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 | |||
@@ -25,8 +25,11 @@ You should exclude journals, if you do not want them to sync with a public cale | |||
25 | 25 | ||
26 | KA/Pi: | 26 | KA/Pi: |
27 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | 27 | Added the possibility to in/exclude public/private/confidential contacts to a filter. |
28 | 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 ... | 28 | 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 ... |
29 | Added printing of card view and details view on desktop. | ||
30 | Printing of list view is not working... | ||
31 | Added button for removing pictures in contact editor. | ||
29 | 32 | ||
30 | 33 | ||
31 | ********** VERSION 1.9.17 ************ | 34 | ********** VERSION 1.9.17 ************ |
32 | 35 | ||
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index ae67968..9ea9d04 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -40,9 +40,9 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : | |||
40 | mAddressee( addressee ) | 40 | mAddressee( addressee ) |
41 | { | 41 | { |
42 | QString name = addressee.familyName()+", "+ addressee.givenName(); | 42 | QString name = addressee.familyName()+", "+ addressee.givenName(); |
43 | if ( name.length() == 2 ) | 43 | if ( name.length() == 2 ) |
44 | name = addressee.realName(); | 44 | name = addressee.organization(); |
45 | setText( Name,name); | 45 | setText( Name,name); |
46 | setText( Email, addressee.preferredEmail() ); | 46 | setText( Email, addressee.preferredEmail() ); |
47 | } | 47 | } |
48 | 48 | ||
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index c6993e9..bd32859 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -997,8 +997,18 @@ void AddresseeEditorWidget::load() | |||
997 | } | 997 | } |
998 | 998 | ||
999 | mFormattedNameLabel->setText( mAddressee.formattedName() ); | 999 | mFormattedNameLabel->setText( mAddressee.formattedName() ); |
1000 | 1000 | ||
1001 | mAConfig->setUid( mAddressee.uid() ); | ||
1002 | if ( mAConfig->automaticNameParsing() ) { | ||
1003 | mNameLabel->hide(); | ||
1004 | mNameEdit->show(); | ||
1005 | } else { | ||
1006 | mNameEdit->hide(); | ||
1007 | mNameLabel->setText( mNameEdit->text() ); | ||
1008 | mNameLabel->show(); | ||
1009 | } | ||
1010 | |||
1001 | mRoleEdit->setText( mAddressee.role() ); | 1011 | mRoleEdit->setText( mAddressee.role() ); |
1002 | mOrgEdit->setText( mAddressee.organization() ); | 1012 | mOrgEdit->setText( mAddressee.organization() ); |
1003 | 1013 | ||
1004 | //US mURLEdit->setURL( mAddressee.url().url() ); | 1014 | //US mURLEdit->setURL( mAddressee.url().url() ); |
@@ -1204,11 +1214,11 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text ) | |||
1204 | mAddressee.setFamilyName( addr.familyName() ); | 1214 | mAddressee.setFamilyName( addr.familyName() ); |
1205 | mAddressee.setSuffix( addr.suffix() ); | 1215 | mAddressee.setSuffix( addr.suffix() ); |
1206 | } | 1216 | } |
1207 | } | 1217 | } |
1208 | |||
1209 | nameBoxChanged(); | 1218 | nameBoxChanged(); |
1210 | 1219 | ||
1220 | |||
1211 | emitModified(); | 1221 | emitModified(); |
1212 | } | 1222 | } |
1213 | 1223 | ||
1214 | void AddresseeEditorWidget::nameBoxChanged() | 1224 | void AddresseeEditorWidget::nameBoxChanged() |
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 48370e3..9ee4eac 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp | |||
@@ -40,8 +40,9 @@ | |||
40 | #include <qgroupbox.h> | 40 | #include <qgroupbox.h> |
41 | #include <qlabel.h> | 41 | #include <qlabel.h> |
42 | #include <qlayout.h> | 42 | #include <qlayout.h> |
43 | #include <qpixmap.h> | 43 | #include <qpixmap.h> |
44 | #include <qpushbutton.h> | ||
44 | #include <qapplication.h> | 45 | #include <qapplication.h> |
45 | 46 | ||
46 | #include "imagewidget.h" | 47 | #include "imagewidget.h" |
47 | 48 | ||
@@ -51,9 +52,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
51 | QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(), | 52 | QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(), |
52 | KDialog::spacingHint() ); | 53 | KDialog::spacingHint() ); |
53 | 54 | ||
54 | QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); | 55 | QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); |
55 | QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2, | 56 | QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 4, 2, |
56 | KDialog::spacingHint() ); | 57 | KDialog::spacingHint() ); |
57 | boxLayout->setRowStretch( 2, 1 ); | 58 | boxLayout->setRowStretch( 2, 1 ); |
58 | 59 | ||
59 | mPhotoLabel = new QLabel( photoBox ); | 60 | mPhotoLabel = new QLabel( photoBox ); |
@@ -62,9 +63,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
62 | fac = 6; | 63 | fac = 6; |
63 | mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); | 64 | mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); |
64 | mPhotoLabel->setScaledContents( true ); | 65 | mPhotoLabel->setScaledContents( true ); |
65 | mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 66 | mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
66 | boxLayout->addMultiCellWidget( mPhotoLabel, 0, 2, 0, 0 ); | 67 | boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); |
67 | 68 | ||
68 | mPhotoUrl = new KURLRequester( photoBox ); | 69 | mPhotoUrl = new KURLRequester( photoBox ); |
69 | #ifndef KAB_EMBEDDED | 70 | #ifndef KAB_EMBEDDED |
70 | mPhotoUrl->setFilter( KImageIO::pattern() ); | 71 | mPhotoUrl->setFilter( KImageIO::pattern() ); |
@@ -78,19 +79,24 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
78 | mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), photoBox ); | 79 | mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), photoBox ); |
79 | mUsePhotoUrl->setEnabled( false ); | 80 | mUsePhotoUrl->setEnabled( false ); |
80 | boxLayout->addWidget( mUsePhotoUrl, 1, 1 ); | 81 | boxLayout->addWidget( mUsePhotoUrl, 1, 1 ); |
81 | 82 | ||
83 | QPushButton * pb = new QPushButton( i18n( "Remove" ), photoBox ); | ||
84 | connect( pb, SIGNAL( clicked() ),this, SLOT( removePhoto() ) ); | ||
85 | boxLayout->addWidget( pb, 2, 1 ); | ||
86 | boxLayout->addWidget( new QLabel( photoBox ), 3, 1 ); | ||
87 | |||
82 | topLayout->addWidget( photoBox, 0, 0 ); | 88 | topLayout->addWidget( photoBox, 0, 0 ); |
83 | 89 | ||
84 | QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); | 90 | QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); |
85 | boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); | 91 | boxLayout = new QGridLayout( logoBox->layout(), 4, 2, KDialog::spacingHint() ); |
86 | boxLayout->setRowStretch( 2, 1 ); | 92 | boxLayout->setRowStretch( 2, 1 ); |
87 | 93 | ||
88 | mLogoLabel = new QLabel( logoBox ); | 94 | mLogoLabel = new QLabel( logoBox ); |
89 | mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); | 95 | mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); |
90 | mLogoLabel->setScaledContents( true ); | 96 | mLogoLabel->setScaledContents( true ); |
91 | mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 97 | mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
92 | boxLayout->addMultiCellWidget( mLogoLabel, 0, 2, 0, 0 ); | 98 | boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); |
93 | 99 | ||
94 | mLogoUrl = new KURLRequester( logoBox ); | 100 | mLogoUrl = new KURLRequester( logoBox ); |
95 | #ifndef KAB_EMBEDDED | 101 | #ifndef KAB_EMBEDDED |
96 | mLogoUrl->setFilter( KImageIO::pattern() ); | 102 | mLogoUrl->setFilter( KImageIO::pattern() ); |
@@ -102,8 +108,12 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) | |||
102 | mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), logoBox ); | 108 | mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), logoBox ); |
103 | mUseLogoUrl->setEnabled( false ); | 109 | mUseLogoUrl->setEnabled( false ); |
104 | boxLayout->addWidget( mUseLogoUrl, 1, 1 ); | 110 | boxLayout->addWidget( mUseLogoUrl, 1, 1 ); |
105 | 111 | ||
112 | pb = new QPushButton( i18n( "Remove" ), logoBox ); | ||
113 | connect( pb, SIGNAL( clicked() ),this, SLOT( removeLogo() ) ); | ||
114 | boxLayout->addWidget( pb, 2, 1 ); | ||
115 | boxLayout->addWidget( new QLabel( logoBox ), 3, 1 ); | ||
106 | topLayout->addWidget( logoBox, 1, 0 ); | 116 | topLayout->addWidget( logoBox, 1, 0 ); |
107 | 117 | ||
108 | connect( mPhotoUrl, SIGNAL( textChanged( const QString& ) ), | 118 | connect( mPhotoUrl, SIGNAL( textChanged( const QString& ) ), |
109 | SIGNAL( changed() ) ); | 119 | SIGNAL( changed() ) ); |
@@ -237,11 +247,19 @@ KABC::Picture ImageWidget::logo() const | |||
237 | logo.setType( "PNG" ); | 247 | logo.setType( "PNG" ); |
238 | 248 | ||
239 | } | 249 | } |
240 | } | 250 | } |
241 | |||
242 | return logo; | 251 | return logo; |
243 | } | 252 | } |
253 | void ImageWidget::removePhoto() | ||
254 | { | ||
255 | setPhoto(KABC::Picture() ); | ||
256 | } | ||
257 | |||
258 | void ImageWidget::removeLogo() | ||
259 | { | ||
260 | setLogo(KABC::Picture() ); | ||
261 | } | ||
244 | 262 | ||
245 | void ImageWidget::loadPhoto() | 263 | void ImageWidget::loadPhoto() |
246 | { | 264 | { |
247 | mPhotoLabel->setPixmap( loadPixmap( mPhotoUrl->url() ) ); | 265 | mPhotoLabel->setPixmap( loadPixmap( mPhotoUrl->url() ) ); |
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index b3ca0bd..afb9aa7 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h | |||
@@ -68,8 +68,10 @@ class ImageWidget : public QWidget | |||
68 | 68 | ||
69 | private slots: | 69 | private slots: |
70 | void loadPhoto(); | 70 | void loadPhoto(); |
71 | void loadLogo(); | 71 | void loadLogo(); |
72 | void removePhoto(); | ||
73 | void removeLogo(); | ||
72 | void updateGUI(); | 74 | void updateGUI(); |
73 | 75 | ||
74 | private: | 76 | private: |
75 | QPixmap loadPixmap( const KURL &url ); | 77 | QPixmap loadPixmap( const KURL &url ); |