diff options
Diffstat (limited to 'kabc')
-rw-r--r-- | kabc/frontend/main.cpp | 2 | ||||
-rw-r--r-- | kabc/frontend/mainWindow.ui.h | 130 | ||||
-rw-r--r-- | kabc/kabc2mutt/kabc2mutt.cpp | 34 | ||||
-rw-r--r-- | kabc/kabc2mutt/kabc2mutt.h | 6 | ||||
-rw-r--r-- | kabc/kabc2mutt/main.cpp | 2 | ||||
-rw-r--r-- | kabc/kabcdistlistupdater/kabcdistlistupdater.cpp | 12 |
6 files changed, 93 insertions, 93 deletions
diff --git a/kabc/frontend/main.cpp b/kabc/frontend/main.cpp index 797c9198a..737ca55a1 100644 --- a/kabc/frontend/main.cpp +++ b/kabc/frontend/main.cpp @@ -15,6 +15,6 @@ int main( int argc, char ** argv ) MainWindow *w = new MainWindow; w->show(); - app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) ); + app.connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); return app.exec(); } diff --git a/kabc/frontend/mainWindow.ui.h b/kabc/frontend/mainWindow.ui.h index e6a024743..fb8377cbb 100644 --- a/kabc/frontend/mainWindow.ui.h +++ b/kabc/frontend/mainWindow.ui.h @@ -6,9 +6,9 @@ ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ -#include <qfiledialog.h> +#include <tqfiledialog.h> #include <kinputdialog.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <klocale.h> #include <kdebug.h> @@ -20,8 +20,8 @@ using namespace KABC; class AddresseeItem : public QListViewItem { public: - AddresseeItem( QListView *parent, const Addressee &a ) : - QListViewItem( parent, a.realName(), a.uid() ), mAddressee( a ) {} + AddresseeItem( TQListView *parent, const Addressee &a ) : + TQListViewItem( parent, a.realName(), a.uid() ), mAddressee( a ) {} void setAddressee( const Addressee &a ) { mAddressee = a; } Addressee &addressee() { return mAddressee; } @@ -39,12 +39,12 @@ void MainWindow::init() mEmailListView->header()->hide(); mCategoryListView->header()->hide(); - connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), - SLOT( addressBookChanged() ) ); - connect( mAddressBook, SIGNAL( addressBookLocked( AddressBook * ) ), - SLOT( addressBookLocked() ) ); - connect( mAddressBook, SIGNAL( addressBookUnlocked( AddressBook * ) ), - SLOT( addressBookUnlocked() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), + TQT_SLOT( addressBookChanged() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookLocked( AddressBook * ) ), + TQT_SLOT( addressBookLocked() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookUnlocked( AddressBook * ) ), + TQT_SLOT( addressBookUnlocked() ) ); } void MainWindow::destroy() @@ -61,18 +61,18 @@ void MainWindow::fileSave() void MainWindow::fileOpen() { - QString fileName = QFileDialog::getOpenFileName(); + TQString fileName = TQFileDialog::getOpenFileName(); loadAddressBook( fileName ); } -void MainWindow::loadAddressBook( const QString &fileName ) +void MainWindow::loadAddressBook( const TQString &fileName ) { kdDebug() << "loadAddressBook(): '" << fileName << "'" << endl; mAddresseeList->clear(); mCurrentItem = 0; - mCurrentAddress = QString::null; + mCurrentAddress = TQString::null; readAddressee( Addressee() ); KABC::AddressBook::Iterator it; @@ -81,7 +81,7 @@ void MainWindow::loadAddressBook( const QString &fileName ) } } -void MainWindow::updateAddressee( QListViewItem *item ) +void MainWindow::updateAddressee( TQListViewItem *item ) { AddresseeItem *addresseeItem = dynamic_cast<AddresseeItem *>( item ); if ( !addresseeItem ) return; @@ -122,31 +122,31 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) // mLabelEdit->setText( a.label() ); mEmailListView->clear(); - QStringList emails = a.emails(); - QStringList::ConstIterator it3; + TQStringList emails = a.emails(); + TQStringList::ConstIterator it3; for( it3 = emails.begin(); it3 != emails.end(); ++it3 ) { - new QListViewItem( mEmailListView, *it3 ); + new TQListViewItem( mEmailListView, *it3 ); } mCategoryListView->clear(); - QStringList categories = a.categories(); - QStringList::ConstIterator it4; + TQStringList categories = a.categories(); + TQStringList::ConstIterator it4; for( it4 = categories.begin(); it4 != categories.end(); ++it4 ) { - new QListViewItem( mCategoryListView, *it4 ); + new TQListViewItem( mCategoryListView, *it4 ); } mCustomListView->clear(); - QStringList customs = a.customs(); - QStringList::ConstIterator it5; + TQStringList customs = a.customs(); + TQStringList::ConstIterator it5; for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { int posDash = (*it5).find( "-" ); int posColon = (*it5).find( ":" ); - QString app = (*it5).left( posDash ); - QString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 ); - QString value = (*it5).mid( posColon + 1 ); + TQString app = (*it5).left( posDash ); + TQString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 ); + TQString value = (*it5).mid( posColon + 1 ); - new QListViewItem( mCustomListView, app, cname, value ); + new TQListViewItem( mCustomListView, app, cname, value ); } Address::List addresses = a.addresses(); @@ -156,7 +156,7 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) mAddressIdCombo->insertItem( (*it).id() ); } if ( mAddressIdCombo->count() > 0 ) mCurrentAddress = mAddressIdCombo->currentText(); - else mCurrentAddress = QString::null; + else mCurrentAddress = TQString::null; readAddress( mCurrentAddress ); mPhoneIdCombo->clear(); @@ -200,9 +200,9 @@ KABC::Addressee MainWindow::writeAddressee( const KABC::Addressee &addressee ) void MainWindow::newEntry() { bool ok = false; - QString name = KInputDialog::getText( i18n("New Address Book Entry"), + TQString name = KInputDialog::getText( i18n("New Address Book Entry"), i18n("Please enter name:"), - QString::null, &ok, + TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; @@ -232,7 +232,7 @@ void MainWindow::updateAddress( int id ) if ( mAddressIdCombo->count() > 0 ) { mCurrentAddress = mAddressIdCombo->text( id ); } else { - mCurrentAddress = QString::null; + mCurrentAddress = TQString::null; } readAddress( mCurrentAddress ); } @@ -263,7 +263,7 @@ KABC::Address MainWindow::writeAddress( const KABC::Address &address ) return a; } -void MainWindow::writeAddress( const QString &id ) +void MainWindow::writeAddress( const TQString &id ) { if ( !mCurrentItem ) return; @@ -304,7 +304,7 @@ void MainWindow::readAddress( const KABC::Address &a ) else mAddressWorkCheck->setChecked( false ); } -void MainWindow::readAddress( const QString &id ) +void MainWindow::readAddress( const TQString &id ) { if ( !mCurrentItem || id.isEmpty() ) { readAddress( Address() ); @@ -323,7 +323,7 @@ void MainWindow::updatePhone( int id ) if ( mPhoneIdCombo->count() > 0 ) { mCurrentPhone = mPhoneIdCombo->text( id ); } else { - mCurrentPhone = QString::null; + mCurrentPhone = TQString::null; } readPhone( mCurrentPhone ); } @@ -354,7 +354,7 @@ KABC::PhoneNumber MainWindow::writePhone( const KABC::PhoneNumber &phoneNumber ) return p; } -void MainWindow::writePhone( const QString &id ) +void MainWindow::writePhone( const TQString &id ) { if ( !mCurrentItem ) return; @@ -402,7 +402,7 @@ void MainWindow::readPhone( const KABC::PhoneNumber &p ) else mPhonePagerCheck->setChecked( false ); } -void MainWindow::readPhone( const QString &id ) +void MainWindow::readPhone( const TQString &id ) { if ( !mCurrentItem || id.isEmpty() ) { readPhone( PhoneNumber() ); @@ -428,7 +428,7 @@ void MainWindow::removeAddress() { if ( !mCurrentItem ) return; - QString id = mAddressIdCombo->currentText(); + TQString id = mAddressIdCombo->currentText(); if ( id.isEmpty() ) return; Address address; @@ -450,13 +450,13 @@ void MainWindow::newEmail() if ( !mCurrentItem ) return; bool ok = false; - QString name = KInputDialog::getText( i18n("New Email Address"), + TQString name = KInputDialog::getText( i18n("New Email Address"), i18n("Please enter email address:"), - QString::null, &ok, + TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; - new QListViewItem( mEmailListView, name ); + new TQListViewItem( mEmailListView, name ); mCurrentItem->addressee().insertEmail( name ); } @@ -464,13 +464,13 @@ void MainWindow::editEmail() { if ( !mCurrentItem ) return; - QListViewItem *item = mEmailListView->selectedItem(); + TQListViewItem *item = mEmailListView->selectedItem(); if( !item ) return; - QString oldName = item->text( 0 ); + TQString oldName = item->text( 0 ); bool ok = false; - QString name = KInputDialog::getText( i18n("Edit Email Address"), + TQString name = KInputDialog::getText( i18n("Edit Email Address"), i18n("Please enter new email address:"), oldName, &ok, this ); @@ -485,7 +485,7 @@ void MainWindow::removeEmail() { if ( !mCurrentItem ) return; - QListViewItem *item = mEmailListView->selectedItem(); + TQListViewItem *item = mEmailListView->selectedItem(); if( !item ) return; mCurrentItem->addressee().removeEmail( item->text( 0 ) ); @@ -506,7 +506,7 @@ void MainWindow::removePhoneNumber() { if ( !mCurrentItem ) return; - QString id = mPhoneIdCombo->currentText(); + TQString id = mPhoneIdCombo->currentText(); if ( id.isEmpty() ) return; PhoneNumber p; @@ -522,13 +522,13 @@ void MainWindow::newCategory() if ( !mCurrentItem ) return; bool ok = false; - QString name = KInputDialog::getText( i18n("New Category"), + TQString name = KInputDialog::getText( i18n("New Category"), i18n("Please enter category name:"), - QString::null, &ok, + TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; - new QListViewItem( mCategoryListView, name ); + new TQListViewItem( mCategoryListView, name ); mCurrentItem->addressee().insertCategory( name ); } @@ -536,13 +536,13 @@ void MainWindow::editCategory() { if ( !mCurrentItem ) return; - QListViewItem *item = mCategoryListView->selectedItem(); + TQListViewItem *item = mCategoryListView->selectedItem(); if( !item ) return; - QString oldName = item->text( 0 ); + TQString oldName = item->text( 0 ); bool ok = false; - QString name = KInputDialog::getText( i18n("Edit Category"), + TQString name = KInputDialog::getText( i18n("Edit Category"), i18n("Please enter new category name:"), oldName, &ok, this ); @@ -557,7 +557,7 @@ void MainWindow::removeCategory() { if ( !mCurrentItem ) return; - QListViewItem *item = mCategoryListView->selectedItem(); + TQListViewItem *item = mCategoryListView->selectedItem(); if( !item ) return; mCurrentItem->addressee().removeCategory( item->text( 0 ) ); @@ -569,14 +569,14 @@ void MainWindow::editCustom() { if ( !mCurrentItem ) return; - QListViewItem *item = mCustomListView->selectedItem(); + TQListViewItem *item = mCustomListView->selectedItem(); if( !item ) return; - QString oldName = item->text( 0 ) + "-" + item->text( 1 ) + ":" + + TQString oldName = item->text( 0 ) + "-" + item->text( 1 ) + ":" + item->text( 2 ); bool ok = false; - QString name = KInputDialog::getText( i18n("New Custom Entry"), + TQString name = KInputDialog::getText( i18n("New Custom Entry"), i18n("Please enter custom entry.\n" "Format: APP-NAME:VALUE"), oldName, &ok, @@ -586,9 +586,9 @@ void MainWindow::editCustom() int posDash = name.find( "-" ); int posColon = name.find( ":" ); - QString app = name.left( posDash ); - QString cname = name.mid( posDash + 1, posColon - posDash - 1 ); - QString value = name.mid( posColon + 1 ); + TQString app = name.left( posDash ); + TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); + TQString value = name.mid( posColon + 1 ); item->setText( 0, app ); item->setText( 1, cname ); @@ -603,21 +603,21 @@ void MainWindow::newCustom() if ( !mCurrentItem ) return; bool ok = false; - QString name = KInputDialog::getText( i18n("New Custom Entry"), + TQString name = KInputDialog::getText( i18n("New Custom Entry"), i18n("Please enter custom entry.\n" "Format: APP-NAME:VALUE"), - QString::null, &ok, + TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; int posDash = name.find( "-" ); int posColon = name.find( ":" ); - QString app = name.left( posDash ); - QString cname = name.mid( posDash + 1, posColon - posDash - 1 ); - QString value = name.mid( posColon + 1 ); + TQString app = name.left( posDash ); + TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); + TQString value = name.mid( posColon + 1 ); - new QListViewItem( mCustomListView, app, cname, value ); + new TQListViewItem( mCustomListView, app, cname, value ); mCurrentItem->addressee().insertCustom( app, cname, value ); } @@ -626,7 +626,7 @@ void MainWindow::removeCustom() { if ( !mCurrentItem ) return; - QListViewItem *item = mCustomListView->selectedItem(); + TQListViewItem *item = mCustomListView->selectedItem(); if( !item ) return; mCurrentItem->addressee().removeCustom( item->text( 0 ), item->text( 1 ) ); @@ -635,7 +635,7 @@ void MainWindow::removeCustom() void MainWindow::addressBookChanged() { - QMessageBox::warning( this, i18n("Address Book Changed"), + TQMessageBox::warning( this, i18n("Address Book Changed"), i18n("The address book has changed on disk."), i18n("Reload") ); loadAddressBook( "dummy" ); diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp index 84f4626bb..96cf79232 100644 --- a/kabc/kabc2mutt/kabc2mutt.cpp +++ b/kabc/kabc2mutt/kabc2mutt.cpp @@ -21,16 +21,16 @@ #include <kapplication.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> #include <iostream> #include "kabc2mutt.h" -static std::ostream & operator<< ( std::ostream &os, const QString &s ); +static std::ostream & operator<< ( std::ostream &os, const TQString &s ); -KABC2Mutt::KABC2Mutt( QObject *parent, const char *name ) - : QObject( parent, name ), mFormat( Aliases ), +KABC2Mutt::KABC2Mutt( TQObject *parent, const char *name ) + : TQObject( parent, name ), mFormat( Aliases ), mIgnoreCase( false ), mAllAddresses( false ), mAlternateKeyFormat( false ), mAddressBook( 0 ) @@ -42,8 +42,8 @@ void KABC2Mutt::run() mAddressBook = KABC::StdAddressBook::self( true ); KABC::StdAddressBook::setAutomaticSave( false ); - connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), - this, SLOT( loadingFinished() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + this, TQT_SLOT( loadingFinished() ) ); } void KABC2Mutt::loadingFinished() @@ -51,7 +51,7 @@ void KABC2Mutt::loadingFinished() // print addressees KABC::AddressBook::ConstIterator iaddr; for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) { - const QString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); + const TQString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); if ( !mQuery.isEmpty() ) { bool match = (name.find(mQuery, 0, mIgnoreCase) > -1) || ((*iaddr).preferredEmail().find( mQuery, 0, mIgnoreCase ) > -1 ); @@ -59,8 +59,8 @@ void KABC2Mutt::loadingFinished() continue; } - const QStringList &allAddresses = (*iaddr).emails(); - QStringList::const_iterator from, to; + const TQStringList &allAddresses = (*iaddr).emails(); + TQStringList::const_iterator from, to; bool multiple = false; if ( mAllAddresses ) { @@ -77,10 +77,10 @@ void KABC2Mutt::loadingFinished() size_t index = 0; if ( mFormat == Aliases ) { - static const QChar space = QChar( ' ' ); - static const QChar underscore = QChar( '_' ); + static const TQChar space = TQChar( ' ' ); + static const TQChar underscore = TQChar( '_' ); - QString key; + TQString key; if ( !mAlternateKeyFormat ) key = (*iaddr).givenName().left( 3 ) + (*iaddr).familyName().left( 3 ); else @@ -125,8 +125,8 @@ void KABC2Mutt::loadingFinished() KABC::DistributionListManager manager( mAddressBook ); manager.load(); - QStringList dists = manager.listNames(); - for ( QStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) { + TQStringList dists = manager.listNames(); + for ( TQStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) { KABC::DistributionList *list = manager.list( *iaddr ); if ( list ) { if ( !mQuery.isEmpty() ) { @@ -135,12 +135,12 @@ void KABC2Mutt::loadingFinished() continue; } - QStringList emails = list->emails(); + TQStringList emails = list->emails(); if ( emails.isEmpty() ) continue; if ( mFormat == Aliases ) { - std::cout << "alias " << (*iaddr).replace( QRegExp( " " ), "_" ) + std::cout << "alias " << (*iaddr).replace( TQRegExp( " " ), "_" ) << '\t' << emails.join( "," ) << std::endl; } else { std::cout << emails.join( "," ) << '\t' << (*iaddr) << '\t' << std::endl; @@ -151,7 +151,7 @@ void KABC2Mutt::loadingFinished() kapp->quit(); } -static std::ostream & operator<< ( std::ostream &os, const QString &s ) +static std::ostream & operator<< ( std::ostream &os, const TQString &s ) { os << s.local8Bit().data(); return os; diff --git a/kabc/kabc2mutt/kabc2mutt.h b/kabc/kabc2mutt/kabc2mutt.h index 65f4d06f4..ebe4f53fd 100644 --- a/kabc/kabc2mutt/kabc2mutt.h +++ b/kabc/kabc2mutt/kabc2mutt.h @@ -30,9 +30,9 @@ class KABC2Mutt : public QObject enum Format { Aliases, Query }; - KABC2Mutt( QObject *parent, const char *name = 0 ); + KABC2Mutt( TQObject *parent, const char *name = 0 ); - void setQuery( const QString &query ) { mQuery = query; } + void setQuery( const TQString &query ) { mQuery = query; } void setFormat( Format format ) { mFormat = format; } void setIgnoreCase( bool ignoreCase ) { mIgnoreCase = ignoreCase; } void setAllAddresses( bool allAddresses ) { mAllAddresses = allAddresses; } @@ -44,7 +44,7 @@ class KABC2Mutt : public QObject void loadingFinished(); private: - QString mQuery; + TQString mQuery; Format mFormat; bool mIgnoreCase; bool mAllAddresses; diff --git a/kabc/kabc2mutt/main.cpp b/kabc/kabc2mutt/main.cpp index 8da8f5491..9ca34586d 100644 --- a/kabc/kabc2mutt/main.cpp +++ b/kabc/kabc2mutt/main.cpp @@ -63,7 +63,7 @@ int main( int argc, char **argv ) object->setAllAddresses( args->isSet( "all-addresses" ) ); // Handle --query option - const QString subString = QString::fromLocal8Bit( args->getOption( "query" ) ); + const TQString subString = TQString::fromLocal8Bit( args->getOption( "query" ) ); if ( !subString.isEmpty() ) { // Mutt wants a first line with some status message on it // See http://mutt.org/doc/manual/manual-4.html#ss4.5 diff --git a/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp b/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp index 012ce4d15..d7a54a731 100644 --- a/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp +++ b/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp @@ -39,15 +39,15 @@ static const KCmdLineOptions options[] = void convertDistributionLists() { KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); - const QMap<QString, QString> entryMap = cfg.entryMap( "DistributionLists" ); + const TQMap<TQString, TQString> entryMap = cfg.entryMap( "DistributionLists" ); if ( entryMap.isEmpty() ) // nothing to convert return; - QMapConstIterator<QString, QString> it; + TQMapConstIterator<TQString, TQString> it; for ( it = entryMap.begin(); it != entryMap.end(); ++it ) { - const QString listName = it.key(); - const QStringList entries = QStringList::split( ',', it.data(), true ); + const TQString listName = it.key(); + const TQStringList entries = TQStringList::split( ',', it.data(), true ); KPIM::DistributionList distList; distList.setUid( KApplication::randomString( 10 ) ); @@ -55,8 +55,8 @@ void convertDistributionLists() if ( entries.count() > 1 ) { for ( uint i = 0; i < entries.count(); i += 2 ) { - const QString uid = entries[ i ]; - const QString preferredEMail = entries[ i + 1 ]; + const TQString uid = entries[ i ]; + const TQString preferredEMail = entries[ i + 1 ]; distList.insertEntry( uid, preferredEMail ); } |