From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kabc/frontend/mainWindow.ui | 206 +++++++++++++++++++++--------------------- kabc/frontend/mainWindow.ui.h | 36 ++++---- kabc/kabc2mutt/kabc2mutt.cpp | 10 +- kabc/kabc2mutt/kabc2mutt.h | 5 +- 4 files changed, 129 insertions(+), 128 deletions(-) (limited to 'kabc') diff --git a/kabc/frontend/mainWindow.ui b/kabc/frontend/mainWindow.ui index 3497a980..c07497bb 100644 --- a/kabc/frontend/mainWindow.ui +++ b/kabc/frontend/mainWindow.ui @@ -1,6 +1,6 @@ MainWindow - + MainWindow @@ -19,7 +19,7 @@ unnamed - + Name @@ -63,7 +63,7 @@ AllColumns - + TabWidget2 @@ -81,7 +81,7 @@ Rounded - + tab @@ -98,12 +98,12 @@ 6 - + mNameEdit - + TextLabel1 @@ -111,7 +111,7 @@ Name: - + TextLabel1_2 @@ -119,47 +119,47 @@ URL: - + mUrlEdit - + mAdditionalNameEdit - + mSuffixEdit - + mGivenNameEdit - + mPrefixEdit - + mFamilyNameEdit - + mFormattedNameEdit - + mNickNameEdit - + TextLabel7 @@ -167,7 +167,7 @@ Nickname: - + TextLabel5 @@ -175,7 +175,7 @@ Honorific suffixes: - + TextLabel3_2 @@ -183,7 +183,7 @@ Family name: - + TextLabel4 @@ -191,7 +191,7 @@ Additional names: - + TextLabel6 @@ -199,7 +199,7 @@ Given name: - + TextLabel1_3 @@ -207,7 +207,7 @@ Honorific prefixes: - + TextLabel8 @@ -215,7 +215,7 @@ Formatted name: - + TextLabel15 @@ -223,12 +223,12 @@ Sort string: - + mSortStringEdit - + TextLabel11 @@ -236,7 +236,7 @@ Role: - + TextLabel12 @@ -244,7 +244,7 @@ Organization: - + TextLabel10 @@ -252,17 +252,17 @@ Title: - + mTitleEdit - + mRoleEdit - + mOrganizationEdit @@ -286,7 +286,7 @@ - + tab @@ -297,7 +297,7 @@ unnamed - + GroupBox1 @@ -314,7 +314,7 @@ 6 - + TextLabel2_3 @@ -322,12 +322,12 @@ Id: - + mPhoneIdCombo - + PushButton3 @@ -335,7 +335,7 @@ Remove - + PushButton4 @@ -343,12 +343,12 @@ New - + mPhoneNumberEdit - + TextLabel1_5 @@ -356,7 +356,7 @@ Number: - + ButtonGroup2 @@ -373,7 +373,7 @@ 6 - + mPhoneWorkCheck @@ -381,7 +381,7 @@ Work - + mPhonePrefCheck @@ -389,7 +389,7 @@ Pref - + mPhoneHomeCheck @@ -397,7 +397,7 @@ Home - + mPhoneCellCheck @@ -405,7 +405,7 @@ Cell - + mPhoneFaxCheck @@ -413,7 +413,7 @@ Fax - + mPhoneBbsCheck @@ -421,7 +421,7 @@ BBS - + mPhoneCarCheck @@ -429,7 +429,7 @@ Car - + mPhoneVideoCheck @@ -437,7 +437,7 @@ Video - + mPhoneIsdnCheck @@ -445,7 +445,7 @@ ISDN - + mPhoneVoiceCheck @@ -453,7 +453,7 @@ Voice - + mPhonePcsCheck @@ -461,7 +461,7 @@ PCS - + mPhoneModemCheck @@ -469,7 +469,7 @@ Modem - + mPhonePagerCheck @@ -477,7 +477,7 @@ Pager - + mPhoneMsgCheck @@ -489,7 +489,7 @@ - + GroupBox2 @@ -506,7 +506,7 @@ 6 - + PushButton7 @@ -514,7 +514,7 @@ &New - + PushButton5 @@ -522,7 +522,7 @@ &Edit - + PushButton6 @@ -547,7 +547,7 @@ - + Address @@ -570,7 +570,7 @@ - + tab @@ -581,7 +581,7 @@ unnamed - + TextLabel16 @@ -589,7 +589,7 @@ Id: - + TextLabel1_4 @@ -597,7 +597,7 @@ Post office box: - + TextLabel2_2 @@ -605,7 +605,7 @@ Extended: - + TextLabel3_3 @@ -613,7 +613,7 @@ Street: - + TextLabel4_2 @@ -621,32 +621,32 @@ Locality: - + mAddressPostOfficeBoxEdit - + mAddressExtendedEdit - + mAddressStreetEdit - + mAddressLocalityEdit - + mAddressRegionEdit - + TextLabel5_2 @@ -654,7 +654,7 @@ Region: - + TextLabel7_2 @@ -662,7 +662,7 @@ Country: - + TextLabel6_2 @@ -670,12 +670,12 @@ Postal code: - + mAddressLabelEdit - + TextLabel13 @@ -683,17 +683,17 @@ Label: - + mAddressPostalCodeEdit - + mAddressCountryEdit - + ButtonGroup1 @@ -710,7 +710,7 @@ 6 - + mAddressDomCheck @@ -718,7 +718,7 @@ Dom - + mAddressIntlCheck @@ -726,7 +726,7 @@ Intl - + mAddressParcelCheck @@ -734,7 +734,7 @@ Parcel - + mAddressPostalCheck @@ -742,7 +742,7 @@ Postal - + mAddressHomeCheck @@ -750,7 +750,7 @@ Home - + mAddressPrefCheck @@ -758,7 +758,7 @@ Pref - + mAddressWorkCheck @@ -768,7 +768,7 @@ - + PushButton1 @@ -776,7 +776,7 @@ &New - + PushButton2 @@ -784,14 +784,14 @@ &Remove - + mAddressIdCombo - + tab @@ -808,12 +808,12 @@ 6 - + mNoteEdit - + TextLabel14 @@ -821,7 +821,7 @@ Note: - + GroupBox2_2 @@ -838,7 +838,7 @@ 6 - + Name @@ -874,7 +874,7 @@ - + PushButton6_2 @@ -882,7 +882,7 @@ &Remove - + PushButton5_2 @@ -890,7 +890,7 @@ &Edit - + PushButton7_2 @@ -902,7 +902,7 @@ - + tab @@ -919,7 +919,7 @@ 6 - + GroupBox2_2_2 @@ -936,7 +936,7 @@ 6 - + App @@ -977,7 +977,7 @@ AllColumns - + PushButton7_2_2 @@ -985,7 +985,7 @@ &New - + PushButton5_2_2 @@ -993,7 +993,7 @@ &Edit - + PushButton6_2_2 @@ -1365,7 +1365,7 @@ QString mCurrentAddress QString mCurrentPhone - + init() destroy() fileSave() @@ -1404,6 +1404,6 @@ addressBookLocked() addressBookUnlocked() fileOpenStd() - + diff --git a/kabc/frontend/mainWindow.ui.h b/kabc/frontend/mainWindow.ui.h index fb8377cb..0740d9cf 100644 --- a/kabc/frontend/mainWindow.ui.h +++ b/kabc/frontend/mainWindow.ui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** -** If you wish to add, delete or rename slots use Qt Designer which will +** If you wish to add, delete or rename slots use TQt Designer which will ** update this file, preserving your code. Create an init() slot in place of ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ @@ -17,11 +17,11 @@ using namespace KABC; -class AddresseeItem : public QListViewItem +class AddresseeItem : public TQListViewItem { public: - AddresseeItem( TQListView *parent, const Addressee &a ) : - TQListViewItem( parent, a.realName(), a.uid() ), mAddressee( a ) {} + AddresseeItem( TQListView *tqparent, const Addressee &a ) : + TQListViewItem( tqparent, a.realName(), a.uid() ), mAddressee( a ) {} void setAddressee( const Addressee &a ) { mAddressee = a; } Addressee &addressee() { return mAddressee; } @@ -72,7 +72,7 @@ void MainWindow::loadAddressBook( const TQString &fileName ) mAddresseeList->clear(); mCurrentItem = 0; - mCurrentAddress = TQString::null; + mCurrentAddress = TQString(); readAddressee( Addressee() ); KABC::AddressBook::Iterator it; @@ -139,8 +139,8 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) TQStringList customs = a.customs(); TQStringList::ConstIterator it5; for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { - int posDash = (*it5).find( "-" ); - int posColon = (*it5).find( ":" ); + int posDash = (*it5).tqfind( "-" ); + int posColon = (*it5).tqfind( ":" ); TQString app = (*it5).left( posDash ); TQString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 ); @@ -156,7 +156,7 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) mAddressIdCombo->insertItem( (*it).id() ); } if ( mAddressIdCombo->count() > 0 ) mCurrentAddress = mAddressIdCombo->currentText(); - else mCurrentAddress = TQString::null; + else mCurrentAddress = TQString(); readAddress( mCurrentAddress ); mPhoneIdCombo->clear(); @@ -202,7 +202,7 @@ void MainWindow::newEntry() bool ok = false; TQString name = KInputDialog::getText( i18n("New Address Book Entry"), i18n("Please enter name:"), - TQString::null, &ok, + TQString(), &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 = TQString::null; + mCurrentAddress = TQString(); } readAddress( mCurrentAddress ); } @@ -323,7 +323,7 @@ void MainWindow::updatePhone( int id ) if ( mPhoneIdCombo->count() > 0 ) { mCurrentPhone = mPhoneIdCombo->text( id ); } else { - mCurrentPhone = TQString::null; + mCurrentPhone = TQString(); } readPhone( mCurrentPhone ); } @@ -452,7 +452,7 @@ void MainWindow::newEmail() bool ok = false; TQString name = KInputDialog::getText( i18n("New Email Address"), i18n("Please enter email address:"), - TQString::null, &ok, + TQString(), &ok, this ); if ( !ok || name.isEmpty() ) return; @@ -524,7 +524,7 @@ void MainWindow::newCategory() bool ok = false; TQString name = KInputDialog::getText( i18n("New Category"), i18n("Please enter category name:"), - TQString::null, &ok, + TQString(), &ok, this ); if ( !ok || name.isEmpty() ) return; @@ -583,8 +583,8 @@ void MainWindow::editCustom() this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.find( "-" ); - int posColon = name.find( ":" ); + int posDash = name.tqfind( "-" ); + int posColon = name.tqfind( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); @@ -606,12 +606,12 @@ void MainWindow::newCustom() TQString name = KInputDialog::getText( i18n("New Custom Entry"), i18n("Please enter custom entry.\n" "Format: APP-NAME:VALUE"), - TQString::null, &ok, + TQString(), &ok, this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.find( "-" ); - int posColon = name.find( ":" ); + int posDash = name.tqfind( "-" ); + int posColon = name.tqfind( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp index b86521dd..7e10dc32 100644 --- a/kabc/kabc2mutt/kabc2mutt.cpp +++ b/kabc/kabc2mutt/kabc2mutt.cpp @@ -29,8 +29,8 @@ static std::ostream & operator<< ( std::ostream &os, const TQString &s ); -KABC2Mutt::KABC2Mutt( TQObject *parent, const char *name ) - : TQObject( parent, name ), mFormat( Aliases ), +KABC2Mutt::KABC2Mutt( TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), mFormat( Aliases ), mIgnoreCase( false ), mAllAddresses( false ), mAlternateKeyFormat( false ), mAddressBook( 0 ) @@ -53,8 +53,8 @@ void KABC2Mutt::loadingFinished() for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) { 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 ); + bool match = (name.tqfind(mQuery, 0, mIgnoreCase) > -1) || + ((*iaddr).preferredEmail().tqfind( mQuery, 0, mIgnoreCase ) > -1 ); if ( !match ) continue; } @@ -130,7 +130,7 @@ void KABC2Mutt::loadingFinished() KABC::DistributionList *list = manager.list( *iaddr ); if ( list ) { if ( !mQuery.isEmpty() ) { - bool match = ((*iaddr).find(mQuery) > -1); + bool match = ((*iaddr).tqfind(mQuery) > -1); if ( !match ) continue; } diff --git a/kabc/kabc2mutt/kabc2mutt.h b/kabc/kabc2mutt/kabc2mutt.h index ebe4f53f..855b48db 100644 --- a/kabc/kabc2mutt/kabc2mutt.h +++ b/kabc/kabc2mutt/kabc2mutt.h @@ -22,15 +22,16 @@ #include -class KABC2Mutt : public QObject +class KABC2Mutt : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Format { Aliases, Query }; - KABC2Mutt( TQObject *parent, const char *name = 0 ); + KABC2Mutt( TQObject *tqparent, const char *name = 0 ); void setQuery( const TQString &query ) { mQuery = query; } void setFormat( Format format ) { mFormat = format; } -- cgit v1.2.3