diff options
Diffstat (limited to 'kaddressbook/addresseditwidget.cpp')
-rw-r--r-- | kaddressbook/addresseditwidget.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index a02092646..83f278748 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -112,11 +112,11 @@ void AddressEditWidget::setReadOnly( bool readOnly ) mEditButton->setEnabled( !readOnly ); } -KABC::Address::List AddressEditWidget::addresses() +TDEABC::Address::List AddressEditWidget::addresses() { - KABC::Address::List retList; + TDEABC::Address::List retList; - KABC::Address::List::ConstIterator it; + TDEABC::Address::List::ConstIterator it; for ( it = mAddressList.begin(); it != mAddressList.end(); ++it ) if ( !(*it).isEmpty() ) retList.append( *it ); @@ -124,8 +124,8 @@ KABC::Address::List AddressEditWidget::addresses() return retList; } -void AddressEditWidget::setAddresses( const KABC::Addressee &addr, - const KABC::Address::List &list ) +void AddressEditWidget::setAddresses( const TDEABC::Addressee &addr, + const TDEABC::Address::List &list ) { mAddressee = addr; @@ -135,8 +135,8 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, mTypeCombo->insertTypeList( list ); TQValueList<int> defaultTypes; - defaultTypes << KABC::Address::Home; - defaultTypes << KABC::Address::Work; + defaultTypes << TDEABC::Address::Home; + defaultTypes << TDEABC::Address::Work; AddresseeConfig config( mAddressee ); const TQValueList<int> configList = config.noDefaultAddrTypes(); @@ -155,10 +155,10 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, mTypeCombo->updateTypes(); // find preferred address which will be shown - int preferred = KABC::Address::Home; // default if no preferred address set - KABC::Address::List::ConstIterator addrIt; + int preferred = TDEABC::Address::Home; // default if no preferred address set + TDEABC::Address::List::ConstIterator addrIt; for ( addrIt = list.begin(); addrIt != list.end(); ++addrIt ) - if ( (*addrIt).type() & KABC::Address::Pref ) { + if ( (*addrIt).type() & TDEABC::Address::Pref ) { preferred = (*addrIt).type(); break; } @@ -168,7 +168,7 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, updateAddressEdit(); } -void AddressEditWidget::updateAddressee( const KABC::Addressee &addr ) +void AddressEditWidget::updateAddressee( const TDEABC::Addressee &addr ) { mAddressee = addr; updateAddressEdit(); @@ -182,13 +182,13 @@ void AddressEditWidget::edit() mAddressList = dialog.addresses(); bool hasHome = false, hasWork = false; - KABC::Address::List::ConstIterator it; + TDEABC::Address::List::ConstIterator it; for ( it = mAddressList.begin(); it != mAddressList.end(); ++it ) { - if ( (*it).type() == KABC::Address::Home ) { + if ( (*it).type() == TDEABC::Address::Home ) { if ( !(*it).isEmpty() ) hasHome = true; } - if ( (*it).type() == KABC::Address::Work ) { + if ( (*it).type() == TDEABC::Address::Work ) { if ( !(*it).isEmpty() ) hasWork = true; } @@ -197,9 +197,9 @@ void AddressEditWidget::edit() AddresseeConfig config( mAddressee ); TQValueList<int> configList; if ( !hasHome ) - configList << KABC::Address::Home; + configList << TDEABC::Address::Home; if ( !hasWork ) - configList << KABC::Address::Work; + configList << TDEABC::Address::Work; config.setNoDefaultAddrTypes( configList ); mTypeCombo->updateTypes(); @@ -211,7 +211,7 @@ void AddressEditWidget::edit() void AddressEditWidget::updateAddressEdit() { - KABC::Address::List::Iterator it = mTypeCombo->selectedElement(); + TDEABC::Address::List::Iterator it = mTypeCombo->selectedElement(); bool block = signalsBlocked(); blockSignals( true ); @@ -219,10 +219,10 @@ void AddressEditWidget::updateAddressEdit() mAddressField->setText( "" ); if ( it != mAddressList.end() ) { - KABC::Address a = *it; + TDEABC::Address a = *it; if ( !a.isEmpty() ) { #if TDE_VERSION >= 319 - if ( a.type() & KABC::Address::Work && mAddressee.realName() != mAddressee.organization() ) { + if ( a.type() & TDEABC::Address::Work && mAddressee.realName() != mAddressee.organization() ) { mAddressField->setText( a.formattedAddress( mAddressee.realName(), mAddressee.organization() ) ); } else { @@ -256,7 +256,7 @@ void AddressEditWidget::updateAddressEdit() blockSignals( block ); } -AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, +AddressEditDialog::AddressEditDialog( const TDEABC::Address::List &list, int selected, TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "street/postal", "Edit Address" ), Ok | Cancel, Ok, @@ -273,7 +273,7 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, mTypeCombo = new AddressTypeCombo( mAddressList, page ); topLayout->addMultiCellWidget( mTypeCombo, 0, 0, 0, 1 ); - TQLabel *label = new TQLabel( i18n( "<streetLabel>:", "%1:" ).arg( KABC::Address::streetLabel() ), page ); + TQLabel *label = new TQLabel( i18n( "<streetLabel>:", "%1:" ).arg( TDEABC::Address::streetLabel() ), page ); label->setAlignment( TQt::AlignTop | TQt::AlignLeft ); topLayout->addWidget( label, 1, 0 ); mStreetTextEdit = new TQTextEdit( page ); @@ -284,31 +284,31 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, TabPressEater *eater = new TabPressEater( TQT_TQOBJECT(this) ); mStreetTextEdit->installEventFilter( eater ); - label = new TQLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( KABC::Address::postOfficeBoxLabel() ), page ); + label = new TQLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( TDEABC::Address::postOfficeBoxLabel() ), page ); topLayout->addWidget( label, 2 , 0 ); mPOBoxEdit = new KLineEdit( page ); label->setBuddy( mPOBoxEdit ); topLayout->addWidget( mPOBoxEdit, 2, 1 ); - label = new TQLabel( i18n( "<localityLabel>:", "%1:" ).arg( KABC::Address::localityLabel() ), page ); + label = new TQLabel( i18n( "<localityLabel>:", "%1:" ).arg( TDEABC::Address::localityLabel() ), page ); topLayout->addWidget( label, 3, 0 ); mLocalityEdit = new KLineEdit( page ); label->setBuddy( mLocalityEdit ); topLayout->addWidget( mLocalityEdit, 3, 1 ); - label = new TQLabel( i18n( "<regionLabel>:", "%1:" ).arg( KABC::Address::regionLabel() ), page ); + label = new TQLabel( i18n( "<regionLabel>:", "%1:" ).arg( TDEABC::Address::regionLabel() ), page ); topLayout->addWidget( label, 4, 0 ); mRegionEdit = new KLineEdit( page ); label->setBuddy( mRegionEdit ); topLayout->addWidget( mRegionEdit, 4, 1 ); - label = new TQLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( KABC::Address::postalCodeLabel() ), page ); + label = new TQLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( TDEABC::Address::postalCodeLabel() ), page ); topLayout->addWidget( label, 5, 0 ); mPostalCodeEdit = new KLineEdit( page ); label->setBuddy( mPostalCodeEdit ); topLayout->addWidget( mPostalCodeEdit, 5, 1 ); - label = new TQLabel( i18n( "<countryLabel>:", "%1:" ).arg( KABC::Address::countryLabel() ), page ); + label = new TQLabel( i18n( "<countryLabel>:", "%1:" ).arg( TDEABC::Address::countryLabel() ), page ); topLayout->addWidget( label, 6, 0 ); mCountryCombo = new KComboBox( page ); mCountryCombo->setEditable( true ); @@ -371,7 +371,7 @@ AddressEditDialog::~AddressEditDialog() { } -KABC::Address::List AddressEditDialog::addresses() +TDEABC::Address::List AddressEditDialog::addresses() { saveAddress( *(mTypeCombo->selectedElement()) ); @@ -403,7 +403,7 @@ void AddressEditDialog::addAddress() void AddressEditDialog::removeAddress() { if ( mAddressList.count() > 0 ) { - KABC::Address::List::Iterator it = mTypeCombo->selectedElement(); + TDEABC::Address::List::Iterator it = mTypeCombo->selectedElement(); if ( mPreviousAddress && mPreviousAddress->id() == (*it).id() ) mPreviousAddress = 0; @@ -421,7 +421,7 @@ void AddressEditDialog::removeAddress() void AddressEditDialog::changeType() { - KABC::Address::List::Iterator a = mTypeCombo->selectedElement(); + TDEABC::Address::List::Iterator a = mTypeCombo->selectedElement(); AddressTypeDialog dlg( (*a).type(), this ); if ( dlg.exec() ) { @@ -437,8 +437,8 @@ void AddressEditDialog::editLabel() { #if KDE_IS_VERSION(3,3,0) bool ok = false; - TQString result = KInputDialog::getMultiLineText( KABC::Address::labelLabel(), - KABC::Address::labelLabel(), + TQString result = KInputDialog::getMultiLineText( TDEABC::Address::labelLabel(), + TDEABC::Address::labelLabel(), mLabel, &ok, this ); if ( ok ) { mLabel = result; @@ -452,8 +452,8 @@ void AddressEditDialog::updateAddressEdits() if ( mPreviousAddress ) saveAddress( *mPreviousAddress ); - KABC::Address::List::Iterator it = mTypeCombo->selectedElement(); - KABC::Address a = *it; + TDEABC::Address::List::Iterator it = mTypeCombo->selectedElement(); + TDEABC::Address a = *it; mPreviousAddress = &(*it); bool tmp = mChanged; @@ -466,7 +466,7 @@ void AddressEditDialog::updateAddressEdits() mCountryCombo->setCurrentText( a.country() ); mLabel = a.label(); - mPreferredCheckBox->setChecked( a.type() & KABC::Address::Pref ); + mPreferredCheckBox->setChecked( a.type() & TDEABC::Address::Pref ); if ( a.isEmpty() ) mCountryCombo->setCurrentText( TDEGlobal::locale()->twoAlphaToCountryName( TDEGlobal::locale()->country() ) ); @@ -481,7 +481,7 @@ void AddressEditDialog::modified() mChanged = true; } -void AddressEditDialog::saveAddress( KABC::Address &addr ) +void AddressEditDialog::saveAddress( TDEABC::Address &addr ) { addr.setLocality( mLocalityEdit->text() ); addr.setRegion( mRegionEdit->text() ); @@ -493,13 +493,13 @@ void AddressEditDialog::saveAddress( KABC::Address &addr ) if ( mPreferredCheckBox->isChecked() ) { - KABC::Address::List::Iterator it; + TDEABC::Address::List::Iterator it; for ( it = mAddressList.begin(); it != mAddressList.end(); ++it ) - (*it).setType( (*it).type() & ~( KABC::Address::Pref ) ); + (*it).setType( (*it).type() & ~( TDEABC::Address::Pref ) ); - addr.setType( addr.type() | KABC::Address::Pref ); + addr.setType( addr.type() | TDEABC::Address::Pref ); } else - addr.setType( addr.type() & ~( KABC::Address::Pref ) ); + addr.setType( addr.type() & ~( TDEABC::Address::Pref ) ); } void AddressEditDialog::fillCountryCombo() @@ -609,12 +609,12 @@ AddressTypeDialog::AddressTypeDialog( int type, TQWidget *parent ) mGroup = new TQButtonGroup( 2, Qt::Horizontal, i18n( "street/postal", "Address Types" ), page ); layout->addWidget( mGroup ); - mTypeList = KABC::Address::typeList(); - mTypeList.remove( KABC::Address::Pref ); + mTypeList = TDEABC::Address::typeList(); + mTypeList.remove( TDEABC::Address::Pref ); - KABC::Address::TypeList::ConstIterator it; + TDEABC::Address::TypeList::ConstIterator it; for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) - new TQCheckBox( KABC::Address::typeLabel( *it ), mGroup ); + new TQCheckBox( TDEABC::Address::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); |