Rename KABC namespace

pull/1/head
Timothy Pearson 12 years ago
parent 795ed72fdb
commit abed891d4e

@ -7,6 +7,6 @@ noinst_HEADERS = addcontactwizard.h
libkopeteaddcontactwizard_la_SOURCES = addcontactwizard_base.ui addcontactwizard.cpp
libkopeteaddcontactwizard_la_LDFLAGS = $(all_libraries) -no-undefined
libkopeteaddcontactwizard_la_LIBADD = ../../libkopete/libkopete.la $(LIB_TDEUI) $(LIB_KABC)
libkopeteaddcontactwizard_la_LIBADD = ../../libkopete/libkopete.la $(LIB_TDEUI) $(LIB_TDEABC)
# vim: set noet:

@ -234,12 +234,12 @@ TQDragObject *ChatMembersListWidget::dragObject()
d->setEncodedData( TQString( c->protocol()->pluginId()+TQChar( 0xE000 )+c->account()->accountId()+TQChar( 0xE000 )+ c->contactId() ).utf8() );
drag->addDragObject( d );
KABC::Addressee address = KABC::StdAddressBook::self()->findByUid(c->metaContact()->metaContactId());
TDEABC::Addressee address = TDEABC::StdAddressBook::self()->findByUid(c->metaContact()->metaContactId());
if( !address.isEmpty() )
{
drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) );
KABC::VCardConverter converter;
TDEABC::VCardConverter converter;
TQString vcard = converter.createVCard( address );
if( !vcard.isNull() )
{

@ -169,7 +169,7 @@ void KopeteIdentityConfig::load()
// Populate the photo contact ComboBOx
slotLoadPhotoSources();
KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
TDEABC::Addressee a = TDEABC::StdAddressBook::self()->whoAmI();
// Load the address book link
if (!a.isEmpty())
{
@ -335,7 +335,7 @@ void KopeteIdentityConfig::slotLoadPhotoSources()
void KopeteIdentityConfig::slotEnableAndDisableWidgets()
{
KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
TDEABC::Addressee a = TDEABC::StdAddressBook::self()->whoAmI();
bool hasKABCLink = !a.isEmpty();
d->m_view->radioNicknameKABC->setEnabled(hasKABCLink);
@ -503,12 +503,12 @@ void KopeteIdentityConfig::slotRemoveIdentity()
void KopeteIdentityConfig::slotChangeAddressee()
{
KABC::Addressee a = Kopete::UI::AddressBookSelectorDialog::getAddressee(i18n("Addressbook Association"), i18n("Choose the person who is yourself."), d->myself->metaContactId(), this);
TDEABC::Addressee a = Kopete::UI::AddressBookSelectorDialog::getAddressee(i18n("Addressbook Association"), i18n("Choose the person who is yourself."), d->myself->metaContactId(), this);
if ( !a.isEmpty() )
{
d->m_view->lineAddressee->setText(a.realName());
KABC::StdAddressBook::self()->setWhoAmI(a);
TDEABC::StdAddressBook::self()->setWhoAmI(a);
d->myself->setMetaContactId(a.uid());
}

@ -66,10 +66,10 @@ KabcExportWizard::KabcExportWizard( TQWidget *parent, const char *name )
// fill resource selector
m_addressBook = Kopete::KABCPersistence::self()->addressBook();
TQPtrList<KABC::Resource> kabcResources = m_addressBook->resources();
TQPtrList<TDEABC::Resource> kabcResources = m_addressBook->resources();
TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
TQPtrListIterator<TDEABC::Resource> resIt( kabcResources );
TDEABC::Resource *resource;
uint counter = 0;
while ( ( resource = resIt.current() ) != 0 )
@ -155,7 +155,7 @@ void KabcExportWizard::accept()
{
// first add an addressee to the selected resource
// then set the metacontactId of each MC to that of the new addressee
KABC::Resource * selectedResource =
TDEABC::Resource * selectedResource =
m_resourceMap[ ( m_addrBooks->index( m_addrBooks->selectedItem() ) ) ];
// for each item checked
{
@ -166,7 +166,7 @@ void KabcExportWizard::accept()
// if it is checked and enabled
if ( item->isEnabled() && item->isOn() )
{
KABC::Addressee addr;
TDEABC::Addressee addr;
addr = m_addressBook->findByUid( item->mc->metaContactId() );
if ( addr.isEmpty() ) // unassociated contact
{
@ -210,7 +210,7 @@ void KabcExportWizard::accept()
TQDialog::accept();
}
void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr )
void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, TDEABC::Addressee & addr )
{
// for each contact
TQPtrList<Kopete::Contact> contacts = mc->contacts();
@ -226,24 +226,24 @@ void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee
prop = (*cit)->property( Kopete::Global::Properties::self()->privatePhone() );
if ( !prop.isNull() )
{
addr.insertPhoneNumber( KABC::PhoneNumber( prop.value().toString(), KABC::PhoneNumber::Home ) );
addr.insertPhoneNumber( TDEABC::PhoneNumber( prop.value().toString(), TDEABC::PhoneNumber::Home ) );
}
prop = (*cit)->property( Kopete::Global::Properties::self()->workPhone() );
if ( !prop.isNull() )
{
addr.insertPhoneNumber( KABC::PhoneNumber( prop.value().toString(), KABC::PhoneNumber::Work ) );
addr.insertPhoneNumber( TDEABC::PhoneNumber( prop.value().toString(), TDEABC::PhoneNumber::Work ) );
}
prop = (*cit)->property( Kopete::Global::Properties::self()->privateMobilePhone() );
if ( !prop.isNull() )
{
addr.insertPhoneNumber( KABC::PhoneNumber( prop.value().toString(), KABC::PhoneNumber::Cell ) );
addr.insertPhoneNumber( TDEABC::PhoneNumber( prop.value().toString(), TDEABC::PhoneNumber::Cell ) );
}
}
// metacontact photo
TQImage photo = mc->photo();
if ( !photo.isNull() )
addr.setPhoto( KABC::Picture( photo ) );
addr.setPhoto( TDEABC::Picture( photo ) );
}
#include "kabcexport.moc"

@ -20,7 +20,7 @@
#include "kabcexport_base.h"
namespace KABC {
namespace TDEABC {
class AddressBook;
class Addressee;
}
@ -47,10 +47,10 @@ Q_OBJECT
void slotSelectAll();
void slotResourceSelectionChanged( TQListBoxItem * lbi );
protected:
void exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr );
void exportDetails( Kopete::MetaContact * mc, TDEABC::Addressee & addr );
private:
KABC::AddressBook* m_addressBook;
TQMap<int, KABC::Resource*> m_resourceMap;
TDEABC::AddressBook* m_addressBook;
TQMap<int, TDEABC::Resource*> m_resourceMap;
TQMap<int, Kopete::MetaContact*> m_contactMap;
};

@ -39,7 +39,7 @@ KopeteAddressBookExport::KopeteAddressBookExport( TQWidget *parent, Kopete::Meta
{
// instantiate dialog and populate widgets
mParent = parent;
mAddressBook = KABC::StdAddressBook::self();
mAddressBook = TDEABC::StdAddressBook::self();
mMetaContact = mc;
}
@ -101,17 +101,17 @@ void KopeteAddressBookExport::fetchKABCData()
}
// phone numbers
fetchPhoneNumbers( mUI->mHomePhones, KABC::PhoneNumber::Home, numHomePhones );
fetchPhoneNumbers( mUI->mWorkPhones, KABC::PhoneNumber::Work, numWorkPhones );
fetchPhoneNumbers( mUI->mMobilePhones, KABC::PhoneNumber::Cell, numMobilePhones );
fetchPhoneNumbers( mUI->mHomePhones, TDEABC::PhoneNumber::Home, numHomePhones );
fetchPhoneNumbers( mUI->mWorkPhones, TDEABC::PhoneNumber::Work, numWorkPhones );
fetchPhoneNumbers( mUI->mMobilePhones, TDEABC::PhoneNumber::Cell, numMobilePhones );
}
}
void KopeteAddressBookExport::fetchPhoneNumbers( TDEListBox * listBox, int type, uint& counter )
{
KABC::PhoneNumber::List phones = mAddressee.phoneNumbers( type );
TDEABC::PhoneNumber::List phones = mAddressee.phoneNumbers( type );
counter = phones.count();
KABC::PhoneNumber::List::Iterator it;
TDEABC::PhoneNumber::List::Iterator it;
for ( it = phones.begin(); it != phones.end(); ++it )
listBox->insertItem( mAddrBookIcon, (*it).number() );
if ( counter == 0 )
@ -229,21 +229,21 @@ void KopeteAddressBookExport::exportData()
for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Home ) );
mAddressee.insertPhoneNumber( TDEABC::PhoneNumber( *it, TDEABC::PhoneNumber::Home ) );
}
// work phone
newVals = newValues( mUI->mWorkPhones, numWorkPhones );
for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Work ) );
mAddressee.insertPhoneNumber( TDEABC::PhoneNumber( *it, TDEABC::PhoneNumber::Work ) );
}
// mobile
newVals = newValues( mUI->mMobilePhones, numMobilePhones );
for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Cell ) );
mAddressee.insertPhoneNumber( TDEABC::PhoneNumber( *it, TDEABC::PhoneNumber::Cell ) );
}
if ( dirty )
@ -251,7 +251,7 @@ void KopeteAddressBookExport::exportData()
// write the changed addressbook
mAddressBook->insertAddressee( mAddressee );
KABC::Ticket *ticket = mAddressBook->requestSaveTicket();
TDEABC::Ticket *ticket = mAddressBook->requestSaveTicket();
if ( !ticket )
kdWarning( 14000 ) << k_funcinfo << "WARNING: Resource is locked by other application!" << endl;
else

