Rename KABC namespace

pull/1/head
Timothy Pearson 12 years ago
parent 8418c2f640
commit c474b8f8c4

@ -2065,7 +2065,7 @@ if test $kde_qtver = 3; then
AC_SUBST(LIB_KJS, "-lkjs") AC_SUBST(LIB_KJS, "-lkjs")
AC_SUBST(LIB_SMB, "-lsmb") AC_SUBST(LIB_SMB, "-lsmb")
AC_SUBST(LIB_KAB, "-lkab") AC_SUBST(LIB_KAB, "-lkab")
AC_SUBST(LIB_KABC, "-ltdeabc") AC_SUBST(LIB_TDEABC, "-ltdeabc")
AC_SUBST(LIB_TDEHTML, "-ltdehtml") AC_SUBST(LIB_TDEHTML, "-ltdehtml")
AC_SUBST(LIB_KSPELL, "-ltdespell") AC_SUBST(LIB_KSPELL, "-ltdespell")
AC_SUBST(LIB_KPARTS, "-ltdeparts") AC_SUBST(LIB_KPARTS, "-ltdeparts")

@ -103,7 +103,7 @@ noinst_HEADERS = \
lib_LTLIBRARIES = lib_LTLIBRARIES =
kde_module_LTLIBRARIES = libkplatopart.la kde_module_LTLIBRARIES = libkplatopart.la
libkplatopart_la_LDFLAGS = $(KDE_LDFLAGS) $(KDE_PLUGIN) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -ltdeprint libkplatopart_la_LDFLAGS = $(KDE_LDFLAGS) $(KDE_PLUGIN) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -ltdeprint
libkplatopart_la_LIBADD = $(LIB_KABC) $(KOFFICE_LIBS) -lDCOP \ libkplatopart_la_LIBADD = $(LIB_TDEABC) $(KOFFICE_LIBS) -lDCOP \
$(top_builddir)/kdgantt/libkdgantt.la $(top_builddir)/kdgantt/libkdgantt.la
## $(top_builddir)/kugar/lib/libkugarlib.la ## $(top_builddir)/kugar/lib/libkugarlib.la

