summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-16 23:41:18 (UTC)
committer zautrix <zautrix>2005-01-16 23:41:18 (UTC)
commit33c04477896c52e9cfea2a29facd959f82cbf17a (patch) (unidiff)
treed7e5a882604b3bfb64087738dd61d702d2d96a60
parent507b362d42d5eed6277ad17422b6ba61acca636e (diff)
downloadkdepimpi-33c04477896c52e9cfea2a29facd959f82cbf17a.zip
kdepimpi-33c04477896c52e9cfea2a29facd959f82cbf17a.tar.gz
kdepimpi-33c04477896c52e9cfea2a29facd959f82cbf17a.tar.bz2
several fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--kabc/addresseedialog.cpp2
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp12
-rw-r--r--kaddressbook/imagewidget.cpp28
-rw-r--r--kaddressbook/imagewidget.h2
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
@@ -23,12 +23,15 @@ If opened, this pulldown list should now has the right time highlighted.
23Added the possibility to exclude events/todos/journals in a filter. 23Added the possibility to exclude events/todos/journals in a filter.
24You should exclude journals, if you do not want them to sync with a public calendar. 24You should exclude journals, if you do not want them to sync with a public calendar.
25 25
26KA/Pi: 26KA/Pi:
27Added the possibility to in/exclude public/private/confidential contacts to a filter. 27Added the possibility to in/exclude public/private/confidential contacts to a filter.
28If 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 ... 28If 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 ...
29Added printing of card view and details view on desktop.
30Printing of list view is not working...
31Added button for removing pictures in contact editor.
29 32
30 33
31********** VERSION 1.9.17 ************ 34********** VERSION 1.9.17 ************
32 35
33KO/Pi: 36KO/Pi:
34Fixed that tooltips were not updated after moving an item in agenda view. 37Fixed that tooltips were not updated after moving an item in agenda view.
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index ae67968..9ea9d04 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -38,13 +38,13 @@ using namespace KABC;
38AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : 38AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
39 QListViewItem( parent ), 39 QListViewItem( parent ),
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
49QString AddresseeItem::key( int column, bool ) const 49QString AddresseeItem::key( int column, bool ) const
50{ 50{
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index c6993e9..bd32859 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -995,12 +995,22 @@ void AddresseeEditorWidget::load()
995 else 995 else
996 mFormattedNameType = NameEditDialog::CustomName; 996 mFormattedNameType = NameEditDialog::CustomName;
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() );
1005 mURLEdit->setText( mAddressee.url().prettyURL() ); 1015 mURLEdit->setText( mAddressee.url().prettyURL() );
1006//US?? mURLEdit->home( false ); 1016//US?? mURLEdit->home( false );
@@ -1202,15 +1212,15 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text )
1202 mAddressee.setGivenName( addr.givenName() ); 1212 mAddressee.setGivenName( addr.givenName() );
1203 mAddressee.setAdditionalName( addr.additionalName() ); 1213 mAddressee.setAdditionalName( addr.additionalName() );
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
1214void AddresseeEditorWidget::nameBoxChanged() 1224void AddresseeEditorWidget::nameBoxChanged()
1215{ 1225{
1216 KABC::Addressee addr; 1226 KABC::Addressee addr;
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index 48370e3..9ee4eac 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -38,35 +38,36 @@
38 38
39#include <qcheckbox.h> 39#include <qcheckbox.h>
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
48ImageWidget::ImageWidget( QWidget *parent, const char *name ) 49ImageWidget::ImageWidget( QWidget *parent, const char *name )
49 : QWidget( parent, name ) 50 : QWidget( parent, name )
50{ 51{
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 );
60 int fac = 9; 61 int fac = 9;
61 if ( QApplication::desktop()->width() > 320 ) 62 if ( QApplication::desktop()->width() > 320 )
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() );
71#else //KAB_EMBEDDED 72#else //KAB_EMBEDDED
72//US qDebug("ImageWidget::ImageWidget KImageIO not defined. Does this harm ???"); 73//US qDebug("ImageWidget::ImageWidget KImageIO not defined. Does this harm ???");
@@ -76,23 +77,28 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
76 boxLayout->addWidget( mPhotoUrl, 0, 1 ); 77 boxLayout->addWidget( mPhotoUrl, 0, 1 );
77 78
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() );
97#else //KAB_EMBEDDED 103#else //KAB_EMBEDDED
98//US qDebug("ImageWidget::ImageWidget KImageIO not defined 2"); 104//US qDebug("ImageWidget::ImageWidget KImageIO not defined 2");
@@ -100,12 +106,16 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
100 boxLayout->addWidget( mLogoUrl, 0, 1 ); 106 boxLayout->addWidget( mLogoUrl, 0, 1 );
101 107
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() ) );
110 connect( mPhotoUrl, SIGNAL( urlSelected( const QString& ) ), 120 connect( mPhotoUrl, SIGNAL( urlSelected( const QString& ) ),
111 SLOT( loadPhoto() ) ); 121 SLOT( loadPhoto() ) );
@@ -235,15 +245,23 @@ KABC::Picture ImageWidget::logo() const
235#endif //KAB_EMBEDDED 245#endif //KAB_EMBEDDED
236 246
237 logo.setType( "PNG" ); 247 logo.setType( "PNG" );
238 248
239 } 249 }
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
245void ImageWidget::loadPhoto() 263void ImageWidget::loadPhoto()
246{ 264{
247 mPhotoLabel->setPixmap( loadPixmap( mPhotoUrl->url() ) ); 265 mPhotoLabel->setPixmap( loadPixmap( mPhotoUrl->url() ) );
248} 266}
249 267
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index b3ca0bd..afb9aa7 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -66,12 +66,14 @@ class ImageWidget : public QWidget
66 signals: 66 signals:
67 void changed(); 67 void changed();
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 );
76 78
77 KURLRequester *mPhotoUrl; 79 KURLRequester *mPhotoUrl;