summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp12
-rw-r--r--kaddressbook/imagewidget.cpp28
-rw-r--r--kaddressbook/imagewidget.h2
3 files changed, 36 insertions, 6 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index c6993e9..bd32859 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -1000,2 +1000,12 @@ void AddresseeEditorWidget::load()
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() );
@@ -1207,5 +1217,5 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text )
1207 } 1217 }
1208
1209 nameBoxChanged(); 1218 nameBoxChanged();
1210 1219
1220
1211 emitModified(); 1221 emitModified();
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index 48370e3..9ee4eac 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -43,2 +43,3 @@
43#include <qpixmap.h> 43#include <qpixmap.h>
44#include <qpushbutton.h>
44#include <qapplication.h> 45#include <qapplication.h>
@@ -54,3 +55,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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() );
@@ -65,3 +66,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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
@@ -81,2 +82,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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 );
@@ -84,3 +90,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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 );
@@ -91,3 +97,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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
@@ -105,2 +111,6 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
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 );
@@ -240,5 +250,13 @@ KABC::Picture ImageWidget::logo() const
240 } 250 }
241
242 return logo; 251 return logo;
243} 252}
253void ImageWidget::removePhoto()
254{
255 setPhoto(KABC::Picture() );
256}
257
258void ImageWidget::removeLogo()
259{
260 setLogo(KABC::Picture() );
261}
244 262
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index b3ca0bd..afb9aa7 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -71,2 +71,4 @@ class ImageWidget : public QWidget
71 void loadLogo(); 71 void loadLogo();
72 void removePhoto();
73 void removeLogo();
72 void updateGUI(); 74 void updateGUI();