@ -91,8 +91,8 @@ protected:
TQPixmap mAddrBookIcon;
AddressBookExportUI *mUI;
Kopete::MetaContact *mMetaContact;
KABC::AddressBook *mAddressBook;
KABC::Addressee mAddressee;
TDEABC::AddressBook *mAddressBook;
TDEABC::Addressee mAddressee;
// counters tracking the number of KABC values where multiple values are possible in a single key
uint numEmails, numHomePhones, numWorkPhones, numMobilePhones;

@ -1283,14 +1283,14 @@ TQDragObject *KopeteContactListView::dragObject()
pm = SmallIcon( metaLVI->metaContact()->statusIcon() );
}
KABC::Addressee address = KABC::StdAddressBook::self()->findByUid(
TDEABC::Addressee address = TDEABC::StdAddressBook::self()->findByUid(
metaLVI->metaContact()->metaContactId()
);
if( !address.isEmpty() )
{
drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) );
KABC::VCardConverter converter;
TDEABC::VCardConverter converter;
TQString vcard = converter.createVCard( address );
if( !vcard.isNull() )
{
@ -1436,7 +1436,7 @@ void KopeteContactListView::slotSendFile()
Kopete::MetaContact *m=Kopete::ContactList::self()->selectedMetaContacts().first();
if ( !m->metaContactId().isEmpty( ) ) // check if in kabc
{
KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( m->metaContactId() );
TDEABC::Addressee addressee = TDEABC::StdAddressBook::self()->findByUid( m->metaContactId() );
if ( !addressee.isEmpty() )
{
TQString emailAddr = addressee.fullEmail();

@ -182,7 +182,7 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *pare
mainWidget->btnClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
connect( mainWidget->btnClearPhoto, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearPhotoClicked() ) );
connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) );
connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const TDEABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const TDEABC::Addressee & ) ) );
mainWidget->chkUseCustomIcons->setChecked( item->metaContact()->useCustomIcon() );
TQString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline );
@ -214,8 +214,8 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *pare
if ( !mAddressBookUid.isEmpty() )
{
KABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook();
KABC::Addressee a = ab->findByUid( mAddressBookUid );
TDEABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook();
TDEABC::Addressee a = ab->findByUid( mAddressBookUid );
mainWidget->widAddresseeLink->setAddressee( a );
if ( !a.isEmpty() )
@ -324,8 +324,8 @@ void KopeteMetaLVIProps::slotLoadPhotoSources()
void KopeteMetaLVIProps::slotEnableAndDisableWidgets()
{
KABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook();
KABC::Addressee a = ab->findByUid( mAddressBookUid );
TDEABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook();
TDEABC::Addressee a = ab->findByUid( mAddressBookUid );
bool validLink = ! a.isEmpty();
// kabc source requires a kabc link
mainWidget->radioNameKABC->setEnabled(validLink);
@ -474,7 +474,7 @@ void KopeteMetaLVIProps::slotUseCustomIconsToggled(bool on)
mainWidget->icnbUnknown->setEnabled( on );
}
void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a )
void KopeteMetaLVIProps::slotAddresseeChanged( const TDEABC::Addressee & a )
{
if ( !a.isEmpty() )
{

@ -37,7 +37,7 @@ class KopeteMetaContactLVI;
class KopeteAddressBookExport;
class KURLRequester;
namespace KABC { class Addressee; }
namespace TDEABC { class Addressee; }
namespace Kopete { class Contact; }
class KopeteGVIProps: public KDialogBase
@ -78,7 +78,7 @@ class KopeteMetaLVIProps: public KDialogBase
AddressBookLinkWidget *linkWidget;
KopeteMetaContactLVI *item;
KopeteAddressBookExport *mExport;
KABC::Sound mSound;
TDEABC::Sound mSound;
int m_countPhotoCapable;
TQMap<int, Kopete::Contact *> m_withPhotoContacts;
TQString mAddressBookUid; // the currently selected addressbook UID
@ -91,7 +91,7 @@ class KopeteMetaLVIProps: public KDialogBase
void slotOkClicked();
void slotUseCustomIconsToggled( bool on );
void slotClearPhotoClicked();
void slotAddresseeChanged( const KABC::Addressee & );
void slotAddresseeChanged( const TDEABC::Addressee & );
void slotExportClicked();
void slotImportClicked();
void slotFromKABCClicked();

@ -376,8 +376,8 @@ void KIMIfaceImpl::unknown( const TQString &uid )
{
// warn the user that the KABC contact associated with this UID isn't known to kopete,
// either associate an existing contact with KABC or add a new one using the ACW.
KABC::AddressBook *bk = KABC::StdAddressBook::self( false );
KABC::Addressee addr = bk->findByUid( uid );
TDEABC::AddressBook *bk = TDEABC::StdAddressBook::self( false );
TDEABC::Addressee addr = bk->findByUid( uid );
if ( addr.isEmpty() )
{
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n("Another TDE application tried to use Kopete for instant messaging, but Kopete could not find the specified contact in the TDE address book."), i18n( "Not Found in Address Book" ) );

@ -72,9 +72,9 @@ KABCPersistence *KABCPersistence::s_self = 0L;
bool KABCPersistence::s_addrBookWritePending = false;
TQPtrList<KABC::Resource> KABCPersistence::s_pendingResources;
TQPtrList<TDEABC::Resource> KABCPersistence::s_pendingResources;
KABC::AddressBook* KABCPersistence::s_addressBook = 0;
TDEABC::AddressBook* KABCPersistence::s_addressBook = 0;
KABCPersistence *KABCPersistence::self()
{
@ -84,12 +84,12 @@ KABCPersistence *KABCPersistence::self()
return s_self;
}
KABC::AddressBook* KABCPersistence::addressBook()
TDEABC::AddressBook* KABCPersistence::addressBook()
{
if ( s_addressBook == 0L )
{
s_addressBook = KABC::StdAddressBook::self();
KABC::StdAddressBook::setAutomaticSave( false );
s_addressBook = TDEABC::StdAddressBook::self();
TDEABC::StdAddressBook::setAutomaticSave( false );
}
return s_addressBook;
}
@ -97,11 +97,11 @@ KABC::AddressBook* KABCPersistence::addressBook()
void KABCPersistence::write( MetaContact * mc )
{
// Save any changes in each contact's addressBookFields to KABC
KABC::AddressBook* ab = addressBook();
TDEABC::AddressBook* ab = addressBook();
kdDebug( 14010 ) << k_funcinfo << "looking up Addressee for " << mc->displayName() << "..." << endl;
// Look up the address book entry
KABC::Addressee theAddressee = ab->findByUid( mc->metaContactId() );
TDEABC::Addressee theAddressee = ab->findByUid( mc->metaContactId() );
// Check that if addressee is not deleted or if the link is spurious
// (inherited from Kopete < 0.8, where all metacontacts had random ids)
if ( theAddressee.isEmpty() )
@ -171,7 +171,7 @@ void KABCPersistence::write( MetaContact * mc )
}*/
}
void KABCPersistence::writeAddressBook( const KABC::Resource * res)
void KABCPersistence::writeAddressBook( const TDEABC::Resource * res)
{
if ( !s_pendingResources.containsRef( res ) )
s_pendingResources.append( res );
@ -185,12 +185,12 @@ void KABCPersistence::writeAddressBook( const KABC::Resource * res)
void KABCPersistence::slotWriteAddressBook()
{
//kdDebug( 14010 ) << k_funcinfo << endl;
KABC::AddressBook* ab = addressBook();
TQPtrListIterator<KABC::Resource> it( s_pendingResources );
TDEABC::AddressBook* ab = addressBook();
TQPtrListIterator<TDEABC::Resource> it( s_pendingResources );
for ( ; it.current(); ++it )
{
//kdDebug( 14010 ) << "Writing resource " << it.current()->resourceName() << endl;
KABC::Ticket *ticket = ab->requestSaveTicket( it.current() );
TDEABC::Ticket *ticket = ab->requestSaveTicket( it.current() );
if ( !ticket )
kdWarning( 14010 ) << "WARNING: Resource is locked by other application!" << endl;
else
@ -211,7 +211,7 @@ void KABCPersistence::removeKABC( MetaContact *)
{
/* // remove any data this KMC has written to the TDE address book
// Save any changes in each contact's addressBookFields to KABC
KABC::AddressBook* ab = addressBook();
TDEABC::AddressBook* ab = addressBook();
// Wipe out the existing addressBook entries
d->addressBook.clear();
@ -223,7 +223,7 @@ void KABCPersistence::removeKABC( MetaContact *)
{
//kdDebug( 14010 ) << k_funcinfo << "looking up Addressee for " << displayName() << "..." << endl;
// Look up the address book entry
KABC::Addressee theAddressee = ab->findByUid( metaContactId() );
TDEABC::Addressee theAddressee = ab->findByUid( metaContactId() );
if ( theAddressee.isEmpty() )
{
@ -259,8 +259,8 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc )
kdDebug(14010) << k_funcinfo << endl;
bool contactAdded = false;
// check whether the dontShowAgain was checked
KABC::AddressBook* ab = addressBook();
KABC::Addressee addr = ab->findByUid( mc->metaContactId() );
TDEABC::AddressBook* ab = addressBook();
TDEABC::Addressee addr = ab->findByUid( mc->metaContactId() );
if ( !addr.isEmpty() ) // if we are associated with KABC
{
@ -435,9 +435,9 @@ void KABCPersistence::splitField( const TQString &str, TQString &app, TQString &
void KABCPersistence::dumpAB()
{
KABC::AddressBook * ab = addressBook();
TDEABC::AddressBook * ab = addressBook();
kdDebug( 14010 ) << k_funcinfo << " DUMPING ADDRESSBOOK" << endl;
KABC::AddressBook::ConstIterator dumpit = ab->begin();
TDEABC::AddressBook::ConstIterator dumpit = ab->begin();
for ( ; dumpit != ab->end(); ++dumpit )
{
(*dumpit).dump();

@ -28,7 +28,7 @@
// *) KABC Export Wizard - TODO - think about sequence of events when adding addressees AND writing their IM data. - Extra save should be unnecessary because we are sharing a kabc instance
// *) Select addressbook entry
namespace KABC
namespace TDEABC
{
class AddressBook;
class Resource;
@ -60,7 +60,7 @@ class KOPETE_EXPORT KABCPersistence : public TQObject
/**
* @brief Access Kopete's KDE address book instance
*/
static KABC::AddressBook* addressBook();
static TDEABC::AddressBook* addressBook();
/**
* @brief Change the KABC data associated with this metacontact
*
@ -84,7 +84,7 @@ class KOPETE_EXPORT KABCPersistence : public TQObject
/**
* Request an address book write, will be delayed to bundle any others happening around the same time
*/
void writeAddressBook( const KABC::Resource * res );
void writeAddressBook( const TDEABC::Resource * res );
protected:
static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value );
@ -97,9 +97,9 @@ class KOPETE_EXPORT KABCPersistence : public TQObject
void slotWriteAddressBook();
private:
static KABCPersistence * s_self;
static KABC::AddressBook* s_addressBook;
static TDEABC::AddressBook* s_addressBook;
static bool s_addrBookWritePending;
static TQPtrList<KABC::Resource> s_pendingResources;
static TQPtrList<TDEABC::Resource> s_pendingResources;
};
} // end namespace Kopete

@ -311,7 +311,7 @@ void ContactList::loadGlobalIdentity()
connect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged()));
// Ensure that the myself metaContactId is always the KABC whoAmI
KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
TDEABC::Addressee a = TDEABC::StdAddressBook::self()->whoAmI();
if(!a.isEmpty() && a.uid() != myself()->metaContactId())
{
myself()->setMetaContactId(a.uid());

@ -639,13 +639,13 @@ TQString MetaContact::displayName() const
TQString nameFromKABC( const TQString &id ) /*const*/
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
TDEABC::AddressBook* ab = KABCPersistence::self()->addressBook();
if ( ! id.isEmpty() && !id.contains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
TDEABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
{
kdDebug( 14010 ) << k_funcinfo << "no KABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
kdDebug( 14010 ) << k_funcinfo << "no TDEABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
}
else
{
@ -738,17 +738,17 @@ TQImage photoFromContact( Kopete::Contact *contact) /*const*/
TQImage photoFromKABC( const TQString &id ) /*const*/
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
TDEABC::AddressBook* ab = KABCPersistence::self()->addressBook();
if ( ! id.isEmpty() && !id.contains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
TDEABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
{
kdDebug( 14010 ) << k_funcinfo << "no KABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
kdDebug( 14010 ) << k_funcinfo << "no TDEABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
}
else
{
KABC::Picture pic = theAddressee.photo();
TDEABC::Picture pic = theAddressee.photo();
if ( pic.data().isNull() && pic.url().isEmpty() )
pic = theAddressee.logo();
@ -1289,18 +1289,18 @@ void MetaContact::slotAllPluginsLoaded()
void MetaContact::slotUpdateAddressBookPicture()
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
TDEABC::AddressBook* ab = KABCPersistence::self()->addressBook();
TQString id = metaContactId();
if ( !id.isEmpty() && !id.contains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
TDEABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
{
kdDebug( 14010 ) << k_funcinfo << "no KABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
kdDebug( 14010 ) << k_funcinfo << "no TDEABC::Addressee found for ( " << id << " ) " << " in current address book" << endl;
}
else
{
KABC::Picture pic = theAddressee.photo();
TDEABC::Picture pic = theAddressee.photo();
if ( pic.data().isNull() && pic.url().isEmpty() )
pic = theAddressee.logo();
@ -1398,7 +1398,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b)
if ( !d->metaContactId.isEmpty() && !newValue.isNull())
{
KABC::Addressee theAddressee = KABCPersistence::self()->addressBook()->findByUid( metaContactId() );
TDEABC::Addressee theAddressee = KABCPersistence::self()->addressBook()->findByUid( metaContactId() );
if ( !theAddressee.isEmpty() )
{

@ -55,7 +55,7 @@ Picture::Picture(const TQImage &image)
setPicture(image);
}
Picture::Picture(const KABC::Picture &picture)
Picture::Picture(const TDEABC::Picture &picture)
: d(new Private)
{
setPicture(picture);
@ -171,7 +171,7 @@ void Picture::setPicture(const TQString &path)
d->pictureBase64 = TQString();
}
void Picture::setPicture(const KABC::Picture &picture)
void Picture::setPicture(const TDEABC::Picture &picture)
{
// No need to call detach() here because setPicture will do it.
if ( picture.isIntern())

@ -23,7 +23,7 @@
#include <tqimage.h>
namespace KABC
namespace TDEABC
{
class Picture;
}
@ -74,9 +74,9 @@ public:
*/
Picture(const TQImage &image);
/**
* Create a picture from a KABC::Picture.
* Create a picture from a TDEABC::Picture.
*/
Picture(const KABC::Picture &picture);
Picture(const TDEABC::Picture &picture);
/**
* Copy a picture. It doesn't create a full copy, it just make a reference.
*/
@ -131,7 +131,7 @@ public:
* Set the picture content.
* @param picture a KABC Picture.
*/
void setPicture(const KABC::Picture &picture);
void setPicture(const TDEABC::Picture &picture);
private:
/**

@ -45,7 +45,7 @@ AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * na
connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) );
}
void AddressBookLinkWidget::setAddressee( const KABC::Addressee& addr )
void AddressBookLinkWidget::setAddressee( const TDEABC::Addressee& addr )
{
edtAddressee->setText( addr.realName() );
btnClear->setEnabled( !addr.isEmpty() );
@ -65,7 +65,7 @@ void AddressBookLinkWidget::slotClearAddressee()
{
edtAddressee->clear();
btnClear->setEnabled( false );
KABC::Addressee mrEmpty;
TDEABC::Addressee mrEmpty;
mSelectedUid = TQString();
emit addresseeChanged( mrEmpty );
}
@ -81,7 +81,7 @@ void AddressBookLinkWidget::slotSelectAddressee()
Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : TQString() ), this );
int result = dialog.exec();
KABC::Addressee addr;
TDEABC::Addressee addr;
if ( result == TQDialog::Accepted )
{
addr = dialog.addressBookSelectorWidget()->addressee();

@ -50,7 +50,7 @@ public:
/**
* Set the currently selected addressee
*/
void setAddressee( const KABC::Addressee& addr );
void setAddressee( const TDEABC::Addressee& addr );
/**
* Set the current metacontact so that the selector dialog may be preselected
*/
@ -61,9 +61,9 @@ public:
TQString uid() const;
signals:
/**
* Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked.
* Emitted when the selected addressee changed. addr is the TDEABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked.
*/
void addresseeChanged( const KABC::Addressee& addr );
void addresseeChanged( const TDEABC::Addressee& addr );
/**
* Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget.

@ -52,12 +52,12 @@ AddressBookSelectorDialog::~AddressBookSelectorDialog()
{
}
KABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent)
TDEABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent)
{
AddressBookSelectorDialog dialog(title, message, preSelectUid, parent);
int result = dialog.exec();
KABC::Addressee adr;
TDEABC::Addressee adr;
if ( result == TQDialog::Accepted )
adr = dialog.addressBookSelectorWidget()->addressee();

@ -23,7 +23,7 @@
#include "kopete_export.h"
#include <kdialogbase.h>
namespace KABC
namespace TDEABC
{
class AddressBook;
class Addressee;
@ -72,7 +72,7 @@ public:
* @returns the selected contact, or a null addressee if the user
* pressed the Cancel button. Optionally
*/
static KABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L );
static TDEABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L );
protected slots:
virtual void accept();

@ -90,7 +90,7 @@ AddressBookSelectorWidget::~AddressBookSelectorWidget()
}
KABC::Addressee AddressBookSelectorWidget::addressee()
TDEABC::Addressee AddressBookSelectorWidget::addressee()
{
AddresseeItem *item = 0L;
item = static_cast<AddresseeItem *>( addresseeListView->selectedItem() );
@ -127,7 +127,7 @@ bool AddressBookSelectorWidget::addresseeSelected()
void AddressBookSelectorWidget::slotLoadAddressees()
{
addresseeListView->clear();
KABC::AddressBook::Iterator it;
TDEABC::AddressBook::Iterator it;
AddresseeItem *addr;
for( it = m_addressBook->begin(); it != m_addressBook->end(); ++it )
{
@ -148,7 +148,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked()
if ( !addresseeName.isEmpty() )
{
KABC::Addressee addr;
TDEABC::Addressee addr;
addr.setNameFromString( addresseeName );
m_addressBook->insertAddressee(addr);
Kopete::KABCPersistence::self()->writeAddressBook( 0 );

@ -35,7 +35,7 @@
#include "addressbookselectorwidget_base.h"
namespace KABC {
namespace TDEABC {
class AddressBook;
class Addressee;
}
@ -52,7 +52,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget
public:
AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 );
~AddressBookSelectorWidget();
KABC::Addressee addressee();
TDEABC::Addressee addressee();
/**
* sets the widget label message
* example: Please select a contact
@ -69,8 +69,8 @@ public:
bool addresseeSelected();
private:
KABC::AddressBook * m_addressBook;
KABC::Addressee m_addressee;
TDEABC::AddressBook * m_addressBook;
TDEABC::Addressee m_addressee;
protected slots:
void slotAddAddresseeClicked();

@ -27,12 +27,12 @@
#include "addresseeitem.h"
AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) :
AddresseeItem::AddresseeItem( TQListView *parent, const TDEABC::Addressee &addressee) :
TDEListViewItem( parent ),
mAddressee( addressee )
{
//We can't save showphoto because we don't have a d pointer
KABC::Picture pic = mAddressee.photo();
TDEABC::Picture pic = mAddressee.photo();
if(!pic.isIntern())
pic = mAddressee.logo();
if(pic.isIntern())

@ -49,12 +49,12 @@ class AddresseeItem : public TDEListViewItem
@param parent The parent listview.
@param addressee The associated addressee.
*/
AddresseeItem( TQListView *parent, const KABC::Addressee &addressee );
AddresseeItem( TQListView *parent, const TDEABC::Addressee &addressee );
/**
Returns the addressee.
*/
KABC::Addressee addressee() const { return mAddressee; }
TDEABC::Addressee addressee() const { return mAddressee; }
/**
Method used by TQListView to sort the items.
@ -62,7 +62,7 @@ class AddresseeItem : public TDEListViewItem
virtual TQString key( int column, bool ascending ) const;
private:
KABC::Addressee mAddressee;
TDEABC::Addressee mAddressee;
};
#endif

@ -102,7 +102,7 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId,
}
d->widget->m_groupList->setCurrentText(TQString()); //default to top-level
connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) );
connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const TDEABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const TDEABC::Addressee& ) ) );
connect( d->widget->m_infoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotInfoClicked() ) );
connect( this, TQT_SIGNAL(okClicked()) , this , TQT_SLOT(slotFinished()));
@ -153,7 +153,7 @@ MetaContact *ContactAddedNotifyDialog::addContact() const
return metacontact;
}
void ContactAddedNotifyDialog::slotAddresseeSelected( const KABC::Addressee & addr )
void ContactAddedNotifyDialog::slotAddresseeSelected( const TDEABC::Addressee & addr )
{
if ( !addr.isEmpty() )
{

@ -20,7 +20,7 @@
#include <kdialogbase.h>
#include "kopete_export.h"
namespace KABC {
namespace TDEABC {
class Addressee;
}
@ -160,7 +160,7 @@ signals:
private slots:
void slotAddresseeSelected( const KABC::Addressee &);
void slotAddresseeSelected( const TDEABC::Addressee &);
void slotInfoClicked();
void slotFinished();

@ -18,7 +18,7 @@ Group=Input (Kopete)
[Kopete::UI::AddressBookLinkWidget]
ToolTip=Address Book Link Widget (Kopete)
WhatsThis=KABC::Addressee display/selector
WhatsThis=TDEABC::Addressee display/selector
IncludeFile=addressbooklinkwidget.h
ConstructorArgs=(parent, name)
Group=Input (Kopete)

@ -79,7 +79,7 @@ KopeteWidgets::KopeteWidgets()
#endif
widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h");
widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)");
widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector");
widget.whatsThis = TQString::fromLatin1("TDEABC::Addressee display/selector");
widget.isContainer = false;
m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget);

Loading…
Cancel
Save