diff options
Diffstat (limited to 'libkdepim/addressesdialog.cpp')
-rw-r--r-- | libkdepim/addressesdialog.cpp | 250 |
1 files changed, 125 insertions, 125 deletions
diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp index 3dc38920e..8a33d7999 100644 --- a/libkdepim/addressesdialog.cpp +++ b/libkdepim/addressesdialog.cpp @@ -52,10 +52,10 @@ #include <krun.h> #include <kstandarddirs.h> -#include <qdict.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace KPIM { @@ -82,7 +82,7 @@ struct AddressesDialog::AddressesDialogPrivate { AddresseeViewItem *ccItem; AddresseeViewItem *bccItem; - QDict<AddresseeViewItem> groupDict; + TQDict<AddresseeViewItem> groupDict; KABC::Addressee::List recentAddresses; LDAPSearchDialog *ldapSearchDialog; @@ -91,7 +91,7 @@ struct AddressesDialog::AddressesDialogPrivate { AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr, int emailIndex ) - : QObject( 0 ), KListViewItem( parent, addr.realName(), + : TQObject( 0 ), KListViewItem( parent, addr.realName(), ( emailIndex == 0 ? addr.preferredEmail() : addr.emails()[ emailIndex ] ) ) { d = new AddresseeViewItemPrivate; @@ -111,24 +111,24 @@ AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Add } } -AddresseeViewItem::AddresseeViewItem( KListView *lv, const QString& name, Category cat ) - : QObject(0), KListViewItem( lv, name ) +AddresseeViewItem::AddresseeViewItem( KListView *lv, const TQString& name, Category cat ) + : TQObject(0), KListViewItem( lv, name ) { d = new AddresseeViewItemPrivate; d->category = cat; } -AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name, +AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name, const KABC::Addressee::List &lst ) - : QObject(0), KListViewItem( parent, name, i18n("<group>") ) + : TQObject(0), KListViewItem( parent, name, i18n("<group>") ) { d = new AddresseeViewItemPrivate; d->category = FilledGroup; d->addresses = lst; } -AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name ) - : QObject(0), KListViewItem( parent, name, i18n("<group>") ) +AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name ) + : TQObject(0), KListViewItem( parent, name, i18n("<group>") ) { d = new AddresseeViewItemPrivate; d->category = DistList; @@ -172,7 +172,7 @@ AddresseeViewItem::email() const return text(1); } -bool AddresseeViewItem::matches(const QString& txt) const +bool AddresseeViewItem::matches(const TQString& txt) const { return d->address.realName().contains(txt, false) || d->address.preferredEmail().contains(txt, false); } @@ -185,11 +185,11 @@ void AddresseeViewItem::setSelected(bool selected) } emit addressSelected( this, selected ); - QListViewItem::setSelected(selected); + TQListViewItem::setSelected(selected); } int -AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const +AddresseeViewItem::compare( TQListViewItem * i, int col, bool ascending ) const { if ( category() == Group || category() == Entry ) return KListViewItem::compare( i , col, ascending ); @@ -210,11 +210,11 @@ AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const return -1; } -AddressesDialog::AddressesDialog( QWidget *widget, const char *name ) +AddressesDialog::AddressesDialog( TQWidget *widget, const char *name ) : KDialogBase( widget, name, true, i18n("Address Selection"), Ok|Cancel, Ok, true ) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); d = new AddressesDialogPrivate; d->ui = new AddressPickerUI( page ); @@ -236,8 +236,8 @@ AddresseeViewItem* AddressesDialog::selectedToItem() if ( !d->toItem ) { d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To ); - connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } return d->toItem; } @@ -247,8 +247,8 @@ AddresseeViewItem* AddressesDialog::selectedCcItem() if ( !d->ccItem ) { d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC ); - connect(d->ccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->ccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } return d->ccItem; } @@ -258,17 +258,17 @@ AddresseeViewItem* AddressesDialog::selectedBccItem() if ( !d->bccItem ) { d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC ); - connect(d->bccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->bccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } return d->bccItem; } void -AddressesDialog::setSelectedTo( const QStringList& l ) +AddressesDialog::setSelectedTo( const TQStringList& l ) { - QString name, email; - for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + TQString name, email; + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { KABC::Addressee addr; KABC::Addressee::parseEmailAddress( *it, name, email ); addr.setNameFromString( name ); @@ -278,10 +278,10 @@ AddressesDialog::setSelectedTo( const QStringList& l ) } void -AddressesDialog::setSelectedCC( const QStringList& l ) +AddressesDialog::setSelectedCC( const TQStringList& l ) { - QString name, email; - for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + TQString name, email; + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { KABC::Addressee addr; KABC::Addressee::parseEmailAddress( *it, name, email ); addr.setNameFromString( name ); @@ -291,10 +291,10 @@ AddressesDialog::setSelectedCC( const QStringList& l ) } void -AddressesDialog::setSelectedBCC( const QStringList& l ) +AddressesDialog::setSelectedBCC( const TQStringList& l ) { - QString name, email; - for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + TQString name, email; + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { KABC::Addressee addr; KABC::Addressee::parseEmailAddress( *it, name, email ); addr.setNameFromString( name ); @@ -316,12 +316,12 @@ AddressesDialog::setRecentAddresses( const KABC::Addressee::List& list ) void AddressesDialog::updateRecentAddresses() { - static const QString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) ); + static const TQString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) ); if ( !d->recent ) { d->recent = new AddresseeViewItem( d->ui->mAvailableView, recentGroup ); - connect(d->recent, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(availableAddressSelected(AddresseeViewItem*, bool))); + connect(d->recent, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool))); d->recent->setVisible( false ); d->groupDict.insert( recentGroup, d->recent ); } @@ -350,7 +350,7 @@ AddressesDialog::setShowBCC( bool b ) QStringList AddressesDialog::to() const { - QStringList emails = allDistributionLists( d->toItem ); + TQStringList emails = allDistributionLists( d->toItem ); KABC::Addressee::List l = toAddresses(); emails += entryToString( l ); @@ -360,7 +360,7 @@ AddressesDialog::to() const QStringList AddressesDialog::cc() const { - QStringList emails = allDistributionLists( d->ccItem ); + TQStringList emails = allDistributionLists( d->ccItem ); KABC::Addressee::List l = ccAddresses(); emails += entryToString( l ); @@ -370,7 +370,7 @@ AddressesDialog::cc() const QStringList AddressesDialog::bcc() const { - QStringList emails = allDistributionLists( d->bccItem ); + TQStringList emails = allDistributionLists( d->bccItem ); KABC::Addressee::List l = bccAddresses(); emails += entryToString( l ); @@ -387,13 +387,13 @@ KABC::Addressee::List AddressesDialog::allToAddressesNoDuplicates() const { KABC::Addressee::List aList = allAddressee( d->toItem ); - const QStringList dList = toDistributionLists(); + const TQStringList dList = toDistributionLists(); KABC::AddressBook* abook = KABC::StdAddressBook::self( true ); #ifdef KDEPIM_NEW_DISTRLISTS - for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) { - const QValueList<KPIM::DistributionList::Entry> eList + for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) { + const TQValueList<KPIM::DistributionList::Entry> eList = KPIM::DistributionList::findByName(abook, *it).entries(abook); - QValueList<KPIM::DistributionList::Entry>::ConstIterator eit; + TQValueList<KPIM::DistributionList::Entry>::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { @@ -404,9 +404,9 @@ AddressesDialog::allToAddressesNoDuplicates() const #else KABC::DistributionListManager manager( abook ); manager.load(); - for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) { - const QValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries(); - QValueList<KABC::DistributionList::Entry>::ConstIterator eit; + for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) { + const TQValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries(); + TQValueList<KABC::DistributionList::Entry>::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { @@ -455,11 +455,11 @@ AddressesDialog::updateAvailableAddressees() d->ui->mAvailableView->clear(); d->groupDict.clear(); - static const QString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) ); + static const TQString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) ); d->ui->mAvailableView->setRootIsDecorated( true ); d->personal = new AddresseeViewItem( d->ui->mAvailableView, personalGroup ); - //connect(d->personal, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - // this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + //connect(d->personal, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + // this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); d->personal->setVisible( false ); d->groupDict.insert( personalGroup, d->personal ); @@ -482,8 +482,8 @@ AddressesDialog::updateAvailableAddressees() void AddressesDialog::checkForSingleAvailableGroup() { - QListViewItem* item = d->ui->mAvailableView->firstChild(); - QListViewItem* firstGroup = 0; + TQListViewItem* item = d->ui->mAvailableView->firstChild(); + TQListViewItem* firstGroup = 0; int found = 0; while (item) { @@ -539,7 +539,7 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected // we have to avoid that a parent and a child is selected together // because in this case we get a double object deletion ( program crashes ) // when removing the selected items from list - AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((QListViewItem*)item)->parent()); + AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((TQListViewItem*)item)->parent()); if ( parent && selected ) parent->setSelected( false ); if (selected) @@ -562,36 +562,36 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected void AddressesDialog::initConnections() { - connect( d->ui->mFilterEdit, SIGNAL(textChanged(const QString &)), - SLOT(filterChanged(const QString &)) ); - connect( d->ui->mToButton, SIGNAL(clicked()), - SLOT(addSelectedTo()) ); - connect( d->ui->mCCButton, SIGNAL(clicked()), - SLOT(addSelectedCC()) ); - connect( d->ui->mBCCButton, SIGNAL(clicked()), - SLOT(addSelectedBCC()) ); - connect( d->ui->mSaveAs, SIGNAL(clicked()), - SLOT(saveAs()) ); - connect( d->ui->mLdapSearch, SIGNAL(clicked()), - SLOT(searchLdap()) ); - connect( d->ui->mRemoveButton, SIGNAL(clicked()), - SLOT(removeEntry()) ); - connect( d->ui->mAvailableView, SIGNAL(selectionChanged()), - SLOT(availableSelectionChanged()) ); - connect( d->ui->mAvailableView, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(addSelectedTo()) ); - connect( d->ui->mSelectedView, SIGNAL(selectionChanged()), - SLOT(selectedSelectionChanged()) ); - connect( d->ui->mSelectedView, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(removeEntry()) ); + connect( d->ui->mFilterEdit, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(filterChanged(const TQString &)) ); + connect( d->ui->mToButton, TQT_SIGNAL(clicked()), + TQT_SLOT(addSelectedTo()) ); + connect( d->ui->mCCButton, TQT_SIGNAL(clicked()), + TQT_SLOT(addSelectedCC()) ); + connect( d->ui->mBCCButton, TQT_SIGNAL(clicked()), + TQT_SLOT(addSelectedBCC()) ); + connect( d->ui->mSaveAs, TQT_SIGNAL(clicked()), + TQT_SLOT(saveAs()) ); + connect( d->ui->mLdapSearch, TQT_SIGNAL(clicked()), + TQT_SLOT(searchLdap()) ); + connect( d->ui->mRemoveButton, TQT_SIGNAL(clicked()), + TQT_SLOT(removeEntry()) ); + connect( d->ui->mAvailableView, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(availableSelectionChanged()) ); + connect( d->ui->mAvailableView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(addSelectedTo()) ); + connect( d->ui->mSelectedView, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(selectedSelectionChanged()) ); + connect( d->ui->mSelectedView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(removeEntry()) ); #ifndef KDEPIM_NEW_DISTRLISTS - connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), - this, SLOT( updateAvailableAddressees() ) ); + connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ), + this, TQT_SLOT( updateAvailableAddressees() ) ); #endif - connect( KABC::StdAddressBook::self( true ), SIGNAL( addressBookChanged(AddressBook*) ), - this, SLOT( updateAvailableAddressees() ) ); + connect( KABC::StdAddressBook::self( true ), TQT_SIGNAL( addressBookChanged(AddressBook*) ), + this, TQT_SLOT( updateAvailableAddressees() ) ); } void @@ -601,9 +601,9 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee return; if ( useCategory ) { - QStringList categories = addr.categories(); + TQStringList categories = addr.categories(); - for ( QStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) { + for ( TQStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) { if ( !d->groupDict[ *it ] ) { //we don't have the category yet AddresseeViewItem* category = new AddresseeViewItem( d->ui->mAvailableView, *it ); d->groupDict.insert( *it, category ); @@ -611,8 +611,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee for ( uint i = 0; i < addr.emails().count(); ++i ) { AddresseeViewItem* addressee = new AddresseeViewItem( d->groupDict[ *it ], addr, i ); - connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(availableAddressSelected(AddresseeViewItem*, bool))); + connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool))); } } } @@ -626,8 +626,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee if ( defaultParent && noCategory ) { // only non-categorized items here AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr ); - connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(availableAddressSelected(AddresseeViewItem*, bool))); + connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool))); } } @@ -645,8 +645,8 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV myChild = static_cast<AddresseeViewItem*>( myChild->nextSibling() ); } AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr ); - connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); defaultParent->setOpen( true ); } @@ -655,11 +655,11 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV void AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent, - const QPtrList<AddresseeViewItem>& addresses ) + const TQPtrList<AddresseeViewItem>& addresses ) { Q_ASSERT( parent ); - QPtrListIterator<AddresseeViewItem> itr( addresses ); + TQPtrListIterator<AddresseeViewItem> itr( addresses ); if (itr.current()) { @@ -693,8 +693,8 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent, address->setVisible( false ); selectedToAvailableMapping.insert(address, newItem); selectedToAvailableMapping.insert(newItem, address); - connect(newItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(newItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } parent->setOpen( true ); @@ -703,7 +703,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent, QStringList AddressesDialog::entryToString( const KABC::Addressee::List& l ) const { - QStringList entries; + TQStringList entries; for( KABC::Addressee::List::ConstIterator it = l.begin(); it != l.end(); ++it ) { entries += (*it).fullEmail(); @@ -717,8 +717,8 @@ AddressesDialog::addSelectedTo() if ( !d->toItem ) { d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To ); - connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } addAddresseesToSelected( d->toItem, selectedAvailableAddresses ); @@ -739,8 +739,8 @@ AddressesDialog::addSelectedCC() if ( !d->ccItem ) { d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC ); - connect(d->ccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->ccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } addAddresseesToSelected( d->ccItem, selectedAvailableAddresses ); @@ -761,8 +761,8 @@ AddressesDialog::addSelectedBCC() if ( !d->bccItem ) { d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC ); - connect(d->bccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)), - this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); + connect(d->bccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)), + this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool))); } addAddresseesToSelected( d->bccItem, selectedAvailableAddresses ); @@ -798,13 +798,13 @@ void AddressesDialog::unmapSelectedAddress(AddresseeViewItem* item) void AddressesDialog::removeEntry() { - QPtrList<AddresseeViewItem> lst; + TQPtrList<AddresseeViewItem> lst; bool resetTo = false; bool resetCC = false; bool resetBCC = false; lst.setAutoDelete( false ); - QPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses ); + TQPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses ); while ( it.current() ) { AddresseeViewItem* item = it.current(); ++it; @@ -849,12 +849,12 @@ AddressesDialog::removeEntry() // copied from kabcore.cpp :( // KDE4: should be in libkabc I think -static KABC::Resource *requestResource( KABC::AddressBook* abook, QWidget *parent ) +static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *parent ) { - QPtrList<KABC::Resource> kabcResources = abook->resources(); + TQPtrList<KABC::Resource> kabcResources = abook->resources(); - QPtrList<KRES::Resource> kresResources; - QPtrListIterator<KABC::Resource> resIt( kabcResources ); + TQPtrList<KRES::Resource> kresResources; + TQPtrListIterator<KABC::Resource> resIt( kabcResources ); KABC::Resource *resource; while ( ( resource = resIt.current() ) != 0 ) { ++resIt; @@ -887,9 +887,9 @@ AddressesDialog::saveAs() } bool ok = false; - QString name = KInputDialog::getText( i18n("New Distribution List"), + TQString name = KInputDialog::getText( i18n("New Distribution List"), i18n("Please enter name:"), - QString::null, &ok, + TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; @@ -941,8 +941,8 @@ AddressesDialog::searchLdap() { if ( !d->ldapSearchDialog ) { d->ldapSearchDialog = new LDAPSearchDialog( this ); - connect( d->ldapSearchDialog, SIGNAL( addresseesAdded() ), - SLOT(ldapSearchResult() ) ); + connect( d->ldapSearchDialog, TQT_SIGNAL( addresseesAdded() ), + TQT_SLOT(ldapSearchResult() ) ); } d->ldapSearchDialog->show(); } @@ -950,12 +950,12 @@ AddressesDialog::searchLdap() void AddressesDialog::ldapSearchResult() { - QStringList emails = QStringList::split(',', d->ldapSearchDialog->selectedEMails() ); - QStringList::iterator it( emails.begin() ); - QStringList::iterator end( emails.end() ); + TQStringList emails = TQStringList::split(',', d->ldapSearchDialog->selectedEMails() ); + TQStringList::iterator it( emails.begin() ); + TQStringList::iterator end( emails.end() ); for ( ; it != end; ++it ){ - QString name; - QString email; + TQString name; + TQString email; KPIM::getNameAndMail( (*it), name, email ); KABC::Addressee ad; ad.setNameFromString( name ); @@ -967,13 +967,13 @@ AddressesDialog::ldapSearchResult() void AddressesDialog::launchAddressBook() { - kapp->startServiceByDesktopName( "kaddressbook", QString() ); + kapp->startServiceByDesktopName( "kaddressbook", TQString() ); } void -AddressesDialog::filterChanged( const QString& txt ) +AddressesDialog::filterChanged( const TQString& txt ) { - QListViewItemIterator it( d->ui->mAvailableView ); + TQListViewItemIterator it( d->ui->mAvailableView ); bool showAll = false; if ( txt.isEmpty() ) @@ -991,8 +991,8 @@ AddressesDialog::filterChanged( const QString& txt ) if ( item->category() == AddresseeViewItem::Entry ) { bool matches = item->matches( txt ) ; item->setVisible( matches ); - if ( matches && static_cast<QListViewItem*>(item)->parent() ) { - static_cast<QListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries + if ( matches && static_cast<TQListViewItem*>(item)->parent() ) { + static_cast<TQListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries } } } @@ -1002,7 +1002,7 @@ KABC::Addressee::List AddressesDialog::allAddressee( KListView* view, bool onlySelected ) const { KABC::Addressee::List lst; - QListViewItemIterator it( view ); + TQListViewItemIterator it( view ); while ( it.current() ) { AddresseeViewItem* item = static_cast<AddresseeViewItem*>( it.current() ); if ( !onlySelected || item->isSelected() ) { @@ -1050,10 +1050,10 @@ AddressesDialog::allAddressee( AddresseeViewItem* parent ) const QStringList AddressesDialog::allDistributionLists( AddresseeViewItem* parent ) const { - QStringList lists; + TQStringList lists; if ( !parent ) - return QStringList(); + return TQStringList(); AddresseeViewItem *item = static_cast<AddresseeViewItem*>( parent->firstChild() ); while ( item ) { @@ -1072,13 +1072,13 @@ AddressesDialog::addDistributionLists() KABC::AddressBook* abook = KABC::StdAddressBook::self( true ); #ifdef KDEPIM_NEW_DISTRLISTS - const QValueList<KPIM::DistributionList> distLists = + const TQValueList<KPIM::DistributionList> distLists = KPIM::DistributionList::allDistributionLists( abook ); #else KABC::DistributionListManager manager( abook ); manager.load(); - QStringList distLists = manager.listNames(); + TQStringList distLists = manager.listNames(); #endif if ( distLists.isEmpty() ) @@ -1088,9 +1088,9 @@ AddressesDialog::addDistributionLists() i18n( "Distribution Lists" ) ); #ifdef KDEPIM_NEW_DISTRLISTS - QValueList<KPIM::DistributionList>::ConstIterator listIt; + TQValueList<KPIM::DistributionList>::ConstIterator listIt; #else - QStringList::Iterator listIt; + TQStringList::Iterator listIt; #endif for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) { #ifdef KDEPIM_NEW_DISTRLISTS @@ -1102,8 +1102,8 @@ AddressesDialog::addDistributionLists() #endif AddresseeViewItem *item = new AddresseeViewItem( topItem, dlist.name() ); - connect( item, SIGNAL( addressSelected( AddresseeViewItem*, bool ) ), - this, SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) ); + connect( item, TQT_SIGNAL( addressSelected( AddresseeViewItem*, bool ) ), + this, TQT_SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) ); #ifdef KDEPIM_NEW_DISTRLISTS KPIM::DistributionList::Entry::List::Iterator itemIt; |