@ -172,7 +172,7 @@ void MainProjectPanelImpl::slotCheckAllFieldsFilled()
void MainProjectPanelImpl::slotChooseLeader() void MainProjectPanelImpl::slotChooseLeader()
{ {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) if (!a.isEmpty())
{ {
leaderfield->setText(a.fullEmail()); leaderfield->setText(a.fullEmail());

@ -134,7 +134,7 @@ void ProjectDialogImpl::slotSchedulingChanged(int activated) {
void ProjectDialogImpl::slotChooseLeader() void ProjectDialogImpl::slotChooseLeader()
{ {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) { if (!a.isEmpty()) {
leaderfield->setText(a.fullEmail()); leaderfield->setText(a.fullEmail());
} }

@ -102,7 +102,7 @@ void ResourceDialogImpl::slotCalculationNeeded(const TQString&) {
void ResourceDialogImpl::slotChooseResource() void ResourceDialogImpl::slotChooseResource()
{ {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) { if (!a.isEmpty()) {
nameEdit->setText(a.assembledName()); nameEdit->setText(a.assembledName());
emailEdit->setText(a.preferredEmail()); emailEdit->setText(a.preferredEmail());

@ -113,7 +113,7 @@ bool SummaryTaskGeneralPanel::ok() {
} }
void SummaryTaskGeneralPanel::slotChooseResponsible() { void SummaryTaskGeneralPanel::slotChooseResponsible() {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) { if (!a.isEmpty()) {
leaderfield->setText(a.fullEmail()); leaderfield->setText(a.fullEmail());
leaderfield->setFocus(); leaderfield->setFocus();

@ -220,7 +220,7 @@ int ConfigTaskPanelImpl::schedulingType() const
void ConfigTaskPanelImpl::changeLeader() void ConfigTaskPanelImpl::changeLeader()
{ {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) if (!a.isEmpty())
{ {
leaderfield->setText(a.fullEmail()); leaderfield->setText(a.fullEmail());

@ -260,7 +260,7 @@ int TaskGeneralPanelImpl::schedulingType() const
void TaskGeneralPanelImpl::changeLeader() void TaskGeneralPanelImpl::changeLeader()
{ {
KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
if (!a.isEmpty()) if (!a.isEmpty())
{ {
leaderfield->setText(a.fullEmail()); leaderfield->setText(a.fullEmail());

@ -33,58 +33,58 @@
#include "KWMailMergeKABC.h" #include "KWMailMergeKABC.h"
#include "KWMailMergeKABCConfig.h" #include "KWMailMergeKABCConfig.h"
KWMailMergeKABC::KWMailMergeKABC( TDEInstance *inst, TQObject *parent ) KWMailMergeTDEABC::KWMailMergeKABC( TDEInstance *inst, TQObject *parent )
: KWMailMergeDataSource( inst, parent ) : KWMailMergeDataSource( inst, parent )
{ {
_addressBook = KABC::StdAddressBook::self(); _addressBook = TDEABC::StdAddressBook::self();
_iterator = _addressBook->begin(); _iterator = _addressBook->begin();
// init record list // init record list
// Using names from kaddressbook. // Using names from kaddressbook.
sampleRecord[ ("KAddressbook identifier") ] = KABC::Addressee::uidLabel(); sampleRecord[ ("KAddressbook identifier") ] = TDEABC::Addressee::uidLabel();
sampleRecord[ ("Name" ) ] = KABC::Addressee::nameLabel(); sampleRecord[ ("Name" ) ] = TDEABC::Addressee::nameLabel();
sampleRecord[ ("Formatted name" ) ] = KABC::Addressee::formattedNameLabel(); sampleRecord[ ("Formatted name" ) ] = TDEABC::Addressee::formattedNameLabel();
sampleRecord[ ("Family names" ) ] = KABC::Addressee::familyNameLabel(); sampleRecord[ ("Family names" ) ] = TDEABC::Addressee::familyNameLabel();
sampleRecord[ ("Given name" ) ] = KABC::Addressee::givenNameLabel(); sampleRecord[ ("Given name" ) ] = TDEABC::Addressee::givenNameLabel();
sampleRecord[ ("Additional names" ) ] = KABC::Addressee::additionalNameLabel(); sampleRecord[ ("Additional names" ) ] = TDEABC::Addressee::additionalNameLabel();
sampleRecord[ ("Honorific prefixes" ) ] = KABC::Addressee::prefixLabel(); sampleRecord[ ("Honorific prefixes" ) ] = TDEABC::Addressee::prefixLabel();
sampleRecord[ ("Honorific suffixes" ) ] = KABC::Addressee::suffixLabel(); sampleRecord[ ("Honorific suffixes" ) ] = TDEABC::Addressee::suffixLabel();
sampleRecord[ ("Nick name" ) ] = KABC::Addressee::nickNameLabel(); sampleRecord[ ("Nick name" ) ] = TDEABC::Addressee::nickNameLabel();
sampleRecord[ ("Birthday" ) ] = KABC::Addressee::birthdayLabel(); sampleRecord[ ("Birthday" ) ] = TDEABC::Addressee::birthdayLabel();
sampleRecord[ ("Home address: Street" ) ] = KABC::Addressee::homeAddressStreetLabel(); sampleRecord[ ("Home address: Street" ) ] = TDEABC::Addressee::homeAddressStreetLabel();
sampleRecord[ ("Home address: Locality" ) ] = KABC::Addressee::homeAddressLocalityLabel(); sampleRecord[ ("Home address: Locality" ) ] = TDEABC::Addressee::homeAddressLocalityLabel();
sampleRecord[ ("Home address: Region" ) ] = KABC::Addressee::homeAddressRegionLabel(); sampleRecord[ ("Home address: Region" ) ] = TDEABC::Addressee::homeAddressRegionLabel();
sampleRecord[ ("Home address: Postal code" ) ] = KABC::Addressee::homeAddressPostalCodeLabel(); sampleRecord[ ("Home address: Postal code" ) ] = TDEABC::Addressee::homeAddressPostalCodeLabel();
sampleRecord[ ("Home address: Country" ) ] = KABC::Addressee::homeAddressCountryLabel(); sampleRecord[ ("Home address: Country" ) ] = TDEABC::Addressee::homeAddressCountryLabel();
sampleRecord[ ("Home address: Label" ) ] = KABC::Addressee::homeAddressLabelLabel(); sampleRecord[ ("Home address: Label" ) ] = TDEABC::Addressee::homeAddressLabelLabel();
sampleRecord[ ("Business address: Street" ) ] = KABC::Addressee::businessAddressStreetLabel(); sampleRecord[ ("Business address: Street" ) ] = TDEABC::Addressee::businessAddressStreetLabel();
sampleRecord[ ("Business address: Locality" ) ] = KABC::Addressee::businessAddressLocalityLabel(); sampleRecord[ ("Business address: Locality" ) ] = TDEABC::Addressee::businessAddressLocalityLabel();
sampleRecord[ ("Business address: Region" ) ] = KABC::Addressee::businessAddressRegionLabel(); sampleRecord[ ("Business address: Region" ) ] = TDEABC::Addressee::businessAddressRegionLabel();
sampleRecord[ ("Business address: Postal code" ) ] = KABC::Addressee::businessAddressPostalCodeLabel(); sampleRecord[ ("Business address: Postal code" ) ] = TDEABC::Addressee::businessAddressPostalCodeLabel();
sampleRecord[ ("Business address: Country" ) ] = KABC::Addressee::businessAddressCountryLabel(); sampleRecord[ ("Business address: Country" ) ] = TDEABC::Addressee::businessAddressCountryLabel();
sampleRecord[ ("Business address: Label" ) ] = KABC::Addressee::businessAddressLabelLabel(); sampleRecord[ ("Business address: Label" ) ] = TDEABC::Addressee::businessAddressLabelLabel();
sampleRecord[ ("Home phone" ) ] = KABC::Addressee::homePhoneLabel(); sampleRecord[ ("Home phone" ) ] = TDEABC::Addressee::homePhoneLabel();
sampleRecord[ ("Business phone" ) ] = KABC::Addressee::businessPhoneLabel(); sampleRecord[ ("Business phone" ) ] = TDEABC::Addressee::businessPhoneLabel();
sampleRecord[ ("Mobile phone" ) ] = KABC::Addressee::mobilePhoneLabel(); sampleRecord[ ("Mobile phone" ) ] = TDEABC::Addressee::mobilePhoneLabel();
sampleRecord[ ("Home fax" ) ] = KABC::Addressee::homeFaxLabel(); sampleRecord[ ("Home fax" ) ] = TDEABC::Addressee::homeFaxLabel();
sampleRecord[ ("Business fax" ) ] = KABC::Addressee::businessFaxLabel(); sampleRecord[ ("Business fax" ) ] = TDEABC::Addressee::businessFaxLabel();
sampleRecord[ ("Car phone" ) ] = KABC::Addressee::carPhoneLabel(); sampleRecord[ ("Car phone" ) ] = TDEABC::Addressee::carPhoneLabel();
sampleRecord[ ("ISDN" ) ] = KABC::Addressee::isdnLabel(); sampleRecord[ ("ISDN" ) ] = TDEABC::Addressee::isdnLabel();
sampleRecord[ ("Pager" ) ] = KABC::Addressee::pagerLabel(); sampleRecord[ ("Pager" ) ] = TDEABC::Addressee::pagerLabel();
sampleRecord[ ("Email" ) ] = KABC::Addressee::emailLabel(); sampleRecord[ ("Email" ) ] = TDEABC::Addressee::emailLabel();
sampleRecord[ ("Mailer" ) ] = KABC::Addressee::mailerLabel(); sampleRecord[ ("Mailer" ) ] = TDEABC::Addressee::mailerLabel();
sampleRecord[ ("Time zone" ) ] = KABC::Addressee::timeZoneLabel(); sampleRecord[ ("Time zone" ) ] = TDEABC::Addressee::timeZoneLabel();
sampleRecord[ ("Geographic position" ) ] = KABC::Addressee::geoLabel(); sampleRecord[ ("Geographic position" ) ] = TDEABC::Addressee::geoLabel();
sampleRecord[ ("Title" ) ] = KABC::Addressee::titleLabel(); sampleRecord[ ("Title" ) ] = TDEABC::Addressee::titleLabel();
sampleRecord[ ("Role" ) ] = KABC::Addressee::roleLabel(); sampleRecord[ ("Role" ) ] = TDEABC::Addressee::roleLabel();
sampleRecord[ ("Organization" ) ] = KABC::Addressee::organizationLabel(); sampleRecord[ ("Organization" ) ] = TDEABC::Addressee::organizationLabel();
sampleRecord[ ("Note" ) ] = KABC::Addressee::noteLabel(); sampleRecord[ ("Note" ) ] = TDEABC::Addressee::noteLabel();
sampleRecord[ ("productId" ) ] = KABC::Addressee::productIdLabel(); sampleRecord[ ("productId" ) ] = TDEABC::Addressee::productIdLabel();
sampleRecord[ ("Revision" ) ] = KABC::Addressee::revisionLabel(); sampleRecord[ ("Revision" ) ] = TDEABC::Addressee::revisionLabel();
sampleRecord[ ("sortString" ) ] = KABC::Addressee::sortStringLabel(); sampleRecord[ ("sortString" ) ] = TDEABC::Addressee::sortStringLabel();
sampleRecord[ ("URL" ) ] = KABC::Addressee::urlLabel(); sampleRecord[ ("URL" ) ] = TDEABC::Addressee::urlLabel();
sampleRecord[ ("Secrecy" ) ] = KABC::Addressee::secrecyLabel(); sampleRecord[ ("Secrecy" ) ] = TDEABC::Addressee::secrecyLabel();
sampleRecord[ ("Preferred address: Street" ) ] = TQString( "preferedAddressStreet" ); sampleRecord[ ("Preferred address: Street" ) ] = TQString( "preferedAddressStreet" );
sampleRecord[ ("Preferred address: Locality" ) ] = TQString( "preferedAddressLocality" ); sampleRecord[ ("Preferred address: Locality" ) ] = TQString( "preferedAddressLocality" );
sampleRecord[ ("Preferred address: Region" ) ] = TQString( "preferedAddressRegion" ); sampleRecord[ ("Preferred address: Region" ) ] = TQString( "preferedAddressRegion" );
@ -94,20 +94,20 @@ KWMailMergeKABC::KWMailMergeKABC( TDEInstance *inst, TQObject *parent )
} }
KWMailMergeKABC::~KWMailMergeKABC() KWMailMergeTDEABC::~KWMailMergeKABC()
{ {
; ;
} }
void KWMailMergeKABC::addEntry( const TQString &uid ) void KWMailMergeTDEABC::addEntry( const TQString &uid )
{ {
_individualUIDs.append( uid ); _individualUIDs.append( uid );
makeUIDsExclusive(); makeUIDsExclusive();
} }
void KWMailMergeKABC::addList( const TQString &id ) void KWMailMergeTDEABC::addList( const TQString &id )
{ {
_lists.append( id ); _lists.append( id );
parseList( id ); parseList( id );
@ -115,7 +115,7 @@ void KWMailMergeKABC::addList( const TQString &id )
} }
void KWMailMergeKABC::clear() void KWMailMergeTDEABC::clear()
{ {
_exclusiveUIDs.clear(); _exclusiveUIDs.clear();
_individualUIDs.clear(); _individualUIDs.clear();
@ -124,16 +124,16 @@ void KWMailMergeKABC::clear()
} }
int KWMailMergeKABC::getNumRecords() const int KWMailMergeTDEABC::getNumRecords() const
{ {
kdDebug() << "KWMailMergeKABC::getNumRecords(): " << _exclusiveUIDs.count() << endl; kdDebug() << "KWMailMergeTDEABC::getNumRecords(): " << _exclusiveUIDs.count() << endl;
return _exclusiveUIDs.count(); return _exclusiveUIDs.count();
} }
TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const TQString KWMailMergeTDEABC::getValue( const TQString &name, int record ) const
{ {
kdDebug() << "KWMailMergeKABC::getValue(" << name << ", " << record << ")" << endl; kdDebug() << "KWMailMergeTDEABC::getValue(" << name << ", " << record << ")" << endl;
if ( record < 0 ) if ( record < 0 )
return name; return name;
@ -172,7 +172,7 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
} }
KABC::Addressee addr = *_iterator; TDEABC::Addressee addr = *_iterator;
_iterator++; // Don't know why. Could be removed? Dirk Schmidt _iterator++; // Don't know why. Could be removed? Dirk Schmidt
@ -202,136 +202,136 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
if ( name == "Home address: Street" ) if ( name == "Home address: Street" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.street(); return a.street();
} }
if ( name == "Home address: Locality" ) if ( name == "Home address: Locality" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.locality(); return a.locality();
} }
if ( name == "Home address: Region" ) if ( name == "Home address: Region" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.region(); return a.region();
} }
if ( name == "Home address: Postal code" ) if ( name == "Home address: Postal code" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.postalCode(); return a.postalCode();
} }
if ( name == "Home address: Country" ) if ( name == "Home address: Country" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.country(); return a.country();
} }
if ( name == "Home address: Label" ) if ( name == "Home address: Label" )
{ {
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
return a.label(); return a.label();
} }
if ( name == "Business address: Street" ) if ( name == "Business address: Street" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.street(); return a.street();
} }
if ( name == "Business address: Locality" ) if ( name == "Business address: Locality" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.locality(); return a.locality();
} }
if ( name == "Business address: Region" ) if ( name == "Business address: Region" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.region(); return a.region();
} }
if ( name == "Business address: Postal code" ) if ( name == "Business address: Postal code" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.postalCode(); return a.postalCode();
} }
if ( name == "Business address: Country" ) if ( name == "Business address: Country" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.country(); return a.country();
} }
if ( name == "Business address: Label" ) if ( name == "Business address: Label" )
{ {
KABC::Address a = addr.address( KABC::Address::Work ); TDEABC::Address a = addr.address( TDEABC::Address::Work );
return a.label(); return a.label();
} }
if ( name == "Prefered address: Street" ) if ( name == "Prefered address: Street" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.street(); return a.street();
} }
if ( name == "Prefered address: Locality" ) if ( name == "Prefered address: Locality" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.locality(); return a.locality();
} }
if ( name == "Prefered address: Region" ) if ( name == "Prefered address: Region" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.region(); return a.region();
} }
if ( name == "Prefered address: Postal code" ) if ( name == "Prefered address: Postal code" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.postalCode(); return a.postalCode();
} }
if ( name == "Prefered address: Country" ) if ( name == "Prefered address: Country" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.country(); return a.country();
} }
if ( name == "Prefered address: Label" ) if ( name == "Prefered address: Label" )
{ {
KABC::Address a = addr.address( KABC::Address::Pref ); TDEABC::Address a = addr.address( TDEABC::Address::Pref );
return a.label(); return a.label();
} }
if ( name == "Home phone" ) if ( name == "Home phone" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Home );
return phone.number(); return phone.number();
} }
if ( name == "Business phone" ) if ( name == "Business phone" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Work ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Work );
return phone.number(); return phone.number();
} }
if ( name == "Mobile phone" ) if ( name == "Mobile phone" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Cell ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Cell );
return phone.number(); return phone.number();
} }
if ( name == "Home fax" ) if ( name == "Home fax" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Home | TDEABC::PhoneNumber::Fax );
return phone.number(); return phone.number();
} }
if ( name == "Business fax" ) if ( name == "Business fax" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Work | TDEABC::PhoneNumber::Fax );
return phone.number(); return phone.number();
} }
if ( name == "Car phone" ) if ( name == "Car phone" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Car ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Car );
return phone.number(); return phone.number();
} }
if ( name == "ISDN" ) if ( name == "ISDN" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Isdn ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Isdn );
return phone.number(); return phone.number();
} }
if ( name == "Pager" ) if ( name == "Pager" )
{ {
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Pager ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Pager );
return phone.number(); return phone.number();
} }
@ -341,12 +341,12 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
return addr.mailer(); return addr.mailer();
if ( name == "Time zone" ) if ( name == "Time zone" )
{ {
KABC::TimeZone zone = addr.timeZone(); TDEABC::TimeZone zone = addr.timeZone();
return TQString::number( zone.offset() ); return TQString::number( zone.offset() );
} }
if ( name == "Geographic position" ) if ( name == "Geographic position" )
{ {
KABC::Geo geo = addr.geo(); TDEABC::Geo geo = addr.geo();
TQString lat; TQString lat;
TQString longi; TQString longi;
if( geo.latitude()<0 ) if( geo.latitude()<0 )
@ -382,21 +382,21 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
return addr.url().url(); return addr.url().url();
if ( name == "Secrecy" ) if ( name == "Secrecy" )
{ {
KABC::Secrecy secrecy = addr.secrecy(); TDEABC::Secrecy secrecy = addr.secrecy();
return KABC::Secrecy::typeLabel( secrecy.type() ); return TDEABC::Secrecy::typeLabel( secrecy.type() );
} }
return ( i18n("Unkown mail merge variable: %1").arg ( name ) ) ; return ( i18n("Unkown mail merge variable: %1").arg ( name ) ) ;
} }
TQStringList KWMailMergeKABC::lists() const TQStringList KWMailMergeTDEABC::lists() const
{ {
return _lists; return _lists;
} }
void KWMailMergeKABC::load( TQDomElement& parentElem ) void KWMailMergeTDEABC::load( TQDomElement& parentElem )
{ {
clear(); clear();
TQDomNode contentNode=parentElem.namedItem("CONTENT"); TQDomNode contentNode=parentElem.namedItem("CONTENT");
@ -426,11 +426,11 @@ void KWMailMergeKABC::load( TQDomElement& parentElem )
} }
void KWMailMergeKABC::makeUIDsExclusive() void KWMailMergeTDEABC::makeUIDsExclusive()
{ {
_exclusiveUIDs = _individualUIDs + _listUIDs; _exclusiveUIDs = _individualUIDs + _listUIDs;
_exclusiveUIDs.sort(); _exclusiveUIDs.sort();
kdDebug() << "KWMailMergeKABC::makeUIDsExclusive(): before: " << _exclusiveUIDs.join(",") kdDebug() << "KWMailMergeTDEABC::makeUIDsExclusive(): before: " << _exclusiveUIDs.join(",")
<< endl; << endl;
TQString uid; TQString uid;
for( TQStringList::Iterator it=_exclusiveUIDs.begin(); for( TQStringList::Iterator it=_exclusiveUIDs.begin();
@ -442,45 +442,45 @@ void KWMailMergeKABC::makeUIDsExclusive()
} }
uid = *it; uid = *it;
} }
kdDebug() << "KWMailMergeKABC::makeUIDsExclusive(): after: " << _exclusiveUIDs.join(",") kdDebug() << "KWMailMergeTDEABC::makeUIDsExclusive(): after: " << _exclusiveUIDs.join(",")
<< endl; << endl;
} }
void KWMailMergeKABC::parseList( const TQString& listName ) void KWMailMergeTDEABC::parseList( const TQString& listName )
{ {
if( listName.isEmpty() ) if( listName.isEmpty() )
return; return;
kdDebug() << "KWMailMergeKABC::parseList: " << listName << endl; kdDebug() << "KWMailMergeTDEABC::parseList: " << listName << endl;
KABC::DistributionListManager dlm ( _addressBook ); TDEABC::DistributionListManager dlm ( _addressBook );
dlm.load(); dlm.load();
TQStringList::Iterator listIt; TQStringList::Iterator listIt;
KABC::DistributionList* list = dlm.list( listName ); TDEABC::DistributionList* list = dlm.list( listName );
KABC::DistributionList::Entry::List entries = list->entries(); TDEABC::DistributionList::Entry::List entries = list->entries();
KABC::DistributionList::Entry::List::Iterator itemIt; TDEABC::DistributionList::Entry::List::Iterator itemIt;
for ( itemIt = entries.begin(); itemIt != entries.end(); ++itemIt ) for ( itemIt = entries.begin(); itemIt != entries.end(); ++itemIt )
{ {
kdDebug() << "WMailMergeKABC::parseList: Listentry UID: " << kdDebug() << "WMailMergeTDEABC::parseList: Listentry UID: " <<
(*itemIt).addressee.uid() << endl; (*itemIt).addressee.uid() << endl;
_listUIDs.append( (*itemIt).addressee.uid() ); _listUIDs.append( (*itemIt).addressee.uid() );
} }
} }
void KWMailMergeKABC::refresh( bool ) void KWMailMergeTDEABC::refresh( bool )
{ {
kdDebug() << "KWMailMergeKABC::refresh()" << endl; kdDebug() << "KWMailMergeTDEABC::refresh()" << endl;
_iterator = _addressBook->begin(); _iterator = _addressBook->begin();
_UIDIterator = _individualUIDs.begin(); _UIDIterator = _individualUIDs.begin();
} }
void KWMailMergeKABC::save( TQDomDocument& doc, TQDomElement& parent) void KWMailMergeTDEABC::save( TQDomDocument& doc, TQDomElement& parent)
{ {
TQDomElement cont=doc.createElement(TQString::fromLatin1("CONTENT")); TQDomElement cont=doc.createElement(TQString::fromLatin1("CONTENT"));
parent.appendChild(cont); parent.appendChild(cont);
@ -506,7 +506,7 @@ void KWMailMergeKABC::save( TQDomDocument& doc, TQDomElement& parent)
} }
} }
bool KWMailMergeKABC::showConfigDialog( TQWidget* par, int action ) bool KWMailMergeTDEABC::showConfigDialog( TQWidget* par, int action )
{ {
bool ret=false; bool ret=false;
if (action == KWSLCreate ) if (action == KWSLCreate )
@ -528,7 +528,7 @@ bool KWMailMergeKABC::showConfigDialog( TQWidget* par, int action )
} }
TQStringList KWMailMergeKABC::singleRecords() const TQStringList KWMailMergeTDEABC::singleRecords() const
{ {
return _individualUIDs; return _individualUIDs;
} }

