diff options
Diffstat (limited to 'kopete/kopete/contactlist/kopeteaddrbookexport.cpp')
-rw-r--r-- | kopete/kopete/contactlist/kopeteaddrbookexport.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp index d752f71e..bcb9c434 100644 --- a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp +++ b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp @@ -19,8 +19,8 @@ */ #include <kabc/phonenumber.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqcombobox.h> +#include <tqlabel.h> #include <kdialogbase.h> #include <kiconloader.h> @@ -35,7 +35,7 @@ #include "kopeteaddrbookexport.h" #include "kopeteaddrbookexportui.h" -KopeteAddressBookExport::KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ) : QObject( parent ) +KopeteAddressBookExport::KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ) : TQObject( parent ) { // instantiate dialog and populate widgets mParent = parent; @@ -69,30 +69,30 @@ void KopeteAddressBookExport::fetchKABCData() mAddrBookIcon = SmallIcon( "kaddressbook" ); // given name - QString given = mAddressee.givenName(); + TQString given = mAddressee.givenName(); if ( !given.isEmpty() ) mUI->mFirstName->insertItem( mAddrBookIcon, given ); else mUI->mFirstName->insertItem( mAddrBookIcon, i18n("<Not Set>") ); // family name - QString family = mAddressee.familyName(); + TQString family = mAddressee.familyName(); if ( !family.isEmpty() ) mUI->mLastName->insertItem( mAddrBookIcon, family ); else mUI->mLastName->insertItem( mAddrBookIcon, i18n("<Not Set>") ); // url - QString url = mAddressee.url().url(); + TQString url = mAddressee.url().url(); if ( !url.isEmpty() ) mUI->mUrl->insertItem( mAddrBookIcon, url ); else mUI->mUrl->insertItem( mAddrBookIcon, i18n("<Not Set>") ); // emails - QStringList emails = mAddressee.emails(); + TQStringList emails = mAddressee.emails(); numEmails = emails.count(); - for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) + for ( TQStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) mUI->mEmails->insertItem( mAddrBookIcon, *it ); if ( numEmails == 0 ) { @@ -123,13 +123,13 @@ void KopeteAddressBookExport::fetchPhoneNumbers( KListBox * listBox, int type, u void KopeteAddressBookExport::fetchIMData() { - QPtrList<Kopete::Contact> contacts = mMetaContact->contacts(); - QPtrListIterator<Kopete::Contact> cit( contacts ); + TQPtrList<Kopete::Contact> contacts = mMetaContact->contacts(); + TQPtrListIterator<Kopete::Contact> cit( contacts ); for( ; cit.current(); ++cit ) { // for each contact, get the property content Kopete::Contact* c = cit.current(); - QPixmap contactIcon = c->account()->accountIcon( 16 ); + TQPixmap contactIcon = c->account()->accountIcon( 16 ); // given name populateIM( c, contactIcon, mUI->mFirstName, Kopete::Global::Properties::self()->firstName() ); // family name @@ -147,7 +147,7 @@ void KopeteAddressBookExport::fetchIMData() } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, QComboBox *combo, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, TQComboBox *combo, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -156,7 +156,7 @@ void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -178,7 +178,7 @@ int KopeteAddressBookExport::showDialog() mUI = new AddressBookExportUI( mDialog ); mDialog->setMainWidget( mUI ); mDialog->setButtonOK( KGuiItem( i18n( "Export" ), - QString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); + TQString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); initLabels(); // fetch existing data from kabc @@ -189,7 +189,7 @@ int KopeteAddressBookExport::showDialog() return mDialog->exec(); } else - return QDialog::Rejected; + return TQDialog::Rejected; } void KopeteAddressBookExport::exportData() @@ -216,31 +216,31 @@ void KopeteAddressBookExport::exportData() mAddressee.setUrl( KURL( mUI->mUrl->currentText() ) ); } - QStringList newVals; + TQStringList newVals; // email newVals = newValues( mUI->mEmails, numEmails ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertEmail( *it ); } // home phone newVals = newValues( mUI->mHomePhones, numHomePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Home ) ); } // work phone newVals = newValues( mUI->mWorkPhones, numWorkPhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Work ) ); } // mobile newVals = newValues( mUI->mMobilePhones, numMobilePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Cell ) ); @@ -266,7 +266,7 @@ void KopeteAddressBookExport::exportData() } } -bool KopeteAddressBookExport::newValue( QComboBox *combo ) +bool KopeteAddressBookExport::newValue( TQComboBox *combo ) { // all data in position 0 is from KABC, so if position 0 is selected, // or if the selection is the same as the data at 0, return false @@ -274,9 +274,9 @@ bool KopeteAddressBookExport::newValue( QComboBox *combo ) ( combo->text( combo->currentItem() ) == combo->text( 0 ) ) ); } -QStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) +TQStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) { - QStringList newValues; + TQStringList newValues; // need to iterate all items except those from KABC and check if selected and not same as the first // counter is the number of KABC items, and hence the index of the first non KABC item for ( uint i = counter; i < listBox->count(); ++i ) |