00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "contacteditorwidget.h"
00023
00024 #include "addresseditwidget.h"
00025 #include "contacteditorpageplugin.h"
00026 #include "contactmetadata_p.h"
00027 #include "dateeditwidget.h"
00028 #include "displaynameeditwidget.h"
00029 #include "emaileditwidget.h"
00030 #include "freebusyeditwidget.h"
00031 #include "geoeditwidget.h"
00032 #include "imagewidget.h"
00033 #include "imeditwidget.h"
00034 #include "nameeditwidget.h"
00035 #include "phoneeditwidget.h"
00036 #include "soundeditwidget.h"
00037
00038 #include <kconfig.h>
00039 #include <kconfiggroup.h>
00040 #include <klineedit.h>
00041 #include <klocale.h>
00042 #include <kstandarddirs.h>
00043 #include <ktabwidget.h>
00044 #include <ktextedit.h>
00045 #include <kurlrequester.h>
00046
00047 #include <QtCore/QDirIterator>
00048 #include <QtCore/QPluginLoader>
00049 #include <QtGui/QGroupBox>
00050 #include <QtGui/QLabel>
00051 #include <QtGui/QLayout>
00052
00053 class ContactEditorWidget::Private
00054 {
00055 public:
00056 Private( ContactEditorWidget *parent )
00057 : mParent( parent )
00058 {
00059 }
00060
00061 void initGui();
00062 void initGuiContactTab();
00063 void initGuiLocationTab();
00064 void initGuiBusinessTab();
00065 void initGuiPersonalTab();
00066
00067 void loadCustomPages();
00068
00069 QString loadCustom( const KABC::Addressee &contact, const QString &key ) const;
00070 void storeCustom( KABC::Addressee &contact, const QString &key, const QString &value ) const;
00071
00072 ContactEditorWidget *mParent;
00073 KTabWidget *mTabWidget;
00074
00075
00076 NameEditWidget *mNameWidget;
00077 ImageWidget *mPhotoWidget;
00078 DisplayNameEditWidget *mDisplayNameWidget;
00079 KLineEdit *mNickNameWidget;
00080 SoundEditWidget *mPronunciationWidget;
00081
00082
00083 EmailEditWidget *mEmailWidget;
00084 KLineEdit *mHomepageWidget;
00085 KLineEdit *mBlogWidget;
00086 IMEditWidget *mIMWidget;
00087
00088
00089 PhoneEditWidget *mPhonesWidget;
00090
00091
00092 AddressEditWidget *mAddressesWidget;
00093
00094
00095 GeoEditWidget *mCoordinatesWidget;
00096
00097
00098 ImageWidget *mLogoWidget;
00099 KLineEdit *mOrganizationWidget;
00100 KLineEdit *mProfessionWidget;
00101 KLineEdit *mTitleWidget;
00102 KLineEdit *mDepartmentWidget;
00103 KLineEdit *mOfficeWidget;
00104 KLineEdit *mManagerWidget;
00105 KLineEdit *mAssistantWidget;
00106
00107
00108 FreeBusyEditWidget *mFreeBusyWidget;
00109
00110
00111 KTextEdit *mNotesWidget;
00112
00113
00114 DateEditWidget *mBirthdateWidget;
00115 DateEditWidget *mAnniversaryWidget;
00116
00117
00118 KLineEdit *mPartnerWidget;
00119
00120
00121 QList<Akonadi::ContactEditorPagePlugin*> mCustomPages;
00122 };
00123
00124 void ContactEditorWidget::Private::initGui()
00125 {
00126 QVBoxLayout *layout = new QVBoxLayout( mParent );
00127 layout->setMargin( 0 );
00128
00129 mTabWidget = new KTabWidget( mParent );
00130 layout->addWidget( mTabWidget );
00131
00132 initGuiContactTab();
00133 initGuiLocationTab();
00134 initGuiBusinessTab();
00135 initGuiPersonalTab();
00136
00137 loadCustomPages();
00138 }
00139
00140 void ContactEditorWidget::Private::initGuiContactTab()
00141 {
00142 QWidget *widget = new QWidget;
00143 QVBoxLayout *layout = new QVBoxLayout( widget );
00144
00145 mTabWidget->addTab( widget, i18n( "Contact" ) );
00146
00147 QGroupBox *nameGroupBox = new QGroupBox( i18n( "Name" ) );
00148 QGroupBox *internetGroupBox = new QGroupBox( i18n( "Internet" ) );
00149 QGroupBox *phonesGroupBox = new QGroupBox( i18n( "Phones" ) );
00150
00151 layout->addWidget( nameGroupBox );
00152 layout->addWidget( internetGroupBox );
00153 layout->addWidget( phonesGroupBox );
00154
00155 QGridLayout *nameLayout = new QGridLayout( nameGroupBox );
00156 QGridLayout *internetLayout = new QGridLayout( internetGroupBox );
00157 QGridLayout *phonesLayout = new QGridLayout( phonesGroupBox );
00158
00159 QLabel *label = 0;
00160
00161
00162 label = new QLabel( i18n( "Name:" ) );
00163 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00164 nameLayout->addWidget( label, 0, 0 );
00165
00166 mNameWidget = new NameEditWidget;
00167 label->setBuddy( mNameWidget );
00168 nameLayout->addWidget( mNameWidget, 0, 1 );
00169
00170 mPhotoWidget = new ImageWidget( ImageWidget::Photo );
00171 mPhotoWidget->setMinimumSize( QSize( 100, 140 ) );
00172 nameLayout->addWidget( mPhotoWidget, 0, 2, 4, 1 );
00173
00174 label = new QLabel( i18n( "Display:" ) );
00175 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00176 nameLayout->addWidget( label, 1, 0 );
00177
00178 mDisplayNameWidget = new DisplayNameEditWidget;
00179 label->setBuddy( mDisplayNameWidget );
00180 nameLayout->addWidget( mDisplayNameWidget, 1, 1 );
00181
00182 label = new QLabel( i18n( "Nickname:" ) );
00183 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00184 nameLayout->addWidget( label, 2, 0 );
00185
00186 mNickNameWidget = new KLineEdit;
00187 label->setBuddy( mNickNameWidget );
00188 nameLayout->addWidget( mNickNameWidget, 2, 1 );
00189
00190 label = new QLabel( i18n( "Pronunciation:" ) );
00191 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00192 nameLayout->addWidget( label, 3, 0 );
00193
00194 mPronunciationWidget = new SoundEditWidget;
00195 label->setBuddy( mPronunciationWidget );
00196 nameLayout->addWidget( mPronunciationWidget, 3, 1 );
00197
00198 nameLayout->setRowStretch( 4, 1 );
00199
00200
00201 label = new QLabel( i18n( "Email:" ) );
00202 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00203 internetLayout->addWidget( label, 0, 0 );
00204
00205 mEmailWidget = new EmailEditWidget;
00206 label->setBuddy( mEmailWidget );
00207 internetLayout->addWidget( mEmailWidget, 0, 1 );
00208
00209 label = new QLabel( i18n( "Homepage:" ) );
00210 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00211 internetLayout->addWidget( label, 1, 0 );
00212
00213 mHomepageWidget = new KLineEdit;
00214 label->setBuddy( mHomepageWidget );
00215 internetLayout->addWidget( mHomepageWidget, 1, 1 );
00216
00217 label = new QLabel( i18n( "Blog:" ) );
00218 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00219 internetLayout->addWidget( label, 2, 0 );
00220
00221 mBlogWidget = new KLineEdit;
00222 label->setBuddy( mBlogWidget );
00223 internetLayout->addWidget( mBlogWidget, 2, 1 );
00224
00225 label = new QLabel( i18n( "Messaging:" ) );
00226 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00227 internetLayout->addWidget( label, 3, 0 );
00228
00229 mIMWidget = new IMEditWidget;
00230 label->setBuddy( mIMWidget );
00231 internetLayout->addWidget( mIMWidget, 3, 1 );
00232
00233 internetLayout->setRowStretch( 4, 1 );
00234
00235
00236 mPhonesWidget = new PhoneEditWidget;
00237 phonesLayout->addWidget( mPhonesWidget, 0, 0 );
00238
00239 phonesLayout->setRowStretch( 1, 1 );
00240 }
00241
00242 void ContactEditorWidget::Private::initGuiLocationTab()
00243 {
00244 QWidget *widget = new QWidget;
00245 QVBoxLayout *layout = new QVBoxLayout( widget );
00246
00247 mTabWidget->addTab( widget, i18n( "Location" ) );
00248
00249 QGroupBox *addressesGroupBox = new QGroupBox( i18n( "Addresses" ) );
00250 QGroupBox *coordinatesGroupBox = new QGroupBox( i18n( "Coordinates" ) );
00251
00252 layout->addWidget( addressesGroupBox );
00253 layout->addWidget( coordinatesGroupBox );
00254
00255 QGridLayout *addressesLayout = new QGridLayout( addressesGroupBox );
00256 QGridLayout *coordinatesLayout = new QGridLayout( coordinatesGroupBox );
00257
00258
00259 mAddressesWidget = new AddressEditWidget( addressesGroupBox );
00260 mAddressesWidget->setMinimumHeight( 200 );
00261 addressesLayout->addWidget( mAddressesWidget, 0, 0 );
00262 addressesLayout->setRowStretch( 1, 1 );
00263
00264
00265 mCoordinatesWidget = new GeoEditWidget;
00266 coordinatesLayout->addWidget( mCoordinatesWidget, 0, 0 );
00267 coordinatesLayout->setRowStretch( 1, 1 );
00268 }
00269
00270 void ContactEditorWidget::Private::initGuiBusinessTab()
00271 {
00272 QWidget *widget = new QWidget;
00273 QVBoxLayout *layout = new QVBoxLayout( widget );
00274
00275 mTabWidget->addTab( widget, i18n( "Business" ) );
00276
00277 QGroupBox *generalGroupBox = new QGroupBox( i18n( "General" ) );
00278 QGroupBox *groupwareGroupBox = new QGroupBox( i18n( "Groupware" ) );
00279 QGroupBox *notesGroupBox = new QGroupBox( i18n( "Notes" ) );
00280
00281 layout->addWidget( generalGroupBox );
00282 layout->addWidget( groupwareGroupBox );
00283 layout->addWidget( notesGroupBox );
00284
00285 QGridLayout *generalLayout = new QGridLayout( generalGroupBox );
00286 QGridLayout *groupwareLayout = new QGridLayout( groupwareGroupBox );
00287 QGridLayout *notesLayout = new QGridLayout( notesGroupBox );
00288
00289 QLabel *label = 0;
00290
00291
00292 mLogoWidget = new ImageWidget( ImageWidget::Logo );
00293 generalLayout->addWidget( mLogoWidget, 0, 2, 6, 1, Qt::AlignTop );
00294
00295 label = new QLabel( i18n( "Organization:" ) );
00296 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00297 generalLayout->addWidget( label, 0, 0 );
00298
00299 mOrganizationWidget = new KLineEdit;
00300 label->setBuddy( mOrganizationWidget );
00301 generalLayout->addWidget( mOrganizationWidget, 0, 1 );
00302
00303 label = new QLabel( i18n( "Profession:" ) );
00304 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00305 generalLayout->addWidget( label, 1, 0 );
00306
00307 mProfessionWidget = new KLineEdit;
00308 label->setBuddy( mProfessionWidget );
00309 generalLayout->addWidget( mProfessionWidget, 1, 1 );
00310
00311 label = new QLabel( i18n( "Title:" ) );
00312 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00313 generalLayout->addWidget( label, 2, 0 );
00314
00315 mTitleWidget = new KLineEdit;
00316 label->setBuddy( mTitleWidget );
00317 generalLayout->addWidget( mTitleWidget , 2, 1 );
00318
00319 label = new QLabel( i18n( "Department:" ) );
00320 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00321 generalLayout->addWidget( label, 3, 0 );
00322
00323 mDepartmentWidget = new KLineEdit;
00324 label->setBuddy( mDepartmentWidget );
00325 generalLayout->addWidget( mDepartmentWidget, 3, 1 );
00326
00327 label = new QLabel( i18n( "Office:" ) );
00328 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00329 generalLayout->addWidget( label, 4, 0 );
00330
00331 mOfficeWidget = new KLineEdit;
00332 label->setBuddy( mOfficeWidget );
00333 generalLayout->addWidget( mOfficeWidget, 4, 1 );
00334
00335 label = new QLabel( i18n( "Manager's name:" ) );
00336 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00337 generalLayout->addWidget( label, 5, 0 );
00338
00339 mManagerWidget = new KLineEdit;
00340 label->setBuddy( mManagerWidget );
00341 generalLayout->addWidget( mManagerWidget, 5, 1 );
00342
00343 label = new QLabel( i18n( "Assistant's name:" ) );
00344 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00345 generalLayout->addWidget( label, 6, 0 );
00346
00347 mAssistantWidget = new KLineEdit;
00348 label->setBuddy( mAssistantWidget );
00349 generalLayout->addWidget( mAssistantWidget, 6, 1 );
00350
00351 generalLayout->setRowStretch( 7, 1 );
00352
00353
00354 label = new QLabel( i18n( "Free/Busy:" ) );
00355 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00356 groupwareLayout->addWidget( label, 0, 0 );
00357
00358 mFreeBusyWidget = new FreeBusyEditWidget;
00359 label->setBuddy( mFreeBusyWidget );
00360 groupwareLayout->addWidget( mFreeBusyWidget, 0, 1 );
00361
00362 groupwareLayout->setRowStretch( 1, 1 );
00363
00364
00365 mNotesWidget = new KTextEdit;
00366 notesLayout->addWidget( mNotesWidget, 0, 0 );
00367 }
00368
00369 void ContactEditorWidget::Private::initGuiPersonalTab()
00370 {
00371 QWidget *widget = new QWidget;
00372 QVBoxLayout *layout = new QVBoxLayout( widget );
00373
00374 mTabWidget->addTab( widget, i18n( "Personal" ) );
00375
00376 QGroupBox *datesGroupBox = new QGroupBox( i18n( "Dates" ) );
00377 QGroupBox *familyGroupBox = new QGroupBox( i18n( "Family" ) );
00378
00379 layout->addWidget( datesGroupBox );
00380 layout->addWidget( familyGroupBox );
00381
00382 QGridLayout *datesLayout = new QGridLayout( datesGroupBox );
00383 QGridLayout *familyLayout = new QGridLayout( familyGroupBox );
00384
00385 QLabel *label = 0;
00386
00387
00388 label = new QLabel( i18n( "Birthdate:" ) );
00389 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00390 datesLayout->addWidget( label, 0, 0 );
00391
00392 mBirthdateWidget = new DateEditWidget( DateEditWidget::Birthday );
00393 label->setBuddy( mBirthdateWidget );
00394 datesLayout->addWidget( mBirthdateWidget, 0, 1 );
00395
00396 label = new QLabel( i18n( "Anniversary:" ) );
00397 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00398 datesLayout->addWidget( label, 1, 0 );
00399
00400 mAnniversaryWidget = new DateEditWidget( DateEditWidget::Anniversary );
00401 label->setBuddy( mAnniversaryWidget );
00402 datesLayout->addWidget( mAnniversaryWidget, 1, 1 );
00403
00404 datesLayout->setRowStretch( 2, 1 );
00405 datesLayout->setColumnStretch( 1, 1 );
00406
00407
00408 label = new QLabel( i18n( "Partner's name:" ) );
00409 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
00410 familyLayout->addWidget( label, 0, 0 );
00411
00412 mPartnerWidget = new KLineEdit;
00413 label->setBuddy( mPartnerWidget );
00414 familyLayout->addWidget( mPartnerWidget, 0, 1 );
00415
00416 familyLayout->setRowStretch( 1, 1 );
00417 }
00418
00419 void ContactEditorWidget::Private::loadCustomPages()
00420 {
00421 qDeleteAll( mCustomPages );
00422 mCustomPages.clear();
00423
00424 const QString pluginDirectory = KStandardDirs::locate( "lib", QLatin1String( "akonadi/contact/editorpageplugins/" ) );
00425 QDirIterator it( pluginDirectory, QDir::Files );
00426 while ( it.hasNext() ) {
00427 QPluginLoader loader( it.next() );
00428 if ( !loader.load() )
00429 continue;
00430
00431 Akonadi::ContactEditorPagePlugin *plugin = qobject_cast<Akonadi::ContactEditorPagePlugin*>( loader.instance() );
00432 if ( !plugin )
00433 continue;
00434
00435 mCustomPages.append( plugin );
00436 }
00437
00438 foreach ( Akonadi::ContactEditorPagePlugin *plugin, mCustomPages )
00439 mTabWidget->addTab( plugin, plugin->title() );
00440 }
00441
00442 QString ContactEditorWidget::Private::loadCustom( const KABC::Addressee &contact, const QString &key ) const
00443 {
00444 return contact.custom( QLatin1String( "KADDRESSBOOK" ), key );
00445 }
00446
00447 void ContactEditorWidget::Private::storeCustom( KABC::Addressee &contact, const QString &key, const QString &value ) const
00448 {
00449 if ( value.isEmpty() )
00450 contact.removeCustom( QLatin1String( "KADDRESSBOOK" ), key );
00451 else
00452 contact.insertCustom( QLatin1String( "KADDRESSBOOK" ), key, value );
00453 }
00454
00455 ContactEditorWidget::ContactEditorWidget( QWidget* )
00456 : d( new Private( this ) )
00457 {
00458 d->initGui();
00459
00460 connect( d->mNameWidget, SIGNAL( nameChanged( const KABC::Addressee& ) ),
00461 d->mDisplayNameWidget, SLOT( changeName( const KABC::Addressee& ) ) );
00462 connect( d->mOrganizationWidget, SIGNAL( textChanged( const QString& ) ),
00463 d->mDisplayNameWidget, SLOT( changeOrganization( const QString& ) ) );
00464 }
00465
00466 ContactEditorWidget::~ContactEditorWidget()
00467 {
00468 delete d;
00469 }
00470
00471 void ContactEditorWidget::loadContact( const KABC::Addressee &contact, const Akonadi::ContactMetaData &metaData )
00472 {
00473
00474 d->mPhotoWidget->loadContact( contact );
00475 d->mNameWidget->loadContact( contact );
00476 d->mDisplayNameWidget->loadContact( contact );
00477 d->mNickNameWidget->setText( contact.nickName() );
00478 d->mPronunciationWidget->loadContact( contact );
00479
00480
00481 d->mEmailWidget->loadContact( contact );
00482 d->mHomepageWidget->setUrl( contact.url() );
00483 d->mBlogWidget->setText( d->loadCustom( contact, QLatin1String( "BlogFeed" ) ) );
00484 d->mIMWidget->loadContact( contact );
00485
00486
00487 d->mPhonesWidget->loadContact( contact );
00488
00489
00490 d->mAddressesWidget->loadContact( contact );
00491
00492
00493 d->mCoordinatesWidget->loadContact( contact );
00494
00495
00496 d->mLogoWidget->loadContact( contact );
00497 d->mOrganizationWidget->setText( contact.organization() );
00498 d->mProfessionWidget->setText( d->loadCustom( contact, QLatin1String( "X-Profession" ) ) );
00499 d->mTitleWidget->setText( contact.title() );
00500 d->mDepartmentWidget->setText( contact.department() );
00501 d->mOfficeWidget->setText( d->loadCustom( contact, QLatin1String( "X-Office" ) ) );
00502 d->mManagerWidget->setText( d->loadCustom( contact, QLatin1String( "X-ManagersName" ) ) );
00503 d->mAssistantWidget->setText( d->loadCustom( contact, QLatin1String( "X-AssistantsName" ) ) );
00504
00505
00506 d->mFreeBusyWidget->loadContact( contact );
00507
00508
00509 d->mNotesWidget->setPlainText( contact.note() );
00510
00511
00512 d->mBirthdateWidget->setDate( contact.birthday().date() );
00513 d->mAnniversaryWidget->setDate( QDate::fromString( d->loadCustom( contact, QLatin1String( "X-Anniversary" ) ),
00514 Qt::ISODate ) );
00515
00516
00517 d->mPartnerWidget->setText( d->loadCustom( contact, QLatin1String( "X-SpousesName" ) ) );
00518
00519 d->mDisplayNameWidget->setDisplayType( (DisplayNameEditWidget::DisplayType)metaData.displayNameMode() );
00520
00521
00522 foreach ( Akonadi::ContactEditorPagePlugin *plugin, d->mCustomPages )
00523 plugin->loadContact( contact );
00524 }
00525
00526 void ContactEditorWidget::storeContact( KABC::Addressee &contact, Akonadi::ContactMetaData &metaData ) const
00527 {
00528
00529 d->mPhotoWidget->storeContact( contact );
00530 d->mNameWidget->storeContact( contact );
00531 d->mDisplayNameWidget->storeContact( contact );
00532 contact.setNickName( d->mNickNameWidget->text().trimmed() );
00533 d->mPronunciationWidget->storeContact( contact );
00534
00535
00536 d->mEmailWidget->storeContact( contact );
00537 contact.setUrl( KUrl( d->mHomepageWidget->text().trimmed() ) );
00538 d->storeCustom( contact, QLatin1String( "BlogFeed" ), d->mBlogWidget->text().trimmed() );
00539 d->mIMWidget->storeContact( contact );
00540
00541
00542 d->mPhonesWidget->storeContact( contact );
00543
00544
00545 d->mAddressesWidget->storeContact( contact );
00546
00547
00548 d->mCoordinatesWidget->storeContact( contact );
00549
00550
00551 d->mLogoWidget->storeContact( contact );
00552 contact.setOrganization( d->mOrganizationWidget->text() );
00553 d->storeCustom( contact, QLatin1String( "X-Profession" ), d->mProfessionWidget->text().trimmed() );
00554 contact.setTitle( d->mTitleWidget->text().trimmed() );
00555 contact.setDepartment( d->mDepartmentWidget->text().trimmed() );
00556 d->storeCustom( contact, QLatin1String( "X-Office" ), d->mOfficeWidget->text().trimmed() );
00557 d->storeCustom( contact, QLatin1String( "X-ManagersName" ), d->mManagerWidget->text().trimmed() );
00558 d->storeCustom( contact, QLatin1String( "X-AssistantsName" ), d->mAssistantWidget->text().trimmed() );
00559
00560
00561 d->mFreeBusyWidget->storeContact( contact );
00562
00563
00564 contact.setNote( d->mNotesWidget->toPlainText() );
00565
00566
00567 contact.setBirthday( QDateTime( d->mBirthdateWidget->date(), QTime(), contact.birthday().timeSpec() ) );
00568 d->storeCustom( contact, QLatin1String( "X-Anniversary" ), d->mAnniversaryWidget->date().toString( Qt::ISODate ) );
00569
00570
00571 d->storeCustom( contact, QLatin1String( "X-SpousesName" ), d->mPartnerWidget->text().trimmed() );
00572
00573 metaData.setDisplayNameMode( d->mDisplayNameWidget->displayType() );
00574
00575
00576 foreach ( Akonadi::ContactEditorPagePlugin *plugin, d->mCustomPages )
00577 plugin->storeContact( contact );
00578 }
00579
00580 void ContactEditorWidget::setReadOnly( bool readOnly )
00581 {
00582
00583 d->mNameWidget->setReadOnly( readOnly );
00584 d->mPhotoWidget->setReadOnly( readOnly );
00585 d->mDisplayNameWidget->setReadOnly( readOnly );
00586 d->mNickNameWidget->setReadOnly( readOnly );
00587 d->mPronunciationWidget->setReadOnly( readOnly );
00588
00589
00590 d->mEmailWidget->setReadOnly( readOnly );
00591 d->mHomepageWidget->setReadOnly( readOnly );
00592 d->mBlogWidget->setReadOnly( readOnly );
00593 d->mIMWidget->setReadOnly( readOnly );
00594
00595
00596 d->mPhonesWidget->setReadOnly( readOnly );
00597
00598
00599 d->mAddressesWidget->setReadOnly( readOnly );
00600
00601
00602 d->mCoordinatesWidget->setReadOnly( readOnly );
00603
00604
00605 d->mLogoWidget->setReadOnly( readOnly );
00606 d->mOrganizationWidget->setReadOnly( readOnly );
00607 d->mProfessionWidget->setReadOnly( readOnly );
00608 d->mTitleWidget->setReadOnly( readOnly );
00609 d->mDepartmentWidget->setReadOnly( readOnly );
00610 d->mOfficeWidget->setReadOnly( readOnly );
00611 d->mManagerWidget->setReadOnly( readOnly );
00612 d->mAssistantWidget->setReadOnly( readOnly );
00613
00614
00615 d->mFreeBusyWidget->setReadOnly( readOnly );
00616
00617
00618 d->mNotesWidget->setReadOnly( readOnly );
00619
00620
00621 d->mBirthdateWidget->setReadOnly( readOnly );
00622 d->mAnniversaryWidget->setReadOnly( readOnly );
00623
00624
00625 d->mPartnerWidget->setReadOnly( readOnly );
00626
00627
00628 foreach ( Akonadi::ContactEditorPagePlugin *plugin, d->mCustomPages )
00629 plugin->setReadOnly( readOnly );
00630 }