@ -79,20 +79,20 @@ protected:
friend class KWMailMergeKABCConfig; friend class KWMailMergeKABCConfig;
/** /**
Adds an entry from KABC::StdAddressBook::self() Adds an entry from TDEABC::StdAddressBook::self()
to the mail merge list. to the mail merge list.
To be called by KWMailMergeKABC::load() and To be called by KWMailMergeTDEABC::load() and
KWMailMergeKABCConfig::acceptSelection() only. KWMailMergeKABCConfig::acceptSelection() only.
@param uid The entry's KABC::Addressee::uid(). @param uid The entry's TDEABC::Addressee::uid().
*/ */
void addEntry( const TQString &uid ); void addEntry( const TQString &uid );
/** /**
Adds a distribution list to the mail merge list. Adds a distribution list to the mail merge list.
To be called by KWMailMergeKABC::load() and To be called by KWMailMergeTDEABC::load() and
KWMailMergeKABCConfig::acceptSelection() only. KWMailMergeKABCConfig::acceptSelection() only.
@param id The DistributionList::name(). @param id The DistributionList::name().
@ -112,7 +112,7 @@ protected:
virtual TQStringList lists() const; virtual TQStringList lists() const;
/** /**
@return The KABC::Addressee::uid() of all individually selected @return The TDEABC::Addressee::uid() of all individually selected
entries in mail merge list. entries in mail merge list.
To be called by KWMailMergeKABCConfig::initSelectedAddressees() To be called by KWMailMergeKABCConfig::initSelectedAddressees()
@ -121,14 +121,14 @@ protected:
private: private:
/** /**
The KABC::StdAddressBook::self(). The TDEABC::StdAddressBook::self().
*/ */
KABC::AddressBook* _addressBook; TDEABC::AddressBook* _addressBook;
/** /**
Just an Iterator. Just an Iterator.
*/ */
mutable KABC::AddressBook::ConstIterator _iterator; mutable TDEABC::AddressBook::ConstIterator _iterator;
/** /**
Just an Iterator. Just an Iterator.
@ -137,7 +137,7 @@ private:
/** /**
The "real" mail merge list. A list of TQStrings. Each represents The "real" mail merge list. A list of TQStrings. Each represents
the KABC::Addressee::uid() of a KAdressbook entry. the TDEABC::Addressee::uid() of a KAdressbook entry.
There is no UID twice in this list. There is no UID twice in this list.
Needed because selected contacts may appear in a selected Needed because selected contacts may appear in a selected
@ -146,13 +146,13 @@ private:
TQStringList _exclusiveUIDs; TQStringList _exclusiveUIDs;
/** /**
This list contains all the KABC::Addressee::uid() selected This list contains all the TDEABC::Addressee::uid() selected
individually with the KWMailMergeKABCConfig dialog. individually with the KWMailMergeKABCConfig dialog.
*/ */
TQStringList _individualUIDs; TQStringList _individualUIDs;
/** /**
This list contains all the KABC::Addressee::uid() from the distribution This list contains all the TDEABC::Addressee::uid() from the distribution
lists selected with the KWMailMergeKABCConfig dialog. lists selected with the KWMailMergeKABCConfig dialog.
*/ */
TQStringList _listUIDs; TQStringList _listUIDs;
@ -165,7 +165,7 @@ private:
/** /**
Appends all KABC::Addressee::uid() of a distribution list to _listUIDs Appends all TDEABC::Addressee::uid() of a distribution list to _listUIDs
and updates the mail merge list. and updates the mail merge list.
To be used by KWMailMergeKABCConfig::addList( const TQString &id ) To be used by KWMailMergeKABCConfig::addList( const TQString &id )

@ -360,7 +360,7 @@ void KWMailMergeKABCConfig::removeSelectedContacts()
void KWMailMergeKABCConfig::saveDistributionList() void KWMailMergeKABCConfig::saveDistributionList()
{ {
KABC::DistributionListManager dlm( KABC::StdAddressBook::self() ); TDEABC::DistributionListManager dlm( TDEABC::StdAddressBook::self() );
dlm.load(); dlm.load();
bool ok = false; bool ok = false;
@ -379,7 +379,7 @@ void KWMailMergeKABCConfig::saveDistributionList()
.arg( listName ) ); .arg( listName ) );
return; return;
} }
KABC::DistributionList *distList = new KABC::DistributionList( &dlm, listName ); TDEABC::DistributionList *distList = new TDEABC::DistributionList( &dlm, listName );
TQListViewItem* newListItem = new TQListViewItem( _ui->mSelectedView->findItem( TQListViewItem* newListItem = new TQListViewItem( _ui->mSelectedView->findItem(
i18n("Distribution Lists"),0 , TQt::ExactMatch), listName ); i18n("Distribution Lists"),0 , TQt::ExactMatch), listName );
@ -396,7 +396,7 @@ void KWMailMergeKABCConfig::saveDistributionList()
{ {
distList->insertEntry( item->addressee() ); distList->insertEntry( item->addressee() );
KABC::Addressee addr = item->addressee(); TDEABC::Addressee addr = item->addressee();
TQString formattedName = addr.formattedName(); TQString formattedName = addr.formattedName();
TQListViewItem* newItem = new TQListViewItem( TQListViewItem* newItem = new TQListViewItem(
newListItem, item->addressee().formattedName() ); newListItem, item->addressee().formattedName() );
@ -434,8 +434,8 @@ void KWMailMergeKABCConfig::updateAvailable()
TQStringList& categories = _usedCategories ; TQStringList& categories = _usedCategories ;
categories.clear(); categories.clear();
KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); TDEABC::AddressBook *addressBook = TDEABC::StdAddressBook::self();
for( KABC::AddressBook::Iterator itAddr = addressBook->begin(); for( TDEABC::AddressBook::Iterator itAddr = addressBook->begin();
itAddr != addressBook->end(); ++itAddr ) itAddr != addressBook->end(); ++itAddr )
{ {
@ -475,7 +475,7 @@ void KWMailMergeKABCConfig::updateAvailable()
// //
// Now append the distribution lists // Now append the distribution lists
// //
KABC::DistributionListManager dlm ( addressBook ); TDEABC::DistributionListManager dlm ( addressBook );
dlm.load(); dlm.load();
TQStringList distributionLists = dlm.listNames(); TQStringList distributionLists = dlm.listNames();
@ -487,14 +487,14 @@ void KWMailMergeKABCConfig::updateAvailable()
for( itDistributionLists = distributionLists.begin(); for( itDistributionLists = distributionLists.begin();
itDistributionLists != distributionLists.end(); ++itDistributionLists ) itDistributionLists != distributionLists.end(); ++itDistributionLists )
{ {
KABC::DistributionList* list = dlm.list( *itDistributionLists ); TDEABC::DistributionList* list = dlm.list( *itDistributionLists );
KABC::DistributionList::Entry::List entries = list->entries(); TDEABC::DistributionList::Entry::List entries = list->entries();
TQListViewItem* listItem = new TQListViewItem( distributionListsItem, TQListViewItem* listItem = new TQListViewItem( distributionListsItem,
*itDistributionLists ); *itDistributionLists );
KABC::DistributionList::Entry::List::Iterator itList; TDEABC::DistributionList::Entry::List::Iterator itList;
for ( itList = entries.begin(); itList != entries.end(); ++itList ) for ( itList = entries.begin(); itList != entries.end(); ++itList )
{ {
// Create a normal TQListViewItem and disable it, because this is not a // Create a normal TQListViewItem and disable it, because this is not a
@ -510,14 +510,14 @@ void KWMailMergeKABCConfig::updateAvailable()
KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListView *parent, KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListView *parent,
const KABC::Addressee& addressEntry ) : TQListViewItem( parent ) const TDEABC::Addressee& addressEntry ) : TQListViewItem( parent )
{ {
setText( 0, addressEntry.formattedName() ); setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry; _addressEntry = addressEntry;
} }
KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *parent, KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *parent,
const KABC::Addressee& addressEntry ) : TQListViewItem( parent ) const TDEABC::Addressee& addressEntry ) : TQListViewItem( parent )
{ {
setText( 0, addressEntry.formattedName() ); setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry; _addressEntry = addressEntry;
@ -526,7 +526,7 @@ KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *pa
KWMailMergeKABCConfigListItem::~KWMailMergeKABCConfigListItem() KWMailMergeKABCConfigListItem::~KWMailMergeKABCConfigListItem()
{} {}
KABC::Addressee KWMailMergeKABCConfigListItem::addressee() const TDEABC::Addressee KWMailMergeKABCConfigListItem::addressee() const
{ {
return _addressEntry; return _addressEntry;
} }

@ -68,7 +68,7 @@ private slots:
void filterChanged( const TQString& txt ); void filterChanged( const TQString& txt );
/** /**
Saves the selected single entries to a new KABC::DistributionList in KAddressbook. Saves the selected single entries to a new TDEABC::DistributionList in KAddressbook.
*/ */
void saveDistributionList(); void saveDistributionList();
private: private:
@ -115,8 +115,8 @@ private:
void removeContact( TQListViewItem* item ); void removeContact( TQListViewItem* item );
/** /**
Appends all KAddressbook entries in KABC::StdAddressBook::self() and all Appends all KAddressbook entries in TDEABC::StdAddressBook::self() and all
KABC::DistributionLists to the left TQListView. TDEABC::DistributionLists to the left TQListView.
*/ */
void updateAvailable(); void updateAvailable();
}; };
@ -126,25 +126,25 @@ class KWMailMergeKABCConfigListItem : public TQListViewItem
{ {
public: public:
KWMailMergeKABCConfigListItem( TQListView *parent, const KABC::Addressee& addressEntry ); KWMailMergeKABCConfigListItem( TQListView *parent, const TDEABC::Addressee& addressEntry );
KWMailMergeKABCConfigListItem( TQListViewItem *parent, const KABC::Addressee& addressEntry ); KWMailMergeKABCConfigListItem( TQListViewItem *parent, const TDEABC::Addressee& addressEntry );
virtual ~KWMailMergeKABCConfigListItem(); virtual ~KWMailMergeKABCConfigListItem();
/** /**
Returns the KABC::Addressee of a KWMailMergeKABCConfigListItem. Returns the TDEABC::Addressee of a KWMailMergeKABCConfigListItem.
*/ */
KABC::Addressee addressee() const; TDEABC::Addressee addressee() const;
/** /**
This is an overloaded member function of TQListViewItem::text( int column ). This is an overloaded member function of TQListViewItem::text( int column ).
It Returns the KABC::Addressee::uid(), if column is set to -1. It Returns the TDEABC::Addressee::uid(), if column is set to -1.
Otherwise TQListViewItem::text( int column ) is returned. Otherwise TQListViewItem::text( int column ) is returned.
*/ */
TQString text( int column ) const; TQString text( int column ) const;
private: private:
KABC::Addressee _addressEntry; TDEABC::Addressee _addressEntry;
}; };
#endif #endif

