From 94273bcb909fac42ef9427e3d8a614cab8c29c66 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 20 Feb 2013 16:27:27 -0600 Subject: Rename KABC namespace --- kaddressbook/features/Makefile.am | 6 +-- kaddressbook/features/distributionlistngwidget.cpp | 14 +++--- kaddressbook/features/distributionlistngwidget.h | 8 ++-- kaddressbook/features/distributionlistwidget.cpp | 54 +++++++++++----------- kaddressbook/features/distributionlistwidget.h | 6 +-- kaddressbook/features/resourceselection.cpp | 26 +++++------ kaddressbook/features/resourceselection.h | 2 +- 7 files changed, 58 insertions(+), 58 deletions(-) (limited to 'kaddressbook/features') diff --git a/kaddressbook/features/Makefile.am b/kaddressbook/features/Makefile.am index c4e8c247d..bfcbd9651 100644 --- a/kaddressbook/features/Makefile.am +++ b/kaddressbook/features/Makefile.am @@ -17,16 +17,16 @@ XXLIBS = $(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la \ if compile_newdistrlists libkaddrbk_distributionlistng_la_SOURCES = distributionlistngwidget.cpp libkaddrbk_distributionlistng_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -libkaddrbk_distributionlistng_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_KABC) +libkaddrbk_distributionlistng_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEABC) else libkaddrbk_distributionlist_la_SOURCES = distributionlistwidget.cpp libkaddrbk_distributionlist_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -libkaddrbk_distributionlist_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_KABC) +libkaddrbk_distributionlist_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEABC) endif libkaddrbk_resourceselection_la_SOURCES = resourceselection.cpp libkaddrbk_resourceselection_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -no-undefined -libkaddrbk_resourceselection_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_KABC) -ltderesources +libkaddrbk_resourceselection_la_LIBADD = $(XXLIBS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEABC) -ltderesources noinst_HEADERS = distributionlistwidget.h distributionlistngwidget.h resourceselection.h diff --git a/kaddressbook/features/distributionlistngwidget.cpp b/kaddressbook/features/distributionlistngwidget.cpp index 1d5acc09c..4a4a20a28 100644 --- a/kaddressbook/features/distributionlistngwidget.cpp +++ b/kaddressbook/features/distributionlistngwidget.cpp @@ -71,7 +71,7 @@ void KAB::DistributionListNg::ListBox::dropEvent( TQDropEvent *event ) if ( !item || index( item ) == 0 ) return; - KABC::Addressee::List list; + TDEABC::Addressee::List list; if ( !KVCardDrag::decode( event, list ) ) return; @@ -149,8 +149,8 @@ KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, TQWidget *pare mListBox = new ListBox( this ); connect( mListBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ), this, TQT_SLOT( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ) ); - connect( mListBox, TQT_SIGNAL( dropped( const TQString &, const KABC::Addressee::List & ) ), - this, TQT_SLOT( contactsDropped( const TQString &, const KABC::Addressee::List & ) ) ); + connect( mListBox, TQT_SIGNAL( dropped( const TQString &, const TDEABC::Addressee::List & ) ), + this, TQT_SLOT( contactsDropped( const TQString &, const TDEABC::Addressee::List & ) ) ); connect( mListBox, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( itemSelected( int ) ) ); connect( mListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), TQT_SLOT(editSelectedDistributionList()) ); @@ -202,7 +202,7 @@ void KAB::DistributionListNg::MainWidget::deleteSelectedDistributionList() core()->deleteDistributionLists( name ); } -void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees ) +void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listName, const TDEABC::Addressee::List &addressees ) { if ( addressees.isEmpty() ) return; @@ -212,7 +212,7 @@ void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listN if ( list.isEmpty() ) // not found [should be impossible] return; - for ( KABC::Addressee::List::ConstIterator it = addressees.begin(); it != addressees.end(); ++it ) { + for ( TDEABC::Addressee::List::ConstIterator it = addressees.begin(); it != addressees.end(); ++it ) { list.insertEntry( *it ); } @@ -220,9 +220,9 @@ void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listN changed( list ); } -void KAB::DistributionListNg::MainWidget::changed( const KABC::Addressee& dist ) +void KAB::DistributionListNg::MainWidget::changed( const TDEABC::Addressee& dist ) { - emit modified( KABC::Addressee::List() << dist ); + emit modified( TDEABC::Addressee::List() << dist ); } void KAB::DistributionListNg::MainWidget::updateEntries() diff --git a/kaddressbook/features/distributionlistngwidget.h b/kaddressbook/features/distributionlistngwidget.h index 3e5515486..c8cf84d31 100644 --- a/kaddressbook/features/distributionlistngwidget.h +++ b/kaddressbook/features/distributionlistngwidget.h @@ -37,7 +37,7 @@ class TQDropEvent; class TQPoint; class TQPushButton; -namespace KABC { +namespace TDEABC { class DistributionListManager; } @@ -53,7 +53,7 @@ public: signals: - void dropped( const TQString &listName, const KABC::Addressee::List &addressees ); + void dropped( const TQString &listName, const TDEABC::Addressee::List &addressees ); protected: //override @@ -80,7 +80,7 @@ public: private: - void changed( const KABC::Addressee& ); + void changed( const TDEABC::Addressee& ); private slots: @@ -90,7 +90,7 @@ private slots: void contextMenuRequested( TQListBoxItem *item, const TQPoint &point ); void updateEntries(); void itemSelected( int index ); - void contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees ); + void contactsDropped( const TQString &listName, const TDEABC::Addressee::List &addressees ); private: ListBox *mListBox; diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index 95bf46607..dce024a87 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -44,7 +44,7 @@ typedef KPIM::DistributionList DistributionList; #else #include -typedef KABC::DistributionList DistributionList; +typedef TDEABC::DistributionList DistributionList; #endif #include #include @@ -109,7 +109,7 @@ class DeletePressedCatcher : public TQObject class ContactItem : public TQListViewItem { public: - ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, + ContactItem( DistributionListView *parent, const TDEABC::Addressee &addressee, const TQString &email = TQString() ) : TQListViewItem( parent ), mAddressee( addressee ), @@ -125,7 +125,7 @@ class ContactItem : public TQListViewItem } } - KABC::Addressee addressee() const + TDEABC::Addressee addressee() const { return mAddressee; } @@ -142,7 +142,7 @@ class ContactItem : public TQListViewItem } private: - KABC::Addressee mAddressee; + TDEABC::Addressee mAddressee; TQString mEmail; }; @@ -206,9 +206,9 @@ DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *paren connect( core, TQT_SIGNAL( contactsUpdated() ), this, TQT_SLOT( updateNameCombo() ) ); #else - mManager = new KABC::DistributionListManager( core->addressBook() ); + mManager = new TDEABC::DistributionListManager( core->addressBook() ); - connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ), + connect( TDEABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ), this, TQT_SLOT( updateNameCombo() ) ); #endif @@ -274,7 +274,7 @@ void DistributionListWidget::createList() return; } #ifdef TDEPIM_NEW_DISTRLISTS - KABC::Resource* resource = core()->requestResource( this ); + TDEABC::Resource* resource = core()->requestResource( this ); if ( !resource ) return; @@ -287,7 +287,7 @@ void DistributionListWidget::createList() core()->addressBook()->insertAddressee( dist ); #else - new KABC::DistributionList( mManager, newName ); + new TDEABC::DistributionList( mManager, newName ); changed(); updateNameCombo(); @@ -324,7 +324,7 @@ void DistributionListWidget::editList() changed( dist ); #else - KABC::DistributionList *list = mManager->list( oldName ); + TDEABC::DistributionList *list = mManager->list( oldName ); list->setName( newName ); mManager->save(); updateNameCombo(); @@ -377,14 +377,14 @@ void DistributionListWidget::addContact() return; } #else - KABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); + TDEABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); if ( !list ) return; - KABC::DistributionList& dist = *list; + TDEABC::DistributionList& dist = *list; #endif - const KABC::Addressee::List addrList = selectedContacts(); - KABC::Addressee::List::ConstIterator it; + const TDEABC::Addressee::List addrList = selectedContacts(); + TDEABC::Addressee::List::ConstIterator it; for ( it = addrList.begin(); it != addrList.end(); ++it ) dist.insertEntry( *it ); @@ -405,10 +405,10 @@ void DistributionListWidget::removeContact() if ( dist.isEmpty() ) // not found return; #else - KABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); + TDEABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); if ( !list ) return; - KABC::DistributionList& dist = *list; + TDEABC::DistributionList& dist = *list; #endif ContactItem *contactItem = @@ -435,10 +435,10 @@ void DistributionListWidget::changeEmail() if ( dist.isEmpty() ) // not found return; #else - KABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); + TDEABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); if ( !list ) return; - KABC::DistributionList& dist = *list; + TDEABC::DistributionList& dist = *list; #endif ContactItem *contactItem = @@ -475,7 +475,7 @@ void DistributionListWidget::updateContactView() core()->addressBook(), mNameCombo->currentText() ); isListSelected = !dist.isEmpty(); #else - KABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); + TDEABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); isListSelected = list != 0; #endif if ( !isListSelected ) { @@ -495,8 +495,8 @@ void DistributionListWidget::updateContactView() const KPIM::DistributionList::Entry::List entries = dist.entries( core()->addressBook() ); KPIM::DistributionList::Entry::List::ConstIterator it; #else - const KABC::DistributionList::Entry::List entries = list->entries(); - KABC::DistributionList::Entry::List::ConstIterator it; + const TDEABC::DistributionList::Entry::List entries = list->entries(); + TDEABC::DistributionList::Entry::List::ConstIterator it; #endif for ( it = entries.begin(); it != entries.end(); ++it, ++entryCount ) new ContactItem( mContactView, (*it).addressee, (*it).email ); @@ -535,17 +535,17 @@ void DistributionListWidget::dropEvent( TQDropEvent *e ) if ( dist.isEmpty() ) return; #else - KABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); + TDEABC::DistributionList *list = mManager->list( mNameCombo->currentText() ); if ( !list ) return; - KABC::DistributionList& dist = *list; + TDEABC::DistributionList& dist = *list; #endif TQString vcards; if ( KVCardDrag::decode( e, vcards ) ) { - KABC::VCardConverter converter; - const KABC::Addressee::List lst = converter.parseVCards( vcards ); - for ( KABC::Addressee::List::ConstIterator it = lst.begin(); it != lst.end(); ++it ) + TDEABC::VCardConverter converter; + const TDEABC::Addressee::List lst = converter.parseVCards( vcards ); + for ( TDEABC::Addressee::List::ConstIterator it = lst.begin(); it != lst.end(); ++it ) dist.insertEntry( *it ); #ifdef TDEPIM_NEW_DISTRLISTS @@ -579,9 +579,9 @@ void DistributionListWidget::dropped( TQDropEvent *e, TQListViewItem* ) } #ifdef TDEPIM_NEW_DISTRLISTS -void DistributionListWidget::changed( const KABC::Addressee& dist ) +void DistributionListWidget::changed( const TDEABC::Addressee& dist ) { - emit modified( KABC::Addressee::List() << dist ); + emit modified( TDEABC::Addressee::List() << dist ); } #else void DistributionListWidget::changed() diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h index 1429aa7bc..e502dda1c 100644 --- a/kaddressbook/features/distributionlistwidget.h +++ b/kaddressbook/features/distributionlistwidget.h @@ -40,7 +40,7 @@ namespace KAB { class Core; } -namespace KABC { +namespace TDEABC { class AddressBook; class DistributionListManager; } @@ -77,7 +77,7 @@ class DistributionListWidget : public KAB::ExtensionWidget private: #ifdef TDEPIM_NEW_DISTRLISTS - void changed( const KABC::Addressee& dist ); + void changed( const TDEABC::Addressee& dist ); #else void changed(); #endif @@ -92,7 +92,7 @@ class DistributionListWidget : public KAB::ExtensionWidget DistributionListView *mContactView; #ifndef TDEPIM_NEW_DISTRLISTS - KABC::DistributionListManager *mManager; + TDEABC::DistributionListManager *mManager; #endif TQPushButton *mCreateListButton; TQPushButton *mEditListButton; diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp index 132d0bc8a..66d75b985 100644 --- a/kaddressbook/features/resourceselection.cpp +++ b/kaddressbook/features/resourceselection.cpp @@ -43,12 +43,12 @@ #include "resourceselection.h" #include -class AddressBookWrapper : public KABC::AddressBook +class AddressBookWrapper : public TDEABC::AddressBook { public: - AddressBookWrapper( KABC::AddressBook* ); + AddressBookWrapper( TDEABC::AddressBook* ); - KRES::Manager* getResourceManager() + KRES::Manager* getResourceManager() { return resourceManager(); } @@ -57,7 +57,7 @@ class AddressBookWrapper : public KABC::AddressBook class ResourceItem : public TQCheckListItem { public: - ResourceItem( TDEListView *parent, KABC::Resource *resource ) + ResourceItem( TDEListView *parent, TDEABC::Resource *resource ) : TQCheckListItem( parent, resource->resourceName(), CheckBox ), mResource( resource ), mChecked( false ), mIsSubresource( false ), mSubItemsCreated( false ), @@ -88,14 +88,14 @@ class ResourceItem : public TQCheckListItem setOn(state); } bool checked() const { return mChecked; } - KABC::Resource *resource() const { return mResource; } + TDEABC::Resource *resource() const { return mResource; } TQString resourceIdentifier() const { return mResourceIdentifier; } bool isSubResource() const { return mIsSubresource; } virtual void stateChange( bool active ); private: - KABC::Resource * const mResource; + TDEABC::Resource * const mResource; bool mChecked; const bool mIsSubresource; bool mSubItemsCreated; @@ -194,7 +194,7 @@ void ResourceSelection::reloadResource() ResourceItem *item = selectedItem(); if ( !item ) return; - KABC::Resource *r = item->resource(); + TDEABC::Resource *r = item->resource(); r->load(); } @@ -203,8 +203,8 @@ void ResourceSelection::saveResource() ResourceItem *item = selectedItem(); if ( !item ) return; - KABC::Resource *r = item->resource(); - KABC::Ticket *ticket = core()->addressBook()->requestSaveTicket( r ); + TDEABC::Resource *r = item->resource(); + TDEABC::Ticket *ticket = core()->addressBook()->requestSaveTicket( r ); if ( ticket ) { r->save( ticket ); } @@ -244,7 +244,7 @@ void ResourceSelection::add() TQString type = types[ descs.findIndex( desc ) ]; // Create new resource - KABC::Resource *resource = mManager->createResource( type ); + TDEABC::Resource *resource = mManager->createResource( type ); if ( !resource ) { KMessageBox::error( this, i18n("Unable to create an address book of type %1.") .arg( type ) ); @@ -277,7 +277,7 @@ void ResourceSelection::edit() // view items can change during "edit", e.g. sub resources being removed -> // sub resource item removed // thus keep their data rather than their pointer - KABC::Resource *resource = item->resource(); + TDEABC::Resource *resource = item->resource(); KRES::ConfigDialog dlg( this, TQString( "contact" ), resource ); @@ -323,7 +323,7 @@ void ResourceSelection::currentChanged( TQListViewItem *item ) if ( !resItem ) return; - KABC::Resource *resource = resItem->resource(); + TDEABC::Resource *resource = resItem->resource(); if ( resItem->checked() != resItem->isOn() ) { resItem->setChecked( resItem->isOn() ); @@ -361,7 +361,7 @@ void ResourceSelection::updateView() mListView->clear(); - KRES::Manager::Iterator it; + KRES::Manager::Iterator it; for ( it = mManager->begin(); it != mManager->end(); ++it ) { ResourceItem *item = new ResourceItem( mListView, *it ); diff --git a/kaddressbook/features/resourceselection.h b/kaddressbook/features/resourceselection.h index 4c1a6df61..a627fb512 100644 --- a/kaddressbook/features/resourceselection.h +++ b/kaddressbook/features/resourceselection.h @@ -87,7 +87,7 @@ class ResourceSelection : public KAB::ExtensionWidget TQString mLastResource; - KRES::Manager *mManager; + KRES::Manager *mManager; }; #endif -- cgit v1.2.1