@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = kwmailmerge_kabc.la
## Plugin encapsulating the QT SQL database interface ## Plugin encapsulating the QT SQL database interface
kwmailmerge_kabc_la_SOURCES = KWMailMergeKABC.cpp KWMailMergeKABCConfig.cpp addresspicker.ui kwmailmerge_kabc_la_SOURCES = KWMailMergeKABC.cpp KWMailMergeKABCConfig.cpp addresspicker.ui
kwmailmerge_kabc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -lDCOP -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts kwmailmerge_kabc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -lDCOP -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts
kwmailmerge_kabc_la_LIBADD = $(KOFFICE_LIBS) ../../libkwmailmerge_interface.la $(LIB_TDEUI) $(LIB_KABC) kwmailmerge_kabc_la_LIBADD = $(KOFFICE_LIBS) ../../libkwmailmerge_interface.la $(LIB_TDEUI) $(LIB_TDEABC)
METASOURCES = AUTO METASOURCES = AUTO

@ -134,13 +134,13 @@ KDialogBase *KoDocumentInfoDlg::dialog() const
void KoDocumentInfoDlg::loadFromKABC() void KoDocumentInfoDlg::loadFromKABC()
{ {
KABC::StdAddressBook *ab = static_cast<KABC::StdAddressBook*> TDEABC::StdAddressBook *ab = static_cast<TDEABC::StdAddressBook*>
( KABC::StdAddressBook::self() ); ( TDEABC::StdAddressBook::self() );
if ( !ab ) if ( !ab )
return; return;
KABC::Addressee addr = ab->whoAmI(); TDEABC::Addressee addr = ab->whoAmI();
if ( addr.isEmpty() ) if ( addr.isEmpty() )
{ {
KMessageBox::sorry( 0L, i18n( "No personal contact data set, please use the option \ KMessageBox::sorry( 0L, i18n( "No personal contact data set, please use the option \
@ -155,15 +155,15 @@ void KoDocumentInfoDlg::loadFromKABC()
d->m_authorWidget->leCompany->setText( addr.organization() ); d->m_authorWidget->leCompany->setText( addr.organization() );
d->m_authorWidget->leEmail->setText( addr.preferredEmail() ); d->m_authorWidget->leEmail->setText( addr.preferredEmail() );
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home ); TDEABC::PhoneNumber phone = addr.phoneNumber( TDEABC::PhoneNumber::Home );
d->m_authorWidget->leTelephoneHome->setText( phone.number() ); d->m_authorWidget->leTelephoneHome->setText( phone.number() );
phone = addr.phoneNumber( KABC::PhoneNumber::Work ); phone = addr.phoneNumber( TDEABC::PhoneNumber::Work );
d->m_authorWidget->leTelephoneWork->setText( phone.number() ); d->m_authorWidget->leTelephoneWork->setText( phone.number() );
phone = addr.phoneNumber( KABC::PhoneNumber::Fax ); phone = addr.phoneNumber( TDEABC::PhoneNumber::Fax );
d->m_authorWidget->leFax->setText( phone.number() ); d->m_authorWidget->leFax->setText( phone.number() );
KABC::Address a = addr.address( KABC::Address::Home ); TDEABC::Address a = addr.address( TDEABC::Address::Home );
d->m_authorWidget->leCountry->setText( a.country() ); d->m_authorWidget->leCountry->setText( a.country() );
d->m_authorWidget->lePostalCode->setText( a.postalCode() ); d->m_authorWidget->lePostalCode->setText( a.postalCode() );
d->m_authorWidget->leCity->setText( a.locality() ); d->m_authorWidget->leCity->setText( a.locality() );

@ -4,7 +4,7 @@ SUBDIRS = . tests
KDE_CXXFLAGS = $(USE_RTTI) $(WOVERLOADED_VIRTUAL) KDE_CXXFLAGS = $(USE_RTTI) $(WOVERLOADED_VIRTUAL)
INCLUDES= $(KSTORE_INCLUDES) $(KWMF_INCLUDES) $(all_includes) INCLUDES= $(KSTORE_INCLUDES) $(KWMF_INCLUDES) $(all_includes)
libkofficecore_la_LIBADD = $(LIB_KSTORE) $(LIB_KOWMF) $(LIB_KPARTS) \ libkofficecore_la_LIBADD = $(LIB_KSTORE) $(LIB_KOWMF) $(LIB_KPARTS) \
$(LIB_TDEPRINT) $(LIB_KABC) $(LIB_KWMF) -lDCOP $(LIB_TDEPRINT) $(LIB_TDEABC) $(LIB_KWMF) -lDCOP
####### Files ####### Files

Loading…
Cancel
Save