diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kpilot | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpilot')
200 files changed, 3330 insertions, 3330 deletions
diff --git a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc index caa2ab20d..a55a0e647 100644 --- a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc +++ b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc @@ -40,7 +40,7 @@ const char *MALConduitFactory::fProxyPort = "Proxy Port"; const char *MALConduitFactory::fProxyUser = "Proxy User"; const char *MALConduitFactory::fProxyPassword = "Proxy Password"; -MALConduitFactory::MALConduitFactory(QObject *p, const char *n) : +MALConduitFactory::MALConduitFactory(TQObject *p, const char *n) : KLibFactory(p,n) { FUNCTIONSETUP; @@ -70,10 +70,10 @@ MALConduitFactory::~MALConduitFactory() KPILOT_DELETE(fAbout); } -/* virtual */ QObject *MALConduitFactory::createObject( QObject *p, +/* virtual */ TQObject *MALConduitFactory::createObject( TQObject *p, const char *n, const char *c, - const QStringList &a) + const TQStringList &a) { FUNCTIONSETUP; @@ -86,7 +86,7 @@ MALConduitFactory::~MALConduitFactory() if (qstrcmp(c,"ConduitConfig")==0) { - QWidget *w = dynamic_cast<QWidget *>(p); + TQWidget *w = dynamic_cast<TQWidget *>(p); if (w) { diff --git a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h index b92b9cb9e..f38cb5c83 100644 --- a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h +++ b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h @@ -17,7 +17,7 @@ class MALConduitFactory : public KLibFactory Q_OBJECT public: - MALConduitFactory(QObject * = 0L,const char * = 0L); + MALConduitFactory(TQObject * = 0L,const char * = 0L); virtual ~MALConduitFactory(); static KAboutData *about() { return fAbout; } ; @@ -34,10 +34,10 @@ public: static const char *malPassword() {return fMALPassword;}; protected: - virtual QObject* createObject( QObject* parent = 0, + virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList() ); + const char* classname = "TQObject", + const TQStringList &args = TQStringList() ); private: KInstance *fInstance; static KAboutData *fAbout; diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc index bf038bb21..11e25f2dd 100644 --- a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc +++ b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc @@ -33,10 +33,10 @@ #include "options.h" -#include <qtimer.h> -#include <qtextcodec.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kabc/stdaddressbook.h> #include <kabc/resourcefile.h> @@ -110,7 +110,7 @@ using namespace KABC; *********************************************************************/ -AbbrowserConduit::AbbrowserConduit(KPilotLink * o, const char *n, const QStringList & a): +AbbrowserConduit::AbbrowserConduit(KPilotLink * o, const char *n, const TQStringList & a): ConduitAction(o, n, a), aBook(0L), fAddressAppInfo(0L), @@ -153,7 +153,7 @@ AbbrowserConduit::~AbbrowserConduit() /* Builds the map which links record ids to uid's of Addressee */ -void AbbrowserConduit::_mapContactsToPilot(QMap < recordid_t, QString > &idContactMap) +void AbbrowserConduit::_mapContactsToPilot(TQMap < recordid_t, TQString > &idContactMap) { FUNCTIONSETUP; @@ -163,7 +163,7 @@ void AbbrowserConduit::_mapContactsToPilot(QMap < recordid_t, QString > &idConta contactIter != aBook->end(); ++contactIter) { Addressee aContact = *contactIter; - QString recid = aContact.custom(KABCSync::appString, KABCSync::idString); + TQString recid = aContact.custom(KABCSync::appString, KABCSync::idString); if(!recid.isEmpty()) { recordid_t id = recid.toULong(); @@ -400,7 +400,7 @@ bool AbbrowserConduit::_saveAddressBook() else { KIO::NetAccess::removeTempFile(fABookFile); } - QFile backup(fABookFile + CSL1("~")); + TQFile backup(fABookFile + CSL1("~")); backup.remove(); } @@ -524,13 +524,13 @@ void AbbrowserConduit::showAddresses( // Local block { - QString dbpath = fLocalDatabase->dbPathName(); + TQString dbpath = fLocalDatabase->dbPathName(); DEBUGKPILOT << fname << ": Local database path " << dbpath << endl; } if ( syncMode().isTest() ) { - QTimer::singleShot(0, this, SLOT(slotTestRecord())); + TQTimer::singleShot(0, this, TQT_SLOT(slotTestRecord())); return true; } @@ -561,7 +561,7 @@ void AbbrowserConduit::showAddresses( allIds=fDatabase->idList(); } - QValueVector<int> v(4); + TQValueVector<int> v(4); v[0] = AbbrowserSettings::custom0(); v[1] = AbbrowserSettings::custom1(); v[2] = AbbrowserSettings::custom2(); @@ -580,7 +580,7 @@ void AbbrowserConduit::showAddresses( for this, and no longer purge the whole addressbook before the sync to prevent data loss in case of connection loss. */ - QTimer::singleShot(0, this, SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); return true; } @@ -596,7 +596,7 @@ void AbbrowserConduit::slotPalmRecToPC() { DEBUGKPILOT << fname << ": Done; change to PCtoHH phase." << endl; abiter = aBook->begin(); - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } @@ -614,7 +614,7 @@ void AbbrowserConduit::slotPalmRecToPC() if(!palmRec) { abiter = aBook->begin(); - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } @@ -622,7 +622,7 @@ void AbbrowserConduit::slotPalmRecToPC() if(syncedIds.contains(palmRec->id())) { KPILOT_DELETE(palmRec); - QTimer::singleShot(0, this, SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); return; } @@ -650,7 +650,7 @@ void AbbrowserConduit::slotPalmRecToPC() KPILOT_DELETE(palmRec); KPILOT_DELETE(backupRec); - QTimer::singleShot(0, this, SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); } @@ -664,7 +664,7 @@ void AbbrowserConduit::slotPCRecToPalm() { DEBUGKPILOT << fname << ": Done; change to delete records." << endl; pilotindex = 0; - QTimer::singleShot(0, this, SLOT(slotDeletedRecord())); + TQTimer::singleShot(0, this, TQT_SLOT(slotDeletedRecord())); return; } @@ -678,12 +678,12 @@ void AbbrowserConduit::slotPCRecToPalm() { DEBUGKPILOT << fname << ": address with id " << ad.uid() << " marked archived, so don't sync." << endl; - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } - QString recID(ad.custom(KABCSync::appString, KABCSync::idString)); + TQString recID(ad.custom(KABCSync::appString, KABCSync::idString)); bool ok; recordid_t rid = recID.toLong(&ok); if (recID.isEmpty() || !ok || !rid) @@ -691,7 +691,7 @@ void AbbrowserConduit::slotPCRecToPalm() DEBUGKPILOT << fname << ": This is a new record." << endl; // it's a new item(no record ID and not inserted by the Palm -> PC sync), so add it syncAddressee(ad, 0L, 0L); - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } @@ -699,7 +699,7 @@ void AbbrowserConduit::slotPCRecToPalm() if (syncedIds.contains(rid)) { DEBUGKPILOT << ": address with id " << rid << " already synced." << endl; - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } @@ -742,7 +742,7 @@ void AbbrowserConduit::slotPCRecToPalm() syncedIds.append(rid); // done with the sync process, go on with the next one: - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); } @@ -755,13 +755,13 @@ void AbbrowserConduit::slotDeletedRecord() if(!backupRec || isFirstSync() ) { KPILOT_DELETE(backupRec); - QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedPCRecords())); + TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedPCRecords())); return; } recordid_t id = backupRec->id(); - QString uid = addresseeMap[id]; + TQString uid = addresseeMap[id]; Addressee e = aBook->findByUid(uid); DEBUGKPILOT << fname << ": now looking at palm id: [" @@ -796,7 +796,7 @@ void AbbrowserConduit::slotDeletedRecord() KPILOT_DELETE(palmRec); KPILOT_DELETE(backupAddr); KPILOT_DELETE(backupRec); - QTimer::singleShot(0, this, SLOT(slotDeletedRecord())); + TQTimer::singleShot(0, this, TQT_SLOT(slotDeletedRecord())); } @@ -806,9 +806,9 @@ void AbbrowserConduit::slotDeleteUnsyncedPCRecords() FUNCTIONSETUP; if ( syncMode()==SyncMode::eCopyHHToPC ) { - QStringList uids; + TQStringList uids; RecordIDList::iterator it; - QString uid; + TQString uid; for ( it = syncedIds.begin(); it != syncedIds.end(); ++it) { uid=addresseeMap[*it]; @@ -829,7 +829,7 @@ void AbbrowserConduit::slotDeleteUnsyncedPCRecords() } } } - QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedHHRecords())); + TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedHHRecords())); } @@ -852,7 +852,7 @@ void AbbrowserConduit::slotDeleteUnsyncedHHRecords() } } } - QTimer::singleShot(0, this, SLOT(slotCleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(slotCleanup())); } @@ -874,7 +874,7 @@ void AbbrowserConduit::slotCleanup() } // Write out the sync maps - QString syncFile = fLocalDatabase->dbPathName() + CSL1(".sync"); + TQString syncFile = fLocalDatabase->dbPathName() + CSL1(".sync"); DEBUGKPILOT << fname << ": Writing sync map to " << syncFile << endl; KSaveFile map( syncFile ); if ( map.status() == 0 ) @@ -1215,7 +1215,7 @@ bool AbbrowserConduit::_savePalmAddr(PilotAddress *palmAddr, Addressee &pcAddr) abId = pcAddr.custom(KABCSync::appString, KABCSync::idString).toUInt(); if(abId != pilotId) { - pcAddr.insertCustom(KABCSync::appString, KABCSync::idString, QString::number(pilotId)); + pcAddr.insertCustom(KABCSync::appString, KABCSync::idString, TQString::number(pilotId)); return true; } @@ -1230,16 +1230,16 @@ bool AbbrowserConduit::_savePCAddr(Addressee &pcAddr, PilotAddress*, FUNCTIONSETUP; DEBUGKPILOT<<"Before _savePCAddr, pcAddr.custom="<<pcAddr.custom(KABCSync::appString, KABCSync::idString)<<endl; - QString pilotId = pcAddr.custom(KABCSync::appString, KABCSync::idString); + TQString pilotId = pcAddr.custom(KABCSync::appString, KABCSync::idString); long pilotIdL = pilotId.toLong(); if(!pilotId.isEmpty()) { // because we maintain a mapping between pilotId -> kabc uid, whenever we add // a new relationship, we have to remove any old mapping that would tie a different // pilot id -> this kabc uid - QMap < recordid_t, QString>::iterator it; + TQMap < recordid_t, TQString>::iterator it; for ( it = addresseeMap.begin(); it != addresseeMap.end(); ++it ) { - QString kabcUid = it.data(); + TQString kabcUid = it.data(); if (kabcUid == pcAddr.uid()) { addresseeMap.remove(it); break; @@ -1317,8 +1317,8 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab { // Check that the name of the category of the HH record // is one matching the PC record. - QString addressCategoryLabel = fAddressAppInfo->categoryName(piAddress->category()); - QString cat = KABCSync::bestMatchedCategoryName(abEntry.categories(), + TQString addressCategoryLabel = fAddressAppInfo->categoryName(piAddress->category()); + TQString cat = KABCSync::bestMatchedCategoryName(abEntry.categories(), *fAddressAppInfo, piAddress->category()); if(!_equal(cat, addressCategoryLabel)) { @@ -1330,22 +1330,22 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab if (flags & eqFlagsPhones) { // first, look for missing e-mail addresses on either side - QStringList abEmails(abEntry.emails()); - QStringList piEmails(piAddress->getEmails()); + TQStringList abEmails(abEntry.emails()); + TQStringList piEmails(piAddress->getEmails()); if (abEmails.count() != piEmails.count()) { DEBUGKPILOT << fname << ": email count not equal" << endl; return false; } - for (QStringList::Iterator it = abEmails.begin(); it != abEmails.end(); it++) { + for (TQStringList::Iterator it = abEmails.begin(); it != abEmails.end(); it++) { if (!piEmails.contains(*it)) { DEBUGKPILOT << fname << ": pilot e-mail missing" << endl; return false; } } - for (QStringList::Iterator it = piEmails.begin(); it != piEmails.end(); it++) { + for (TQStringList::Iterator it = piEmails.begin(); it != piEmails.end(); it++) { if (!abEmails.contains(*it)) { DEBUGKPILOT << fname << ": kabc e-mail missing" << endl; @@ -1483,8 +1483,8 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab @pc, @backup, @palm ... entries of the according databases @returns string of the merged entries. */ -QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & backup, - const QString & palm, ConflictResolution confRes) +TQString AbbrowserConduit::_smartMergeString(const TQString &pc, const TQString & backup, + const TQString & palm, ConflictResolution confRes) { FUNCTIONSETUP; @@ -1493,7 +1493,7 @@ QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & b // If this is a first sync, we don't have a backup record, so if(isFirstSync() || backup.isEmpty()) { - if (pc.isEmpty() && palm.isEmpty() ) return QString::null; + if (pc.isEmpty() && palm.isEmpty() ) return TQString::null; if(pc.isEmpty()) return palm; if(palm.isEmpty()) return pc; } else { @@ -1512,7 +1512,7 @@ QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & b case SyncAction::ePreviousSyncOverrides: return backup; break; default: break; } - return QString::null; + return TQString::null; } @@ -1535,9 +1535,9 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse #define appendGen(desc, abfield, palmfield) \ tab->append(new ResolutionItem(desc, tab->fExistItems, \ - (!pcAddr.isEmpty())?(abfield):(QString::null), \ - (palmAddr)?(palmAddr->palmfield):(QString::null), \ - (backupAddr)?(backupAddr->palmfield):(QString::null) )) + (!pcAddr.isEmpty())?(abfield):(TQString::null), \ + (palmAddr)?(palmAddr->palmfield):(TQString::null), \ + (backupAddr)?(backupAddr->palmfield):(TQString::null) )) #define appendAddr(desc, abfield, palmfield) \ appendGen(desc, abfield, getField(palmfield)) #define appendGenPhone(desc, abfield, palmfield) \ @@ -1572,12 +1572,12 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse appendAddr(i18n("Postal code"), abAddress.postalCode(), entryZip); appendAddr(i18n("Country"), abAddress.country(), entryCountry); - QString palmAddrCategoryLabel; + TQString palmAddrCategoryLabel; if (palmAddr) { palmAddrCategoryLabel = fAddressAppInfo->categoryName(palmAddr->category()); } - QString backupAddrCategoryLabel; + TQString backupAddrCategoryLabel; if (backupAddr) { backupAddrCategoryLabel = fAddressAppInfo->categoryName(backupAddr->category()); @@ -1588,7 +1588,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse tab->fExistItems, !pcAddr.isEmpty() ? KABCSync::bestMatchedCategoryName(pcAddr.categories(), *fAddressAppInfo, category) : - QString::null, + TQString::null, palmAddrCategoryLabel, backupAddrCategoryLabel)); #undef appendGen @@ -1601,7 +1601,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse /// This function just sets the phone number of type "type" to "phone" -static inline void setPhoneNumber(Addressee &abEntry, int type, const QString &nr) +static inline void setPhoneNumber(Addressee &abEntry, int type, const TQString &nr) { PhoneNumber phone = abEntry.phoneNumber(type); phone.setNumber(nr); @@ -1746,7 +1746,7 @@ bool AbbrowserConduit::_smartMergeAddressee(Addressee &pcAddr, if (!mergeOk) { - QString dlgText; + TQString dlgText; if (!palmAddr) { dlgText=i18n("The following address entry was changed, but does no longer exist on the handheld. Please resolve this conflict:"); @@ -1839,7 +1839,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const // first, use the pilotID to UID map to find the appropriate record if( !isFirstSync() && (pilotAddress.id() > 0) ) { - QString id(addresseeMap[pilotAddress.id()]); + TQString id(addresseeMap[pilotAddress.id()]); DEBUGKPILOT << fname << ": PilotRecord has id " << pilotAddress.id() << ", mapped to " << id << endl; if(!id.isEmpty()) { @@ -1852,7 +1852,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const for(AddressBook::Iterator iter = aBook->begin(); iter != aBook->end(); ++iter) { Addressee abEntry = *iter; - QString recID(abEntry.custom(KABCSync::appString, KABCSync::idString)); + TQString recID(abEntry.custom(KABCSync::appString, KABCSync::idString)); bool ok; if (!recID.isEmpty() ) { @@ -1893,5 +1893,5 @@ void AbbrowserConduit::slotTestRecord() // Schedule more work. ++pilotindex; - QTimer::singleShot(0, this, SLOT(slotTestRecord())); + TQTimer::singleShot(0, this, TQT_SLOT(slotTestRecord())); } diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h index 484f61292..22e94469a 100644 --- a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h +++ b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h @@ -49,14 +49,14 @@ class Ticket; using namespace KABC; -typedef QValueList<recordid_t> RecordIDList; +typedef TQValueList<recordid_t> RecordIDList; class AbbrowserConduit : public ConduitAction { Q_OBJECT public: AbbrowserConduit(KPilotLink *o,const char *n = 0L, - const QStringList &a = QStringList() ); + const TQStringList &a = TQStringList() ); virtual ~AbbrowserConduit(); /********************************************************************* @@ -97,7 +97,7 @@ private: /* Given a list of contacts, creates the pilot id to contact key map * and a list of new contacts in O(n) time (single pass) */ - void _mapContactsToPilot( QMap < recordid_t, QString> &idContactMap); + void _mapContactsToPilot( TQMap < recordid_t, TQString> &idContactMap); /* Do the preperations before doSync or doBackup. * Load contacts, set the pilot */ bool _prepare(); @@ -141,7 +141,7 @@ private: /********************************************************************* C O P Y R E C O R D S *********************************************************************/ - inline bool _equal(const QString & str1, const QString & str2) const + inline bool _equal(const TQString & str1, const TQString & str2) const { return (str1.isEmpty() && str2.isEmpty()) || (str1 == str2); } ; @@ -168,8 +168,8 @@ private: * @pc, @backup, @palm ... entries of the according databases * @returns string of the merged entries. */ - QString _smartMergeString(const QString &pc, const QString & backup, - const QString & palm, ConflictResolution confRes); + TQString _smartMergeString(const TQString &pc, const TQString & backup, + const TQString & palm, ConflictResolution confRes); bool _buildResolutionTable(ResolutionTable*tab, const Addressee &pcAddr, PilotAddress *backupAddr, PilotAddress *palmAddr); bool _applyResolutionTable(ResolutionTable*tab, Addressee &pcAddr, @@ -200,9 +200,9 @@ private: int pilotindex; bool abChanged; /** addresseeMap maps record ids to IDs of Addressees. This is used to speed up searching the local addressbook */ - QMap < recordid_t, QString> addresseeMap; + TQMap < recordid_t, TQString> addresseeMap; RecordIDList syncedIds, allIds; - QString fABookFile; + TQString fABookFile; AddressBook::Iterator abiter; /** For a local file resource, we need to obtain a saveTicket * when opening the abook, just in case we want to modify it diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc b/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc index 4a2aa4215..f4d80d2ce 100644 --- a/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc +++ b/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc @@ -29,9 +29,9 @@ #include "options.h" -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> #include <kurlrequester.h> #include <kaboutdata.h> @@ -62,7 +62,7 @@ static KAboutData *createAbout() return fAbout; } -AbbrowserWidgetSetup::AbbrowserWidgetSetup(QWidget *w, const char *n) : +AbbrowserWidgetSetup::AbbrowserWidgetSetup(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(new AbbrowserWidget(w)) { @@ -73,20 +73,20 @@ AbbrowserWidgetSetup::AbbrowserWidgetSetup(QWidget *w, const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout); fWidget=fConfigWidget; fConfigWidget->fAbookFile->setMode(KFile::File); -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fSyncDestination,SIGNAL(clicked(int))); - CM(fAbookFile,SIGNAL(textChanged(const QString &))); - CM(fArchive,SIGNAL(toggled(bool))); - CM(fConflictResolution,SIGNAL(activated(int))); - CM(fOtherPhone,SIGNAL(activated(int))); - CM(fAddress,SIGNAL(activated(int))); - CM(fFax,SIGNAL(activated(int))); - CM(fCustom0,SIGNAL(activated(int))); - CM(fCustom1,SIGNAL(activated(int))); - CM(fCustom2,SIGNAL(activated(int))); - CM(fCustom3,SIGNAL(activated(int))); - CM(fCustomDate, SIGNAL(activated(int))); - CM(fCustomDate, SIGNAL(textChanged(const QString&))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fSyncDestination,TQT_SIGNAL(clicked(int))); + CM(fAbookFile,TQT_SIGNAL(textChanged(const TQString &))); + CM(fArchive,TQT_SIGNAL(toggled(bool))); + CM(fConflictResolution,TQT_SIGNAL(activated(int))); + CM(fOtherPhone,TQT_SIGNAL(activated(int))); + CM(fAddress,TQT_SIGNAL(activated(int))); + CM(fFax,TQT_SIGNAL(activated(int))); + CM(fCustom0,TQT_SIGNAL(activated(int))); + CM(fCustom1,TQT_SIGNAL(activated(int))); + CM(fCustom2,TQT_SIGNAL(activated(int))); + CM(fCustom3,TQT_SIGNAL(activated(int))); + CM(fCustomDate, TQT_SIGNAL(activated(int))); + CM(fCustomDate, TQT_SIGNAL(textChanged(const TQString&))); #undef CM } @@ -99,7 +99,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup() { FUNCTIONSETUP; - QButtonGroup*grp=fConfigWidget->fSyncDestination; + TQButtonGroup*grp=fConfigWidget->fSyncDestination; AbbrowserSettings::setAddressbookType(grp->id(grp->selected())); AbbrowserSettings::setFileName(fConfigWidget->fAbookFile->url()); AbbrowserSettings::setArchiveDeleted(fConfigWidget->fArchive->isChecked()); @@ -132,7 +132,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup() #endif int fmtindex=fConfigWidget->fCustomDate->currentItem(); AbbrowserSettings::setCustomDateFormat( - (fmtindex==0)?(QString::null):fConfigWidget->fCustomDate->currentText() ); + (fmtindex==0)?(TQString::null):fConfigWidget->fCustomDate->currentText() ); AbbrowserSettings::self()->writeConfig(); unmodified(); @@ -175,7 +175,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup() fConfigWidget->fCustom1->setCurrentItem(AbbrowserSettings::custom1()); fConfigWidget->fCustom2->setCurrentItem(AbbrowserSettings::custom2()); fConfigWidget->fCustom3->setCurrentItem(AbbrowserSettings::custom3()); - QString datefmt=AbbrowserSettings::customDateFormat(); + TQString datefmt=AbbrowserSettings::customDateFormat(); if (datefmt.isEmpty()) { fConfigWidget->fCustomDate->setCurrentItem(0); @@ -188,7 +188,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup() unmodified(); } -/* static */ ConduitConfigBase *AbbrowserWidgetSetup::create(QWidget *w, const char *n) +/* static */ ConduitConfigBase *AbbrowserWidgetSetup::create(TQWidget *w, const char *n) { return new AbbrowserWidgetSetup(w,n); } diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-setup.h b/kpilot/conduits/abbrowserconduit/abbrowser-setup.h index 71981dc09..47eff1cf1 100644 --- a/kpilot/conduits/abbrowserconduit/abbrowser-setup.h +++ b/kpilot/conduits/abbrowserconduit/abbrowser-setup.h @@ -38,11 +38,11 @@ class KAboutData; class AbbrowserWidgetSetup : public ConduitConfigBase { public: - AbbrowserWidgetSetup(QWidget *,const char *); + AbbrowserWidgetSetup(TQWidget *,const char *); virtual ~AbbrowserWidgetSetup(); virtual void load(); virtual void commit(); - static ConduitConfigBase *create(QWidget *,const char *); + static ConduitConfigBase *create(TQWidget *,const char *); private: AbbrowserWidget *fConfigWidget; KAboutData *fAbout; diff --git a/kpilot/conduits/abbrowserconduit/kabcRecord.cc b/kpilot/conduits/abbrowserconduit/kabcRecord.cc index b5d68121a..9b49a2cad 100644 --- a/kpilot/conduits/abbrowserconduit/kabcRecord.cc +++ b/kpilot/conduits/abbrowserconduit/kabcRecord.cc @@ -33,7 +33,7 @@ #include "options.h" -#include <qregexp.h> +#include <tqregexp.h> #include <kglobal.h> #include <kabc/addressee.h> @@ -79,7 +79,7 @@ KABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) FUNCTIONSETUP; KABC::PhoneNumber::List list; - QString test; + TQString test; PhoneSlot shownPhone = a.getShownPhone(); @@ -136,7 +136,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, const KABC::PhoneNumber::List &list) { FUNCTIONSETUP; - QString test; + TQString test; // clear all phone numbers (not e-mails) first for ( PhoneSlot i = PhoneSlot::begin(); i.isValid() ; ++i ) @@ -144,7 +144,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, PilotAddressInfo::EPhoneType ind = a.getPhoneType( i ); if (ind != PilotAddressInfo::eEmail) { - a.setField(i, QString()); + a.setField(i, TQString()); } } @@ -199,7 +199,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, // after setting the numbers, make sure that something sensible is set as the // shownPhone on the Pilot if nothing is yet... - QString pref = a.getField(a.getShownPhone()); + TQString pref = a.getField(a.getShownPhone()); if (!a.getShownPhone().isValid() || pref.isEmpty()) { DEBUGKPILOT << fname << ": Pilot's showPhone: [" @@ -222,7 +222,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, } } -unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories, +unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories, const PilotAddressInfo &info, unsigned int hhcategory) { @@ -243,7 +243,7 @@ unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories, // Look for the first category from the list which is available on // the handheld as well. - for(QStringList::ConstIterator it = pccategories.begin(); it != pccategories.end(); ++it) + for(TQStringList::ConstIterator it = pccategories.begin(); it != pccategories.end(); ++it) { // Do not map unknown to unfiled when looking for category int c = info.findCategory( *it, false ); @@ -258,7 +258,7 @@ unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories, return Pilot::Unfiled; } -void KABCSync::setCategory(KABC::Addressee & abEntry, const QString &cat) +void KABCSync::setCategory(KABC::Addressee & abEntry, const TQString &cat) { if ( (!cat.isEmpty())) { @@ -267,24 +267,24 @@ void KABCSync::setCategory(KABC::Addressee & abEntry, const QString &cat) } -QString KABCSync::getFieldForHHCustom( +TQString KABCSync::getFieldForHHCustom( const unsigned int index, const KABC::Addressee &abEntry, const KABCSync::Settings &settings) { FUNCTIONSETUPL(4); - QString retval; + TQString retval; if (index>3) { WARNINGKPILOT << "Bad index number " << index << endl; - retval = QString(); + retval = TQString(); } if (settings.customMapping().count() != 4) { WARNINGKPILOT << "Mapping does not have 4 elements." << index << endl; - retval = QString(); + retval = TQString(); } switch (settings.custom(index)) @@ -296,9 +296,9 @@ QString KABCSync::getFieldForHHCustom( } else { - QString tmpfmt(KGlobal::locale()->dateFormat()); + TQString tmpfmt(KGlobal::locale()->dateFormat()); KGlobal::locale()->setDateFormat(settings.dateFormat()); - QString ret(KGlobal::locale()->formatDate(abEntry.birthday().date())); + TQString ret(KGlobal::locale()->formatDate(abEntry.birthday().date())); KGlobal::locale()->setDateFormat(tmpfmt); retval = ret; } @@ -311,7 +311,7 @@ QString KABCSync::getFieldForHHCustom( break; case eCustomField: default: - retval = abEntry.custom(appString, CSL1("CUSTOM")+QString::number(index)); + retval = abEntry.custom(appString, CSL1("CUSTOM")+TQString::number(index)); break; } @@ -321,7 +321,7 @@ QString KABCSync::getFieldForHHCustom( void KABCSync::setFieldFromHHCustom( const unsigned int index, KABC::Addressee &abEntry, - const QString &value, + const TQString &value, const KABCSync::Settings &settings) { FUNCTIONSETUPL(4); @@ -341,7 +341,7 @@ void KABCSync::setFieldFromHHCustom( { case eCustomBirthdate: { - QDate bdate; + TQDate bdate; bool ok=false; if (settings.dateFormat().isEmpty()) { @@ -356,8 +356,8 @@ void KABCSync::setFieldFromHHCustom( if (!ok) { - QString format = KGlobal::locale()->dateFormatShort(); - QRegExp re(CSL1("%[yY][^%]*")); + TQString format = KGlobal::locale()->dateFormatShort(); + TQRegExp re(CSL1("%[yY][^%]*")); format.remove(re); // Remove references to year and following punctuation bdate = KGlobal::locale()->readDate(value, format, &ok); } @@ -382,7 +382,7 @@ void KABCSync::setFieldFromHHCustom( break; case eCustomField: default: - abEntry.insertCustom(appString, CSL1("CUSTOM")+QString::number(index), value); + abEntry.insertCustom(appString, CSL1("CUSTOM")+TQString::number(index), value); break; } } @@ -416,7 +416,7 @@ KABC::Address KABCSync::getAddress(const KABC::Addressee &abEntry, const KABCSyn } -QString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const KABCSync::Settings &s) +TQString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const KABCSync::Settings &s) { switch(s.fieldForOtherPhone()) { @@ -437,11 +437,11 @@ QString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const case eTTYTTDPhone: return abEntry.phoneNumber(KABC::PhoneNumber::Pcs).number(); default: - return QString::null; + return TQString::null; } } -void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const QString &nr, const KABCSync::Settings &s) +void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const TQString &nr, const KABCSync::Settings &s) { int phoneType = 0; switch (s.fieldForOtherPhone()) @@ -496,13 +496,13 @@ void KABCSync::setAddress(PilotAddress &toPilotAddr, bool KABCSync::isArchived(const KABC::Addressee &addr) { - return addr.custom(KABCSync::appString, KABCSync::flagString) == QString::number(SYNCDEL); + return addr.custom(KABCSync::appString, KABCSync::flagString) == TQString::number(SYNCDEL); } void KABCSync::makeArchived(KABC::Addressee &addr) { FUNCTIONSETUP; - addr.insertCustom(KABCSync::appString, KABCSync::flagString, QString::number(SYNCDEL)); + addr.insertCustom(KABCSync::appString, KABCSync::flagString, TQString::number(SYNCDEL)); addr.removeCustom(KABCSync::appString, KABCSync::idString); } @@ -536,7 +536,7 @@ void KABCSync::copy(PilotAddress &toPilotAddr, // Other field is an oddball and if the user has more than one field set // as "Other" then only one will be carried over. - QString oth = KABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings); + TQString oth = KABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings); DEBUGKPILOT << fname << ": putting: ["<<oth<<"] into Palm's other"<<endl; toPilotAddr.setPhoneField(PilotAddressInfo::eOther, oth, PilotAddress::Replace); @@ -650,7 +650,7 @@ void KABCSync::copy(KABC::Addressee &toAbEntry, // pilot id may be zero(since it could be new) but couldn't hurt // to even assign it to zero; let's us know what state the // toAbEntry is in - toAbEntry.insertCustom(KABCSync::appString, KABCSync::idString, QString::number(fromPiAddr.id())); + toAbEntry.insertCustom(KABCSync::appString, KABCSync::idString, TQString::number(fromPiAddr.id())); KABCSync::setCategory(toAbEntry, appInfo.categoryName(fromPiAddr.category())); diff --git a/kpilot/conduits/abbrowserconduit/kabcRecord.h b/kpilot/conduits/abbrowserconduit/kabcRecord.h index 13a3e2694..f27f0b1a2 100644 --- a/kpilot/conduits/abbrowserconduit/kabcRecord.h +++ b/kpilot/conduits/abbrowserconduit/kabcRecord.h @@ -33,7 +33,7 @@ ** Bug reports and questions can be sent to [email protected]. */ -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <kabc/phonenumber.h> @@ -71,20 +71,20 @@ namespace KABCSync { public: Settings(); - QString dateFormat() const + TQString dateFormat() const { return fDateFormat; } - void setDateFormat(const QString& s) + void setDateFormat(const TQString& s) { fDateFormat = s; } - const QValueVector<int> &customMapping() const + const TQValueVector<int> &customMapping() const { return fCustomMapping; } - void setCustomMapping(const QValueVector<int> &v) + void setCustomMapping(const TQValueVector<int> &v) { if (v.count()==4) { @@ -130,8 +130,8 @@ namespace KABCSync fFaxTypeOnPC = v; } private: - QString fDateFormat; - QValueVector<int> fCustomMapping; + TQString fDateFormat; + TQValueVector<int> fCustomMapping; int fOtherPhone; bool fPreferHome; int fFaxTypeOnPC; @@ -165,12 +165,12 @@ namespace KABCSync * @return Category index that best matches. * @return Pilot::Unfiled if no best match. */ - unsigned int bestMatchedCategory(const QStringList &categorynames, + unsigned int bestMatchedCategory(const TQStringList &categorynames, const PilotAddressInfo &info, unsigned int category); /** As above, but return the name of the category. */ - inline QString bestMatchedCategoryName(const QStringList &categorynames, + inline TQString bestMatchedCategoryName(const TQStringList &categorynames, const PilotAddressInfo &info, unsigned int category) { @@ -181,14 +181,14 @@ namespace KABCSync /** Give the addressee @p abEntry the category @p cat (leaving * existing category assignments intact). */ - void setCategory(KABC::Addressee &abEntry, const QString &cat); + void setCategory(KABC::Addressee &abEntry, const TQString &cat); /* These are string identifiers used for custom properties in the addressees, * used to store KPilot-specific settings. */ - const QString appString=CSL1("KPILOT"); ///< Identifier for the application - const QString flagString=CSL1("Flag"); ///< Flags: synced or not - const QString idString=CSL1("RecordID"); ///< Record ID on HH for this addressee + const TQString appString=CSL1("KPILOT"); ///< Identifier for the application + const TQString flagString=CSL1("Flag"); ///< Flags: synced or not + const TQString idString=CSL1("RecordID"); ///< Record ID on HH for this addressee /** Get the string value for HH custom field @p index (0..3) from the addressee @@ -199,9 +199,9 @@ namespace KABCSync * string @p dateFormat. If this is empty, use the locale setting. * * @return String value for HH custom field @p index - * @return Null QString on error (is also a valid return value) + * @return Null TQString on error (is also a valid return value) */ - QString getFieldForHHCustom( + TQString getFieldForHHCustom( unsigned int index, const KABC::Addressee &abEntry, const Settings &settings); @@ -215,7 +215,7 @@ namespace KABCSync void setFieldFromHHCustom( const unsigned int index, KABC::Addressee &abEntry, - const QString &value, + const TQString &value, const Settings &settings); /** The HH has a phone type "other" which may be mapped to any one of @@ -223,7 +223,7 @@ namespace KABCSync * * @note @p mappingForOther should come from AbbrowserSettings::pilotOther() */ - QString getFieldForHHOtherPhone(const KABC::Addressee &abEntry, const Settings &s); + TQString getFieldForHHOtherPhone(const KABC::Addressee &abEntry, const Settings &s); /** The HH has a phone type "other" which may be mapped to any one * of several PC side phone numbers. Store the number @p nr in the @@ -231,7 +231,7 @@ namespace KABCSync * * @note @p mappingForOther should come from AbbrowserSettings::pilotOther() */ - void setFieldFromHHOtherPhone(KABC::Addressee &abEntry, const QString &nr, const Settings &s); + void setFieldFromHHOtherPhone(KABC::Addressee &abEntry, const TQString &nr, const Settings &s); /** Returns the address portion of an addressee. Since the HH can only store * one address, we return the preferred address (if the Addressee @p abEntry diff --git a/kpilot/conduits/abbrowserconduit/resolutionDialog.cc b/kpilot/conduits/abbrowserconduit/resolutionDialog.cc index 2749074f8..aa8e2f148 100644 --- a/kpilot/conduits/abbrowserconduit/resolutionDialog.cc +++ b/kpilot/conduits/abbrowserconduit/resolutionDialog.cc @@ -28,11 +28,11 @@ #include "options.h" -#include <qtimer.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlistview.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlistview.h> +#include <tqregexp.h> #include "resolutionTable.h" #include "resolutionDialog_base.h" @@ -46,16 +46,16 @@ * activated (stateChange), it sets the text of its parent (which is the * controller, which is an instance of ResolutionCheckListItem, too). **/ -class ResolutionCheckListItem : QCheckListItem { +class ResolutionCheckListItem : TQCheckListItem { public: ResolutionCheckListItem(ResolutionItem*it, ResolutionTable*tb, - QListView*parent); - ResolutionCheckListItem(QString header, QString text, + TQListView*parent); + ResolutionCheckListItem(TQString header, TQString text, ResolutionCheckListItem*parent); ~ResolutionCheckListItem() {}; virtual void stateChange(bool newstate); - virtual void setValue(QString text); - virtual void setCaption(QString caption); + virtual void setValue(TQString text); + virtual void setCaption(TQString caption); protected: void updateText(); @@ -65,20 +65,20 @@ protected: /* The description of the entry, e.g. Backup, PC, Palm for the radio buttons, * of the field name for the controllers */ - QString fCaption; + TQString fCaption; /* The currrent value of the entry (for controllers this changes with the * selected button */ - QString fText; + TQString fText; }; ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it, - ResolutionTable*tb, QListView*parent) : - QCheckListItem(parent, QString::null, QCheckListItem::Controller), + ResolutionTable*tb, TQListView*parent) : + TQCheckListItem(parent, TQString::null, TQCheckListItem::Controller), fResItem(it), isController(true), - fCaption(it?(it->fName):(QString::null)), - fText(it?(it->fResolved):(QString::null)) + fCaption(it?(it->fName):(TQString::null)), + fText(it?(it->fResolved):(TQString::null)) { FUNCTIONSETUP; if (it && tb) @@ -86,7 +86,7 @@ ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it, // If all three texts are identical, there is no need for // resolution so don't show the radio items below bool itemsEqual=true; - QString testtext(QString::null); + TQString testtext(TQString::null); const enum eExistItems its[3]={eExistsPC, eExistsPalm, eExistsBackup}; // get a valid text from a valid field, which will serve as the // test text for the comparison @@ -118,9 +118,9 @@ ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it, setOpen(true); } -ResolutionCheckListItem::ResolutionCheckListItem(QString text, QString header, +ResolutionCheckListItem::ResolutionCheckListItem(TQString text, TQString header, ResolutionCheckListItem*parent) : - QCheckListItem(parent, QString(), QCheckListItem::RadioButton), + TQCheckListItem(parent, TQString(), TQCheckListItem::RadioButton), fResItem(0L), isController(false), fCaption(header), @@ -140,7 +140,7 @@ void ResolutionCheckListItem::stateChange(bool newstate) } } -void ResolutionCheckListItem::setValue(QString text) +void ResolutionCheckListItem::setValue(TQString text) { FUNCTIONSETUP; fText=text; @@ -151,7 +151,7 @@ void ResolutionCheckListItem::setValue(QString text) updateText(); } -void ResolutionCheckListItem::setCaption(QString caption) +void ResolutionCheckListItem::setCaption(TQString caption) { fCaption=caption; updateText(); @@ -159,8 +159,8 @@ void ResolutionCheckListItem::setCaption(QString caption) void ResolutionCheckListItem::updateText() { - QString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").arg(fCaption).arg(fText)); - newText.replace(QRegExp(CSL1("\n")), + TQString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").arg(fCaption).arg(fText)); + newText.replace(TQRegExp(CSL1("\n")), i18n("Denoting newlines in Address entries. No need to translate", " | ")); setText(0, newText); } @@ -171,8 +171,8 @@ void ResolutionCheckListItem::updateText() * *****************************************************************/ -ResolutionDlg::ResolutionDlg( QWidget* parent, KPilotLink*fH, - const QString &caption, const QString &helpText, ResolutionTable*tab) : +ResolutionDlg::ResolutionDlg( TQWidget* parent, KPilotLink*fH, + const TQString &caption, const TQString &helpText, ResolutionTable*tab) : KDialogBase( parent, "ResolutionDlg", false, caption, Apply|Cancel, Apply), tickleTimer(0L), fHandle(fH), @@ -189,20 +189,20 @@ ResolutionDlg::ResolutionDlg( QWidget* parent, KPilotLink*fH, adjustSize(); resize(size()); - if (fHandle) tickleTimer=new QTimer(this, "TickleTimer"); + if (fHandle) tickleTimer=new TQTimer(this, "TickleTimer"); if (tickleTimer) { - connect( tickleTimer, SIGNAL(timeout()), this, SLOT(_tickle())); + connect( tickleTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(_tickle())); // tickle the palm every 10 seconds to prevent a timeout until the // sync is really finished. tickleTimer->start( 10000 ); } - connect(fWidget->fKeepBoth, SIGNAL(clicked()), SLOT(slotKeepBoth())); - connect(fWidget->fBackupValues, SIGNAL(clicked()), SLOT(slotUseBackup())); - connect(fWidget->fPalmValues, SIGNAL(clicked()), SLOT(slotUsePalm())); - connect(fWidget->fPCValues, SIGNAL(clicked()), SLOT(slotUsePC())); + connect(fWidget->fKeepBoth, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBoth())); + connect(fWidget->fBackupValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUseBackup())); + connect(fWidget->fPalmValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUsePalm())); + connect(fWidget->fPCValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUsePC())); } void ResolutionDlg::adjustButtons(ResolutionTable*tab) diff --git a/kpilot/conduits/abbrowserconduit/resolutionDialog.h b/kpilot/conduits/abbrowserconduit/resolutionDialog.h index 5f41ba0f2..d0b8fd527 100644 --- a/kpilot/conduits/abbrowserconduit/resolutionDialog.h +++ b/kpilot/conduits/abbrowserconduit/resolutionDialog.h @@ -42,10 +42,10 @@ class ResolutionDlg : public KDialogBase Q_OBJECT public: - ResolutionDlg( QWidget* parent=0, + ResolutionDlg( TQWidget* parent=0, KPilotLink*fH=0L, - const QString &caption=QString(), - const QString &helpText=QString(), + const TQString &caption=TQString(), + const TQString &helpText=TQString(), ResolutionTable *tab=0L ); ~ResolutionDlg(); @@ -60,7 +60,7 @@ protected: void fillListView(); void adjustButtons(ResolutionTable*tab); - QTimer* tickleTimer; + TQTimer* tickleTimer; KPilotLink* fHandle; ResolutionTable*fTable; diff --git a/kpilot/conduits/abbrowserconduit/resolutionTable.h b/kpilot/conduits/abbrowserconduit/resolutionTable.h index 760f962e2..51c25190e 100644 --- a/kpilot/conduits/abbrowserconduit/resolutionTable.h +++ b/kpilot/conduits/abbrowserconduit/resolutionTable.h @@ -29,7 +29,7 @@ */ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "syncAction.h" typedef enum eExistItems { @@ -41,12 +41,12 @@ class ResolutionItem { public: enum eExistItems fExistItems; - QString fEntries[3]; - QString fResolved; - QString fName; + TQString fEntries[3]; + TQString fResolved; + TQString fName; public: ResolutionItem() {} - ResolutionItem(QString name, int ex, QString pc, QString palm, QString backup):fExistItems((eExistItems)ex),fName(name) + ResolutionItem(TQString name, int ex, TQString pc, TQString palm, TQString backup):fExistItems((eExistItems)ex),fName(name) {fEntries[0]=pc;fEntries[1]=palm; fEntries[2]=backup; /*fExistItems=(eExistItems)ex;*/ } ~ResolutionItem() {} }; @@ -54,15 +54,15 @@ public: /** @author Reinhold Kainhofer */ -class ResolutionTable : public QPtrList<ResolutionItem> +class ResolutionTable : public TQPtrList<ResolutionItem> { public: - ResolutionTable():QPtrList<ResolutionItem>() {fResolution=SyncAction::eAskUser;}; + ResolutionTable():TQPtrList<ResolutionItem>() {fResolution=SyncAction::eAskUser;}; ~ResolutionTable() {}; SyncAction::ConflictResolution fResolution; - QString labels[3]; + TQString labels[3]; enum eExistItems fExistItems; }; diff --git a/kpilot/conduits/docconduit/DOC-converter.cc b/kpilot/conduits/docconduit/DOC-converter.cc index c8d7ac02d..6502fe54e 100644 --- a/kpilot/conduits/docconduit/DOC-converter.cc +++ b/kpilot/conduits/docconduit/DOC-converter.cc @@ -30,10 +30,10 @@ #include "options.h" #include "DOC-converter.moc" -#include <qdir.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qsortedlist.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqsortedlist.h> #include <pilotDatabase.h> #include <pilotLocalDatabase.h> @@ -50,7 +50,7 @@ /**************************************************************************************************** - * various bookmark classes. Most important is the bmkList findMatches(QString) function, + * various bookmark classes. Most important is the bmkList findMatches(TQString) function, * which needs to return a list of all bookmarks found for the given bookmark expression. * A bookmark usually consists of a bookmark text and an offset into the text document. ****************************************************************************************************/ @@ -70,7 +70,7 @@ bool operator== ( const docBookmark &s1, const docBookmark &s2) } -int docMatchBookmark::findMatches(QString doctext, bmkList &fBookmarks) { +int docMatchBookmark::findMatches(TQString doctext, bmkList &fBookmarks) { FUNCTIONSETUP; // bmkList res; int pos = 0, nr=0, found=0; @@ -99,11 +99,11 @@ int docMatchBookmark::findMatches(QString doctext, bmkList &fBookmarks) { -int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks) +int docRegExpBookmark::findMatches(TQString doctext, bmkList &fBookmarks) { FUNCTIONSETUP; // bmkList res; - QRegExp rx(pattern); + TQRegExp rx(pattern); int pos = 0, nr=0, found=0; while (pos>=0 && found<=to) { @@ -118,7 +118,7 @@ int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks) fBookmarks.append(new docBookmark(/*bmkName.left(16)*/rx.cap(capSubexpression), pos)); } else { // TODO: use the subexpressions from the regexp for the bmk name ($1..$9) (given as separate regexp) - QString bmkText(bmkName); + TQString bmkText(bmkName); for (int i=0; i<=rx.numCaptures(); ++i) { bmkText.replace(CSL1("$%1").arg(i), rx.cap(i)); bmkText.replace(CSL1("\\%1").arg(i), rx.cap(i)); @@ -145,7 +145,7 @@ int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks) *********************************************************************/ -DOCConverter::DOCConverter(QObject *parent, const char *name):QObject(parent,name) { +DOCConverter::DOCConverter(TQObject *parent, const char *name):TQObject(parent,name) { FUNCTIONSETUP; docdb=0L; eSortBookmarks=eSortNone; @@ -168,16 +168,16 @@ DOCConverter::~DOCConverter() { -void DOCConverter::setTXTpath(QString path, QString file) { - QDir dr(path); - QFileInfo pth(dr, file); +void DOCConverter::setTXTpath(TQString path, TQString file) { + TQDir dr(path); + TQFileInfo pth(dr, file); if (!file.isEmpty()) txtfilename = pth.absFilePath(); } -void DOCConverter::setTXTpath(QString filename) { +void DOCConverter::setTXTpath(TQString filename) { if (!filename.isEmpty()) txtfilename = filename; } @@ -189,26 +189,26 @@ void DOCConverter::setPDB(PilotDatabase * dbi) { -QString DOCConverter::readText() { +TQString DOCConverter::readText() { FUNCTIONSETUP; - if (txtfilename.isEmpty()) return QString(); - QFile docfile(txtfilename); + if (txtfilename.isEmpty()) return TQString(); + TQFile docfile(txtfilename); if (!docfile.open(IO_ReadOnly)) { emit logError(i18n("Unable to open text file %1 for reading.").arg(txtfilename)); - return QString(); + return TQString(); } - QTextStream docstream(&docfile); + TQTextStream docstream(&docfile); - QString doc = docstream.read(); + TQString doc = docstream.read(); docfile.close(); return doc; } -int DOCConverter::findBmkEndtags(QString &text, bmkList&fBmks) { +int DOCConverter::findBmkEndtags(TQString &text, bmkList&fBmks) { FUNCTIONSETUP; // Start from the end of the text int pos = text.length() - 1, nr=0; @@ -256,11 +256,11 @@ int DOCConverter::findBmkEndtags(QString &text, bmkList&fBmks) { return nr; } -int DOCConverter::findBmkInline(QString &text, bmkList &fBmks) { +int DOCConverter::findBmkInline(TQString &text, bmkList &fBmks) { FUNCTIONSETUP; // bmkList res; int nr=0; - QRegExp rx(CSL1("<\\*(.*)\\*>")); + TQRegExp rx(CSL1("<\\*(.*)\\*>")); rx.setMinimal(TRUE); int pos = 0; @@ -275,17 +275,17 @@ int DOCConverter::findBmkInline(QString &text, bmkList &fBmks) { return nr; } -int DOCConverter::findBmkFile(QString &, bmkList &fBmks) { +int DOCConverter::findBmkFile(TQString &, bmkList &fBmks) { FUNCTIONSETUP; int nr=0; - QString bmkfilename = txtfilename; + TQString bmkfilename = txtfilename; if (bmkfilename.endsWith(CSL1(".txt"))){ bmkfilename.remove(bmkfilename.length()-4, 4); } - QString oldbmkfilename=bmkfilename; + TQString oldbmkfilename=bmkfilename; bmkfilename+=CSL1(BMK_SUFFIX); - QFile bmkfile(bmkfilename); + TQFile bmkfile(bmkfilename); if (!bmkfile.open(IO_ReadOnly)) { bmkfilename=oldbmkfilename+CSL1(PDBBMK_SUFFIX); bmkfile.setName(bmkfilename); @@ -297,11 +297,11 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) { DEBUGKPILOT<<"Bookmark file: "<<bmkfilename<<endl; - QTextStream bmkstream(&bmkfile); - QString line; + TQTextStream bmkstream(&bmkfile); + TQString line; while ( !(line=bmkstream.readLine()).isEmpty() ) { if (!line.isEmpty() && !line.startsWith(CSL1("#")) ) { - QStringList bmkinfo=QStringList::split(CSL1(","), line); + TQStringList bmkinfo=TQStringList::split(CSL1(","), line); int fieldnr=bmkinfo.count(); // We use the same syntax for the entries as MakeDocJ bookmark files: // <bookmark>,<string-to-search>,<bookmark-name-string>,<starting-bookmark>,<ending-bookmark> @@ -309,19 +309,19 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) { if (fieldnr>0){ DEBUGKPILOT<<"Working on bookmark \""<<line<<"\""<<endl; docMatchBookmark*bmk=0L; - QString bookmark=bmkinfo[0]; + TQString bookmark=bmkinfo[0]; bool ok; int pos=bookmark.toInt(&ok); if (ok) { if (fieldnr>1) { - QString name(bmkinfo[1]); + TQString name(bmkinfo[1]); DEBUGKPILOT<<"Bookmark \""<<name<<"\" set at position "<<pos<<endl; fBmks.append(new docBookmark(name, pos)); } } else if (bookmark==CSL1("-") || bookmark==CSL1("+")) { if (fieldnr>1) { - QString patt(bmkinfo[1]); - QString name(patt); + TQString patt(bmkinfo[1]); + TQString name(patt); if (fieldnr>2) { int cap=bmkinfo[2].toInt(&ok); if (ok) { @@ -359,7 +359,7 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) { DEBUGKPILOT<<"RegExp bookmark found with no other information (no bookmark pattern nor name)"<<endl; } } else { - QString pattern(bookmark); + TQString pattern(bookmark); if (fieldnr>1) pattern=bmkinfo[1]; if (fieldnr>2) bookmark=bmkinfo[2]; DEBUGKPILOT<<"RegExp Bookmark, pattern="<<pattern<<", name="<<bookmark<<endl; @@ -384,7 +384,7 @@ bool DOCConverter::convertTXTtoPDB() { return false; } - QString text = readText(); + TQString text = readText(); if (fBmkTypes & eBmkEndtags) { findBmkEndtags(text, fBookmarks); @@ -537,14 +537,14 @@ bool DOCConverter::convertPDBtoTXT() <<" version="<<header.version<<endl; // next come the header.numRecords real document records (might be compressed, see the version flag in the header) - QFile docfile(txtfilename); + TQFile docfile(txtfilename); if (!docfile.open(IO_WriteOnly)) { emit logError(i18n("Unable to open output file %1.").arg(txtfilename)); KPILOT_DELETE(docdb); return false; } - QString doctext; + TQString doctext; for (int i=1; i<header.numRecords+1; ++i) { PilotRecord*rec=docdb->readRecordByIndex(i); @@ -570,7 +570,7 @@ bool DOCConverter::convertPDBtoTXT() if (rec) { PilotDOCBookmark bookie(rec); - docBookmark*bmk=new docBookmark(QString::fromLatin1(bookie.bookmarkName), bookie.pos); + docBookmark*bmk=new docBookmark(TQString::fromLatin1(bookie.bookmarkName), bookie.pos); bmks.append(bmk); KPILOT_DELETE(rec); } else { @@ -583,12 +583,12 @@ bool DOCConverter::convertPDBtoTXT() if ((fBmkTypes & eBmkFile) && (bmks.count()>0)) { - QString bmkfilename = docfile.name(); + TQString bmkfilename = docfile.name(); if (bmkfilename.endsWith(CSL1(".txt"))){ bmkfilename.remove(bmkfilename.length()-4, 4); } bmkfilename+=CSL1(PDBBMK_SUFFIX); - QFile bmkfile(bmkfilename); + TQFile bmkfile(bmkfilename); if (!bmkfile.open(IO_WriteOnly)) { emit logError(i18n("Unable to open file %1 for the bookmarks of %2.") @@ -598,7 +598,7 @@ bool DOCConverter::convertPDBtoTXT() { DEBUGKPILOT<<"Writing "<<upperBmkRec-header.numRecords<< "("<<upperBmkRec<<") bookmarks to file "<<bmkfilename<<endl; - QTextStream bmkstream(&bmkfile); + TQTextStream bmkstream(&bmkfile); for (docBookmark*bmk=bmks.first(); bmk; bmk=bmks.next()) { bmkstream<<bmk->position<<", "<<bmk->bmkName<<endl; @@ -611,14 +611,14 @@ bool DOCConverter::convertPDBtoTXT() { for (docBookmark*bmk=bmks.last(); bmk; bmk=bmks.prev()) { - doctext.insert(bmk->position, QString(CSL1("<*") + + doctext.insert(bmk->position, TQString(CSL1("<*") + bmk->bmkName + CSL1("*>"))); } } // Finally, write the actual text out to the file. - QTextStream docstream(&docfile); + TQTextStream docstream(&docfile); docstream<<doctext; //docstream.close(); docfile.close(); diff --git a/kpilot/conduits/docconduit/DOC-converter.h b/kpilot/conduits/docconduit/DOC-converter.h index f3747ea1d..802d60f20 100644 --- a/kpilot/conduits/docconduit/DOC-converter.h +++ b/kpilot/conduits/docconduit/DOC-converter.h @@ -36,51 +36,51 @@ #define BMK_SUFFIX ".bmk" #define PDBBMK_SUFFIX ".bm" -#include <qptrlist.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqobject.h> class PilotDatabase; /**************************************************************************************************** - * various bookmark classes. Most important is the bmkList findMatches(QString, bmkList &) function, + * various bookmark classes. Most important is the bmkList findMatches(TQString, bmkList &) function, * which needs to return a list of all bookmarks found for the given bookmark expression. * A bookmark usually consists of a bookmark text and an offset into the text document. ****************************************************************************************************/ class docBookmark; -#define bmkList QPtrList<docBookmark> -#define bmkSortedList QSortedList<docBookmark> +#define bmkList TQPtrList<docBookmark> +#define bmkSortedList TQSortedList<docBookmark> class docBookmark { public: static bool compare_pos; docBookmark():bmkName(), position(0) { }; - docBookmark(QString name, long int pos):bmkName(name), position(pos) { }; + docBookmark(TQString name, long int pos):bmkName(name), position(pos) { }; docBookmark(const docBookmark &bmk):bmkName(bmk.bmkName),position(bmk.position){}; virtual ~ docBookmark() { }; - virtual int findMatches(QString, bmkList &fBookmarks) { + virtual int findMatches(TQString, bmkList &fBookmarks) { FUNCTIONSETUP; fBookmarks.append(new docBookmark(*this)); return 1; }; - QString bmkName; + TQString bmkName; long int position; }; class docMatchBookmark:public docBookmark { public: docMatchBookmark():docBookmark() { from=0; to=100;}; - docMatchBookmark(QString pattrn, int options=0):docBookmark(), + docMatchBookmark(TQString pattrn, int options=0):docBookmark(), pattern(pattrn), opts(options) { from=0; to=100; }; - docMatchBookmark(QString pattrn, QString bmkname, + docMatchBookmark(TQString pattrn, TQString bmkname, int options=0):docBookmark(bmkname, 0), pattern(pattrn), opts(options) { from=0; to=100; }; virtual ~ docMatchBookmark() { }; - virtual int findMatches(QString, bmkList &fBookmarks); - QString pattern; + virtual int findMatches(TQString, bmkList &fBookmarks); + TQString pattern; int opts; int from, to; }; @@ -88,13 +88,13 @@ class docMatchBookmark:public docBookmark { class docRegExpBookmark:public docMatchBookmark { public: docRegExpBookmark():docMatchBookmark() { capSubexpression=-1;}; - docRegExpBookmark(QString regexp, int cap=0, + docRegExpBookmark(TQString regexp, int cap=0, int options=0):docMatchBookmark(regexp, options) {capSubexpression=cap; }; - docRegExpBookmark(QString pattrn, QString bmkname, + docRegExpBookmark(TQString pattrn, TQString bmkname, int options=0):docMatchBookmark(pattrn, bmkname, options) { capSubexpression=-1; }; virtual ~ docRegExpBookmark() { }; - virtual int findMatches(QString, bmkList &fBookmarks); + virtual int findMatches(TQString, bmkList &fBookmarks); int capSubexpression; }; @@ -103,12 +103,12 @@ class docRegExpBookmark:public docMatchBookmark { * The converter class that does the real work for us. *************************************************************************************************************/ -class DOCConverter:public QObject { +class DOCConverter:public TQObject { Q_OBJECT private: PilotDatabase * docdb; - QString txtfilename; - QString bmkfilename; + TQString txtfilename; + TQString bmkfilename; bool compress; bmkList fBookmarks; @@ -121,16 +121,16 @@ public: } eSortBookmarks; public: - DOCConverter(QObject *parent=0L, const char *name=0L); + DOCConverter(TQObject *parent=0L, const char *name=0L); virtual ~ DOCConverter(); - QString readText(); - void setTXTpath(QString path, QString file); - void setTXTpath(QString filename); + TQString readText(); + void setTXTpath(TQString path, TQString file); + void setTXTpath(TQString filename); void setPDB(PilotDatabase * dbi); - QString txtFilename() const {return txtfilename;} - QString bmkFilename() const {return bmkfilename;} - void setBmkFilename(QString bmkf) { bmkfilename=bmkf;} + TQString txtFilename() const {return txtfilename;} + TQString bmkFilename() const {return bmkfilename;} + void setBmkFilename(TQString bmkf) { bmkfilename=bmkf;} bool getCompress() const { return compress; }; void setCompress(bool newcomp) {compress=newcomp;}; @@ -151,9 +151,9 @@ public: return fBookmarks.count(); }; - int findBmkEndtags(QString &, bmkList&); - int findBmkInline(QString &, bmkList&); - int findBmkFile(QString &, bmkList&); + int findBmkEndtags(TQString &, bmkList&); + int findBmkInline(TQString &, bmkList&); + int findBmkFile(TQString &, bmkList&); void setSort(enum eSortBookmarksEnum sort) {eSortBookmarks=sort;} @@ -176,8 +176,8 @@ protected: private: void readConfig(); signals: - void logMessage(const QString &); - void logError(const QString &); + void logMessage(const TQString &); + void logError(const TQString &); }; #endif diff --git a/kpilot/conduits/docconduit/doc-conduit.cc b/kpilot/conduits/docconduit/doc-conduit.cc index eee36080c..fbaa22f59 100644 --- a/kpilot/conduits/docconduit/doc-conduit.cc +++ b/kpilot/conduits/docconduit/doc-conduit.cc @@ -36,8 +36,8 @@ #include "options.h" #include "doc-conduit.moc" -#include <qtimer.h> -#include <qdir.h> +#include <tqtimer.h> +#include <tqdir.h> #include <kconfig.h> #include <kmdcodec.h> @@ -59,7 +59,7 @@ extern "C" unsigned long version_conduit_doc = Pilot::PLUGIN_API; } -QString dirToString(eSyncDirectionEnum dir) { +TQString dirToString(eSyncDirectionEnum dir) { switch(dir) { // case eSyncAll: return "eSyncAll"; case eSyncPDAToPC: return CSL1("eSyncPDAToPC"); @@ -78,7 +78,7 @@ QString dirToString(eSyncDirectionEnum dir) { DOCConduit::DOCConduit(KPilotLink * o, - const char *n, const QStringList & a):ConduitAction(o, n, a) + const char *n, const TQStringList & a):ConduitAction(o, n, a) { FUNCTIONSETUP; fConduitName=i18n("DOC"); @@ -145,13 +145,13 @@ void DOCConduit::readConfig() -bool DOCConduit::pcTextChanged(QString txtfn) +bool DOCConduit::pcTextChanged(TQString txtfn) { FUNCTIONSETUP; // How do I find out if a text file has changed shince we last synced it?? // Use KMD5 for now. If I realize it is too slow, then I have to go back to comparing modification times // if there is no config setting yet, assume the file has been changed. the md5 sum will be written to the config file after the sync. - QString oldDigest=DOCConduitSettings::self()->config()->readEntry(txtfn); + TQString oldDigest=DOCConduitSettings::self()->config()->readEntry(txtfn); if (oldDigest.length()<=0) { return true; @@ -161,10 +161,10 @@ bool DOCConduit::pcTextChanged(QString txtfn) #endif KMD5 docmd5; - QFile txtfile(txtfn); + TQFile txtfile(txtfn); if (txtfile.open(IO_ReadOnly)){ docmd5.update(txtfile); - QString thisDigest(docmd5.hexDigest() /* .data() */); + TQString thisDigest(docmd5.hexDigest() /* .data() */); #ifdef DEBUG DEBUGKPILOT<<"New digest is "<<thisDigest<<endl; #endif @@ -233,19 +233,19 @@ bool DOCConduit::hhTextChanged(PilotDatabase*docdb) * Helper functions ********************************************************************/ -QString DOCConduit::constructPDBFileName(QString name) { +TQString DOCConduit::constructPDBFileName(TQString name) { FUNCTIONSETUP; - QString fn; - QDir dr(DOCConduitSettings::pDBDirectory()); - QFileInfo pth(dr, name); + TQString fn; + TQDir dr(DOCConduitSettings::pDBDirectory()); + TQFileInfo pth(dr, name); if (!name.isEmpty()) fn=pth.absFilePath()+CSL1(".pdb"); return fn; } -QString DOCConduit::constructTXTFileName(QString name) { +TQString DOCConduit::constructTXTFileName(TQString name) { FUNCTIONSETUP; - QString fn; - QDir dr( DOCConduitSettings::tXTDirectory() ); - QFileInfo pth(dr, name); + TQString fn; + TQDir dr( DOCConduitSettings::tXTDirectory() ); + TQFileInfo pth(dr, name); if (!name.isEmpty()) fn=pth.absFilePath()+CSL1(".txt"); return fn; } @@ -271,7 +271,7 @@ QString DOCConduit::constructTXTFileName(QString name) { emit logMessage(i18n("Searching for texts and databases to synchronize")); - QTimer::singleShot(0, this, SLOT(syncNextDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB())); return true; } @@ -284,15 +284,15 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) if (sinfo.direction==eSyncDelete) { if (!sinfo.txtfilename.isEmpty()) { - if (!QFile::remove(sinfo.txtfilename)) { + if (!TQFile::remove(sinfo.txtfilename)) { WARNINGKPILOT << "Unable to delete the text file " << sinfo.txtfilename << " on the PC" << endl; } - QString bmkfilename = sinfo.txtfilename; + TQString bmkfilename = sinfo.txtfilename; if (bmkfilename.endsWith(CSL1(".txt"))){ bmkfilename.remove(bmkfilename.length()-4, 4); } bmkfilename+=CSL1(PDBBMK_SUFFIX); - if (!QFile::remove(bmkfilename)) { + if (!TQFile::remove(bmkfilename)) { #ifdef DEBUG DEBUGKPILOT<<"Could not remove bookmarks file "<<bmkfilename<<" for database "<<sinfo.handheldDB<<endl; #endif @@ -300,7 +300,7 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) } if (!sinfo.pdbfilename.isEmpty() && DOCConduitSettings::keepPDBsLocally() ) { PilotLocalDatabase*database=new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(), - QString::fromLatin1(sinfo.dbinfo.name), false); + TQString::fromLatin1(sinfo.dbinfo.name), false); if (database) { if ( database->deleteDatabase() !=0 ) { WARNINGKPILOT << "Unable to delete database " << sinfo.dbinfo.name << " on the PC" << endl; @@ -336,8 +336,8 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) if (database && database->isOpen()) { DOCConverter docconverter; - connect(&docconverter, SIGNAL(logError(const QString &)), SIGNAL(logError(const QString &))); - connect(&docconverter, SIGNAL(logMessage(const QString &)), SIGNAL(logMessage(const QString &))); + connect(&docconverter, TQT_SIGNAL(logError(const TQString &)), TQT_SIGNAL(logError(const TQString &))); + connect(&docconverter, TQT_SIGNAL(logMessage(const TQString &)), TQT_SIGNAL(logMessage(const TQString &))); docconverter.setTXTpath( DOCConduitSettings::tXTDirectory(), sinfo.txtfilename ); docconverter.setPDB(database); @@ -360,10 +360,10 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) if (res) { KMD5 docmd5; - QFile txtfile(docconverter.txtFilename()); + TQFile txtfile(docconverter.txtFilename()); if (txtfile.open(IO_ReadOnly)) { docmd5.update(txtfile); - QString thisDigest(docmd5.hexDigest() /* .data() */); + TQString thisDigest(docmd5.hexDigest() /* .data() */); DOCConduitSettings::self()->config()->writeEntry(docconverter.txtFilename(), thisDigest); DOCConduitSettings::self()->config()->sync(); #ifdef DEBUG @@ -378,18 +378,18 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) if (!postSyncAction(database, sinfo, res)) emit logError(i18n("Unable to install the locally created PalmDOC %1 to the handheld.") - .arg(QString::fromLatin1(sinfo.dbinfo.name))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); if (!res) emit logError(i18n("Conversion of PalmDOC \"%1\" failed.") - .arg(QString::fromLatin1(sinfo.dbinfo.name))); -// disconnect(&docconverter, SIGNAL(logError(const QString &)), SIGNAL(logError(const QString &))); -// disconnect(&docconverter, SIGNAL(logMessage(const QString &)), SIGNAL(logMessage(const QString &))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); +// disconnect(&docconverter, TQT_SIGNAL(logError(const TQString &)), TQT_SIGNAL(logError(const TQString &))); +// disconnect(&docconverter, TQT_SIGNAL(logMessage(const TQString &)), TQT_SIGNAL(logMessage(const TQString &))); // KPILOT_DELETE(database); } else { emit logError(i18n("Unable to open or create the database %1.") - .arg(QString::fromLatin1(sinfo.dbinfo.name))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); } return res; } @@ -404,7 +404,7 @@ void DOCConduit::syncNextDB() { if (eSyncDirection==eSyncPCToPDA || fHandle->findDatabase(NULL, &dbinfo, dbnr, dbtype(), dbcreator() /*, cardno */ ) < 0) { // no more databases available, so check for PC->Palm sync - QTimer::singleShot(0, this, SLOT(syncNextTXT())); + TQTimer::singleShot(0, this, TQT_SLOT(syncNextTXT())); return; } dbnr=dbinfo.index+1; @@ -414,23 +414,23 @@ void DOCConduit::syncNextDB() { // if creator and/or type don't match, go to next db if (!isCorrectDBTypeCreator(dbinfo) || - fDBNames.contains(QString::fromLatin1(dbinfo.name))) + fDBNames.contains(TQString::fromLatin1(dbinfo.name))) { - QTimer::singleShot(0, this, SLOT(syncNextDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB())); return; } - QString txtfilename=constructTXTFileName(QString::fromLatin1(dbinfo.name)); - QString pdbfilename=constructPDBFileName(QString::fromLatin1(dbinfo.name)); + TQString txtfilename=constructTXTFileName(TQString::fromLatin1(dbinfo.name)); + TQString pdbfilename=constructPDBFileName(TQString::fromLatin1(dbinfo.name)); - docSyncInfo syncInfo(QString::fromLatin1(dbinfo.name), + docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name), txtfilename, pdbfilename, eSyncNone); syncInfo.dbinfo=dbinfo; needsSync(syncInfo); fSyncInfoList.append(syncInfo); - fDBNames.append(QString::fromLatin1(dbinfo.name)); + fDBNames.append(TQString::fromLatin1(dbinfo.name)); - QTimer::singleShot(0, this, SLOT(syncNextDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB())); return; } @@ -444,28 +444,28 @@ void DOCConduit::syncNextTXT() { // We don't sync from PC to PDB, so start the conflict resolution and then the actual sync process docnames.clear(); - QTimer::singleShot(0, this, SLOT(checkPDBFiles())); + TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles())); return; } // if docnames isn't initialized, get a list of all *.txt files in DOCConduitSettings::tXTDirectory() if (docnames.isEmpty()/* || dociterator==docnames.end() */) { - docnames=QDir( DOCConduitSettings::tXTDirectory(), CSL1("*.txt")).entryList() ; + docnames=TQDir( DOCConduitSettings::tXTDirectory(), CSL1("*.txt")).entryList() ; dociterator=docnames.begin(); } if (dociterator==docnames.end()) { // no more databases available, so start the conflict resolution and then the actual sync proces docnames.clear(); - QTimer::singleShot(0, this, SLOT(checkPDBFiles())); + TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles())); return; } - QString fn=(*dociterator); + TQString fn=(*dociterator); - QDir dr( DOCConduitSettings::tXTDirectory() ); - QFileInfo fl(dr, fn ); - QString txtfilename=fl.absFilePath(); - QString pdbfilename; + TQDir dr( DOCConduitSettings::tXTDirectory() ); + TQFileInfo fl(dr, fn ); + TQString txtfilename=fl.absFilePath(); + TQString pdbfilename; ++dociterator; DBInfo dbinfo; @@ -476,19 +476,19 @@ void DOCConduit::syncNextTXT() bool alreadySynced=fDBNames.contains(fl.baseName(TRUE)); if (!alreadySynced) { - docSyncInfo syncInfo(QString::fromLatin1(dbinfo.name), + docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name), txtfilename, pdbfilename, eSyncNone); syncInfo.dbinfo=dbinfo; needsSync(syncInfo); fSyncInfoList.append(syncInfo); - fDBNames.append(QString::fromLatin1(dbinfo.name)); + fDBNames.append(TQString::fromLatin1(dbinfo.name)); } else { #ifdef DEBUG DEBUGKPILOT<<txtfilename<<" has already been synced, skipping it."<<endl; #endif } - QTimer::singleShot(0, this, SLOT(syncNextTXT())); + TQTimer::singleShot(0, this, TQT_SLOT(syncNextTXT())); return; } @@ -502,33 +502,33 @@ void DOCConduit::checkPDBFiles() { if ( DOCConduitSettings::localSync() || !DOCConduitSettings::keepPDBsLocally() || eSyncDirection==eSyncPCToPDA ) { // no more databases available, so check for PC->Palm sync - QTimer::singleShot(0, this, SLOT(checkDeletedDocs())); + TQTimer::singleShot(0, this, TQT_SLOT(checkDeletedDocs())); return; } // Walk through all files in the pdb directory and check if it has already been synced. // if docnames isn't initialized, get a list of all *.pdb files in DOCConduitSettings::pDBDirectory() if (docnames.isEmpty()/* || dociterator==docnames.end() */) { - docnames=QDir(DOCConduitSettings::pDBDirectory(), CSL1("*.pdb")).entryList() ; + docnames=TQDir(DOCConduitSettings::pDBDirectory(), CSL1("*.pdb")).entryList() ; dociterator=docnames.begin(); } if (dociterator==docnames.end()) { // no more databases available, so start the conflict resolution and then the actual sync proces docnames.clear(); - QTimer::singleShot(0, this, SLOT(checkDeletedDocs())); + TQTimer::singleShot(0, this, TQT_SLOT(checkDeletedDocs())); return; } - QString fn=(*dociterator); + TQString fn=(*dociterator); - QDir dr(DOCConduitSettings::pDBDirectory()); - QFileInfo fl(dr, fn ); - QString pdbfilename=fl.absFilePath(); + TQDir dr(DOCConduitSettings::pDBDirectory()); + TQFileInfo fl(dr, fn ); + TQString pdbfilename=fl.absFilePath(); ++dociterator; // Get the doc title and check if it has already been synced (in the synced docs list of in fDBNames to be synced) // If the doc title doesn't appear in either list, install it to the Handheld, and add it to the list of dbs to be synced. - QString dbname=fl.baseName(TRUE).left(30); + TQString dbname=fl.baseName(TRUE).left(30); if (!fDBNames.contains(dbname) && !fDBListSynced.contains(dbname)) { if (fHandle->installFiles(pdbfilename, false)) { DBInfo dbinfo; @@ -549,7 +549,7 @@ void DOCConduit::checkPDBFiles() { } } - QTimer::singleShot(0, this, SLOT(checkPDBFiles())); + TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles())); } @@ -558,12 +558,12 @@ void DOCConduit::checkDeletedDocs() { FUNCTIONSETUP; - for (QStringList::Iterator it=fDBListSynced.begin(); it!=fDBListSynced.end(); ++it ) { + for (TQStringList::Iterator it=fDBListSynced.begin(); it!=fDBListSynced.end(); ++it ) { if (!fDBNames.contains(*it)) { // We need to delete this doc: - QString dbname(*it); - QString txtfilename=constructTXTFileName(dbname); - QString pdbfilename=constructPDBFileName(dbname); + TQString dbname(*it); + TQString txtfilename=constructTXTFileName(dbname); + TQString pdbfilename=constructPDBFileName(dbname); docSyncInfo syncInfo(dbname, txtfilename, pdbfilename, eSyncDelete); DBInfo dbinfo; @@ -574,7 +574,7 @@ void DOCConduit::checkDeletedDocs() fSyncInfoList.append(syncInfo); } } - QTimer::singleShot(0, this, SLOT(resolve())); + TQTimer::singleShot(0, this, TQT_SLOT(resolve())); return; } @@ -628,7 +628,7 @@ void DOCConduit::resolve() { if (!dlg || !dlg->exec() ) { KPILOT_DELETE(dlg) emit logMessage(i18n("Sync aborted by user.")); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } } @@ -638,7 +638,7 @@ void DOCConduit::resolve() { // fDBNames will be filled with the names of the databases that are actually synced (not deleted), so I can write the list to the config file fDBNames.clear(); fSyncInfoListIterator=fSyncInfoList.begin(); - QTimer::singleShot(0,this, SLOT(syncDatabases())); + TQTimer::singleShot(0,this, TQT_SLOT(syncDatabases())); return; } @@ -648,7 +648,7 @@ void DOCConduit::syncDatabases() { FUNCTIONSETUP; if (fSyncInfoListIterator==fSyncInfoList.end()) { // We're done, so clean up - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } @@ -679,12 +679,12 @@ void DOCConduit::syncDatabases() { } if (sinfo.direction != eSyncDelete) fDBNames.append(sinfo.handheldDB); - QTimer::singleShot(0,this, SLOT(syncDatabases())); + TQTimer::singleShot(0,this, TQT_SLOT(syncDatabases())); return; } -PilotDatabase*DOCConduit::openDOCDatabase(const QString &dbname) { +PilotDatabase*DOCConduit::openDOCDatabase(const TQString &dbname) { if (DOCConduitSettings::localSync()) { return new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(), dbname, false); @@ -701,7 +701,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) FUNCTIONSETUP; sinfo.direction = eSyncNone; - PilotDatabase*docdb=openDOCDatabase(QString::fromLatin1(sinfo.dbinfo.name)); + PilotDatabase*docdb=openDOCDatabase(TQString::fromLatin1(sinfo.dbinfo.name)); if (!fDBListSynced.contains(sinfo.handheldDB)) { // the database wasn't included on last sync, so it has to be new. #ifdef DEBUG @@ -716,7 +716,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) N N | C P H */ - if (QFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew; + if (TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew; else sinfo.fPCStatus=eStatDoesntExist; if (docdb && docdb->isOpen()) sinfo.fPalmStatus=eStatNew; else sinfo.fPalmStatus=eStatDoesntExist; @@ -756,7 +756,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) } // Text was included in the last sync - if (!QFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatDeleted; + if (!TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatDeleted; else if(pcTextChanged(sinfo.txtfilename)) { sinfo.fPCStatus=eStatChanged; #ifdef DEBUG @@ -871,7 +871,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const { // make sure the dir for the local texts really exists! - QDir dir( DOCConduitSettings::tXTDirectory() ); + TQDir dir( DOCConduitSettings::tXTDirectory() ); if (!dir.exists()) { dir.mkdir(dir.absPath()); @@ -885,7 +885,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const if (DOCConduitSettings::keepPDBsLocally()) { // make sure the dir for the local db really exists! - QDir dir(DOCConduitSettings::pDBDirectory()); + TQDir dir(DOCConduitSettings::pDBDirectory()); if (!dir.exists()) { @@ -909,7 +909,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const if (DOCConduitSettings::keepPDBsLocally()) { // make sure the dir for the local db really exists! - QDir dir(DOCConduitSettings::pDBDirectory()); + TQDir dir(DOCConduitSettings::pDBDirectory()); if (!dir.exists()) { dir.mkdir(dir.absPath()); @@ -922,11 +922,11 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const if (DOCConduitSettings::keepPDBsLocally()) { return new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(), - QString::fromLatin1(dbinfo.name), false); + TQString::fromLatin1(dbinfo.name), false); } else { - return deviceLink()->database(QString::fromLatin1(dbinfo.name)); + return deviceLink()->database(TQString::fromLatin1(dbinfo.name)); } } @@ -950,7 +950,7 @@ bool DOCConduit::postSyncAction(PilotDatabase * database, if (DOCConduitSettings::keepPDBsLocally() && !DOCConduitSettings::localSync()) { PilotDatabase*db=deviceLink()->database( - QString::fromLatin1(sinfo.dbinfo.name)); + TQString::fromLatin1(sinfo.dbinfo.name)); #ifdef DEBUG DEBUGKPILOT<<"Middle 1 Resetting sync flags for database " <<sinfo.dbinfo.name<<endl; @@ -977,7 +977,7 @@ bool DOCConduit::postSyncAction(PilotDatabase * database, DEBUGKPILOT<<"Installing file "<<localdb->dbPathName()<<" (" <<sinfo.handheldDB<<") to the handheld"<<endl; #endif - QString dbpathname=localdb->dbPathName(); + TQString dbpathname=localdb->dbPathName(); // This deletes localdb as well, which is just a cast from database KPILOT_DELETE(database); if (!fHandle->installFiles(dbpathname, false)) diff --git a/kpilot/conduits/docconduit/doc-conduit.h b/kpilot/conduits/docconduit/doc-conduit.h index 834002bea..aefb4264f 100644 --- a/kpilot/conduits/docconduit/doc-conduit.h +++ b/kpilot/conduits/docconduit/doc-conduit.h @@ -31,7 +31,7 @@ #include <plugin.h> class docSyncInfo; -typedef QValueList<docSyncInfo> syncInfoList; +typedef TQValueList<docSyncInfo> syncInfoList; typedef enum eSyncDirectionEnum { eSyncNone, @@ -51,7 +51,7 @@ typedef enum eTextStatus { }; -QString dirToString(eSyncDirectionEnum dir); +TQString dirToString(eSyncDirectionEnum dir); class DOCConduit:public ConduitAction { Q_OBJECT @@ -60,11 +60,11 @@ public: public: DOCConduit(KPilotLink * o, - const char *n = 0L, const QStringList & a = QStringList()); + const char *n = 0L, const TQStringList & a = TQStringList()); virtual ~ DOCConduit(); - bool encode(QStringList fileName, PilotDatabase * db); - bool decode(PilotDatabase * db, QString fileName); + bool encode(TQStringList fileName, PilotDatabase * db); + bool decode(PilotDatabase * db, TQString fileName); virtual bool exec(); protected: virtual bool isCorrectDBTypeCreator(DBInfo dbinfo); @@ -106,33 +106,33 @@ public slots: */ bool postSyncAction(PilotDatabase * dbinfo, docSyncInfo &sinfo, bool res = true); - bool pcTextChanged(QString txtfn); + bool pcTextChanged(TQString txtfn); bool hhTextChanged(PilotDatabase*docdb); /** Opens the database with name dbname. For a local sync, this will be a * PilotLocalDatabase, otherwise it will be a database on the serial device * (i.e. an object of class PilotSerialDatabase) */ - PilotDatabase *openDOCDatabase(const QString &dbname); + PilotDatabase *openDOCDatabase(const TQString &dbname); - QString constructPDBFileName(QString name); - QString constructTXTFileName(QString name); + TQString constructPDBFileName(TQString name); + TQString constructTXTFileName(TQString name); eSyncDirectionEnum eConflictResolution; int fTXTBookmarks, fPDBBookmarks; - QStringList fDBListSynced; - QStringList fDBNames; + TQStringList fDBListSynced; + TQStringList fDBNames; syncInfoList fSyncInfoList; syncInfoList::Iterator fSyncInfoListIterator; long int dbnr; - QStringList docnames; - QStringList::Iterator dociterator; + TQStringList docnames; + TQStringList::Iterator dociterator; }; class docSyncInfo { public: - docSyncInfo(QString hhDB=QString(), QString txtfn=QString(), QString pdbfn=QString(), eSyncDirectionEnum dir=eSyncNone) + docSyncInfo(TQString hhDB=TQString(), TQString txtfn=TQString(), TQString pdbfn=TQString(), eSyncDirectionEnum dir=eSyncNone) { handheldDB=hhDB; txtfilename=txtfn; @@ -142,7 +142,7 @@ public: fPalmStatus=eStatNone; }; ~docSyncInfo(){}; - QString handheldDB, txtfilename, pdbfilename; + TQString handheldDB, txtfilename, pdbfilename; DBInfo dbinfo; eSyncDirectionEnum direction; eTextStatus fPCStatus, fPalmStatus; diff --git a/kpilot/conduits/docconduit/doc-conflictdialog.cc b/kpilot/conduits/docconduit/doc-conflictdialog.cc index 7dafd9b66..50ecbbd1e 100644 --- a/kpilot/conduits/docconduit/doc-conflictdialog.cc +++ b/kpilot/conduits/docconduit/doc-conflictdialog.cc @@ -28,54 +28,54 @@ #include "options.h" #include "doc-conflictdialog.moc" -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qbuttongroup.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqbuttongroup.h> #include <kmessagebox.h> -#include <qtimer.h> -#include <qtable.h> -#include <qcombobox.h> -#include <qscrollview.h> +#include <tqtimer.h> +#include <tqtable.h> +#include <tqcombobox.h> +#include <tqscrollview.h> -ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syncInfoList*sinfo, KPilotLink*lnk ) +ResolutionDialog::ResolutionDialog( TQWidget* parent, const TQString& caption, syncInfoList*sinfo, KPilotLink*lnk ) : KDialogBase( parent, "resolutionDialog", true, caption, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true), tickleTimer(0L), fHandle(lnk) { FUNCTIONSETUP; syncInfo=sinfo; hasConflicts=false; - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); // First, insert the texts on top: - textLabel1 = new QLabel(i18n("Here is a list of all text files and DOC databases the conduit found. The conduit tried to determine the correct sync direction, but for databases in bold red letters a conflict occurred (i.e. the text was changed both on the desktop and on the handheld). For these databases please specify which version is the current one."), page); - textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + textLabel1 = new TQLabel(i18n("Here is a list of all text files and DOC databases the conduit found. The conduit tried to determine the correct sync direction, but for databases in bold red letters a conflict occurred (i.e. the text was changed both on the desktop and on the handheld). For these databases please specify which version is the current one."), page); + textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); topLayout->addWidget(textLabel1); - textLabel2 = new QLabel(i18n("You can also change the sync direction for databases without a conflict." ), page ); - textLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + textLabel2 = new TQLabel(i18n("You can also change the sync direction for databases without a conflict." ), page ); + textLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); topLayout->addWidget(textLabel2); - resolutionGroupBox = new QGroupBox(i18n("DOC Databases"), page ); - QVBoxLayout*playout = new QVBoxLayout(resolutionGroupBox); - QScrollView* sv = new QScrollView(resolutionGroupBox); + resolutionGroupBox = new TQGroupBox(i18n("DOC Databases"), page ); + TQVBoxLayout*playout = new TQVBoxLayout(resolutionGroupBox); + TQScrollView* sv = new TQScrollView(resolutionGroupBox); playout->addWidget(sv); - sv->setResizePolicy(QScrollView::AutoOneFit); - sv->setHScrollBarMode(QScrollView::AlwaysOff); + sv->setResizePolicy(TQScrollView::AutoOneFit); + sv->setHScrollBarMode(TQScrollView::AlwaysOff); sv->setMargin(5); - QFrame* big_box = new QFrame(sv->viewport()); + TQFrame* big_box = new TQFrame(sv->viewport()); sv->addChild(big_box); - resolutionGroupBoxLayout = new QGridLayout( big_box, syncInfo->size(), 3 ); + resolutionGroupBoxLayout = new TQGridLayout( big_box, syncInfo->size(), 3 ); resolutionGroupBoxLayout->setAlignment( Qt::AlignTop ); // Invisible button group for the information buttons to use the same slot for all of them (see Dallheimer's book, page 309f) - QButtonGroup *bgroup = new QButtonGroup( this ); + TQButtonGroup *bgroup = new TQButtonGroup( this ); bgroup->hide(); - QObject::connect(bgroup, SIGNAL(clicked(int)), this, SLOT(slotInfo(int))); + TQObject::connect(bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotInfo(int))); if (syncInfo) { DEBUGKPILOT<<"Adding resolution options for the databases "<<endl; @@ -89,18 +89,18 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn cE.conflict=(si.direction==eSyncConflict); DEBUGKPILOT<<"Adding "<<si.handheldDB<<" to the conflict resolution dialog"<<endl; - QString text=si.handheldDB; + TQString text=si.handheldDB; if (cE.conflict) { text=CSL1("<qt><b><font color=red>")+text+CSL1("</font></b></qt>"); DEBUGKPILOT<<"We have a conflict for database "<<si.handheldDB<<endl; hasConflicts=true; } - cE.dbname=new QLabel(text, big_box); + cE.dbname=new TQLabel(text, big_box); resolutionGroupBoxLayout->addWidget( cE.dbname, cE.index, 0 ); - cE.resolution=new QComboBox( FALSE, big_box); - cE.resolution->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, - (QSizePolicy::SizeType)0, 0, 0, + cE.resolution=new TQComboBox( FALSE, big_box); + cE.resolution->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, + (TQSizePolicy::SizeType)0, 0, 0, cE.resolution->sizePolicy().hasHeightForWidth() ) ); cE.resolution->clear(); cE.resolution->insertItem( i18n( "No Sync" ) ); @@ -110,7 +110,7 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn cE.resolution->setCurrentItem((int)si.direction); resolutionGroupBoxLayout->addWidget( cE.resolution, cE.index, 1); - cE.info = new QPushButton( i18n("More Info..."), big_box ); + cE.info = new TQPushButton( i18n("More Info..."), big_box ); resolutionGroupBoxLayout->addWidget(cE.info, cE.index, 2); bgroup->insert(cE.info); @@ -123,11 +123,11 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn topLayout->addWidget( resolutionGroupBox ); - resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 480).expandedTo(minimumSizeHint()) ); - if (fHandle) tickleTimer=new QTimer(this, "TickleTimer"); + if (fHandle) tickleTimer=new TQTimer(this, "TickleTimer"); if (tickleTimer) { - connect( tickleTimer, SIGNAL(timeout()), this, SLOT(_tickle()) ); + connect( tickleTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(_tickle()) ); tickleTimer->start( 10000 ); // tickle the palm every 10 seconds to prevent a timeout until the sync is really finished. } @@ -143,14 +143,14 @@ ResolutionDialog::~ResolutionDialog() /* virtual slot */ void ResolutionDialog::slotOk() { FUNCTIONSETUP; - QValueList<conflictEntry>::Iterator ceIt; + TQValueList<conflictEntry>::Iterator ceIt; for (ceIt=conflictEntries.begin(); ceIt!=conflictEntries.end(); ++ceIt) { (*syncInfo)[(*ceIt).index].direction=(eSyncDirectionEnum)((*ceIt).resolution->currentItem()); } KDialogBase::slotOk(); } -QString eTextStatusToString(eTextStatus stat) { +TQString eTextStatusToString(eTextStatus stat) { switch(stat) { case eStatNone: return i18n("unchanged"); case eStatNew: return i18n("new"); @@ -168,7 +168,7 @@ void ResolutionDialog::slotInfo(int index) { int ix=cE.index; if (!syncInfo) return; docSyncInfo si=(*syncInfo)[ix]; - QString text=i18n("Status of the database %1:\n\n").arg(si.handheldDB); + TQString text=i18n("Status of the database %1:\n\n").arg(si.handheldDB); text+=i18n("Handheld: %1\n").arg(eTextStatusToString(si.fPalmStatus)); text+=i18n("Desktop: %1\n").arg(eTextStatusToString(si.fPCStatus)); diff --git a/kpilot/conduits/docconduit/doc-conflictdialog.h b/kpilot/conduits/docconduit/doc-conflictdialog.h index f8ad8caf7..00a3ef1a5 100644 --- a/kpilot/conduits/docconduit/doc-conflictdialog.h +++ b/kpilot/conduits/docconduit/doc-conflictdialog.h @@ -43,9 +43,9 @@ class KPilotLink; typedef struct conflictEntry { - QLabel*dbname; - QComboBox* resolution; - QPushButton*info; + TQLabel*dbname; + TQComboBox* resolution; + TQPushButton*info; int index; bool conflict; }; @@ -56,23 +56,23 @@ class ResolutionDialog : public KDialogBase Q_OBJECT public: - ResolutionDialog( QWidget* parent=0, const QString& caption=i18n("Resolution Dialog"), syncInfoList*sinfo=0L, KPilotLink*lnk=0L); + ResolutionDialog( TQWidget* parent=0, const TQString& caption=i18n("Resolution Dialog"), syncInfoList*sinfo=0L, KPilotLink*lnk=0L); ~ResolutionDialog(); bool hasConflicts; public slots: void _tickle(); protected: - QTimer* tickleTimer; + TQTimer* tickleTimer; KPilotLink* fHandle; protected: - QGroupBox* resolutionGroupBox; - QGridLayout*resolutionGroupBoxLayout; + TQGroupBox* resolutionGroupBox; + TQGridLayout*resolutionGroupBoxLayout; syncInfoList*syncInfo; - QValueList<conflictEntry> conflictEntries; - QLabel *textLabel1,*textLabel2; + TQValueList<conflictEntry> conflictEntries; + TQLabel *textLabel1,*textLabel2; protected slots: virtual void slotOk(); diff --git a/kpilot/conduits/docconduit/doc-factory.cc b/kpilot/conduits/docconduit/doc-factory.cc index 3d2a16b11..cfab20f4d 100644 --- a/kpilot/conduits/docconduit/doc-factory.cc +++ b/kpilot/conduits/docconduit/doc-factory.cc @@ -54,7 +54,7 @@ const char *DOCConduitFactory::dbDOCcreator = "REAd"; -DOCConduitFactory::DOCConduitFactory(QObject * p, const char *n): +DOCConduitFactory::DOCConduitFactory(TQObject * p, const char *n): KLibFactory(p, n) { FUNCTIONSETUP; @@ -77,8 +77,8 @@ DOCConduitFactory::~DOCConduitFactory() } -/* virtual */ QObject * DOCConduitFactory::createObject(QObject * p, - const char *n, const char *c, const QStringList & a) +/* virtual */ TQObject * DOCConduitFactory::createObject(TQObject * p, + const char *n, const char *c, const TQStringList & a) { FUNCTIONSETUP; @@ -87,7 +87,7 @@ DOCConduitFactory::~DOCConduitFactory() #endif if (qstrcmp(c, "ConduitConfigBase") == 0) { - QWidget *w = dynamic_cast<QWidget *>(p); + TQWidget *w = dynamic_cast<TQWidget *>(p); if (w) { return new DOCWidgetConfig(w,n); diff --git a/kpilot/conduits/docconduit/doc-factory.h b/kpilot/conduits/docconduit/doc-factory.h index c848777a0..312b9def9 100644 --- a/kpilot/conduits/docconduit/doc-factory.h +++ b/kpilot/conduits/docconduit/doc-factory.h @@ -41,7 +41,7 @@ class DOCConduitFactory:public KLibFactory Q_OBJECT public: - DOCConduitFactory(QObject * = 0L, const char * = 0L); + DOCConduitFactory(TQObject * = 0L, const char * = 0L); virtual ~ DOCConduitFactory(); static KAboutData *about() { @@ -55,10 +55,10 @@ public: protected: - virtual QObject * createObject(QObject * parent = 0, + virtual TQObject * createObject(TQObject * parent = 0, const char *name = 0, - const char *classname = "QObject", - const QStringList & args = QStringList()); + const char *classname = "TQObject", + const TQStringList & args = TQStringList()); private: KInstance * fInstance; diff --git a/kpilot/conduits/docconduit/doc-setup.cc b/kpilot/conduits/docconduit/doc-setup.cc index a6de2d2ad..6e6858a5c 100644 --- a/kpilot/conduits/docconduit/doc-setup.cc +++ b/kpilot/conduits/docconduit/doc-setup.cc @@ -28,10 +28,10 @@ #include "options.h" -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qcombobox.h> +#include <tqtabwidget.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> #include <kconfig.h> #include <kurlrequester.h> @@ -43,7 +43,7 @@ #include "docconduitSettings.h" -DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n): +DOCWidgetConfig::DOCWidgetConfig(TQWidget * w, const char *n): ConduitConfigBase(w, n), fConfigWidget(new DOCWidget(w)) { @@ -51,8 +51,8 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n): fWidget=fConfigWidget; - QStringList l = KGlobal::charsets()->descriptiveEncodingNames(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it) + TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { fConfigWidget->fEncoding->insertItem(*it); } @@ -63,9 +63,9 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n): fConduitName=i18n("Palm DOC"); -#define CMOD(a,b) connect(fConfigWidget->a,SIGNAL(b),this,SLOT(modified())) - CMOD(fTXTDir,textChanged(const QString &)); - CMOD(fPDBDir,textChanged(const QString &)); +#define CMOD(a,b) connect(fConfigWidget->a,TQT_SIGNAL(b),this,TQT_SLOT(modified())) + CMOD(fTXTDir,textChanged(const TQString &)); + CMOD(fPDBDir,textChanged(const TQString &)); CMOD(fkeepPDBLocally,clicked()); CMOD(fConflictResolution,clicked(int)); CMOD(fConvertBookmarks,stateChanged(int)); @@ -77,7 +77,7 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n): CMOD(fNoConversionOfBmksOnly,stateChanged(int)); CMOD(fAlwaysUseResolution,stateChanged(int)); CMOD(fPCBookmarks,clicked(int)); - CMOD(fEncoding,textChanged(const QString &)); + CMOD(fEncoding,textChanged(const TQString &)); #undef CMOD fConfigWidget->adjustSize(); diff --git a/kpilot/conduits/docconduit/doc-setup.h b/kpilot/conduits/docconduit/doc-setup.h index 470585e01..32d1b54bc 100644 --- a/kpilot/conduits/docconduit/doc-setup.h +++ b/kpilot/conduits/docconduit/doc-setup.h @@ -36,7 +36,7 @@ class DOCWidget; class DOCWidgetConfig : public ConduitConfigBase { public: - DOCWidgetConfig(QWidget *, const char *); + DOCWidgetConfig(TQWidget *, const char *); virtual void commit(); virtual void load(); protected: diff --git a/kpilot/conduits/docconduit/kpalmdoc_dlg.cc b/kpilot/conduits/docconduit/kpalmdoc_dlg.cc index 5bdacba8c..29713ffae 100644 --- a/kpilot/conduits/docconduit/kpalmdoc_dlg.cc +++ b/kpilot/conduits/docconduit/kpalmdoc_dlg.cc @@ -31,12 +31,12 @@ #include <stdio.h> #include <iostream> -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqtabwidget.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> #include <kconfig.h> @@ -54,24 +54,24 @@ #include "kpalmdocSettings.h" -ConverterDlg::ConverterDlg( QWidget *parent, const QString& caption) +ConverterDlg::ConverterDlg( TQWidget *parent, const TQString& caption) : KDialogBase( parent, "converterdialog", false, caption, KDialogBase::Close|KDialogBase::Help|KDialogBase::User1, KDialogBase::Close, true, i18n("&About")) { - QWidget *page = makeHBoxMainWidget(); + TQWidget *page = makeHBoxMainWidget(); dlg=new ConverterDlgBase(page); - QStringList l = KGlobal::charsets()->descriptiveEncodingNames(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it) + TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { dlg->fEncoding->insertItem(*it); } readSettings(); - connect(dlg->fDirectories, SIGNAL(toggled(bool)), - this, SLOT(slotDirectories(bool))); - connect(dlg->fTextToPDB, SIGNAL(clicked()), this, SLOT(slotToPDB())); - connect(dlg->fPDBToText, SIGNAL(clicked()), this, SLOT(slotToText())); + connect(dlg->fDirectories, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotDirectories(bool))); + connect(dlg->fTextToPDB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToPDB())); + connect(dlg->fPDBToText, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToText())); resize(minimumSize()); } @@ -117,7 +117,7 @@ void ConverterDlg::readSettings() slotDirectories(dir); dlg->fAskOverwrite->setChecked( KPalmDocSettings::askOverwrite() ); dlg->fVerbose->setChecked( KPalmDocSettings::verboseMessages() ); - QString encoding = KPalmDocSettings::encoding(); + TQString encoding = KPalmDocSettings::encoding(); #ifdef DEBUG DEBUGKPILOT << fname << ": Encoding=" << encoding << endl; #endif @@ -162,11 +162,11 @@ void ConverterDlg::slotToText() bool dir=dlg->fDirectories->isChecked(); - QString txturl=dlg->fTXTDir->url(); - QString pdburl=dlg->fPDBDir->url(); + TQString txturl=dlg->fTXTDir->url(); + TQString pdburl=dlg->fPDBDir->url(); - QFileInfo txtinfo(txturl); - QFileInfo pdbinfo(pdburl); + TQFileInfo txtinfo(txturl); + TQFileInfo pdbinfo(pdburl); if (dir) { @@ -176,7 +176,7 @@ void ConverterDlg::slotToText() i18n("<qt>You selected to sync folders, " "but gave a filename instead (<em>%1</em>)." "<br>Use folder <em>%2</em> instead?</qt>").arg(pdburl) - .arg(pdbinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel()); + .arg(pdbinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel()); if (res==KMessageBox::Yes) { pdburl=pdbinfo.dirPath(true); @@ -212,7 +212,7 @@ void ConverterDlg::slotToText() i18n("<qt>You selected to sync folders, " "but gave a filename instead (<em>%1</em>)." "<br>Use folder <em>%2</em> instead?</qt>").arg(txturl) - .arg(txtinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel()); + .arg(txtinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel()); if (res==KMessageBox::Yes) { txturl=txtinfo.dirPath(true); txtinfo.setFile(txturl); @@ -235,13 +235,13 @@ void ConverterDlg::slotToText() // Now that we have both directories, create the converter object DEBUGKPILOT<<"Pdbinfo.dir="<<pdbinfo.dir().absPath()<<endl; DEBUGKPILOT<<"txtinfo.dir="<<txtinfo.dir().absPath()<<endl; - QStringList pdbfiles(pdbinfo.dir().entryList(CSL1("*.pdb"))); - QStringList converted_Files; + TQStringList pdbfiles(pdbinfo.dir().entryList(CSL1("*.pdb"))); + TQStringList converted_Files; DEBUGKPILOT<<"Length of filename list: "<<pdbfiles.size()<<endl; - for ( QStringList::Iterator it = pdbfiles.begin(); it != pdbfiles.end(); ++it ) + for ( TQStringList::Iterator it = pdbfiles.begin(); it != pdbfiles.end(); ++it ) { - QString txtfile=QFileInfo(*it).baseName(true)+CSL1(".txt"); + TQString txtfile=TQFileInfo(*it).baseName(true)+CSL1(".txt"); DEBUGKPILOT<<"pdbfile="<<*it<<", pdbdir="<<pdburl<<", txtfile="<<txtfile<<", txtdir="<<txturl<<endl; if (convertPDBtoTXT(pdburl, *it, txturl, txtfile, &conv)) { @@ -311,11 +311,11 @@ void ConverterDlg::slotToPDB() bool dir=dlg->fDirectories->isChecked(); - QString txturl=dlg->fTXTDir->url(); - QString pdburl=dlg->fPDBDir->url(); + TQString txturl=dlg->fTXTDir->url(); + TQString pdburl=dlg->fPDBDir->url(); - QFileInfo txtinfo(txturl); - QFileInfo pdbinfo(pdburl); + TQFileInfo txtinfo(txturl); + TQFileInfo pdbinfo(pdburl); if (dir) { @@ -325,7 +325,7 @@ void ConverterDlg::slotToPDB() i18n("<qt>You selected to sync folders, " "but gave a filename instead (<em>%1</em>)." "<br>Use folder <em>%2</em> instead?</qt>").arg(txturl) - .arg(txtinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel()); + .arg(txtinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel()); if (res==KMessageBox::Yes) { txturl=txtinfo.dirPath(true); @@ -351,7 +351,7 @@ void ConverterDlg::slotToPDB() "but gave a filename instead (<em>%1</em>)." "<br>Use folder <em>%2</em> instead?</qt>") .arg(pdburl) - .arg(pdbinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel()); + .arg(pdbinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel()); if (res==KMessageBox::Yes) { pdburl=pdbinfo.dirPath(true); pdbinfo.setFile(pdburl); @@ -373,13 +373,13 @@ void ConverterDlg::slotToPDB() // Now that we have both directories, create the converter object DEBUGKPILOT<<"Pdbinfo.dir="<<pdbinfo.dir().absPath()<<endl; DEBUGKPILOT<<"txtinfo.dir="<<txtinfo.dir().absPath()<<endl; - QStringList txtfiles(txtinfo.dir().entryList(CSL1("*.txt"))); - QStringList converted_Files; + TQStringList txtfiles(txtinfo.dir().entryList(CSL1("*.txt"))); + TQStringList converted_Files; DEBUGKPILOT<<"Length of filename list: "<<txtfiles.size()<<endl; - for ( QStringList::Iterator it = txtfiles.begin(); it != txtfiles.end(); ++it ) + for ( TQStringList::Iterator it = txtfiles.begin(); it != txtfiles.end(); ++it ) { - QString pdbfile=QFileInfo(*it).baseName(true)+CSL1(".pdb"); + TQString pdbfile=TQFileInfo(*it).baseName(true)+CSL1(".pdb"); DEBUGKPILOT<<"pdbfile="<<pdbfile<<", pdbdir="<<pdburl<<", txtfile="<<*it<<", txtdir="<<txturl<<endl; if (convertTXTtoPDB(txturl, *it, pdburl, pdbfile, &conv)) { @@ -444,19 +444,19 @@ void ConverterDlg::slotDirectories(bool dir) } } -bool ConverterDlg::convertTXTtoPDB(QString txtdir, QString txtfile, - QString pdbdir, QString pdbfile, DOCConverter*conv) +bool ConverterDlg::convertTXTtoPDB(TQString txtdir, TQString txtfile, + TQString pdbdir, TQString pdbfile, DOCConverter*conv) { FUNCTIONSETUP; bool res=false; - QFileInfo dbfileinfo(pdbdir, pdbfile); + TQFileInfo dbfileinfo(pdbdir, pdbfile); DEBUGKPILOT<<"Working on file "<<pdbfile<<endl; if (!dbfileinfo.exists() || !askOverwrite || (KMessageBox::Yes==KMessageBox::questionYesNo(this, i18n("<qt>The database file <em>%1</em> already exists. Overwrite it?</qt>") - .arg(dbfileinfo.filePath()), QString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) )) + .arg(dbfileinfo.filePath()), TQString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) )) { - PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, QFileInfo(pdbfile).baseName(), false); + PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, TQFileInfo(pdbfile).baseName(), false); if (pdbdb) { if (!pdbdb->isOpen()) @@ -489,19 +489,19 @@ bool ConverterDlg::convertTXTtoPDB(QString txtdir, QString txtfile, return res; } -bool ConverterDlg::convertPDBtoTXT(QString pdbdir, QString pdbfile, - QString txtdir, QString txtfile, DOCConverter*conv) +bool ConverterDlg::convertPDBtoTXT(TQString pdbdir, TQString pdbfile, + TQString txtdir, TQString txtfile, DOCConverter*conv) { FUNCTIONSETUP; bool res=false; - QFileInfo txtfileinfo(txtdir, txtfile); + TQFileInfo txtfileinfo(txtdir, txtfile); DEBUGKPILOT<<"Working on file "<<txtfile<<endl; if (!txtfileinfo.exists() || !askOverwrite || (KMessageBox::Yes==KMessageBox::questionYesNo(this, i18n("<qt>The text file <em>%1</em> already exists. Overwrite it?</qt>") - .arg(txtfileinfo.filePath()), QString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) )) + .arg(txtfileinfo.filePath()), TQString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) )) { - PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, QFileInfo(pdbfile).baseName(), false); + PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, TQFileInfo(pdbfile).baseName(), false); if (pdbdb) { if (pdbdb->isOpen()) diff --git a/kpilot/conduits/docconduit/kpalmdoc_dlg.h b/kpilot/conduits/docconduit/kpalmdoc_dlg.h index 410b24568..5e9202b00 100644 --- a/kpilot/conduits/docconduit/kpalmdoc_dlg.h +++ b/kpilot/conduits/docconduit/kpalmdoc_dlg.h @@ -37,7 +37,7 @@ class ConverterDlg : public KDialogBase Q_OBJECT public: - ConverterDlg( QWidget *parent=0, const QString& caption=0); + ConverterDlg( TQWidget *parent=0, const TQString& caption=0); ~ConverterDlg(); protected slots: @@ -51,10 +51,10 @@ protected: void readSettings(); // These two functions convert one single file to or from a pdb database - bool convertTXTtoPDB(QString txtdir, QString txtfile, - QString pdbdir, QString pdbfile, DOCConverter*conv); - bool convertPDBtoTXT(QString pdbdir, QString pdbfile, - QString txtdir, QString txtfile, DOCConverter*conv); + bool convertTXTtoPDB(TQString txtdir, TQString txtfile, + TQString pdbdir, TQString pdbfile, DOCConverter*conv); + bool convertPDBtoTXT(TQString pdbdir, TQString pdbfile, + TQString txtdir, TQString txtfile, DOCConverter*conv); // The actual dialog widget (designer created) holding all controls diff --git a/kpilot/conduits/docconduit/pilotDOCEntry.h b/kpilot/conduits/docconduit/pilotDOCEntry.h index b1b9ba45b..4ecaf19a9 100644 --- a/kpilot/conduits/docconduit/pilotDOCEntry.h +++ b/kpilot/conduits/docconduit/pilotDOCEntry.h @@ -48,11 +48,11 @@ public: PilotDOCEntry & operator=(const PilotDOCEntry & e); - QString getText() { + TQString getText() { fText.Decompress(); - return QString::fromLatin1((const char *) fText.text()); + return TQString::fromLatin1((const char *) fText.text()); }; - void setText(QString newtext, bool compressed = false) { + void setText(TQString newtext, bool compressed = false) { fText.setText((const unsigned char *) newtext.latin1(), newtext.length(), compressed); }; diff --git a/kpilot/conduits/knotes/knotes-action.cc b/kpilot/conduits/knotes/knotes-action.cc index 905e5ef39..ca3291321 100644 --- a/kpilot/conduits/knotes/knotes-action.cc +++ b/kpilot/conduits/knotes/knotes-action.cc @@ -29,8 +29,8 @@ #include "options.h" -#include <qmap.h> -#include <qtimer.h> +#include <tqmap.h> +#include <tqtimer.h> #include <kapplication.h> @@ -63,8 +63,8 @@ unsigned long version_conduit_knotes = Pilot::PLUGIN_API; } -typedef QString KNoteID_t; -typedef const QString &KNoteID_pt; +typedef TQString KNoteID_t; +typedef const TQString &KNoteID_pt; class NoteAndMemo { @@ -79,21 +79,21 @@ public: int memo() const { return memoId; } ; KNoteID_t note() const { return noteId; } ; inline bool valid() const { return (memoId>0) && (!noteId.isEmpty()) ; } ; - QString toString() const { return CSL1("<%1,%2>").arg(noteId).arg(memoId); } ; + TQString toString() const { return CSL1("<%1,%2>").arg(noteId).arg(memoId); } ; - static NoteAndMemo findNote(const QValueList<NoteAndMemo> &,KNoteID_pt note); - static NoteAndMemo findMemo(const QValueList<NoteAndMemo> &,int memo); + static NoteAndMemo findNote(const TQValueList<NoteAndMemo> &,KNoteID_pt note); + static NoteAndMemo findMemo(const TQValueList<NoteAndMemo> &,int memo); protected: KNoteID_t noteId; int memoId; } ; -NoteAndMemo NoteAndMemo::findNote(const QValueList<NoteAndMemo> &l ,KNoteID_pt note) +NoteAndMemo NoteAndMemo::findNote(const TQValueList<NoteAndMemo> &l ,KNoteID_pt note) { FUNCTIONSETUP; - for (QValueList<NoteAndMemo>::ConstIterator it = l.begin(); + for (TQValueList<NoteAndMemo>::ConstIterator it = l.begin(); it != l.end(); ++it) { @@ -103,11 +103,11 @@ NoteAndMemo NoteAndMemo::findNote(const QValueList<NoteAndMemo> &l ,KNoteID_pt n return NoteAndMemo(); } -NoteAndMemo NoteAndMemo::findMemo(const QValueList<NoteAndMemo> &l , int memo) +NoteAndMemo NoteAndMemo::findMemo(const TQValueList<NoteAndMemo> &l , int memo) { FUNCTIONSETUP; - for (QValueList<NoteAndMemo>::ConstIterator it =l.begin(); + for (TQValueList<NoteAndMemo>::ConstIterator it =l.begin(); it != l.end(); ++it) { @@ -158,7 +158,7 @@ public: //KNotesIface_stub *fKNotes; // The timer for invoking process() to do some more work. - QTimer *fTimer; + TQTimer *fTimer; // The database we're working with (MemoDB) // PilotSerialDatabase *fDatabase; @@ -175,7 +175,7 @@ public: // We need to translate between the ids that KNotes uses and // Pilot id's, so we make a list of pairs. // - QValueList<NoteAndMemo> fIdList; + TQValueList<NoteAndMemo> fIdList; // Setting to delete a KNote when the corresponding memo // has been deleted. @@ -185,7 +185,7 @@ public: KNotesAction::KNotesAction(KPilotLink *o, - const char *n, const QStringList &a) : + const char *n, const TQStringList &a) : ConduitAction(o,n ? n : "knotes-conduit",a), fP(new KNotesActionPrivate) { @@ -220,7 +220,7 @@ KNotesAction::KNotesAction(KPilotLink *o, return true; } - QString e; + TQString e; if (!openKNotesResource()) return false; // Database names seem to be latin1 @@ -233,13 +233,13 @@ KNotesAction::KNotesAction(KPilotLink *o, return false; } - fP->fTimer = new QTimer(this); + fP->fTimer = new TQTimer(this); fActionStatus = Init; // this is not needed. As it is done in the initstate in process(); // resetIndexes(); - connect(fP->fTimer,SIGNAL(timeout()),SLOT(process())); + connect(fP->fTimer,TQT_SIGNAL(timeout()),TQT_SLOT(process())); fP->fTimer->start(0,false); return true; @@ -257,7 +257,7 @@ bool KNotesAction::openKNotesResource() KConfig korgcfg( locate( "config", CSL1("korganizerrc") ) ); korgcfg.setGroup( "Time & Date" ); - QString tz(korgcfg.readEntry( "TimeZoneId" ) ); + TQString tz(korgcfg.readEntry( "TimeZoneId" ) ); fP->fNotesResource = new KCal::CalendarLocal(tz); KURL mURL = KGlobal::dirs()->saveLocation( "data", "knotes/" ) + "notes.ics"; @@ -395,8 +395,8 @@ void KNotesAction::getConfigInfo() fP->fDeleteNoteForMemo = KNotesConduitSettings::deleteNoteForMemo(); - QValueList<KNoteID_t> notes; - QValueList<int> memos; + TQValueList<KNoteID_t> notes; + TQValueList<int> memos; // Make this match the type of KNoteID_t ! notes=KNotesConduitSettings::noteIds(); @@ -416,8 +416,8 @@ void KNotesAction::getConfigInfo() setFirstSync( true ); } - QValueList<KNoteID_t>::ConstIterator iNotes = notes.begin(); - QValueList<int>::ConstIterator iMemos = memos.begin(); + TQValueList<KNoteID_t>::ConstIterator iNotes = notes.begin(); + TQValueList<int>::ConstIterator iMemos = memos.begin(); while((iNotes != notes.end()) && (iMemos != memos.end())) { @@ -465,7 +465,7 @@ bool KNotesAction::modifyNoteOnPilot() if (nm.valid()) { - QString text,title,body; + TQString text,title,body; title = fP->fIndex.data(); body = fP->fKNotes->text(fP->fIndex.key()); if (body.startsWith(title)) @@ -517,7 +517,7 @@ bool KNotesAction::deleteNoteOnPilot() FUNCTIONSETUP; /* - QValueList<NoteAndMemo>::Iterator i = fP->fIdList.begin(); + TQValueList<NoteAndMemo>::Iterator i = fP->fIdList.begin(); while ( i != fP->fIdList.end() ) { // TODO DCOP_REMOVE @@ -732,7 +732,7 @@ int KNotesAction::addNoteToPilot() << endl; #endif - QString text = j->summary() + CSL1("\n"); + TQString text = j->summary() + CSL1("\n"); text.append( j->description() ); //TODO DCOP_REMOVAL //text.append(fP->fKNotes->text(fP->fIndex.key())); @@ -775,10 +775,10 @@ void KNotesAction::cleanupMemos() << endl; #endif - QValueList<KNoteID_t> notes; - QValueList<int> memos; + TQValueList<KNoteID_t> notes; + TQValueList<int> memos; - for (QValueList<NoteAndMemo>::ConstIterator i = + for (TQValueList<NoteAndMemo>::ConstIterator i = fP->fIdList.begin(); i!=fP->fIdList.end(); ++i) @@ -846,7 +846,7 @@ void KNotesAction::cleanupMemos() } -/* virtual */ QString KNotesAction::statusString() const +/* virtual */ TQString KNotesAction::statusString() const { switch(fActionStatus) { diff --git a/kpilot/conduits/knotes/knotes-action.h b/kpilot/conduits/knotes/knotes-action.h index 695e90747..eb490e0a7 100644 --- a/kpilot/conduits/knotes/knotes-action.h +++ b/kpilot/conduits/knotes/knotes-action.h @@ -41,7 +41,7 @@ public: KNotesAction( KPilotLink *o, const char *n = 0L, - const QStringList &a = QStringList() ); + const TQStringList &a = TQStringList() ); virtual ~KNotesAction(); enum Status { Init, @@ -51,7 +51,7 @@ public: MemosToKNotes, Cleanup, Done } ; - virtual QString statusString() const; + virtual TQString statusString() const; protected: virtual bool exec(); diff --git a/kpilot/conduits/knotes/knotes-factory.cc b/kpilot/conduits/knotes/knotes-factory.cc index a919e1ed1..9601e81e5 100644 --- a/kpilot/conduits/knotes/knotes-factory.cc +++ b/kpilot/conduits/knotes/knotes-factory.cc @@ -57,7 +57,7 @@ void *init_conduit_knotes() /* static */ KAboutData *KNotesConduitFactory::fAbout = 0L; -KNotesConduitFactory::KNotesConduitFactory(QObject *p, const char *n) : +KNotesConduitFactory::KNotesConduitFactory(TQObject *p, const char *n) : KLibFactory(p,n) { FUNCTIONSETUP; @@ -85,10 +85,10 @@ KNotesConduitFactory::~KNotesConduitFactory() KPILOT_DELETE(fAbout); } -/* virtual */ QObject *KNotesConduitFactory::createObject( QObject *p, +/* virtual */ TQObject *KNotesConduitFactory::createObject( TQObject *p, const char *n, const char *c, - const QStringList &a) + const TQStringList &a) { FUNCTIONSETUP; @@ -101,7 +101,7 @@ KNotesConduitFactory::~KNotesConduitFactory() if (qstrcmp(c,"ConduitConfigBase")==0) { - QWidget *w = dynamic_cast<QWidget *>(p); + TQWidget *w = dynamic_cast<TQWidget *>(p); if (w) { return new KNotesConfigBase(w,0L); diff --git a/kpilot/conduits/knotes/knotes-factory.h b/kpilot/conduits/knotes/knotes-factory.h index 94ad44429..02b0f6102 100644 --- a/kpilot/conduits/knotes/knotes-factory.h +++ b/kpilot/conduits/knotes/knotes-factory.h @@ -39,7 +39,7 @@ class KNotesConduitFactory : public KLibFactory Q_OBJECT public: - KNotesConduitFactory(QObject * = 0L,const char * = 0L); + KNotesConduitFactory(TQObject * = 0L,const char * = 0L); virtual ~KNotesConduitFactory(); static KAboutData *about() { return fAbout; } ; @@ -50,10 +50,10 @@ public: // break its value. We store group and entry keys in here. protected: - virtual QObject* createObject( QObject* parent = 0, + virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList() ); + const char* classname = "TQObject", + const TQStringList &args = TQStringList() ); private: KInstance *fInstance; static KAboutData *fAbout; diff --git a/kpilot/conduits/knotes/knotes-setup.cc b/kpilot/conduits/knotes/knotes-setup.cc index da8b31c48..1127011ad 100644 --- a/kpilot/conduits/knotes/knotes-setup.cc +++ b/kpilot/conduits/knotes/knotes-setup.cc @@ -28,10 +28,10 @@ #include "options.h" -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qmap.h> -#include <qtimer.h> +#include <tqtabwidget.h> +#include <tqcheckbox.h> +#include <tqmap.h> +#include <tqtimer.h> #include <kapplication.h> #include <kconfig.h> @@ -43,19 +43,19 @@ #include "knotesconduitSettings.h" -KNotesConfigBase::KNotesConfigBase(QWidget *w, const char *n) : +KNotesConfigBase::KNotesConfigBase(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(0L) { fConfigWidget = new KNotesWidget(w); ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,KNotesConduitFactory::about()); fWidget = fConfigWidget; - QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(clicked()), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fSuppressConfirm,SIGNAL(clicked()), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(toggled(bool)), - fConfigWidget->fSuppressConfirm,SLOT(setEnabled(bool))); + TQObject::connect(fConfigWidget->fDeleteNoteForMemo,TQT_SIGNAL(clicked()), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fSuppressConfirm,TQT_SIGNAL(clicked()), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fDeleteNoteForMemo,TQT_SIGNAL(toggled(bool)), + fConfigWidget->fSuppressConfirm,TQT_SLOT(setEnabled(bool))); fConduitName=i18n("KNotes"); } @@ -76,7 +76,7 @@ void KNotesConfigBase::load() unmodified(); } -/* static */ ConduitConfigBase *KNotesConfigBase::create(QWidget *w, const char *n) +/* static */ ConduitConfigBase *KNotesConfigBase::create(TQWidget *w, const char *n) { return new KNotesConfigBase(w,n); } diff --git a/kpilot/conduits/knotes/knotes-setup.h b/kpilot/conduits/knotes/knotes-setup.h index 9e7603df7..652f22238 100644 --- a/kpilot/conduits/knotes/knotes-setup.h +++ b/kpilot/conduits/knotes/knotes-setup.h @@ -36,12 +36,12 @@ class KNotesWidget; class KNotesConfigBase : public ConduitConfigBase { public: - KNotesConfigBase(QWidget *parent, const char *name); + KNotesConfigBase(TQWidget *parent, const char *name); virtual void commit(); virtual void load(); - static ConduitConfigBase *create(QWidget *p, const char *n); + static ConduitConfigBase *create(TQWidget *p, const char *n); private: KNotesWidget *fConfigWidget; } ; diff --git a/kpilot/conduits/malconduit/mal-conduit.cc b/kpilot/conduits/malconduit/mal-conduit.cc index 73a77a141..95c4d64b5 100644 --- a/kpilot/conduits/malconduit/mal-conduit.cc +++ b/kpilot/conduits/malconduit/mal-conduit.cc @@ -34,7 +34,7 @@ #include "options.h" -#include <qregexp.h> +#include <tqregexp.h> #include <kconfig.h> #include <kdebug.h> @@ -109,7 +109,7 @@ static int32 cbItem (void */*out*/, MALConduit::MALConduit(KPilotLink * o, const char *n, - const QStringList & a) : + const TQStringList & a) : ConduitAction(o, n, a) { FUNCTIONSETUP; @@ -144,7 +144,7 @@ void MALConduit::readConfig() void MALConduit::saveConfig() { FUNCTIONSETUP; - MALConduitSettings::setLastMALSync( QDateTime::currentDateTime() ); + MALConduitSettings::setLastMALSync( TQDateTime::currentDateTime() ); MALConduitSettings::self()->writeConfig(); } @@ -152,8 +152,8 @@ void MALConduit::saveConfig() bool MALConduit::skip() { - QDateTime now=QDateTime::currentDateTime(); - QDateTime lastSync=MALConduitSettings::lastMALSync(); + TQDateTime now=TQDateTime::currentDateTime(); + TQDateTime lastSync=MALConduitSettings::lastMALSync(); if (!lastSync.isValid() || !now.isValid()) return false; @@ -203,9 +203,9 @@ bool MALConduit::skip() return false; } - QString proxyServer( MALConduitSettings::proxyServer() ); + TQString proxyServer( MALConduitSettings::proxyServer() ); int proxyPort( MALConduitSettings::proxyPort() ); - QString syncMessage; + TQString syncMessage; bool canContinue = true; // Set all proxy settings switch (MALConduitSettings::proxyType()) @@ -222,7 +222,7 @@ bool MALConduit::skip() #ifdef DEBUG DEBUGKPILOT<<" Using HTTP proxy server \""<<proxyServer<< "\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<< - ", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?QString("not "):QString())<<"set" + ", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?TQString("not "):TQString())<<"set" <<endl; #endif #ifdef LIBMAL20 @@ -261,7 +261,7 @@ bool MALConduit::skip() } syncMessage = i18n("Using SOCKS proxy: %1").arg(proxyServer); #ifdef DEBUG - DEBUGKPILOT<<" Using SOCKS proxy server \""<<proxyServer<<"\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<<", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?QString("not "):QString() )<<"set"<<endl; + DEBUGKPILOT<<" Using SOCKS proxy server \""<<proxyServer<<"\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<<", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?TQString("not "):TQString() )<<"set"<<endl; #endif #ifdef LIBMAL20 setSocksProxy( const_cast<char *>(proxyServer.latin1()) ); @@ -304,13 +304,13 @@ bool MALConduit::skip() return delayDone(); } -void MALConduit::printLogMessage(QString msg) +void MALConduit::printLogMessage(TQString msg) { FUNCTIONSETUP; // Remove the pseudo-progressbar: - QString newmsg(msg); - newmsg.replace( QRegExp("^\\s*\\.*\\s*"), ""); - newmsg.replace( QRegExp("\\s*\\.*\\s*$"), ""); + TQString newmsg(msg); + newmsg.replace( TQRegExp("^\\s*\\.*\\s*"), ""); + newmsg.replace( TQRegExp("\\s*\\.*\\s*$"), ""); if (newmsg.length()>0) { emit logMessage(newmsg); diff --git a/kpilot/conduits/malconduit/mal-conduit.h b/kpilot/conduits/malconduit/mal-conduit.h index 83f72ace1..3f5c14a04 100644 --- a/kpilot/conduits/malconduit/mal-conduit.h +++ b/kpilot/conduits/malconduit/mal-conduit.h @@ -42,9 +42,9 @@ public: MALConduit( KPilotLink *o, const char *n = 0L, - const QStringList &a = QStringList() ); + const TQStringList &a = TQStringList() ); virtual ~MALConduit(); - void printLogMessage(QString msg); + void printLogMessage(TQString msg); virtual bool exec(); protected: diff --git a/kpilot/conduits/malconduit/mal-factory.cc b/kpilot/conduits/malconduit/mal-factory.cc index f9a8bcafb..3e363d269 100644 --- a/kpilot/conduits/malconduit/mal-factory.cc +++ b/kpilot/conduits/malconduit/mal-factory.cc @@ -60,7 +60,7 @@ unsigned long version_conduit_mal = Pilot::PLUGIN_API; // KAboutData *MALConduitFactory::fAbout = 0L; -MALConduitFactory::MALConduitFactory(QObject *p, const char *n) : +MALConduitFactory::MALConduitFactory(TQObject *p, const char *n) : KLibFactory(p,n) { FUNCTIONSETUP; @@ -90,10 +90,10 @@ MALConduitFactory::~MALConduitFactory() KPILOT_DELETE(fAbout); } -/* virtual */ QObject *MALConduitFactory::createObject( QObject *p, +/* virtual */ TQObject *MALConduitFactory::createObject( TQObject *p, const char *n, const char *c, - const QStringList &a) + const TQStringList &a) { FUNCTIONSETUP; @@ -106,7 +106,7 @@ MALConduitFactory::~MALConduitFactory() if (qstrcmp(c,"ConduitConfigBase")==0) { - QWidget *w = dynamic_cast<QWidget *>(p); + TQWidget *w = dynamic_cast<TQWidget *>(p); if (w) { diff --git a/kpilot/conduits/malconduit/mal-factory.h b/kpilot/conduits/malconduit/mal-factory.h index 82631e1ac..a15316381 100644 --- a/kpilot/conduits/malconduit/mal-factory.h +++ b/kpilot/conduits/malconduit/mal-factory.h @@ -42,16 +42,16 @@ class MALConduitFactory : public KLibFactory Q_OBJECT public: - MALConduitFactory(QObject * = 0L,const char * = 0L); + MALConduitFactory(TQObject * = 0L,const char * = 0L); virtual ~MALConduitFactory(); static KAboutData *about() { return fAbout; } ; protected: - virtual QObject* createObject( QObject* parent = 0, + virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList() ); + const char* classname = "TQObject", + const TQStringList &args = TQStringList() ); private: KInstance *fInstance; static KAboutData *fAbout; diff --git a/kpilot/conduits/malconduit/mal-setup.cc b/kpilot/conduits/malconduit/mal-setup.cc index d2652b035..1d1f89ff2 100644 --- a/kpilot/conduits/malconduit/mal-setup.cc +++ b/kpilot/conduits/malconduit/mal-setup.cc @@ -32,11 +32,11 @@ #include "options.h" -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kcombobox.h> #include <knuminput.h> @@ -53,7 +53,7 @@ #include "malconduitSettings.h" -MALWidgetSetup::MALWidgetSetup(QWidget *w, const char *n) : +MALWidgetSetup::MALWidgetSetup(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(new MALWidget(w)) { @@ -65,21 +65,21 @@ MALWidgetSetup::MALWidgetSetup(QWidget *w, const char *n) : fConfigWidget->tabWidget->adjustSize(); fConfigWidget->resize(fConfigWidget->tabWidget->size()); -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM( syncTime, SIGNAL(clicked(int)) ); - CM( proxyType, SIGNAL(clicked(int)) ); - - CM( proxyServerName, SIGNAL(textChanged(const QString &)) ); - CM( proxyCustomPortCheck, SIGNAL(clicked()) ); - CM( proxyCustomPort, SIGNAL(valueChanged(int)) ); - CM( proxyUserName, SIGNAL(textChanged(const QString &)) ); - CM( proxyPassword, SIGNAL(textChanged(const QString &)) ); - - CM( malServerName, SIGNAL(textChanged(const QString &)) ); - CM( malCustomPortCheck, SIGNAL(clicked()) ); - CM( malCustomPort, SIGNAL(valueChanged(int)) ); - CM( malUserName, SIGNAL(textChanged(const QString &)) ); - CM( malPassword, SIGNAL(textChanged(const QString &)) ); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM( syncTime, TQT_SIGNAL(clicked(int)) ); + CM( proxyType, TQT_SIGNAL(clicked(int)) ); + + CM( proxyServerName, TQT_SIGNAL(textChanged(const TQString &)) ); + CM( proxyCustomPortCheck, TQT_SIGNAL(clicked()) ); + CM( proxyCustomPort, TQT_SIGNAL(valueChanged(int)) ); + CM( proxyUserName, TQT_SIGNAL(textChanged(const TQString &)) ); + CM( proxyPassword, TQT_SIGNAL(textChanged(const TQString &)) ); + + CM( malServerName, TQT_SIGNAL(textChanged(const TQString &)) ); + CM( malCustomPortCheck, TQT_SIGNAL(clicked()) ); + CM( malCustomPort, TQT_SIGNAL(valueChanged(int)) ); + CM( malUserName, TQT_SIGNAL(textChanged(const TQString &)) ); + CM( malPassword, TQT_SIGNAL(textChanged(const TQString &)) ); #undef CM } @@ -150,7 +150,7 @@ MALWidgetSetup::~MALWidgetSetup() fConfigWidget->proxyCustomPort->setValue(proxyPortNr); } fConfigWidget->proxyUserName->setText(MALConduitSettings::proxyUser()); - fConfigWidget->proxyPassword->setText(QString::null); + fConfigWidget->proxyPassword->setText(TQString::null); fConfigWidget->proxyPassword->insert(MALConduitSettings::proxyPassword()); #ifdef DEBUG @@ -178,7 +178,7 @@ MALWidgetSetup::~MALWidgetSetup() unmodified(); } -/* static */ ConduitConfigBase *MALWidgetSetup::create(QWidget *w, const char *n) +/* static */ ConduitConfigBase *MALWidgetSetup::create(TQWidget *w, const char *n) { return new MALWidgetSetup(w,n); } diff --git a/kpilot/conduits/malconduit/mal-setup.h b/kpilot/conduits/malconduit/mal-setup.h index 78b6a0ee2..6a6337496 100644 --- a/kpilot/conduits/malconduit/mal-setup.h +++ b/kpilot/conduits/malconduit/mal-setup.h @@ -41,11 +41,11 @@ class MALWidgetSetup : public ConduitConfigBase { Q_OBJECT public: - MALWidgetSetup(QWidget *,const char *); + MALWidgetSetup(TQWidget *,const char *); virtual ~MALWidgetSetup(); virtual void load(); virtual void commit(); - static ConduitConfigBase *create(QWidget *, const char *); + static ConduitConfigBase *create(TQWidget *, const char *); private: MALWidget *fConfigWidget; } ; diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.cc b/kpilot/conduits/memofileconduit/memofile-conduit.cc index 1dc5fe386..7c2402eaf 100644 --- a/kpilot/conduits/memofileconduit/memofile-conduit.cc +++ b/kpilot/conduits/memofileconduit/memofile-conduit.cc @@ -41,9 +41,9 @@ #include "pilotMemo.h" -#include <qfile.h> -#include <qdir.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqtextcodec.h> #include <kconfig.h> #include <kdebug.h> @@ -60,9 +60,9 @@ */ MemofileConduit::MemofileConduit(KPilotLink *d, const char *n, - const QStringList &l) : + const TQStringList &l) : ConduitAction(d,n,l), - _DEFAULT_MEMODIR(QDir::homeDirPath() + CSL1("/MyMemos")), + _DEFAULT_MEMODIR(TQDir::homeDirPath() + CSL1("/MyMemos")), fMemoAppInfo(0L), _memofiles(0L) { @@ -145,7 +145,7 @@ bool MemofileConduit::readConfig() { FUNCTIONSETUP; - QString dir(MemofileConduitSettings::directory()); + TQString dir(MemofileConduitSettings::directory()); if (dir.isEmpty()) { dir = _DEFAULT_MEMODIR; @@ -235,7 +235,7 @@ bool MemofileConduit::loadPilotCategories() fCategories.clear(); - QString _category_name; + TQString _category_name; int _category_id=0; int _category_num=0; @@ -378,7 +378,7 @@ void MemofileConduit::listPilotMemos() PilotMemo *memo; for ( memo = fMemoList.first(); memo; memo = fMemoList.next() ) { - QString _category_name = fCategories[memo->category()]; + TQString _category_name = fCategories[memo->category()]; DEBUGKPILOT << fConduitName << ": listing record id: [" << memo->id() @@ -421,7 +421,7 @@ bool MemofileConduit::copyPCToHH() _memofiles->load(true); - QPtrList<Memofile> memofiles = _memofiles->getAll(); + TQPtrList<Memofile> memofiles = _memofiles->getAll(); Memofile * memofile; @@ -484,7 +484,7 @@ int MemofileConduit::writeToPilot(Memofile * memofile) memofile->setID(newid); - QString status; + TQString status; if (oldid <=0) { fCtrHH->created(); status = "new to pilot"; @@ -534,7 +534,7 @@ bool MemofileConduit::sync() _memofiles->addModifiedMemo(memo); } - QPtrList<Memofile> memofiles = _memofiles->getModified(); + TQPtrList<Memofile> memofiles = _memofiles->getModified(); Memofile *memofile; for ( memofile = memofiles.first(); memofile; memofile = memofiles.next() ) { diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.h b/kpilot/conduits/memofileconduit/memofile-conduit.h index 08fdbd0f7..c79506611 100644 --- a/kpilot/conduits/memofileconduit/memofile-conduit.h +++ b/kpilot/conduits/memofileconduit/memofile-conduit.h @@ -40,7 +40,7 @@ Q_OBJECT public: MemofileConduit(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~MemofileConduit(); protected: @@ -57,7 +57,7 @@ private: bool _sync_private; PilotMemoInfo *fMemoAppInfo; - QPtrList<PilotMemo> fMemoList; + TQPtrList<PilotMemo> fMemoList; // our categories MemoCategoryMap fCategories; diff --git a/kpilot/conduits/memofileconduit/memofile-factory.cc b/kpilot/conduits/memofileconduit/memofile-factory.cc index e373a0185..795edc33d 100644 --- a/kpilot/conduits/memofileconduit/memofile-factory.cc +++ b/kpilot/conduits/memofileconduit/memofile-factory.cc @@ -28,9 +28,9 @@ #include "options.h" -#include <qtabwidget.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqtabwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kconfig.h> #include <kinstance.h> @@ -46,14 +46,14 @@ class MemofileConduitConfig : public ConduitConfigBase { public: - MemofileConduitConfig(QWidget *parent=0L, const char *n=0L); + MemofileConduitConfig(TQWidget *parent=0L, const char *n=0L); virtual void commit(); virtual void load(); protected: MemofileWidget *fConfigWidget; } ; -MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) : +MemofileConduitConfig::MemofileConduitConfig(TQWidget *p, const char *n) : ConduitConfigBase(p,n), fConfigWidget(new MemofileWidget(p)) { @@ -72,10 +72,10 @@ MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,about); fWidget=fConfigWidget; - QObject::connect(fConfigWidget->fDirectory,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fSyncPrivate,SIGNAL(toggled(bool)), - this,SLOT(modified())); + TQObject::connect(fConfigWidget->fDirectory,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fSyncPrivate,TQT_SIGNAL(toggled(bool)), + this,TQT_SLOT(modified())); } diff --git a/kpilot/conduits/memofileconduit/memofile.cc b/kpilot/conduits/memofileconduit/memofile.cc index 1428c487d..3a7ff6c3a 100644 --- a/kpilot/conduits/memofileconduit/memofile.cc +++ b/kpilot/conduits/memofileconduit/memofile.cc @@ -27,7 +27,7 @@ #include "memofile.h" -Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory) : +Memofile::Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory) : PilotMemo(memo,memo->text()), _categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory) { _lastModified = 0; @@ -36,7 +36,7 @@ Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QSt } Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, - QString categoryName, QString fileName, QString baseDirectory) : + TQString categoryName, TQString fileName, TQString baseDirectory) : PilotMemo(), _categoryName(categoryName), _filename(fileName),_baseDirectory(baseDirectory) { @@ -47,7 +47,7 @@ Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size _modified = _modifiedByPalm = false; } -Memofile::Memofile(int category, QString categoryName, QString fileName, QString baseDirectory) : +Memofile::Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory) : PilotMemo(), _categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory) { @@ -70,7 +70,7 @@ bool Memofile::load() return false; } - QFile f( filenameAbs() ); + TQFile f( filenameAbs() ); if ( !f.open( IO_ReadOnly ) ) { DEBUGKPILOT << fname << ": Couldn't open file: [" << filenameAbs() << "] to read. " @@ -78,9 +78,9 @@ bool Memofile::load() return false; } - QTextStream ts( &f ); + TQTextStream ts( &f ); - QString text,title,body; + TQString text,title,body; title = filename(); body = ts.read(); @@ -136,7 +136,7 @@ bool Memofile::deleteFile() FUNCTIONSETUP; DEBUGKPILOT << fname << ": deleting file: [" << filenameAbs() << "]." << endl; - return QFile::remove(filenameAbs()); + return TQFile::remove(filenameAbs()); } @@ -156,7 +156,7 @@ bool Memofile::saveFile() << filenameAbs() << "]" << endl; - QFile f( filenameAbs() ); + TQFile f( filenameAbs() ); if ( !f.open( IO_WriteOnly ) ) { DEBUGKPILOT << fname << ": Couldn't open file: [" << filenameAbs() << "] to write your memo to. " @@ -164,7 +164,7 @@ bool Memofile::saveFile() return false; } - QTextStream stream(&f); + TQTextStream stream(&f); stream << text() << endl; f.close(); @@ -226,14 +226,14 @@ bool Memofile::isModifiedBySize() uint Memofile::getFileLastModified() { - QFileInfo f = QFileInfo(filenameAbs()); + TQFileInfo f = TQFileInfo(filenameAbs()); uint lastModifiedTime = f.lastModified().toTime_t(); return lastModifiedTime; } uint Memofile::getFileSize() { - QFileInfo f = QFileInfo(filenameAbs()); + TQFileInfo f = TQFileInfo(filenameAbs()); uint size = f.size(); return size; } diff --git a/kpilot/conduits/memofileconduit/memofile.h b/kpilot/conduits/memofileconduit/memofile.h index 27931cdfe..4bd5fb776 100644 --- a/kpilot/conduits/memofileconduit/memofile.h +++ b/kpilot/conduits/memofileconduit/memofile.h @@ -40,10 +40,10 @@ #include <pi-memo.h> -#include <qfile.h> -#include <qdir.h> -#include <qtextstream.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqtextstream.h> +#include <tqtextcodec.h> #include "pilotMemo.h" @@ -55,9 +55,9 @@ class Memofile : public PilotMemo { public: - Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory); - Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, QString categoryName, QString filename, QString baseDirectory); - Memofile(int category, QString categoryName, QString fileName, QString baseDirectory); + Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory); + Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, TQString categoryName, TQString filename, TQString baseDirectory); + Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory); uint lastModified() const { return _lastModified; } ; uint size() const { return _size; } ; @@ -72,30 +72,30 @@ class Memofile : public PilotMemo bool load(); - bool fileExists() { return QFile::exists(filenameAbs()); } ; + bool fileExists() { return TQFile::exists(filenameAbs()); } ; void setID(recordid_t id); bool save(); bool deleteFile(); - QString toString() { - return CSL1("id: [") + QString::number(id()) + TQString toString() { + return CSL1("id: [") + TQString::number(id()) + CSL1("], category:[") + _categoryName + CSL1("], filename: [") + _filename + CSL1("]"); } ; - const QString & getCategoryName() { return _categoryName; } ; - const QString & getFilename() { return _filename; } ; - const QString & filename() { return _filename; } ; + const TQString & getCategoryName() { return _categoryName; } ; + const TQString & getFilename() { return _filename; } ; + const TQString & filename() { return _filename; } ; private: bool saveFile(); bool isModifiedByTimestamp(); bool isModifiedBySize(); - QString filenameAbs() { return dirName() + filename(); } ; - QString dirName() { return _baseDirectory + QDir::separator() + _categoryName + QDir::separator(); } ; - bool setCategory(const QString &label); + TQString filenameAbs() { return dirName() + filename(); } ; + TQString dirName() { return _baseDirectory + TQDir::separator() + _categoryName + TQDir::separator(); } ; + bool setCategory(const TQString &label); uint getFileLastModified(); uint getFileSize(); @@ -105,9 +105,9 @@ class Memofile : public PilotMemo uint _lastModified; uint _size; - QString _categoryName; - QString _filename; - QString _baseDirectory; + TQString _categoryName; + TQString _filename; + TQString _baseDirectory; } ; #endif diff --git a/kpilot/conduits/memofileconduit/memofiles.cc b/kpilot/conduits/memofileconduit/memofiles.cc index 2846d448b..db3d8cacc 100644 --- a/kpilot/conduits/memofileconduit/memofiles.cc +++ b/kpilot/conduits/memofileconduit/memofiles.cc @@ -30,17 +30,17 @@ #include "memofiles.h" #include "memofile.h" -QString Memofiles::FIELD_SEP = CSL1("\t"); +TQString Memofiles::FIELD_SEP = CSL1("\t"); Memofiles::Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo, - QString & baseDirectory, CUDCounter &fCtrPC) : + TQString & baseDirectory, CUDCounter &fCtrPC) : _categories(categories), _memoAppInfo(appInfo), _baseDirectory(baseDirectory), _cudCounter(fCtrPC) { FUNCTIONSETUP; _memofiles.clear(); - _memoMetadataFile = _baseDirectory + QDir::separator() + CSL1(".ids"); - _categoryMetadataFile = _baseDirectory + QDir::separator() + CSL1(".categories"); + _memoMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".ids"); + _categoryMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".categories"); _memofiles.setAutoDelete(true); _ready = ensureDirectoryReady(); @@ -67,10 +67,10 @@ void Memofiles::load (bool loadAll) for ( it = _categories.begin(); it != _categories.end(); ++it ) { int category = it.key(); - QString categoryName = it.data(); - QString categoryDirname = _baseDirectory + QDir::separator() + categoryName; + TQString categoryName = it.data(); + TQString categoryDirname = _baseDirectory + TQDir::separator() + categoryName; - QDir dir = QDir(categoryDirname); + TQDir dir = TQDir(categoryDirname); if (! dir.exists() ) { DEBUGKPILOT << fname << ": category directory: [" << categoryDirname @@ -79,11 +79,11 @@ void Memofiles::load (bool loadAll) } - QStringList entries = dir.entryList(QDir::Files); - QString file; - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { + TQStringList entries = dir.entryList(TQDir::Files); + TQString file; + for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { file = *it; - QFileInfo info(dir, file); + TQFileInfo info(dir, file); if(info.isFile() && info.isReadable()) { // DEBUGKPILOT << fname @@ -151,13 +151,13 @@ bool Memofiles::ensureDirectoryReady() int failures = 0; // now make sure that a directory for each category exists. - QString _category_name; - QString dir; + TQString _category_name; + TQString dir; MemoCategoryMap::Iterator it; for ( it = _categories.begin(); it != _categories.end(); ++it ) { _category_name = it.data(); - dir = _baseDirectory + QDir::separator() + _category_name; + dir = _baseDirectory + TQDir::separator() + _category_name; DEBUGKPILOT << fname << ": checking directory: [" << dir << "]" << endl; @@ -169,12 +169,12 @@ bool Memofiles::ensureDirectoryReady() return failures == 0; } -bool Memofiles::checkDirectory(QString & dir) +bool Memofiles::checkDirectory(TQString & dir) { FUNCTIONSETUP; // make sure that the directory we're asked to write to exists - QDir d(dir); - QFileInfo fid( dir ); + TQDir d(dir); + TQFileInfo fid( dir ); if ( ! fid.isDir() ) { @@ -212,15 +212,15 @@ void Memofiles::eraseLocalMemos () MemoCategoryMap::Iterator it; for ( it = _categories.begin(); it != _categories.end(); ++it ) { - QString dir = _baseDirectory + QDir::separator() + it.data(); + TQString dir = _baseDirectory + TQDir::separator() + it.data(); - if (!folderRemove(QDir(dir))) { + if (!folderRemove(TQDir(dir))) { DEBUGKPILOT << fname << ": couldn't erase all local memos from: [" << dir << "]." << endl; } } - QDir d(_baseDirectory); + TQDir d(_baseDirectory); d.remove(_memoMetadataFile); ensureDirectoryReady(); @@ -228,7 +228,7 @@ void Memofiles::eraseLocalMemos () _memofiles.clear(); } -void Memofiles::setPilotMemos (QPtrList<PilotMemo> & memos) +void Memofiles::setPilotMemos (TQPtrList<PilotMemo> & memos) { FUNCTIONSETUP; @@ -252,7 +252,7 @@ bool Memofiles::loadFromMetadata () _memofiles.clear(); - QFile f( _memoMetadataFile ); + TQFile f( _memoMetadataFile ); if ( !f.open( IO_ReadOnly ) ) { DEBUGKPILOT << fname << ": ooh, bad. couldn't open your memo-id file for reading." @@ -260,15 +260,15 @@ bool Memofiles::loadFromMetadata () return false; } - QTextStream t( &f ); + TQTextStream t( &f ); Memofile * memofile; while ( !t.atEnd() ) { - QString data = t.readLine(); + TQString data = t.readLine(); int errors = 0; bool ok; - QStringList fields = QStringList::split( FIELD_SEP, data ); + TQStringList fields = TQStringList::split( FIELD_SEP, data ); if ( fields.count() >= 4 ) { int id = fields[0].toInt( &ok ); if ( !ok ) @@ -282,7 +282,7 @@ bool Memofiles::loadFromMetadata () uint size = fields[3].toInt( &ok ); if ( !ok ) errors++; - QString filename = fields[4]; + TQString filename = fields[4]; if ( filename.isEmpty() ) errors++; @@ -331,7 +331,7 @@ Memofile * Memofiles::find (recordid_t id) } -Memofile * Memofiles::find (const QString & category, const QString & filename) +Memofile * Memofiles::find (const TQString & category, const TQString & filename) { Memofile * memofile; @@ -371,8 +371,8 @@ void Memofiles::addModifiedMemo (PilotMemo * memo) return; } - QString debug = CSL1(": adding a PilotMemo. id: [") - + QString::number(memo->id()) + CSL1("], title: [") + TQString debug = CSL1(": adding a PilotMemo. id: [") + + TQString::number(memo->id()) + CSL1("], title: [") + memo->getTitle() + CSL1("]. "); Memofile * memofile = find(memo->id()); @@ -400,11 +400,11 @@ void Memofiles::addModifiedMemo (PilotMemo * memo) } -QPtrList<Memofile> Memofiles::getModified () +TQPtrList<Memofile> Memofiles::getModified () { FUNCTIONSETUP; - QPtrList<Memofile> modList; + TQPtrList<Memofile> modList; modList.clear(); Memofile * memofile; @@ -441,8 +441,8 @@ bool Memofiles::saveMemoMetadata() << ": saving memo metadata to file: [" << _memoMetadataFile << "]" << endl; - QFile f( _memoMetadataFile ); - QTextStream stream(&f); + TQFile f( _memoMetadataFile ); + TQTextStream stream(&f); if( !f.open(IO_WriteOnly) ) { DEBUGKPILOT << fname @@ -484,8 +484,8 @@ MemoCategoryMap Memofiles::readCategoryMetadata() MemoCategoryMap map; map.clear(); - QFile f( _categoryMetadataFile ); - QTextStream stream(&f); + TQFile f( _categoryMetadataFile ); + TQTextStream stream(&f); if( !f.open(IO_ReadOnly) ) { DEBUGKPILOT << fname @@ -496,16 +496,16 @@ MemoCategoryMap Memofiles::readCategoryMetadata() while ( !stream.atEnd() ) { - QString data = stream.readLine(); + TQString data = stream.readLine(); int errors = 0; bool ok; - QStringList fields = QStringList::split( FIELD_SEP, data ); + TQStringList fields = TQStringList::split( FIELD_SEP, data ); if ( fields.count() >= 2 ) { int id = fields[0].toInt( &ok ); if ( !ok ) errors++; - QString categoryName = fields[1]; + TQString categoryName = fields[1]; if ( categoryName.isEmpty() ) errors++; @@ -541,8 +541,8 @@ bool Memofiles::saveCategoryMetadata() << ": saving categories to file: [" << _categoryMetadataFile << "]" << endl; - QFile f( _categoryMetadataFile ); - QTextStream stream(&f); + TQFile f( _categoryMetadataFile ); + TQTextStream stream(&f); if( !f.open(IO_WriteOnly) ) { DEBUGKPILOT << fname @@ -601,8 +601,8 @@ bool Memofiles::saveMemos() bool Memofiles::isFirstSync() { FUNCTIONSETUP; - bool metadataExists = QFile::exists(_memoMetadataFile) && - QFile::exists(_categoryMetadataFile); + bool metadataExists = TQFile::exists(_memoMetadataFile) && + TQFile::exists(_categoryMetadataFile); bool valid = metadataExists && _metadataLoaded; @@ -615,19 +615,19 @@ bool Memofiles::isFirstSync() -bool Memofiles::folderRemove(const QDir &_d) +bool Memofiles::folderRemove(const TQDir &_d) { FUNCTIONSETUP; - QDir d = _d; + TQDir d = _d; - QStringList entries = d.entryList(); - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { + TQStringList entries = d.entryList(); + for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { if(*it == CSL1(".") || *it == CSL1("..")) continue; - QFileInfo info(d, *it); + TQFileInfo info(d, *it); if(info.isDir()) { - if(!folderRemove(QDir(info.filePath()))) + if(!folderRemove(TQDir(info.filePath()))) return FALSE; } else { DEBUGKPILOT << fname @@ -635,7 +635,7 @@ bool Memofiles::folderRemove(const QDir &_d) d.remove(info.filePath()); } } - QString name = d.dirName(); + TQString name = d.dirName(); if(!d.cdUp()) return FALSE; DEBUGKPILOT << fname @@ -645,14 +645,14 @@ bool Memofiles::folderRemove(const QDir &_d) return TRUE; } -QString Memofiles::filename(PilotMemo * memo) +TQString Memofiles::filename(PilotMemo * memo) { FUNCTIONSETUP; - QString filename = memo->getTitle(); + TQString filename = memo->getTitle(); if (filename.isEmpty()) { - QString text = memo->text(); + TQString text = memo->text(); int i = text.find(CSL1("\n")); if (i > 1) { filename = text.left(i); @@ -664,7 +664,7 @@ QString Memofiles::filename(PilotMemo * memo) filename = sanitizeName(filename); - QString category = _categories[memo->category()]; + TQString category = _categories[memo->category()]; Memofile * memofile = find(category, filename); @@ -676,22 +676,22 @@ QString Memofiles::filename(PilotMemo * memo) } int uniq = 2; - QString newfilename; + TQString newfilename; // try to find a good filename, but only do this 20 times at the most. // if our user has 20 memos with the same filename, he/she is asking // for trouble. while (NULL != memofile && uniq <=20) { - newfilename = QString(filename + CSL1(".") + QString::number(uniq++) ); + newfilename = TQString(filename + CSL1(".") + TQString::number(uniq++) ); memofile = find(category, newfilename); } return newfilename; } -QString Memofiles::sanitizeName(QString name) +TQString Memofiles::sanitizeName(TQString name) { - QString clean = name; + TQString clean = name; // safety net. we can't save a // filesystem separator as part of a filename, now can we? clean.replace('/', CSL1("-")); diff --git a/kpilot/conduits/memofileconduit/memofiles.h b/kpilot/conduits/memofileconduit/memofiles.h index ec0497d5b..72b6ed4a9 100644 --- a/kpilot/conduits/memofileconduit/memofiles.h +++ b/kpilot/conduits/memofileconduit/memofiles.h @@ -27,11 +27,11 @@ */ #include "plugin.h" -#include <qmap.h> +#include <tqmap.h> #include "memofile.h" -typedef QMap<int, QString> MemoCategoryMap; +typedef TQMap<int, TQString> MemoCategoryMap; class Memofile; @@ -40,29 +40,29 @@ class Memofiles { public: Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo, - QString & baseDirectory, CUDCounter &fCtrHH); + TQString & baseDirectory, CUDCounter &fCtrHH); ~Memofiles(); void load(bool loadAll); void save(); void eraseLocalMemos(); - void setPilotMemos (QPtrList<PilotMemo> & memos); + void setPilotMemos (TQPtrList<PilotMemo> & memos); void addModifiedMemo (PilotMemo * memo); void deleteMemo (PilotMemo * memo); bool isFirstSync(); bool isReady() { return _ready; }; - QPtrList<Memofile> getModified(); - QPtrList<Memofile> getAll() { return _memofiles; } ; - Memofile * find (const QString & category, const QString & filename); + TQPtrList<Memofile> getModified(); + TQPtrList<Memofile> getAll() { return _memofiles; } ; + Memofile * find (const TQString & category, const TQString & filename); Memofile * find (recordid_t id); MemoCategoryMap readCategoryMetadata(); void setCategories(MemoCategoryMap map) { _categories = map; } ; - static QString FIELD_SEP; - static QString sanitizeName(QString name); + static TQString FIELD_SEP; + static TQString sanitizeName(TQString name); int count() { return _memofiles.count(); } @@ -70,23 +70,23 @@ private: MemoCategoryMap _categories; PilotMemoInfo &_memoAppInfo; - QString & _baseDirectory; + TQString & _baseDirectory; CUDCounter &_cudCounter; - QPtrList<Memofile> _memofiles; + TQPtrList<Memofile> _memofiles; bool loadFromMetadata(); bool ensureDirectoryReady(); - bool checkDirectory(QString & dir); + bool checkDirectory(TQString & dir); bool saveMemoMetadata(); bool saveCategoryMetadata(); bool saveMemos(); - bool folderRemove(const QDir & dir); + bool folderRemove(const TQDir & dir); - QString filename(PilotMemo * memo); + TQString filename(PilotMemo * memo); - QString _categoryMetadataFile; - QString _memoMetadataFile; + TQString _categoryMetadataFile; + TQString _memoMetadataFile; bool _metadataLoaded; bool _ready; diff --git a/kpilot/conduits/notepadconduit/notepad-conduit.cc b/kpilot/conduits/notepadconduit/notepad-conduit.cc index 763f3acd0..da6f085d5 100644 --- a/kpilot/conduits/notepadconduit/notepad-conduit.cc +++ b/kpilot/conduits/notepadconduit/notepad-conduit.cc @@ -40,12 +40,12 @@ #include <pi-notepad.h> -#include <qthread.h> -#include <qapplication.h> -#include <qvaluelist.h> -#include <qimage.h> -#include <qdir.h> -#include <qcstring.h> +#include <tqthread.h> +#include <tqapplication.h> +#include <tqvaluelist.h> +#include <tqimage.h> +#include <tqdir.h> +#include <tqcstring.h> extern "C" { @@ -53,7 +53,7 @@ unsigned long version_conduit_notepad = Pilot::PLUGIN_API; } NotepadConduit::NotepadConduit(KPilotLink *d, const char *n, - const QStringList &args) : ConduitAction(d, n, args) + const TQStringList &args) : ConduitAction(d, n, args) { FUNCTIONSETUP; fConduitName=i18n("Notepad"); @@ -74,7 +74,7 @@ NotepadConduit::~NotepadConduit() DEBUGKPILOT << fname << ": In exec() @" << (unsigned long) this << endl; #endif - QDir dir(NotepadConduitSettings::outputDirectory()); + TQDir dir(NotepadConduitSettings::outputDirectory()); if(!dir.exists() && !dir.mkdir(dir.path())) { emit logError(i18n("Unable to open %1").arg(dir.path())); delayDone(); @@ -91,11 +91,11 @@ NotepadConduit::~NotepadConduit() return true; } -bool NotepadConduit::event(QEvent *e) +bool NotepadConduit::event(TQEvent *e) { FUNCTIONSETUP; - if(e->type() == QEvent::User) { + if(e->type() == TQEvent::User) { #ifdef DEBUG DEBUGKPILOT << fname << ": Notepad thread done." << endl; #endif @@ -115,7 +115,7 @@ bool NotepadConduit::event(QEvent *e) // NotepadActionThread //----------------------------------------------------------------------------- -NotepadActionThread::NotepadActionThread(QObject *parent, KPilotLink *link) : +NotepadActionThread::NotepadActionThread(TQObject *parent, KPilotLink *link) : fParent(parent), fLink(link), notSaved(0), saved(0) { FUNCTIONSETUP; @@ -131,8 +131,8 @@ void NotepadActionThread::run() if ( n > 0 ) { - QValueList<recordid_t> vl = db->idList(); - QValueList<recordid_t>::iterator it; + TQValueList<recordid_t> vl = db->idList(); + TQValueList<recordid_t>::iterator it; struct NotePad a; for ( it = vl.begin(); it != vl.end(); ++it ) { @@ -146,10 +146,10 @@ void NotepadActionThread::run() } } KPILOT_DELETE(db); - QApplication::postEvent(fParent, new QEvent(QEvent::User)); + TQApplication::postEvent(fParent, new TQEvent(TQEvent::User)); } -static void saveImageFromBITS(QImage &image, struct NotePad *n, unsigned int width) +static void saveImageFromBITS(TQImage &image, struct NotePad *n, unsigned int width) { FUNCTIONSETUP; image.setColor(0, qRgb(0xaa, 0xc1 ,0x91)); @@ -175,7 +175,7 @@ static void saveImageFromBITS(QImage &image, struct NotePad *n, unsigned int wid } } -static void saveImageFromUNCOMPRESSED(QImage &image, struct NotePad *n, unsigned int width) +static void saveImageFromUNCOMPRESSED(TQImage &image, struct NotePad *n, unsigned int width) { FUNCTIONSETUP; @@ -219,7 +219,7 @@ void NotepadActionThread::saveImage(struct NotePad *n) int height = n->body.height; - QImage image(width, height, 8, 2); + TQImage image(width, height, 8, 2); switch (n->body.dataType) { @@ -240,7 +240,7 @@ void NotepadActionThread::saveImage(struct NotePad *n) // TODO: Post a warning to the UI } - QString filename(n->name); + TQString filename(n->name); if(filename.isEmpty()) { filename.sprintf("%4d-%02d-%02d_%02d-%02d-%02d", @@ -251,7 +251,7 @@ void NotepadActionThread::saveImage(struct NotePad *n) n->changeDate.min, n->changeDate.sec); } - QString imgname = QString("%1/%2.png").arg(NotepadConduitSettings::outputDirectory()).arg(filename); + TQString imgname = TQString("%1/%2.png").arg(NotepadConduitSettings::outputDirectory()).arg(filename); #ifdef DEBUG diff --git a/kpilot/conduits/notepadconduit/notepad-conduit.h b/kpilot/conduits/notepadconduit/notepad-conduit.h index 5ba915e31..907a306a2 100644 --- a/kpilot/conduits/notepadconduit/notepad-conduit.h +++ b/kpilot/conduits/notepadconduit/notepad-conduit.h @@ -35,7 +35,7 @@ #include "plugin.h" -#include <qthread.h> +#include <tqthread.h> struct NotePad; class NotepadActionThread; @@ -44,9 +44,9 @@ class NotepadConduit : public ConduitAction public: NotepadConduit(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~NotepadConduit(); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); protected: virtual bool exec(); // From ConduitAction @@ -62,14 +62,14 @@ private: class NotepadActionThread : public QThread { public: - NotepadActionThread(QObject *parent, KPilotLink *link); + NotepadActionThread(TQObject *parent, KPilotLink *link); virtual void run(); int getFailed() { return notSaved; } int getSaved() { return saved; } private: - QObject *fParent; + TQObject *fParent; KPilotLink *fLink; /** diff --git a/kpilot/conduits/notepadconduit/notepad-factory.cc b/kpilot/conduits/notepadconduit/notepad-factory.cc index f934a2cb1..0e1094b6f 100644 --- a/kpilot/conduits/notepadconduit/notepad-factory.cc +++ b/kpilot/conduits/notepadconduit/notepad-factory.cc @@ -33,7 +33,7 @@ #include <kaboutdata.h> #include <kurlrequester.h> #include <kmessagebox.h> -#include <qlineedit.h> +#include <tqlineedit.h> #include "pluginfactory.h" @@ -47,10 +47,10 @@ class NotepadConduitConfig : public ConduitConfigBase { public: - NotepadConduitConfig(QWidget *parent=0L, const char *n=0L); + NotepadConduitConfig(TQWidget *parent=0L, const char *n=0L); virtual void commit(); virtual void load(); - static ConduitConfigBase *create(QWidget *p, const char *n) + static ConduitConfigBase *create(TQWidget *p, const char *n) { return new NotepadConduitConfig(p, n); }; @@ -80,7 +80,7 @@ static KAboutData *createAbout() } -NotepadConduitConfig::NotepadConduitConfig(QWidget *p, const char *n) : +NotepadConduitConfig::NotepadConduitConfig(TQWidget *p, const char *n) : ConduitConfigBase(p, n), fConfigWidget(new NotepadWidget(p)) { @@ -89,8 +89,8 @@ NotepadConduitConfig::NotepadConduitConfig(QWidget *p, const char *n) : fConduitName = i18n("Notepad"); ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget, createAbout()); fWidget=fConfigWidget; - QObject::connect(fConfigWidget->fOutputDirectory, SIGNAL(textChanged(const QString&)), - this, SLOT(modified())); + TQObject::connect(fConfigWidget->fOutputDirectory, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(modified())); fConfigWidget->fOutputDirectory->setMode(KFile::Directory | KFile::LocalOnly); } diff --git a/kpilot/conduits/null/null-conduit.cc b/kpilot/conduits/null/null-conduit.cc index 56599fec9..f04c7435c 100644 --- a/kpilot/conduits/null/null-conduit.cc +++ b/kpilot/conduits/null/null-conduit.cc @@ -54,7 +54,7 @@ // NullConduit::NullConduit(KPilotLink *d, const char *n, - const QStringList &l) : + const TQStringList &l) : ConduitAction(d,n,l), fDatabase(0L), fFailImmediately( l.contains( CSL1("--fail") )) @@ -82,7 +82,7 @@ NullConduit::~NullConduit() return false; } - QString m(NullConduitSettings::logMessage()); + TQString m(NullConduitSettings::logMessage()); if (!m.isEmpty()) { addSyncLogEntry(m); diff --git a/kpilot/conduits/null/null-conduit.h b/kpilot/conduits/null/null-conduit.h index 7bf1b67de..4cdbbdec4 100644 --- a/kpilot/conduits/null/null-conduit.h +++ b/kpilot/conduits/null/null-conduit.h @@ -51,7 +51,7 @@ public: */ NullConduit(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~NullConduit(); protected: diff --git a/kpilot/conduits/null/null-factory.cc b/kpilot/conduits/null/null-factory.cc index 2a829c6e3..c2d381de6 100644 --- a/kpilot/conduits/null/null-factory.cc +++ b/kpilot/conduits/null/null-factory.cc @@ -28,9 +28,9 @@ #include "options.h" -#include <qtabwidget.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqtabwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kconfig.h> #include <kinstance.h> @@ -47,7 +47,7 @@ class NullConduitConfig : public ConduitConfigBase { public: - NullConduitConfig(QWidget *parent=0L, const char *n=0L); + NullConduitConfig(TQWidget *parent=0L, const char *n=0L); virtual void commit(); virtual void load(); protected: @@ -55,7 +55,7 @@ protected: KAboutData *fAbout; } ; -NullConduitConfig::NullConduitConfig(QWidget *p, const char *n) : +NullConduitConfig::NullConduitConfig(TQWidget *p, const char *n) : ConduitConfigBase(p,n), fConfigWidget(new NullWidget(p)) { @@ -74,8 +74,8 @@ NullConduitConfig::NullConduitConfig(QWidget *p, const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout); fWidget=fConfigWidget; - QObject::connect(fConfigWidget->fLogMessage,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); + TQObject::connect(fConfigWidget->fLogMessage,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); } /* virtual */ void NullConduitConfig::commit() diff --git a/kpilot/conduits/popmail/popmail-conduit.cc b/kpilot/conduits/popmail/popmail-conduit.cc index 47315edaa..8f51545cf 100644 --- a/kpilot/conduits/popmail/popmail-conduit.cc +++ b/kpilot/conduits/popmail/popmail-conduit.cc @@ -41,8 +41,8 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API; } -#include <qsocket.h> -#include <qregexp.h> +#include <tqsocket.h> +#include <tqregexp.h> #include <sys/types.h> @@ -60,9 +60,9 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API; #endif #include <pi-mail.h> -#include <qdir.h> -#include <qtextstream.h> -#include <qtextcodec.h> +#include <tqdir.h> +#include <tqtextstream.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <kmessagebox.h> @@ -78,11 +78,11 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API; #include "popmailSettings.h" #include "setupDialog.h" -static QString DATE_FORMAT("ddd, d MMM yyyy hh:mm:ss"); +static TQString DATE_FORMAT("ddd, d MMM yyyy hh:mm:ss"); PopMailConduit::PopMailConduit(KPilotLink *d, const char *n, - const QStringList &l) : + const TQStringList &l) : ConduitAction(d,n,l) { FUNCTIONSETUP; @@ -157,7 +157,7 @@ int PopMailConduit::sendPendingMail(int mode) } -QString PopMailConduit::getKMailOutbox() const +TQString PopMailConduit::getKMailOutbox() const { FUNCTIONSETUP; @@ -165,7 +165,7 @@ QString PopMailConduit::getKMailOutbox() const KSimpleConfig c(CSL1("kmailrc"),true); c.setGroup("General"); - QString outbox = c.readEntry("outboxFolder"); + TQString outbox = c.readEntry("outboxFolder"); if (outbox.isEmpty()) { outbox = MailConduitSettings::outboxFolder(); @@ -184,7 +184,7 @@ int PopMailConduit::sendViaKMail() { FUNCTIONSETUP; int count=0; - QString kmailOutboxName = getKMailOutbox(); + TQString kmailOutboxName = getKMailOutbox(); DCOPClient *dcopptr = KApplication::kApplication()->dcopClient(); if (!dcopptr) @@ -252,15 +252,15 @@ int PopMailConduit::sendViaKMail() writeMessageToFile(sendf, theMail); - QByteArray data,returnValue; - QCString returnType; - QDataStream arg(data,IO_WriteOnly); + TQByteArray data,returnValue; + TQCString returnType; + TQDataStream arg(data,IO_WriteOnly); arg << kmailOutboxName << t.name() << CSL1("N") ; if (!dcopptr->call("kmail", "KMailIface", - "dcopAddMessage(QString,QString,QString)", + "dcopAddMessage(TQString,TQString,TQString)", data, returnType, returnValue, @@ -302,9 +302,9 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail) { FUNCTIONSETUP; - QTextStream mailPipe(sendf, IO_WriteOnly); + TQTextStream mailPipe(sendf, IO_WriteOnly); - QString fromAddress = MailConduitSettings::emailAddress(); + TQString fromAddress = MailConduitSettings::emailAddress(); mailPipe << "From: " << fromAddress << "\r\n"; mailPipe << "To: " << theMail.to << "\r\n"; if(theMail.cc) @@ -319,13 +319,13 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail) // if our struct indicates that it's dated, then use the date it // holds. otherwise, provide current date. either way, we need to // have a date... - QDateTime date = QDateTime::currentDateTime(); + TQDateTime date = TQDateTime::currentDateTime(); if (theMail.dated) { date = readTm(theMail.date); } - QString dateString = date.toString(DATE_FORMAT); + TQString dateString = date.toString(DATE_FORMAT); mailPipe << "Date: " << dateString << "\r\n"; @@ -343,16 +343,16 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail) } //insert the real signature file from disk - QString signature = MailConduitSettings::signature(); + TQString signature = MailConduitSettings::signature(); if(!signature.isEmpty()) { DEBUGKPILOT << fname << ": Reading signature" << endl; - QFile f(signature); + TQFile f(signature); if ( f.open(IO_ReadOnly) ) { // file opened successfully mailPipe << "-- \r\n"; - QTextStream t( &f ); // use a text stream + TQTextStream t( &f ); // use a text stream while ( !t.eof() ) { // until end of file... mailPipe << t.readLine() << "\r\n"; @@ -370,15 +370,15 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail) { FUNCTIONSETUP; - QString outbox = getKMailOutbox(); + TQString outbox = getKMailOutbox(); DEBUGKPILOT << fname << ": KMail's outbox is " << outbox << endl; - QDateTime date = QDateTime::currentDateTime(); - QString dateString = date.toString(DATE_FORMAT); + TQDateTime date = TQDateTime::currentDateTime(); + TQString dateString = date.toString(DATE_FORMAT); DEBUGKPILOT << fname << ": Date format example: [" << dateString << "]" << endl; diff --git a/kpilot/conduits/popmail/popmail-conduit.h b/kpilot/conduits/popmail/popmail-conduit.h index 1df1a6912..52b5b9174 100644 --- a/kpilot/conduits/popmail/popmail-conduit.h +++ b/kpilot/conduits/popmail/popmail-conduit.h @@ -46,7 +46,7 @@ class PopMailConduit : public ConduitAction public: PopMailConduit(KPilotLink *d, const char *n=0L, - const QStringList &l=QStringList()); + const TQStringList &l=TQStringList()); virtual ~PopMailConduit(); protected: @@ -67,7 +67,7 @@ protected: int sendViaKMail(); // int sendViaSMTP(); void writeMessageToFile(FILE* sendf, struct Mail& theMail); - QString getKMailOutbox() const; + TQString getKMailOutbox() const; }; diff --git a/kpilot/conduits/popmail/setupDialog.cc b/kpilot/conduits/popmail/setupDialog.cc index 64553562b..b8d3db70b 100644 --- a/kpilot/conduits/popmail/setupDialog.cc +++ b/kpilot/conduits/popmail/setupDialog.cc @@ -42,9 +42,9 @@ #include <klineedit.h> #include <kaboutdata.h> -#include <qcheckbox.h> -#include <qdir.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqdir.h> +#include <tqcombobox.h> #include "kfiledialog.h" @@ -58,7 +58,7 @@ -PopMailWidgetConfig::PopMailWidgetConfig(QWidget *p,const char *n) : +PopMailWidgetConfig::PopMailWidgetConfig(TQWidget *p,const char *n) : ConduitConfigBase(p,n), fConfigWidget(new PopMailWidget(p,"PopMailWidget")) { @@ -86,14 +86,14 @@ PopMailWidgetConfig::PopMailWidgetConfig(QWidget *p,const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->fTabWidget,fAbout); fWidget=fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fSendMode,SIGNAL(activated(int))); - CM(fEmailFrom,SIGNAL(textChanged(const QString &))); - CM(fSignature,SIGNAL(textChanged(const QString &))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fSendMode,TQT_SIGNAL(activated(int))); + CM(fEmailFrom,TQT_SIGNAL(textChanged(const TQString &))); + CM(fSignature,TQT_SIGNAL(textChanged(const TQString &))); #undef CM - connect(fConfigWidget->fSendMode,SIGNAL(activated(int)), - this,SLOT(toggleSendMode(int))); + connect(fConfigWidget->fSendMode,TQT_SIGNAL(activated(int)), + this,TQT_SLOT(toggleSendMode(int))); } diff --git a/kpilot/conduits/popmail/setupDialog.h b/kpilot/conduits/popmail/setupDialog.h index 248b4ecbf..76bf9afe5 100644 --- a/kpilot/conduits/popmail/setupDialog.h +++ b/kpilot/conduits/popmail/setupDialog.h @@ -41,11 +41,11 @@ class PopMailWidgetConfig : public ConduitConfigBase { Q_OBJECT public: - PopMailWidgetConfig(QWidget *, const char *); + PopMailWidgetConfig(TQWidget *, const char *); virtual void load(); virtual void commit(); - static ConduitConfigBase *create(QWidget *w, const char *n) + static ConduitConfigBase *create(TQWidget *w, const char *n) { return new PopMailWidgetConfig(w,n); } ; // These enums must follow the order of items in the combo box diff --git a/kpilot/conduits/recordconduit/factory.cc b/kpilot/conduits/recordconduit/factory.cc index 8015763d1..83377336a 100644 --- a/kpilot/conduits/recordconduit/factory.cc +++ b/kpilot/conduits/recordconduit/factory.cc @@ -28,9 +28,9 @@ #include "options.h" -#include <qtabwidget.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqtabwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kconfig.h> #include <kinstance.h> @@ -48,7 +48,7 @@ class ConduitConfig : public ConduitConfigBase { public: - ConduitConfig(QWidget *parent=0L, const char *n=0L); + ConduitConfig(TQWidget *parent=0L, const char *n=0L); virtual void commit(); virtual void load(); protected: @@ -56,7 +56,7 @@ protected: KAboutData *fAbout; } ; -ConduitConfig::ConduitConfig(QWidget *p, const char *n) : +ConduitConfig::ConduitConfig(TQWidget *p, const char *n) : ConduitConfigBase(p,n), fConfigWidget(new RecordWidget(p)) { @@ -75,12 +75,12 @@ ConduitConfig::ConduitConfig(QWidget *p, const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout); fWidget=fConfigWidget; - QObject::connect(fConfigWidget->fLogMessage,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fDatabases,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fFailImmediately,SIGNAL(toggled(bool)), - this,SLOT(modified())); + TQObject::connect(fConfigWidget->fLogMessage,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fDatabases,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fFailImmediately,TQT_SIGNAL(toggled(bool)), + this,TQT_SLOT(modified())); } /* virtual */ void ConduitConfig::commit() diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc index b3e69b65c..86fc10752 100644 --- a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc +++ b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc @@ -29,10 +29,10 @@ #include <pi-version.h> -#include <qtimer.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqregexp.h> #include <kconfig.h> #include <kdebug.h> @@ -49,7 +49,7 @@ #include "sysinfo-conduit.moc" #include "sysinfoSettings.h" -const QString SysInfoConduit::defaultpage = CSL1("KPilot System Information Page\n" +const TQString SysInfoConduit::defaultpage = CSL1("KPilot System Information Page\n" "==============================\n" "(Kpilot was unable to find the correct template file, \n" "so this simple template was used.)\n\n" @@ -156,7 +156,7 @@ unsigned long version_conduit_sysinfo = Pilot::PLUGIN_API; SysInfoConduit::SysInfoConduit(KPilotLink * o, const char *n, - const QStringList & a) : + const TQStringList & a) : ConduitAction(o, n, a) { FUNCTIONSETUP; @@ -196,7 +196,7 @@ void SysInfoConduit::readConfig() readConfig(); - QTimer::singleShot(0, this, SLOT(hardwareInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(hardwareInfo())); return true; } @@ -204,7 +204,7 @@ void SysInfoConduit::hardwareInfo() { FUNCTIONSETUP; if (fHardwareInfo) { - QString unknown = i18n("unknown"); + TQString unknown = i18n("unknown"); /* Retrieve values for * - #deviceid# @@ -214,14 +214,14 @@ void SysInfoConduit::hardwareInfo() * - #devicetype# */ KPilotSysInfo sysinfo = fHandle->getSysInfo(); - fValues[CSL1("deviceid")] = QString::fromLatin1(sysinfo.getProductID()); + fValues[CSL1("deviceid")] = TQString::fromLatin1(sysinfo.getProductID()); const KPilotCard *device = fHandle->getCardInfo(); if (device) { - fValues[CSL1("devicename")] = QString::fromLatin1(device->getCardName()); + fValues[CSL1("devicename")] = TQString::fromLatin1(device->getCardName()); fValues[CSL1("devicemodel")] = unknown; // TODO - fValues[CSL1("manufacturer")] = QString::fromLatin1(device->getCardManufacturer()); + fValues[CSL1("manufacturer")] = TQString::fromLatin1(device->getCardManufacturer()); } else { @@ -235,7 +235,7 @@ void SysInfoConduit::hardwareInfo() KPILOT_DELETE(device); keepParts.append(CSL1("hardware")); } else removeParts.append(CSL1("hardware")); - QTimer::singleShot(0, this, SLOT(userInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(userInfo())); } void SysInfoConduit::userInfo() @@ -257,15 +257,15 @@ void SysInfoConduit::userInfo() { fValues[CSL1("pw")] = i18n("No password set"); } - fValues[CSL1("uid")] = QString::number(user.data()->userID); - fValues[CSL1("viewerid")] = QString::number(user.data()->viewerID); + fValues[CSL1("uid")] = TQString::number(user.data()->userID); + fValues[CSL1("viewerid")] = TQString::number(user.data()->viewerID); keepParts.append(CSL1("user")); } else { removeParts.append(CSL1("user")); } - QTimer::singleShot(0, this, SLOT(memoryInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(memoryInfo())); } void SysInfoConduit::memoryInfo() @@ -280,13 +280,13 @@ void SysInfoConduit::memoryInfo() const KPilotCard *device = fHandle->getCardInfo(); if (device) { - fValues[CSL1("rom")] = QString::number(device->getRomSize()/1024); - fValues[CSL1("totalmem")] = QString::number(device->getRamSize()/1024); - fValues[CSL1("freemem")] = QString::number(device->getRamFree()/1024); + fValues[CSL1("rom")] = TQString::number(device->getRomSize()/1024); + fValues[CSL1("totalmem")] = TQString::number(device->getRamSize()/1024); + fValues[CSL1("freemem")] = TQString::number(device->getRamFree()/1024); } keepParts.append(CSL1("memory")); } else removeParts.append(CSL1("memory")); - QTimer::singleShot(0, this, SLOT(storageInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(storageInfo())); } void SysInfoConduit::storageInfo() @@ -299,8 +299,8 @@ void SysInfoConduit::storageInfo() const KPilotCard *device = fHandle->getCardInfo(1); if (device) { fValues[CSL1("cards")] = CSL1("%1 (%2, %3 kB of %3 kB free)") - .arg(QString::fromLatin1(device->getCardName())) - .arg(QString::fromLatin1(device->getCardManufacturer())) + .arg(TQString::fromLatin1(device->getCardName())) + .arg(TQString::fromLatin1(device->getCardManufacturer())) .arg(device->getRamFree()/1024) .arg(device->getRamSize()/1024); KPILOT_DELETE(device); @@ -309,7 +309,7 @@ void SysInfoConduit::storageInfo() } keepParts.append(CSL1("storage")); } else removeParts.append(CSL1("storage")); - QTimer::singleShot(0, this, SLOT(dbListInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(dbListInfo())); } void SysInfoConduit::dbListInfo() @@ -322,7 +322,7 @@ void SysInfoConduit::dbListInfo() dblist=deviceLink()->getDBList(); keepParts.append(CSL1("dblist")); } else removeParts.append(CSL1("dblist")); - QTimer::singleShot(0, this, SLOT(recNumberInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(recNumberInfo())); } void SysInfoConduit::recNumberInfo() @@ -336,34 +336,34 @@ void SysInfoConduit::recNumberInfo() * - #memos# */ PilotDatabase *fDatabase = 0L; - QString ERROR = CSL1("ERROR"); + TQString ERROR = CSL1("ERROR"); fValues[CSL1("addresses")] = ERROR; fValues[CSL1("events")] = ERROR; fValues[CSL1("todos")] = ERROR; fValues[CSL1("memos")] = ERROR; fDatabase = deviceLink()->database(CSL1("AddressDB")); if (fDatabase) { - fValues[CSL1("addresses")] = QString::number(fDatabase->recordCount()); + fValues[CSL1("addresses")] = TQString::number(fDatabase->recordCount()); KPILOT_DELETE(fDatabase); } fDatabase = deviceLink()->database(CSL1("DatebookDB")); if (fDatabase) { - fValues[CSL1("events")] = QString::number(fDatabase->recordCount()); + fValues[CSL1("events")] = TQString::number(fDatabase->recordCount()); KPILOT_DELETE(fDatabase); } fDatabase = deviceLink()->database(CSL1("ToDoDB")); if (fDatabase) { - fValues[CSL1("todos")] = QString::number(fDatabase->recordCount()); + fValues[CSL1("todos")] = TQString::number(fDatabase->recordCount()); KPILOT_DELETE(fDatabase); } fDatabase = deviceLink()->database(CSL1("MemoDB")); if (fDatabase) { - fValues[CSL1("memos")] = QString::number(fDatabase->recordCount()); + fValues[CSL1("memos")] = TQString::number(fDatabase->recordCount()); KPILOT_DELETE(fDatabase); } keepParts.append(CSL1("records")); } else removeParts.append(CSL1("records")); - QTimer::singleShot(0, this, SLOT(syncInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(syncInfo())); } void SysInfoConduit::syncInfo() @@ -377,16 +377,16 @@ void SysInfoConduit::syncInfo() */ KPilotUser user = deviceLink()->getPilotUser(); time_t lastsync = user.getLastSyncDate(); - QDateTime qlastsync; + TQDateTime qlastsync; qlastsync.setTime_t(lastsync); fValues[CSL1("lastsync")] = qlastsync.toString(Qt::LocalDate); lastsync = user.getLastSuccessfulSyncDate(); qlastsync.setTime_t(lastsync); fValues[CSL1("lastsuccsync")] = qlastsync.toString(Qt::LocalDate); - fValues[CSL1("lastsyncpc")] = QString::number(user.getLastSyncPC()); + fValues[CSL1("lastsyncpc")] = TQString::number(user.getLastSyncPC()); keepParts.append(CSL1("sync")); } else removeParts.append(CSL1("sync")); - QTimer::singleShot(0, this, SLOT(pcVersionInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(pcVersionInfo())); } void SysInfoConduit::pcVersionInfo() @@ -400,7 +400,7 @@ void SysInfoConduit::pcVersionInfo() * - #kpilot# * - #pilotlink# */ - fValues[CSL1("kpilot")] = QString::fromLatin1(KPILOT_VERSION); + fValues[CSL1("kpilot")] = TQString::fromLatin1(KPILOT_VERSION); fValues[CSL1("kde")] = i18n("unknown"); fValues[CSL1("qt")] = i18n("unknown"); fValues[CSL1("os")] = i18n("unknown"); @@ -408,29 +408,29 @@ void SysInfoConduit::pcVersionInfo() struct utsname name; if (uname (&name) >= 0) { fValues[CSL1("os")] = CSL1("%1 %3, %5") - .arg(QString::fromLatin1(name.sysname)) - .arg(QString::fromLatin1(name.release)) - .arg(QString::fromLatin1(name.machine)); - fValues[CSL1("hostname")] = CSL1("%2").arg(QString::fromLatin1(name.nodename)); + .arg(TQString::fromLatin1(name.sysname)) + .arg(TQString::fromLatin1(name.release)) + .arg(TQString::fromLatin1(name.machine)); + fValues[CSL1("hostname")] = CSL1("%2").arg(TQString::fromLatin1(name.nodename)); } #ifdef KDE_VERSION_STRING - fValues[CSL1("kde")] = QString::fromLatin1(KDE_VERSION_STRING); + fValues[CSL1("kde")] = TQString::fromLatin1(KDE_VERSION_STRING); #endif #ifdef QT_VERSION_STR - fValues[CSL1("qt")] = QString::fromLatin1(QT_VERSION_STR); + fValues[CSL1("qt")] = TQString::fromLatin1(QT_VERSION_STR); #endif fValues[CSL1("pilotlink")] = CSL1("%1.%2.%3%4") .arg(PILOT_LINK_VERSION) .arg(PILOT_LINK_MAJOR) .arg(PILOT_LINK_MINOR) #ifdef PILOT_LINK_PATCH - .arg(QString::fromLatin1(PILOT_LINK_PATCH)); + .arg(TQString::fromLatin1(PILOT_LINK_PATCH)); #else - .arg(QString()); + .arg(TQString()); #endif keepParts.append(CSL1("pcversion")); } else removeParts.append(CSL1("pcversion")); - QTimer::singleShot(0, this, SLOT(palmVersionInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(palmVersionInfo())); } void SysInfoConduit::palmVersionInfo() @@ -440,7 +440,7 @@ void SysInfoConduit::palmVersionInfo() /* Retrieve values for * - #palmos# */ -/* fValues["palmos"] = QString("PalmOS %1.%2 (compat %3.%4)") +/* fValues["palmos"] = TQString("PalmOS %1.%2 (compat %3.%4)") .arg(fHandle->getSysInfo()->getMajorVersion()) .arg(fHandle->getSysInfo()->getMinorVersion()) .arg(fHandle->getSysInfo()->getCompatMajorVersion()) @@ -450,7 +450,7 @@ void SysInfoConduit::palmVersionInfo() keepParts.append(CSL1("palmversion")); } else removeParts.append(CSL1("palmversion")); - QTimer::singleShot(0, this, SLOT(debugInfo())); + TQTimer::singleShot(0, this, TQT_SLOT(debugInfo())); } void SysInfoConduit::debugInfo() @@ -463,18 +463,18 @@ void SysInfoConduit::debugInfo() fValues[CSL1("debug")] = i18n("No debug data"); keepParts.append(CSL1("debug")); } else removeParts.append(CSL1("debug")); - QTimer::singleShot(0, this, SLOT(writeFile())); + TQTimer::singleShot(0, this, TQT_SLOT(writeFile())); } void SysInfoConduit::writeFile() { FUNCTIONSETUP; - fValues[CSL1("date")] = QDateTime::currentDateTime().toString(Qt::LocalDate); + fValues[CSL1("date")] = TQDateTime::currentDateTime().toString(Qt::LocalDate); - QString output; + TQString output; // Open the template file - QString templatefile; + TQString templatefile; switch(fOutputType) { case eOutputText: @@ -495,9 +495,9 @@ void SysInfoConduit::writeFile() #ifdef DEBUG DEBUGKPILOT<<"Loading template file "<<templatefile<<endl; #endif - QFile infile(templatefile); + TQFile infile(templatefile); if (infile.open(IO_ReadOnly)) { - QTextStream instream(&infile); + TQTextStream instream(&infile); output = instream.read(); infile.close(); loaded=true; @@ -512,32 +512,32 @@ void SysInfoConduit::writeFile() } // Remove all parts not extracted - for ( QStringList::Iterator it = removeParts.begin(); it != removeParts.end(); ++it ) { - QRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").arg(*it).arg(*it)); + for ( TQStringList::Iterator it = removeParts.begin(); it != removeParts.end(); ++it ) { + TQRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").arg(*it).arg(*it)); re.setMinimal(true); output.remove(re); } - for ( QStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) { - QRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").arg(*it).arg(*it)); + for ( TQStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) { + TQRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").arg(*it).arg(*it)); re.setMinimal(true); output.replace(re, CSL1("\\1")); } // Do a loop through all keys in fValues - QMap<QString,QString>::Iterator it; + TQMap<TQString,TQString>::Iterator it; for ( it = fValues.begin(); it != fValues.end(); ++it ) { output.replace(CSL1("#%1#").arg(it.key()), it.data()); } // Insert the list of databases - QRegExp re(CSL1("#dblist\\[(.*)\\]#")); + TQRegExp re(CSL1("#dblist\\[(.*)\\]#")); re.setMinimal(true); while (re.search(output)>=0){ - QString dbstring; - QString subpatt=re.cap(1); + TQString dbstring; + TQString subpatt=re.cap(1); for (KPilotLink::DBInfoList::ConstIterator i = dblist.begin(); i != dblist.end(); ++i ) { DBInfo dbi = *i; - QString newpatt(subpatt); + TQString newpatt(subpatt); char tmpchr[5]; ::memset(&tmpchr[0], 0, 5); /* Patterns for the dblist argument: @@ -552,16 +552,16 @@ void SysInfoConduit::writeFile() * %8 .. modifyDate * %9 .. backupDate */ - newpatt.replace(CSL1("%0"), QString::fromLatin1(dbi.name)); + newpatt.replace(CSL1("%0"), TQString::fromLatin1(dbi.name)); set_long(&tmpchr[0],dbi.type); - newpatt.replace(CSL1("%1"), QString::fromLatin1(tmpchr)); + newpatt.replace(CSL1("%1"), TQString::fromLatin1(tmpchr)); set_long(&tmpchr[0],dbi.creator); - newpatt.replace(CSL1("%2"), QString::fromLatin1(tmpchr)); - newpatt.replace(CSL1("%3"), QString::number(dbi.index)); - newpatt.replace(CSL1("%4"), QString::number(dbi.flags)); - newpatt.replace(CSL1("%5"), QString::number(dbi.miscFlags)); - newpatt.replace(CSL1("%6"), QString::number(dbi.version)); - QDateTime tm; + newpatt.replace(CSL1("%2"), TQString::fromLatin1(tmpchr)); + newpatt.replace(CSL1("%3"), TQString::number(dbi.index)); + newpatt.replace(CSL1("%4"), TQString::number(dbi.flags)); + newpatt.replace(CSL1("%5"), TQString::number(dbi.miscFlags)); + newpatt.replace(CSL1("%6"), TQString::number(dbi.version)); + TQDateTime tm; tm.setTime_t(dbi.createDate); newpatt.replace(CSL1("%7"), tm.toString(Qt::LocalDate)); tm.setTime_t(dbi.modifyDate); @@ -576,12 +576,12 @@ void SysInfoConduit::writeFile() } // Write out the result - QFile outfile(fOutputFile); + TQFile outfile(fOutputFile); #ifdef DEBUG DEBUGKPILOT << fname << ": Writing file <" << fOutputFile << ">" << endl; #endif if (fOutputFile.isEmpty() || (!outfile.open(IO_WriteOnly)) ) { - QFileInfo fi(QDir::home(), CSL1("KPilotSysInfo.")+QFileInfo(templatefile).extension() ); + TQFileInfo fi(TQDir::home(), CSL1("KPilotSysInfo.")+TQFileInfo(templatefile).extension() ); fOutputFile=fi.absFilePath(); WARNINGKPILOT << "Unable to open output file, using " << fOutputFile << " instead." << endl; emit logMessage(i18n("Unable to open output file, using %1 instead.").arg(fOutputFile)); @@ -589,18 +589,18 @@ void SysInfoConduit::writeFile() if (!outfile.open(IO_WriteOnly)) { WARNINGKPILOT<< "Unable to open " << fOutputFile << endl; emit logError(i18n("Unable to open %1").arg(fOutputFile)); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } } // Finally, write the actual text out to the file. - QTextStream outstream(&outfile); + TQTextStream outstream(&outfile); outstream<<output; outfile.close(); emit logMessage(i18n("Handheld system information written to the file %1").arg(fOutputFile)); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); } void SysInfoConduit::cleanup() diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h index 05bc395d3..803bc7370 100644 --- a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h +++ b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h @@ -37,7 +37,7 @@ public: SysInfoConduit( KPilotLink *o, const char *n = 0L, - const QStringList &a = QStringList() ); + const TQStringList &a = TQStringList() ); virtual ~SysInfoConduit(); virtual bool exec(); @@ -58,12 +58,12 @@ public slots: protected: void readConfig(); private: - QMap<QString,QString> fValues; + TQMap<TQString,TQString> fValues; bool fHardwareInfo, fUserInfo, fMemoryInfo, fStorageInfo, fDBList, fRecordNumber, fSyncInfo, fKDEVersion, fPalmOSVersion, fDebugInfo; - QString fOutputFile, fTemplateFile; + TQString fOutputFile, fTemplateFile; enum eOutputTypeEnum { eOutputHTML=0, eOutputText, @@ -71,9 +71,9 @@ private: } fOutputType; KPilotLink::DBInfoList dblist; - QStringList removeParts; - QStringList keepParts; - static const QString defaultpage; + TQStringList removeParts; + TQStringList keepParts; + static const TQString defaultpage; } ; #endif diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc b/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc index ed7419ab3..271db659b 100644 --- a/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc +++ b/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc @@ -28,11 +28,11 @@ #include "options.h" -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qlistview.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqlistview.h> #include <kaboutdata.h> #include <kapplication.h> @@ -81,11 +81,11 @@ const sysinfoEntry_t sysinfoEntries[] = /* ** This is a convenience define to update an item's "original setting". */ -#define updateSetting(i) { QCheckListItem *ubbu=(i); \ - ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : QString::null)); } +#define updateSetting(i) { TQCheckListItem *ubbu=(i); \ + ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : TQString::null)); } -SysInfoWidgetConfig::SysInfoWidgetConfig(QWidget *w, const char *n) : +SysInfoWidgetConfig::SysInfoWidgetConfig(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(new SysInfoWidget(w)) { @@ -103,12 +103,12 @@ SysInfoWidgetConfig::SysInfoWidgetConfig(QWidget *w, const char *n) : ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout); fWidget=fConfigWidget; - QObject::connect(fConfigWidget->fOutputFile,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fTemplateFile,SIGNAL(textChanged(const QString&)), - this,SLOT(modified())); - QObject::connect(fConfigWidget->fOutputType,SIGNAL(clicked(int)), - this,SLOT(modified())); + TQObject::connect(fConfigWidget->fOutputFile,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fTemplateFile,TQT_SIGNAL(textChanged(const TQString&)), + this,TQT_SLOT(modified())); + TQObject::connect(fConfigWidget->fOutputType,TQT_SIGNAL(clicked(int)), + this,TQT_SLOT(modified())); fConduitName=i18n("System Information"); } @@ -123,8 +123,8 @@ void SysInfoWidgetConfig::commit() SysinfoSettings::setOutputFormat( fConfigWidget->fOutputType->id(fConfigWidget->fOutputType->selected())); - QListViewItem *i = fConfigWidget->fPartsList->firstChild(); - QCheckListItem *ci = dynamic_cast<QCheckListItem *>(i); + TQListViewItem *i = fConfigWidget->fPartsList->firstChild(); + TQCheckListItem *ci = dynamic_cast<TQCheckListItem *>(i); while(ci) { #ifdef DEBUG @@ -139,7 +139,7 @@ void SysInfoWidgetConfig::commit() } updateSetting(ci); i=i->nextSibling(); - ci = dynamic_cast<QCheckListItem *>(i); + ci = dynamic_cast<TQCheckListItem *>(i); } SysinfoSettings::self()->writeConfig(); unmodified(); @@ -151,13 +151,13 @@ void SysInfoWidgetConfig::load() SysinfoSettings::self()->readConfig(); const sysinfoEntry_t *p = sysinfoEntries; - QCheckListItem *i = 0L; + TQCheckListItem *i = 0L; while (p && p->name) { - i = new QCheckListItem(fConfigWidget->fPartsList,i18n(p->name),QCheckListItem::CheckBox); + i = new TQCheckListItem(fConfigWidget->fPartsList,i18n(p->name),TQCheckListItem::CheckBox); // by default let the sysinfo conduit write out all available information i->setOn( p->accessor() ); - i->setText(PART_KEY, QString::number(p-sysinfoEntries)); // store index there + i->setText(PART_KEY, TQString::number(p-sysinfoEntries)); // store index there updateSetting(i); #ifdef DEBUG DEBUGKPILOT << fname << ": Loaded " << p->name @@ -177,8 +177,8 @@ void SysInfoWidgetConfig::load() FUNCTIONSETUP; if (fModified) return true; - QListViewItem *i = fConfigWidget->fPartsList->firstChild(); - QCheckListItem *ci = dynamic_cast<QCheckListItem *>(i); + TQListViewItem *i = fConfigWidget->fPartsList->firstChild(); + TQCheckListItem *ci = dynamic_cast<TQCheckListItem *>(i); while(ci) { @@ -192,7 +192,7 @@ void SysInfoWidgetConfig::load() if (current!=original) return true; i=i->nextSibling(); - ci = dynamic_cast<QCheckListItem *>(i); + ci = dynamic_cast<TQCheckListItem *>(i); } return false; } diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-setup.h b/kpilot/conduits/sysinfoconduit/sysinfo-setup.h index 41e55eb86..400dea3c1 100644 --- a/kpilot/conduits/sysinfoconduit/sysinfo-setup.h +++ b/kpilot/conduits/sysinfoconduit/sysinfo-setup.h @@ -36,7 +36,7 @@ class SysInfoWidget; class SysInfoWidgetConfig : public ConduitConfigBase { public: - SysInfoWidgetConfig(QWidget *parent, const char *); + SysInfoWidgetConfig(TQWidget *parent, const char *); virtual void commit(); virtual void load(); virtual bool isModified() const; diff --git a/kpilot/conduits/timeconduit/time-conduit.cc b/kpilot/conduits/timeconduit/time-conduit.cc index c1455b359..76798dbed 100644 --- a/kpilot/conduits/timeconduit/time-conduit.cc +++ b/kpilot/conduits/timeconduit/time-conduit.cc @@ -50,7 +50,7 @@ unsigned long version_conduit_time = Pilot::PLUGIN_API ; TimeConduit::TimeConduit(KPilotLink * o, const char *n, - const QStringList & a) : + const TQStringList & a) : ConduitAction(o, n, a) { FUNCTIONSETUP; @@ -83,7 +83,7 @@ void TimeConduit::readConfig() { #ifdef DEBUG DEBUGKPILOT << fname << ": Would have set time to " - << QDateTime::currentDateTime().toString() << endl; + << TQDateTime::currentDateTime().toString() << endl; #endif return delayDone(); } diff --git a/kpilot/conduits/timeconduit/time-conduit.h b/kpilot/conduits/timeconduit/time-conduit.h index 8a6a57a50..06b6b50e1 100644 --- a/kpilot/conduits/timeconduit/time-conduit.h +++ b/kpilot/conduits/timeconduit/time-conduit.h @@ -36,7 +36,7 @@ public: TimeConduit( KPilotLink *o, const char *n = 0L, - const QStringList &a = QStringList() ); + const TQStringList &a = TQStringList() ); virtual ~TimeConduit(); virtual bool exec(); diff --git a/kpilot/conduits/timeconduit/time-setup.cc b/kpilot/conduits/timeconduit/time-setup.cc index ce562d7dd..409cdc346 100644 --- a/kpilot/conduits/timeconduit/time-setup.cc +++ b/kpilot/conduits/timeconduit/time-setup.cc @@ -28,9 +28,9 @@ #include "options.h" -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> #include <kapplication.h> #include <kaboutdata.h> @@ -57,7 +57,7 @@ static KAboutData *createAbout() -TimeWidgetConfig::TimeWidgetConfig(QWidget *w, const char *n) : +TimeWidgetConfig::TimeWidgetConfig(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(new TimeWidget(w)) { diff --git a/kpilot/conduits/timeconduit/time-setup.h b/kpilot/conduits/timeconduit/time-setup.h index 7552c12d6..b0bb2f0ae 100644 --- a/kpilot/conduits/timeconduit/time-setup.h +++ b/kpilot/conduits/timeconduit/time-setup.h @@ -38,10 +38,10 @@ class TimeWidgetConfig : public ConduitConfigBase { Q_OBJECT public: - TimeWidgetConfig(QWidget *parent, const char *); + TimeWidgetConfig(TQWidget *parent, const char *); virtual void commit(); virtual void load(); - static ConduitConfigBase *create(QWidget *,const char *); + static ConduitConfigBase *create(TQWidget *,const char *); protected: TimeWidget *fConfigWidget; KAboutData *fAbout; diff --git a/kpilot/conduits/vcalconduit/cleanupstate.cc b/kpilot/conduits/vcalconduit/cleanupstate.cc index 29b1f6ea5..209a0e918 100644 --- a/kpilot/conduits/vcalconduit/cleanupstate.cc +++ b/kpilot/conduits/vcalconduit/cleanupstate.cc @@ -29,7 +29,7 @@ #include <options.h> #include <kio/netaccess.h> -#include <qfile.h> +#include <tqfile.h> #include "pilotDatabase.h" @@ -74,7 +74,7 @@ void CleanUpState::startSync( ConduitAction *ca ) } KCal::Calendar *fCalendar = vccb->calendar(); - QString fCalendarFile = vccb->calendarFile(); + TQString fCalendarFile = vccb->calendarFile(); if ( fCalendar ) { @@ -96,7 +96,7 @@ void CleanUpState::startSync( ConduitAction *ca ) else { KIO::NetAccess::removeTempFile( fCalendarFile ); } - QFile backup( fCalendarFile + CSL1( "~" ) ); + TQFile backup( fCalendarFile + CSL1( "~" ) ); backup.remove(); } break; diff --git a/kpilot/conduits/vcalconduit/hhtopcstate.cc b/kpilot/conduits/vcalconduit/hhtopcstate.cc index 79089671d..82024f123 100644 --- a/kpilot/conduits/vcalconduit/hhtopcstate.cc +++ b/kpilot/conduits/vcalconduit/hhtopcstate.cc @@ -186,13 +186,13 @@ void VCalConduitBase::slotPalmRecToPC() if ( syncMode()==SyncMode::eCopyHHToPC ) { emit logMessage(i18n("Cleaning up ...")); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } else { emit logMessage(i18n("Copying records to Pilot ...")); - QTimer::singleShot(0 ,this,SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0 ,this,TQT_SLOT(slotPCRecToPalm())); return; } } @@ -244,6 +244,6 @@ void VCalConduitBase::slotPalmRecToPC() KPILOT_DELETE(r); KPILOT_DELETE(s); - QTimer::singleShot(0,this,SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0,this,TQT_SLOT(slotPalmRecToPC())); } */ diff --git a/kpilot/conduits/vcalconduit/kcalRecord.cc b/kpilot/conduits/vcalconduit/kcalRecord.cc index f12d9b8c3..598866dc5 100644 --- a/kpilot/conduits/vcalconduit/kcalRecord.cc +++ b/kpilot/conduits/vcalconduit/kcalRecord.cc @@ -49,8 +49,8 @@ void KCalSync::setCategory(PilotRecordBase *de, return; } - QString deCategory; - QStringList eventCategories = e->categories(); + TQString deCategory; + TQStringList eventCategories = e->categories(); if (eventCategories.size() < 1) { // This event has no categories. @@ -70,14 +70,14 @@ void KCalSync::setCategory(PilotRecordBase *de, } } - QStringList availableHandheldCategories = Pilot::categoryNames(&info); + TQStringList availableHandheldCategories = Pilot::categoryNames(&info); // Either the record is unfiled, and should be filed, or // it has a category set which is not in the list of // categories that the event has. So go looking for // a category that is available both for the event // and on the handheld. - for ( QStringList::ConstIterator it = eventCategories.begin(); + for ( TQStringList::ConstIterator it = eventCategories.begin(); it != eventCategories.end(); ++it ) { // Odd, an empty category string. @@ -113,9 +113,9 @@ void KCalSync::setCategory(KCal::Incidence *e, return; } - QStringList cats=e->categories(); + TQStringList cats=e->categories(); int cat = de->category(); - QString newcat = Pilot::categoryName(&info,cat); + TQString newcat = Pilot::categoryName(&info,cat); DEBUGKPILOT << fname << ": palm category id: [" << cat << "], label: [" << newcat << "]" << endl; diff --git a/kpilot/conduits/vcalconduit/pctohhstate.cc b/kpilot/conduits/vcalconduit/pctohhstate.cc index b68771f13..d2866fd19 100644 --- a/kpilot/conduits/vcalconduit/pctohhstate.cc +++ b/kpilot/conduits/vcalconduit/pctohhstate.cc @@ -111,8 +111,8 @@ void PCToHHState::handleRecord( ConduitAction *ca ) DEBUGKPILOT << fname << ": found PC entry with pilotID " << id <<endl; DEBUGKPILOT << fname << ": Description: " << e->summary() << endl; - QDateTime start_time = e->dtStart(); - QDateTime end_time = e->dtEnd(); + TQDateTime start_time = e->dtStart(); + TQDateTime end_time = e->dtEnd(); DEBUGKPILOT << fname << ": Time: "<< start_time.toString() << " until " << end_time.toString() << endl; diff --git a/kpilot/conduits/vcalconduit/teststate.cc b/kpilot/conduits/vcalconduit/teststate.cc index d8c8e56cc..c762d32b4 100644 --- a/kpilot/conduits/vcalconduit/teststate.cc +++ b/kpilot/conduits/vcalconduit/teststate.cc @@ -28,8 +28,8 @@ #include <options.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqfile.h> #include "pilotSerialDatabase.h" #include "pilotLocalDatabase.h" @@ -38,7 +38,7 @@ #include "teststate.h" #include "vcal-conduitbase.h" -TestState::TestState() : fCalendar( QString::null ) +TestState::TestState() : fCalendar( TQString::null ) { fState = eTest; } @@ -109,7 +109,7 @@ void TestState::finishSync( ConduitAction *ca ) // No more records present on the device so lets dump the // readed records in a file. - QFile f( CSL1("dump.ics") ); + TQFile f( CSL1("dump.ics") ); if( !f.exists() ) { f.open( IO_WriteOnly ); diff --git a/kpilot/conduits/vcalconduit/todo-conduit.cc b/kpilot/conduits/vcalconduit/todo-conduit.cc index 302ada565..9b1007c20 100644 --- a/kpilot/conduits/vcalconduit/todo-conduit.cc +++ b/kpilot/conduits/vcalconduit/todo-conduit.cc @@ -34,8 +34,8 @@ #include "options.h" -#include <qdatetime.h> -#include <qtextcodec.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> #include <libkcal/calendar.h> #include <libkcal/todo.h> @@ -110,8 +110,8 @@ KCal::Incidence *TodoConduitPrivate::findIncidence(PilotRecordBase *tosearch) PilotTodoEntry*entry=dynamic_cast<PilotTodoEntry*>(tosearch); if (!entry) return 0L; - QString title=entry->getDescription(); - QDateTime dt=readTm( entry->getDueDate() ); + TQString title=entry->getDescription(); + TQDateTime dt=readTm( entry->getDueDate() ); KCal::Todo::List::ConstIterator it; for( it = fAllTodos.begin(); it != fAllTodos.end(); ++it ) { @@ -176,7 +176,7 @@ KCal::Incidence *TodoConduitPrivate::getNextModifiedIncidence() TodoConduit::TodoConduit(KPilotLink *d, const char *n, - const QStringList &a) : VCalConduitBase(d,n,a), + const TQStringList &a) : VCalConduitBase(d,n,a), fTodoAppInfo( 0L ) { FUNCTIONSETUP; @@ -223,14 +223,14 @@ void TodoConduit::_getAppInfo() -const QString TodoConduit::getTitle(PilotRecordBase *de) +const TQString TodoConduit::getTitle(PilotRecordBase *de) { PilotTodoEntry*d=dynamic_cast<PilotTodoEntry*>(de); if (d) { - return QString(d->getDescription()); + return TQString(d->getDescription()); } - return QString::null; + return TQString::null; } diff --git a/kpilot/conduits/vcalconduit/todo-conduit.h b/kpilot/conduits/vcalconduit/todo-conduit.h index 3364d61f2..8d8780eba 100644 --- a/kpilot/conduits/vcalconduit/todo-conduit.h +++ b/kpilot/conduits/vcalconduit/todo-conduit.h @@ -67,13 +67,13 @@ Q_OBJECT public: TodoConduit(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~TodoConduit(); protected: - virtual const QString getTitle(PilotRecordBase *de); + virtual const TQString getTitle(PilotRecordBase *de); - virtual const QString dbname() { return CSL1("ToDoDB"); }; + virtual const TQString dbname() { return CSL1("ToDoDB"); }; virtual void preSync(); virtual VCalConduitPrivateBase *createPrivateCalendarData(KCal::Calendar *fCalendar) { diff --git a/kpilot/conduits/vcalconduit/todo-setup.cc b/kpilot/conduits/vcalconduit/todo-setup.cc index eb1c98c91..19a731c5a 100644 --- a/kpilot/conduits/vcalconduit/todo-setup.cc +++ b/kpilot/conduits/vcalconduit/todo-setup.cc @@ -29,7 +29,7 @@ #include "options.h" -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include <kaboutdata.h> #include "korganizerConduit.h" @@ -38,7 +38,7 @@ -ToDoWidgetSetup::ToDoWidgetSetup(QWidget *w, const char *n) : +ToDoWidgetSetup::ToDoWidgetSetup(TQWidget *w, const char *n) : VCalWidgetSetupBase(w,n) { FUNCTIONSETUP; @@ -74,7 +74,7 @@ ToDoWidgetSetup::~ToDoWidgetSetup() FUNCTIONSETUP; } -/* static */ ConduitConfigBase *ToDoWidgetSetup::create(QWidget *w, const char *n) +/* static */ ConduitConfigBase *ToDoWidgetSetup::create(TQWidget *w, const char *n) { return new ToDoWidgetSetup(w,n); } diff --git a/kpilot/conduits/vcalconduit/todo-setup.h b/kpilot/conduits/vcalconduit/todo-setup.h index 9eebd3a3d..b9b919c92 100644 --- a/kpilot/conduits/vcalconduit/todo-setup.h +++ b/kpilot/conduits/vcalconduit/todo-setup.h @@ -34,11 +34,11 @@ class ToDoWidgetSetup : public VCalWidgetSetupBase { public: - ToDoWidgetSetup(QWidget *,const char *); + ToDoWidgetSetup(TQWidget *,const char *); virtual ~ToDoWidgetSetup(); virtual VCalConduitSettings*config(); - static ConduitConfigBase *create(QWidget *, const char *); + static ConduitConfigBase *create(TQWidget *, const char *); } ; #endif diff --git a/kpilot/conduits/vcalconduit/todoRecord.cc b/kpilot/conduits/vcalconduit/todoRecord.cc index 7db753fb5..7618df368 100644 --- a/kpilot/conduits/vcalconduit/todoRecord.cc +++ b/kpilot/conduits/vcalconduit/todoRecord.cc @@ -126,7 +126,7 @@ bool KCalSync::setTodo(KCal::Todo *e, // COMPLETED? // e->setCompleted(de->getComplete()); if ( de->getComplete() && !e->hasCompletedDate() ) { - e->setCompleted( QDateTime::currentDateTime() ); + e->setCompleted( TQDateTime::currentDateTime() ); } e->setSummary(de->getDescription()); diff --git a/kpilot/conduits/vcalconduit/vcal-conduit.cc b/kpilot/conduits/vcalconduit/vcal-conduit.cc index 0eea42733..d882cf8f8 100644 --- a/kpilot/conduits/vcalconduit/vcal-conduit.cc +++ b/kpilot/conduits/vcalconduit/vcal-conduit.cc @@ -104,8 +104,8 @@ KCal::Incidence *VCalConduitPrivate::findIncidence(PilotRecordBase *tosearch) PilotDateEntry*entry=dynamic_cast<PilotDateEntry*>(tosearch); if (!entry) return 0L; - QString title=entry->getDescription(); - QDateTime dt=readTm( entry->getEventStart() ); + TQString title=entry->getDescription(); + TQDateTime dt=readTm( entry->getEventStart() ); KCal::Event::List::ConstIterator it; for( it = fAllEvents.begin(); it != fAllEvents.end(); ++it ) { @@ -170,7 +170,7 @@ KCal::Incidence *VCalConduitPrivate::getNextModifiedIncidence() VCalConduit::VCalConduit(KPilotLink *d, const char *n, - const QStringList &a) : + const TQStringList &a) : VCalConduitBase(d,n,a), fAppointmentAppInfo( 0L ) { @@ -196,11 +196,11 @@ void VCalConduit::_getAppInfo() fAppointmentAppInfo = new PilotDateInfo( fDatabase ); } -const QString VCalConduit::getTitle(PilotRecordBase *de) +const TQString VCalConduit::getTitle(PilotRecordBase *de) { PilotDateEntry*d=dynamic_cast<PilotDateEntry*>(de); - if (d) return QString(d->getDescription()); - return QString::null; + if (d) return TQString(d->getDescription()); + return TQString::null; } diff --git a/kpilot/conduits/vcalconduit/vcal-conduit.h b/kpilot/conduits/vcalconduit/vcal-conduit.h index c41ceb906..ed47d712f 100644 --- a/kpilot/conduits/vcalconduit/vcal-conduit.h +++ b/kpilot/conduits/vcalconduit/vcal-conduit.h @@ -70,11 +70,11 @@ Q_OBJECT public: VCalConduit(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~VCalConduit(); protected: - virtual const QString dbname() { return CSL1("DatebookDB"); }; + virtual const TQString dbname() { return CSL1("DatebookDB"); }; virtual void preSync() {VCalConduitBase::preSync(); _getAppInfo(); }; virtual VCalConduitPrivateBase *createPrivateCalendarData(KCal::Calendar *fCalendar); @@ -84,7 +84,7 @@ protected: virtual PilotRecordBase *newPilotEntry(PilotRecord*r); virtual KCal::Incidence*newIncidence(); - virtual const QString getTitle(PilotRecordBase *de); + virtual const TQString getTitle(PilotRecordBase *de); virtual VCalConduitSettings *config(); public: static VCalConduitSettings *theConfig(); diff --git a/kpilot/conduits/vcalconduit/vcal-conduitbase.cc b/kpilot/conduits/vcalconduit/vcal-conduitbase.cc index a9fc6376b..cd288ba59 100644 --- a/kpilot/conduits/vcalconduit/vcal-conduitbase.cc +++ b/kpilot/conduits/vcalconduit/vcal-conduitbase.cc @@ -33,8 +33,8 @@ #include <options.h> -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include <kmessagebox.h> #include <kio/netaccess.h> @@ -66,7 +66,7 @@ VCalConduitBase::VCalConduitBase(KPilotLink *d, const char *n, - const QStringList &a) : + const TQStringList &a) : ConduitAction(d,n,a), fCalendar(0L), fP(0L) @@ -176,7 +176,7 @@ VCalConduitBase::~VCalConduitBase() if (!syncMode().isTest() && !openCalendar() ) goto error; // Start processing the sync - QTimer::singleShot(0, this, SLOT(slotProcess())); + TQTimer::singleShot(0, this, TQT_SLOT(slotProcess())); return true; error: @@ -200,13 +200,13 @@ void VCalConduitBase::slotProcess() { if( hasNextRecord ) { fState->handleRecord( this ); - QTimer::singleShot( 0, this, SLOT( slotProcess() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotProcess() ) ); } // Else finish the current state if there is one else if( fState ) { fState->finishSync( this ); - QTimer::singleShot( 0, this, SLOT( slotProcess() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotProcess() ) ); } // No state so sync is finished else @@ -245,7 +245,7 @@ static void listResources( KCal::CalendarResources *p ) // this part taken from adcalendarbase.cpp: korgcfg.setGroup( "Time & Date" ); - QString tz(korgcfg.readEntry( "TimeZoneId" ) ); + TQString tz(korgcfg.readEntry( "TimeZoneId" ) ); DEBUGKPILOT << fname << ": KOrganizer's time zone = " << tz << endl; @@ -312,7 +312,7 @@ static void listResources( KCal::CalendarResources *p ) // Try to create empty file. if it fails, // no valid file name was given. - QFile fl(fCalendarFile); + TQFile fl(fCalendarFile); if (!fl.open(IO_WriteOnly | IO_Append)) { DEBUGKPILOT << fname << "Invalid calendar file name " @@ -422,7 +422,7 @@ int VCalConduitBase::resolveConflict( KCal::Incidence *e, PilotRecordBase *de ) if ( getConflictResolution() == SyncAction::eAskUser ) { // TODO: This is messed up!!! - QString query = i18n( "The following item was modified " + TQString query = i18n( "The following item was modified " "both on the Handheld and on your PC:\nPC entry:\n\t" ); query += e->summary(); query += i18n( "\nHandheld entry:\n\t" ); @@ -433,7 +433,7 @@ int VCalConduitBase::resolveConflict( KCal::Incidence *e, PilotRecordBase *de ) return KMessageBox::No == questionYesNo( query, i18n( "Conflicting Entries" ), - QString::null, + TQString::null, 0 /* Never timeout */, i18n( "Handheld" ), i18n( "PC" )); } @@ -579,9 +579,9 @@ void VCalConduitBase::updateIncidenceOnPalm( KCal::Incidence *e, } } -const QString VCalConduitBase::dbname() +const TQString VCalConduitBase::dbname() { - return QString::null; + return TQString::null; } PilotRecord *VCalConduitBase::readRecordByIndex( int index ) diff --git a/kpilot/conduits/vcalconduit/vcal-conduitbase.h b/kpilot/conduits/vcalconduit/vcal-conduitbase.h index 7d2fc6588..4e2f3ae10 100644 --- a/kpilot/conduits/vcalconduit/vcal-conduitbase.h +++ b/kpilot/conduits/vcalconduit/vcal-conduitbase.h @@ -30,7 +30,7 @@ */ -#include <qstring.h> +#include <tqstring.h> #include <libkcal/calendarlocal.h> @@ -78,7 +78,7 @@ class VCalConduitBase : public ConduitAction public: VCalConduitBase(KPilotLink *, const char *name = 0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~VCalConduitBase(); /********************************************************************* @@ -86,13 +86,13 @@ public: *********************************************************************/ protected: KCal::Calendar *fCalendar; - QString fCalendarFile; + TQString fCalendarFile; VCalConduitPrivateBase *fP; ConduitState *fState; bool hasNextRecord; - virtual const QString dbname() = 0; - virtual const QString getTitle(PilotRecordBase *de) = 0; + virtual const TQString dbname() = 0; + virtual const TQString getTitle(PilotRecordBase *de) = 0; virtual void readConfig(); virtual bool exec(); @@ -147,7 +147,7 @@ public: // Getters KCal::Calendar *calendar() const { return fCalendar; }; - QString calendarFile() const { return fCalendarFile; }; + TQString calendarFile() const { return fCalendarFile; }; virtual VCalConduitSettings *config() = 0; virtual PilotDatabase *database() const { return fDatabase; }; diff --git a/kpilot/conduits/vcalconduit/vcal-setup.cc b/kpilot/conduits/vcalconduit/vcal-setup.cc index 666e9ee0a..0361c3255 100644 --- a/kpilot/conduits/vcalconduit/vcal-setup.cc +++ b/kpilot/conduits/vcalconduit/vcal-setup.cc @@ -29,7 +29,7 @@ #include "options.h" -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include <kaboutdata.h> #include "korganizerConduit.h" @@ -37,7 +37,7 @@ #include "vcal-setup.h" -VCalWidgetSetup::VCalWidgetSetup(QWidget *w, const char *n) : +VCalWidgetSetup::VCalWidgetSetup(TQWidget *w, const char *n) : VCalWidgetSetupBase(w,n) { KAboutData *fAbout = new KAboutData("vcalConduit", @@ -71,7 +71,7 @@ VCalWidgetSetup::VCalWidgetSetup(QWidget *w, const char *n) : } -/* static */ ConduitConfigBase *VCalWidgetSetup::create(QWidget *w,const char *n) +/* static */ ConduitConfigBase *VCalWidgetSetup::create(TQWidget *w,const char *n) { return new VCalWidgetSetup(w,n); } diff --git a/kpilot/conduits/vcalconduit/vcal-setup.h b/kpilot/conduits/vcalconduit/vcal-setup.h index 407c0d99f..20723ceb8 100644 --- a/kpilot/conduits/vcalconduit/vcal-setup.h +++ b/kpilot/conduits/vcalconduit/vcal-setup.h @@ -37,8 +37,8 @@ class VCalConduitSettings; class VCalWidgetSetup : public VCalWidgetSetupBase { public: - VCalWidgetSetup(QWidget *, const char *); - static ConduitConfigBase *create(QWidget *, const char *); + VCalWidgetSetup(TQWidget *, const char *); + static ConduitConfigBase *create(TQWidget *, const char *); protected: virtual VCalConduitSettings*config(); } ; diff --git a/kpilot/conduits/vcalconduit/vcal-setupbase.cc b/kpilot/conduits/vcalconduit/vcal-setupbase.cc index 3e97987fa..643dee645 100644 --- a/kpilot/conduits/vcalconduit/vcal-setupbase.cc +++ b/kpilot/conduits/vcalconduit/vcal-setupbase.cc @@ -29,9 +29,9 @@ #include "options.h" -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> #include <kurlrequester.h> @@ -39,7 +39,7 @@ #include "vcalconduitSettings.h" #include "vcal-setupbase.h" -VCalWidgetSetupBase::VCalWidgetSetupBase(QWidget *w, const char *n) : +VCalWidgetSetupBase::VCalWidgetSetupBase(TQWidget *w, const char *n) : ConduitConfigBase(w,n), fConfigWidget(new VCalWidget(w)) { @@ -49,11 +49,11 @@ VCalWidgetSetupBase::VCalWidgetSetupBase(QWidget *w, const char *n) : fConfigWidget->fCalendarFile->setMode(KFile::File); fConfigWidget->fCalendarFile->setFilter(CSL1("*.vcs *.ics|ICalendars\n*.*|All Files (*.*)")); -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fSyncDestination,SIGNAL(clicked(int))); - CM(fCalendarFile,SIGNAL(textChanged(const QString &))); - CM(fArchive,SIGNAL(toggled(bool))); - CM(fConflictResolution,SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fSyncDestination,TQT_SIGNAL(clicked(int))); + CM(fCalendarFile,TQT_SIGNAL(textChanged(const TQString &))); + CM(fArchive,TQT_SIGNAL(toggled(bool))); + CM(fConflictResolution,TQT_SIGNAL(activated(int))); #undef CM } diff --git a/kpilot/conduits/vcalconduit/vcal-setupbase.h b/kpilot/conduits/vcalconduit/vcal-setupbase.h index 7863659bd..a14bf14d8 100644 --- a/kpilot/conduits/vcalconduit/vcal-setupbase.h +++ b/kpilot/conduits/vcalconduit/vcal-setupbase.h @@ -37,7 +37,7 @@ class VCalConduitSettings; class VCalWidgetSetupBase : public ConduitConfigBase { public: - VCalWidgetSetupBase(QWidget *, const char *); + VCalWidgetSetupBase(TQWidget *, const char *); virtual ~VCalWidgetSetupBase(); virtual void load(); diff --git a/kpilot/conduits/vcalconduit/vcalRecord.cc b/kpilot/conduits/vcalconduit/vcalRecord.cc index f9866d91a..898bc7986 100644 --- a/kpilot/conduits/vcalconduit/vcalRecord.cc +++ b/kpilot/conduits/vcalconduit/vcalRecord.cc @@ -70,7 +70,7 @@ static void setAlarms(KCal::Event *e, const PilotDateEntry *de) e->clearAlarms(); if (!de->isAlarmEnabled()) return; -// QDateTime alarmDT = readTm(de->getEventStart()); +// TQDateTime alarmDT = readTm(de->getEventStart()); int advanceUnits = de->getAdvanceUnits(); switch (advanceUnits) @@ -117,7 +117,7 @@ static void setRecurrence(KCal::Event *event,const PilotDateEntry *dateEntry) KCal::Recurrence *recur = event->recurrence(); int freq = dateEntry->getRepeatFrequency(); bool repeatsForever = dateEntry->getRepeatForever(); - QDate endDate, evt; + TQDate endDate, evt; if (!repeatsForever) { @@ -131,7 +131,7 @@ static void setRecurrence(KCal::Event *event,const PilotDateEntry *dateEntry) #endif } - QBitArray dayArray(7); + TQBitArray dayArray(7); switch(dateEntry->getRepeatType()) { @@ -326,7 +326,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event) // first we have 'fake type of recurrence' when a multi-day event is passed to the pilot, it is converted to an event // which recurs daily a number of times. if the event itself recurs, this will be overridden, and // only the first day will be included in the event!!!! - QDateTime startDt(readTm(dateEntry->getEventStart())), endDt(readTm(dateEntry->getEventEnd())); + TQDateTime startDt(readTm(dateEntry->getEventStart())), endDt(readTm(dateEntry->getEventEnd())); if (startDt.daysTo(endDt)) { isMultiDay=true; @@ -350,7 +350,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event) int freq=r->frequency(); - QDate endDate=r->endDate(); + TQDate endDate=r->endDate(); if ( r->duration() < 0 || !endDate.isValid() ) { @@ -366,7 +366,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event) DEBUGKPILOT<< "duration: "<<r->duration() << ", endDate: "<<endDate.toString()<< ", ValidEndDate: "<<endDate.isValid()<<", NullEndDate: "<<endDate.isNull()<<endl; #endif - QBitArray dayArray(7), dayArrayPalm(7); + TQBitArray dayArray(7), dayArrayPalm(7); switch(recType) { case KCal::Recurrence::rDaily: @@ -392,7 +392,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event) if (r->monthPositions().count()>0) { // Only take the first monthly position, as the palm allows only one - QValueList<KCal::RecurrenceRule::WDayPos> mps=r->monthPositions(); + TQValueList<KCal::RecurrenceRule::WDayPos> mps=r->monthPositions(); KCal::RecurrenceRule::WDayPos mp=mps.first(); int week = mp.pos(); int day = (mp.day()+1) % 7; // rotate because of different offset diff --git a/kpilot/kpilot/addressEditor.cc b/kpilot/kpilot/addressEditor.cc index 0ea0032bf..cfab322e9 100644 --- a/kpilot/kpilot/addressEditor.cc +++ b/kpilot/kpilot/addressEditor.cc @@ -33,13 +33,13 @@ #endif #ifndef QLINEEDIT_H -#include <qlineedit.h> +#include <tqlineedit.h> #endif #ifndef QLAYOUT_H -#include <qlayout.h> +#include <tqlayout.h> #endif #ifndef QLABEL_H -#include <qlabel.h> +#include <tqlabel.h> #endif #ifndef _KDEBUG_H #include <kdebug.h> @@ -54,7 +54,7 @@ AddressEditor::AddressEditor(PilotAddress * p, PilotAddressInfo *appInfo, - QWidget * parent, + TQWidget * parent, const char *name) : KDialogBase(KDialogBase::Plain, i18n("Address Editor"), @@ -69,8 +69,8 @@ AddressEditor::AddressEditor(PilotAddress * p, initLayout(); fillFields(); - connect(parent, SIGNAL(recordChanged(PilotAddress *)), - this, SLOT(updateRecord(PilotAddress *))); + connect(parent, TQT_SIGNAL(recordChanged(PilotAddress *)), + this, TQT_SLOT(updateRecord(PilotAddress *))); } @@ -100,7 +100,7 @@ AddressEditor::~AddressEditor() /* * Return phone label from AddressAppInfo + some sanity checking */ -QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) +TQString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) { FUNCTIONSETUP; if (!addr) @@ -109,7 +109,7 @@ QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) } PilotAddressInfo::EPhoneType idx = addr->getPhoneType(i); - QString ret = fAppInfo->phoneLabel(idx) + CSL1(":"); + TQString ret = fAppInfo->phoneLabel(idx) + CSL1(":"); return ret; } @@ -154,16 +154,16 @@ void AddressEditor::fillFields() #define MakeField(text,field,row,column) \ - t=new QLabel(text,p); \ - field = new QLineEdit(p); \ + t=new TQLabel(text,p); \ + field = new TQLineEdit(p); \ field->setMinimumWidth(20*SPACING); \ t->setBuddy(field); \ grid->addWidget(t,row,column); \ grid->addWidget(field,row,column+1); #define MakeFieldL(text,label,field,row,column) \ - label = new QLabel(text,p); \ - field = new QLineEdit(p); \ + label = new TQLabel(text,p); \ + field = new TQLineEdit(p); \ field->setMinimumWidth(20*SPACING); \ label->setBuddy(field); \ grid->addWidget(label,row,column); \ @@ -173,10 +173,10 @@ void AddressEditor::initLayout() { FUNCTIONSETUP; - QFrame *p = plainPage(); - QGridLayout *grid = new QGridLayout(p, 10, 5, 0, SPACING); + TQFrame *p = plainPage(); + TQGridLayout *grid = new TQGridLayout(p, 10, 5, 0, SPACING); - QLabel *t; + TQLabel *t; MakeField(i18n("Last name:"), fLastNameField, 0, 0); MakeField(i18n("First name:"), fFirstNameField, 1, 0); diff --git a/kpilot/kpilot/addressEditor.h b/kpilot/kpilot/addressEditor.h index 67132b104..5e676c4c9 100644 --- a/kpilot/kpilot/addressEditor.h +++ b/kpilot/kpilot/addressEditor.h @@ -44,7 +44,7 @@ class AddressEditor : public KDialogBase public: AddressEditor(PilotAddress *address, PilotAddressInfo *appInfo, - QWidget *parent, const char *name=0L); + TQWidget *parent, const char *name=0L); ~AddressEditor(); @@ -62,26 +62,26 @@ private: PilotAddress* fAddress; PilotAddressInfo *fAppInfo; // entry fields - QLineEdit *fCustom4Field; - QLineEdit *fCustom3Field; - QLineEdit *fCustom2Field; - QLineEdit *fCustom1Field; - QLineEdit *fCountryField; - QLineEdit *fZipField; - QLineEdit *fStateField; - QLineEdit *fCityField; - QLineEdit *fAddressField; - QLineEdit *fPhoneField[5]; - QLineEdit *fCompanyField; - QLineEdit *fTitleField; - QLineEdit *fFirstNameField; - QLineEdit *fLastNameField; + TQLineEdit *fCustom4Field; + TQLineEdit *fCustom3Field; + TQLineEdit *fCustom2Field; + TQLineEdit *fCustom1Field; + TQLineEdit *fCountryField; + TQLineEdit *fZipField; + TQLineEdit *fStateField; + TQLineEdit *fCityField; + TQLineEdit *fAddressField; + TQLineEdit *fPhoneField[5]; + TQLineEdit *fCompanyField; + TQLineEdit *fTitleField; + TQLineEdit *fFirstNameField; + TQLineEdit *fLastNameField; // phone labels (changing!) - QLabel *m_phoneLabel[5]; + TQLabel *m_phoneLabel[5]; void initLayout(); void fillFields(); - QString phoneLabelText(PilotAddress *, const PhoneSlot &i); + TQString phoneLabelText(PilotAddress *, const PhoneSlot &i); }; #endif diff --git a/kpilot/kpilot/addressWidget.cc b/kpilot/kpilot/addressWidget.cc index 4b900abb2..e72b33abf 100644 --- a/kpilot/kpilot/addressWidget.cc +++ b/kpilot/kpilot/addressWidget.cc @@ -38,19 +38,19 @@ #include <cstring> #include <cstdlib> -#include <qptrlist.h> -#include <qlistbox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qtextstream.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qmultilineedit.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qtextview.h> -#include <qtextcodec.h> -#include <qregexp.h> +#include <tqptrlist.h> +#include <tqlistbox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqtextstream.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqtextview.h> +#include <tqtextcodec.h> +#include <tqregexp.h> #include <kapplication.h> #include <kmessagebox.h> @@ -65,8 +65,8 @@ #include "addressWidget.moc" -AddressWidget::AddressWidget(QWidget * parent, - const QString & path) : +AddressWidget::AddressWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_address", path), fAddrInfo(0L), fAddressAppInfo(0L), @@ -170,7 +170,7 @@ void AddressWidget::hideComponent() } } -/* virtual */ bool AddressWidget::preHotSync(QString &s) +/* virtual */ bool AddressWidget::preHotSync(TQString &s) { FUNCTIONSETUP; @@ -185,7 +185,7 @@ void AddressWidget::hideComponent() #if KDE_VERSION<220 s = i18n("There are still %1 address editing windows open.") - .arg(QString::number(fPendingAddresses)); + .arg(TQString::number(fPendingAddresses)); #else s = i18n("There is still an address editing window open.", "There are still %n address editing windows open.", @@ -213,74 +213,74 @@ void AddressWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label; - QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING); + TQLabel *label; + TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING); - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("<qt>Select the category of addresses to display here.</qt>")); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); - fListBox = new QListBox(this); + fListBox = new TQListBox(this); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(highlighted(int)), - this, SLOT(slotShowAddress(int))); - connect(fListBox, SIGNAL(selected(int)), - this, SLOT(slotEditRecord())); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotShowAddress(int))); + connect(fListBox, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(slotEditRecord())); + TQWhatsThis::add(fListBox, i18n("<qt>This list displays all the addresses " "in the selected category. Click on " "one to display it to the right.</qt>")); - label = new QLabel(i18n("Address info:"), this); + label = new TQLabel(i18n("Address info:"), this); grid->addWidget(label, 0, 2); // address info text view - fAddrInfo = new QTextView(this); + fAddrInfo = new TQTextView(this); grid->addMultiCellWidget(fAddrInfo, 1, 4, 2, 2); - QPushButton *button; - QString wt; + TQPushButton *button; + TQString wt; - fEditButton = new QPushButton(i18n("Edit Record..."), this); + fEditButton = new TQPushButton(i18n("Edit Record..."), this); grid->addWidget(fEditButton, 2, 0); - connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord())); + connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>You can edit an address when it is selected.</qt>") : i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(fEditButton,wt); + TQWhatsThis::add(fEditButton,wt); - button = new QPushButton(i18n("New Record..."), this); + button = new TQPushButton(i18n("New Record..."), this); grid->addWidget(button, 2, 1); - connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Add a new address to the address book.</qt>") : i18n("<qt><i>Adding is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(button, wt); + TQWhatsThis::add(button, wt); button->setEnabled(KPilotSettings::internalEditors()); - fDeleteButton = new QPushButton(i18n("Delete Record"), this); + fDeleteButton = new TQPushButton(i18n("Delete Record"), this); grid->addWidget(fDeleteButton, 3, 0); - connect(fDeleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Delete the selected address from the address book.</qt>") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - button = new QPushButton(i18n("Export addresses to file","Export..."), this); + button = new TQPushButton(i18n("Export addresses to file","Export..."), this); grid->addWidget(button, 3,1); - connect(button, SIGNAL(clicked()), this, SLOT(slotExport())); - QWhatsThis::add(button, + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExport())); + TQWhatsThis::add(button, i18n("<qt>Export all addresses in the selected category to CSV format.</qt>") ); - QWhatsThis::add(fDeleteButton,wt); + TQWhatsThis::add(fDeleteButton,wt); } void AddressWidget::updateWidget() @@ -313,12 +313,12 @@ void AddressWidget::updateWidget() if ((currentCatID == -1) || (fAddressList.current()->category() == currentCatID)) { - QString title = createTitle(fAddressList.current(), + TQString title = createTitle(fAddressList.current(), addressDisplayMode); if (!title.isEmpty()) { - title.remove(QRegExp(CSL1("\n.*"))); + title.remove(TQRegExp(CSL1("\n.*"))); PilotListItem *p = new PilotListItem(title, listIndex, fAddressList.current()); @@ -340,11 +340,11 @@ void AddressWidget::updateWidget() -QString AddressWidget::createTitle(PilotAddress * address, int displayMode) +TQString AddressWidget::createTitle(PilotAddress * address, int displayMode) { // FUNCTIONSETUP; - QString title; + TQString title; switch (displayMode) { @@ -441,10 +441,10 @@ void AddressWidget::slotEditRecord() AddressEditor *editor = new AddressEditor(selectedRecord, fAddressAppInfo, this); - connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)), - this, SLOT(slotUpdateRecord(PilotAddress *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)), + this, TQT_SLOT(slotUpdateRecord(PilotAddress *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingAddresses++; @@ -491,10 +491,10 @@ void AddressWidget::slotCreateNewRecord() AddressEditor *editor = new AddressEditor(0L, fAddressAppInfo, this); - connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)), - this, SLOT(slotAddRecord(PilotAddress *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)), + this, TQT_SLOT(slotAddRecord(PilotAddress *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingAddresses++; @@ -605,7 +605,7 @@ void AddressWidget::slotShowAddress(int which) << endl; #endif - QString text(CSL1("<qt>")); + TQString text(CSL1("<qt>")); text += addr->getTextRepresentation(fAddressAppInfo,Qt::RichText); text += CSL1("</qt>\n"); fAddrInfo->setText(text); @@ -673,13 +673,13 @@ void AddressWidget::slotExport() int currentCatID = findSelectedCategory(fCatList, fAddressAppInfo->categoryInfo()); - QString prompt = (currentCatID==-1) ? + TQString prompt = (currentCatID==-1) ? i18n("Export All Addresses") : i18n("Export Address Category %1").arg(fAddressAppInfo->categoryName(currentCatID)) ; - QString saveFile = KFileDialog::getSaveFileName( - QString::null, + TQString saveFile = KFileDialog::getSaveFileName( + TQString::null, CSL1("*.csv|Comma Separated Values"), this, prompt @@ -691,7 +691,7 @@ void AddressWidget::slotExport() #endif return; } - if (QFile::exists(saveFile) && + if (TQFile::exists(saveFile) && KMessageBox::warningContinueCancel(this, i18n("The file <i>%1</i> exists. Overwrite?").arg(saveFile), i18n("Overwrite File?"), @@ -703,7 +703,7 @@ void AddressWidget::slotExport() return; } - FILE *f = fopen(QFile::encodeName(saveFile),"w"); + FILE *f = fopen(TQFile::encodeName(saveFile),"w"); if (!f) { KMessageBox::sorry(this, diff --git a/kpilot/kpilot/addressWidget.h b/kpilot/kpilot/addressWidget.h index 289b49e33..1fa172b88 100644 --- a/kpilot/kpilot/addressWidget.h +++ b/kpilot/kpilot/addressWidget.h @@ -46,13 +46,13 @@ class AddressWidget : public PilotComponent Q_OBJECT public: - AddressWidget(QWidget* parent,const QString& dbpath); + AddressWidget(TQWidget* parent,const TQString& dbpath); ~AddressWidget(); // Pilot Component Methods: virtual void showComponent(); virtual void hideComponent(); - virtual bool preHotSync(QString &); + virtual bool preHotSync(TQString &); virtual void postHotSync(); public slots: @@ -107,13 +107,13 @@ private: * Create a sensible "title" for an address, composed * of first + last name if possible. */ - QString createTitle(PilotAddress *,int displayMode); + TQString createTitle(PilotAddress *,int displayMode); /** - * We use a QComboBox fCatList to hold the user-visible names - * of all the categories. The QTextView fAddrInfo is for + * We use a TQComboBox fCatList to hold the user-visible names + * of all the categories. The TQTextView fAddrInfo is for * displaying the currently selected address, if any. - * The QListBox fListBox lists all the addresses in the + * The TQListBox fListBox lists all the addresses in the * currently selected category. * * The entire address database is read into memory in the @@ -123,11 +123,11 @@ private: * * The two buttons should speak for themselves. */ - QComboBox *fCatList; - QTextView *fAddrInfo; + TQComboBox *fCatList; + TQTextView *fAddrInfo; PilotAddressInfo *fAddressAppInfo; - QPtrList<PilotAddress> fAddressList; - QListBox *fListBox; + TQPtrList<PilotAddress> fAddressList; + TQListBox *fListBox; QPushButton *fEditButton,*fDeleteButton; protected: diff --git a/kpilot/kpilot/conduitConfigDialog.cc b/kpilot/kpilot/conduitConfigDialog.cc index 6e4f0fc94..3ea444d3f 100644 --- a/kpilot/kpilot/conduitConfigDialog.cc +++ b/kpilot/kpilot/conduitConfigDialog.cc @@ -30,18 +30,18 @@ #include "options.h" -#include <qlistview.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qvbox.h> -#include <qsplitter.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqlistview.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqvbox.h> +#include <tqsplitter.h> +#include <tqheader.h> +#include <tqtimer.h> #include <kservice.h> #include <kservicetype.h> @@ -72,13 +72,13 @@ extern "C" { - KDE_EXPORT KCModule *create_kpilotconfig( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kpilotconfig( TQWidget *parent, const char * ) { FUNCTIONSETUP; return new ConduitConfigWidget( parent, "kcmkpilotconfig" ); } - KDE_EXPORT ConfigWizard *create_wizard(QWidget *parent, int m) + KDE_EXPORT ConfigWizard *create_wizard(TQWidget *parent, int m) { FUNCTIONSETUP; return new ConfigWizard(parent,"Wizard", m); @@ -89,18 +89,18 @@ extern "C" class ConduitTip : public QToolTip { public: - ConduitTip(QListView *parent); + ConduitTip(TQListView *parent); virtual ~ConduitTip(); protected: - virtual void maybeTip(const QPoint &); + virtual void maybeTip(const TQPoint &); - QListView *fListView; + TQListView *fListView; } ; -ConduitTip::ConduitTip(QListView *p) : - QToolTip(p->viewport(),0L), +ConduitTip::ConduitTip(TQListView *p) : + TQToolTip(p->viewport(),0L), fListView(p) { FUNCTIONSETUP; @@ -111,11 +111,11 @@ ConduitTip::~ConduitTip() FUNCTIONSETUP; } -/* virtual */ void ConduitTip::maybeTip(const QPoint &p) +/* virtual */ void ConduitTip::maybeTip(const TQPoint &p) { FUNCTIONSETUP; - QListViewItem *l = fListView->itemAt(p); + TQListViewItem *l = fListView->itemAt(p); if (!l) return; @@ -130,7 +130,7 @@ ConduitTip::~ConduitTip() << endl; #endif - QString s = l->text(CONDUIT_COMMENT); + TQString s = l->text(CONDUIT_COMMENT); if (s.isEmpty()) return; if (s.find(CSL1("<qt>"),0,false) == -1) @@ -148,7 +148,7 @@ ConduitTip::~ConduitTip() class KPilotCheckListItem : public QCheckListItem { public: - KPilotCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem(parent, text, tt),mOriginalState(false) {} + KPilotCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem(parent, text, tt),mOriginalState(false) {} ~KPilotCheckListItem() {} void setOriginalState(bool state) { mOriginalState=state; setOn(state);} @@ -174,23 +174,23 @@ protected: ** Create a page in the widget stack @p parent on page @p pageno, ** bearing the given @p text. The remainder of the parameters are ** for esoteric things like: -** @p buttons set to non-null to include (and return) a QHBox suitable +** @p buttons set to non-null to include (and return) a TQHBox suitable ** for displaying a row of buttons in on the page. -** @p label set to non-null to return the QLabel used to display @p text. +** @p label set to non-null to return the TQLabel used to display @p text. */ -static void addDescriptionPage(QWidgetStack *parent, +static void addDescriptionPage(TQWidgetStack *parent, int pageno, - const QString &text, - QHBox **buttons = 0L, - QLabel **label = 0L) + const TQString &text, + TQHBox **buttons = 0L, + TQLabel **label = 0L) { - QVBox *v = new QVBox(parent); - QLabel *l = 0L; + TQVBox *v = new TQVBox(parent); + TQLabel *l = 0L; - v->setFrameShape(QLabel::NoFrame); + v->setFrameShape(TQLabel::NoFrame); v->setMargin(SPACING); - l = new QLabel(v); + l = new TQLabel(v); l->setText(text); l->setAlignment(Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak); @@ -198,15 +198,15 @@ static void addDescriptionPage(QWidgetStack *parent, if (buttons) { - *buttons = new QHBox(v); - l = new QLabel(v); + *buttons = new TQHBox(v); + l = new TQLabel(v); } parent->addWidget(v,pageno); } -ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) : +ConduitConfigWidgetBase::ConduitConfigWidgetBase(TQWidget *parent, const char *n) : KCModule(parent, n), fConduitList(0L), fStack(0L), @@ -217,32 +217,32 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) { FUNCTIONSETUP; - QWidget *w = 0L; // For spacing purposes only. - QHBox *btns = 0L; + TQWidget *w = 0L; // For spacing purposes only. + TQHBox *btns = 0L; - QHBoxLayout *mainLayout = new QHBoxLayout(this); + TQHBoxLayout *mainLayout = new TQHBoxLayout(this); mainLayout->setSpacing(10); // Create the left hand column - fConduitList = new QListView(this ,"ConduitList"); - fConduitList->addColumn(QString::null); + fConduitList = new TQListView(this ,"ConduitList"); + fConduitList->addColumn(TQString::null); fConduitList->header()->hide(); fConduitList->setSizePolicy( - QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred)); + TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); mainLayout->addWidget(fConduitList); // Create the title - QVBoxLayout *vbox = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, KDialog::spacingHint()); // String below is just to make space; no need to translate. - fTitleText = new QLabel(CSL1("Conduit Setup - Addressbook"), this); - QFont titleFont(fTitleText->font()); + fTitleText = new TQLabel(CSL1("Conduit Setup - Addressbook"), this); + TQFont titleFont(fTitleText->font()); titleFont.setBold(true); fTitleText->setFont(titleFont); vbox->addWidget(fTitleText, 0, AlignLeft); - vbox->addWidget(new KSeparator(QFrame::HLine|QFrame::Plain, this)); + vbox->addWidget(new KSeparator(TQFrame::HLine|TQFrame::Plain, this)); // Right hand column - fStack = new QWidgetStack(this, "RightPart"); + fStack = new TQWidgetStack(this, "RightPart"); vbox->addWidget(fStack, 10); mainLayout->addLayout(vbox); @@ -258,16 +258,16 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) // addDescriptionPage(fStack,OLD_CONDUIT, i18n("<qt>This is an old-style conduit.</qt>"),&btns); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); - fConfigureButton = new QPushButton(btns); + fConfigureButton = new TQPushButton(btns); fConfigureButton->setText(i18n("Configure...")); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); // Page 3 addDescriptionPage(fStack,INTERNAL_CONDUIT, - QString::null,0L,&fActionDescription); + TQString::null,0L,&fActionDescription); // Page 5 - explanation about conduits addDescriptionPage(fStack,CONDUIT_EXPLN, @@ -290,17 +290,17 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) "Checked conduits will be run during a HotSync. " "Select a conduit to configure it.</p>" "</qt>"),&btns); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); - fConfigureWizard = new QPushButton(i18n("Configuration Wizard"),btns); - w = new QWidget(btns); + fConfigureWizard = new TQPushButton(i18n("Configuration Wizard"),btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); fStack->addWidget(ConduitConfigBase::aboutPage(fStack,0L),GENERAL_ABOUT); } -ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n, +ConduitConfigWidget::ConduitConfigWidget(TQWidget *parent, const char *n, bool) : ConduitConfigWidgetBase(parent,n), fConfigure(0L), @@ -319,25 +319,25 @@ ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n, fConduitList->resize(fConduitList->sizeHint()); fConduitList->setMinimumSize(fConduitList->sizeHint()); fConduitList->setColumnWidth(0, fConduitList->sizeHint().width()); - fConduitList->setResizeMode(QListView::AllColumns); + fConduitList->setResizeMode(TQListView::AllColumns); - fStack->resize(fStack->sizeHint()+QSize(10,40)); - fStack->setMinimumSize(fStack->sizeHint()+QSize(10,40)); + fStack->resize(fStack->sizeHint()+TQSize(10,40)); + fStack->setMinimumSize(fStack->sizeHint()+TQSize(10,40)); - QObject::connect(fConduitList, - SIGNAL(selectionChanged(QListViewItem *)), - this,SLOT(selected(QListViewItem *))); - QObject::connect(fConduitList, - SIGNAL(clicked(QListViewItem*)), - this, SLOT(conduitsChanged(QListViewItem*))); + TQObject::connect(fConduitList, + TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this,TQT_SLOT(selected(TQListViewItem *))); + TQObject::connect(fConduitList, + TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(conduitsChanged(TQListViewItem*))); // Deprecated? - QObject::connect(fConfigureButton, - SIGNAL(clicked()), - this,SLOT(configure())); + TQObject::connect(fConfigureButton, + TQT_SIGNAL(clicked()), + this,TQT_SLOT(configure())); - QObject::connect(fConfigureWizard,SIGNAL(clicked()), - this,SLOT(configureWizard())); + TQObject::connect(fConfigureWizard,TQT_SIGNAL(clicked()), + this,TQT_SLOT(configureWizard())); fGeneralPage->setSelected(true); fConduitList->setCurrentItem(fGeneralPage); @@ -359,19 +359,19 @@ void ConduitConfigWidget::fillLists() FUNCTIONSETUP; // 3 QListViewItems for the three headings in the list - QListViewItem *general,*conduits; + TQListViewItem *general,*conduits; // And two generic pointers for the rest. - QListViewItem *q = 0L; + TQListViewItem *q = 0L; KPilotCheckListItem *p = 0L; - q = new QListViewItem(fConduitList, i18n("About")); + q = new TQListViewItem(fConduitList, i18n("About")); q->setText(CONDUIT_COMMENT, i18n("About KPilot. Credits.")); q->setText(CONDUIT_LIBRARY, CSL1("general_about")); - conduits = new QListViewItem(fConduitList, i18n("Conduits")); + conduits = new TQListViewItem(fConduitList, i18n("Conduits")); - general = new QListViewItem( fConduitList, i18n("General Setup" ) ); + general = new TQListViewItem( fConduitList, i18n("General Setup" ) ); fGeneralPage = general; // Give them identifiers so they can be handled specially when selected. @@ -388,7 +388,7 @@ void ConduitConfigWidget::fillLists() // Create entries under general. -#define CE(a,b,c) q = new QListViewItem(general,a) ; \ +#define CE(a,b,c) q = new TQListViewItem(general,a) ; \ q->setText(CONDUIT_COMMENT,b) ; \ q->setText(CONDUIT_LIBRARY,c) ; @@ -402,13 +402,13 @@ void ConduitConfigWidget::fillLists() // List of installed (enabled) actions and conduits. - QStringList potentiallyInstalled = KPilotSettings::installedConduits(); + TQStringList potentiallyInstalled = KPilotSettings::installedConduits(); // Create internal conduits. // // -#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),QCheckListItem::CheckBox); \ +#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),TQCheckListItem::CheckBox); \ p->setText(CONDUIT_COMMENT,i18n(c)); \ p->setText(CONDUIT_LIBRARY,CSL1("internal_" b)); \ p->setText(CONDUIT_DESKTOP,CSL1("internal_" b)); \ @@ -424,7 +424,7 @@ void ConduitConfigWidget::fillLists() KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(CSL1("KPilotConduit")); - QValueListIterator < KServiceOffer > availList(offers.begin()); + TQValueListIterator < KServiceOffer > availList(offers.begin()); while (availList != offers.end()) { KSharedPtr < KService > o = (*availList).service(); @@ -444,7 +444,7 @@ void ConduitConfigWidget::fillLists() p = new KPilotCheckListItem(conduits, o->name(), - QCheckListItem::CheckBox); + TQCheckListItem::CheckBox); p->setMultiLinesEnabled(true); p->setText(CONDUIT_COMMENT,o->comment()); p->setText(CONDUIT_DESKTOP,o->desktopEntryName()); @@ -472,11 +472,11 @@ static void dumpConduitInfo(const KLibrary *lib) #endif } -static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p) +static ConduitConfigBase *handleGeneralPages(TQWidget *w, TQListViewItem *p) { ConduitConfigBase *o = 0L; - QString s = p->text(CONDUIT_LIBRARY) ; + TQString s = p->text(CONDUIT_LIBRARY) ; if (s.startsWith(CSL1("general_setup"))) { @@ -502,7 +502,7 @@ static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p) return o; } -void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) +void ConduitConfigWidget::loadAndConfigure(TQListViewItem *p) // ,bool exec) { FUNCTIONSETUP; @@ -517,7 +517,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) return; } - QString libraryName = p->text(CONDUIT_LIBRARY); + TQString libraryName = p->text(CONDUIT_LIBRARY); #ifdef DEBUG DEBUGKPILOT << fname @@ -563,7 +563,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) return; } - QObject *o = 0L; + TQObject *o = 0L; // Page 4: General setup if (libraryName.startsWith(CSL1("general_"))) @@ -572,7 +572,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) } else { - QCString library = QFile::encodeName(libraryName); + TQCString library = TQFile::encodeName(libraryName); KLibFactory *f = KLibLoader::self()->factory(library); if (!f) @@ -593,7 +593,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) dumpConduitInfo(KLibLoader::self()->library(library)); - QStringList a; + TQStringList a; a.append(CSL1("modal")); o = f->create(fStack, 0L, "ConduitConfigBase", a); @@ -629,7 +629,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) } // Remove the config widget from the stack before we can add the new one - QWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT ); + TQWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT ); if ( oldConfigWidget ) { fStack->removeWidget( oldConfigWidget ); @@ -651,7 +651,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) fCurrentConfig=d; // make sure the changed signal is propagated to the KCM*Dialog // and the apply button is enabled correspondingly. - connect(d, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(d, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); } } @@ -668,7 +668,7 @@ bool ConduitConfigWidget::release() if (fCurrentConduit) { KLibLoader::self()->unloadLibrary( - QFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY))); + TQFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY))); } fCurrentConduit=0L; fCurrentConfig=0L; @@ -681,7 +681,7 @@ void ConduitConfigWidget::unselect() fConduitList->setCurrentItem( fCurrentConduit ); } -void ConduitConfigWidget::selected(QListViewItem *p) +void ConduitConfigWidget::selected(TQListViewItem *p) { FUNCTIONSETUP; #ifdef DEBUG @@ -694,7 +694,7 @@ void ConduitConfigWidget::selected(QListViewItem *p) if (!release()) { fConduitList->blockSignals(true); - QTimer::singleShot(1,this,SLOT(unselect())); + TQTimer::singleShot(1,this,TQT_SLOT(unselect())); return; } } @@ -716,9 +716,9 @@ void ConduitConfigWidget::selected(QListViewItem *p) #endif // set the dialog title to the selected item - QListViewItem *pParent = p->parent(); - QString title; - title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : QString() ; + TQListViewItem *pParent = p->parent(); + TQString title; + title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : TQString() ; title += p ? p->text(CONDUIT_NAME) : i18n("KPilot Setup"); fTitleText->setText(title); } @@ -728,11 +728,11 @@ void ConduitConfigWidget::configure() loadAndConfigure(fConduitList->selectedItem()); } -void ConduitConfigWidget::warnNoExec(const QListViewItem * p) +void ConduitConfigWidget::warnNoExec(const TQListViewItem * p) { FUNCTIONSETUP; - QString msg = i18n("<qt>No library could be " + TQString msg = i18n("<qt>No library could be " "found for the conduit %1. This means that the " "conduit was not installed properly.</qt>") .arg(p->text(CONDUIT_NAME)); @@ -745,11 +745,11 @@ void ConduitConfigWidget::warnNoExec(const QListViewItem * p) KMessageBox::error(this, msg, i18n("Conduit Error")); } -void ConduitConfigWidget::warnNoLibrary(const QListViewItem *p) +void ConduitConfigWidget::warnNoLibrary(const TQListViewItem *p) { FUNCTIONSETUP; - QString msg = i18n("<qt>There was a problem loading the library " + TQString msg = i18n("<qt>There was a problem loading the library " "for the conduit %1. This means that the " "conduit was not installed properly.</qt>") .arg(p->text(CONDUIT_NAME)); @@ -773,8 +773,8 @@ void ConduitConfigWidget::save() if (fCurrentConfig) fCurrentConfig->commit(); } - QStringList activeConduits; - QListViewItemIterator it( fConduitList ); + TQStringList activeConduits; + TQListViewItemIterator it( fConduitList ); while ( it.current() ) { KPilotCheckListItem*p = dynamic_cast<KPilotCheckListItem*>(it.current()); if ( p ) @@ -795,14 +795,14 @@ void ConduitConfigWidget::load() FUNCTIONSETUP; KPilotSettings::self()->readConfig(); - QStringList potentiallyInstalled = KPilotSettings::installedConduits(); - QListViewItem*p = fConduitList->firstChild(); + TQStringList potentiallyInstalled = KPilotSettings::installedConduits(); + TQListViewItem*p = fConduitList->firstChild(); while (p) { - QListViewItem*q = p->firstChild(); + TQListViewItem*q = p->firstChild(); while (q) { - QCheckListItem*qq=dynamic_cast<QCheckListItem*>(q); + TQCheckListItem*qq=dynamic_cast<TQCheckListItem*>(q); if (qq) { qq->setOn(! (potentiallyInstalled.findIndex(qq->text(CONDUIT_DESKTOP))<0) ); @@ -822,7 +822,7 @@ void ConduitConfigWidget::load() } -void ConduitConfigWidget::conduitsChanged(QListViewItem*item) +void ConduitConfigWidget::conduitsChanged(TQListViewItem*item) { KPilotCheckListItem*i=dynamic_cast<KPilotCheckListItem*>(item); if (i) @@ -831,7 +831,7 @@ void ConduitConfigWidget::conduitsChanged(QListViewItem*item) } } -void ConduitConfigWidget::reopenItem(QListViewItem *i) +void ConduitConfigWidget::reopenItem(TQListViewItem *i) { i->setOpen(true); } diff --git a/kpilot/kpilot/conduitConfigDialog.h b/kpilot/kpilot/conduitConfigDialog.h index 697251fab..549f49831 100644 --- a/kpilot/kpilot/conduitConfigDialog.h +++ b/kpilot/kpilot/conduitConfigDialog.h @@ -46,31 +46,31 @@ class ConduitConfigWidgetBase : public KCModule { Q_OBJECT public: - ConduitConfigWidgetBase(QWidget *p=0L,const char *n=0L); - - QListView *fConduitList; - QWidgetStack *fStack; - QPushButton *fConfigureButton; - QPushButton *fConfigureWizard,*fConfigureKontact; - QLabel *fActionDescription; - QLabel *fTitleText; // Dialog title above fStack + ConduitConfigWidgetBase(TQWidget *p=0L,const char *n=0L); + + TQListView *fConduitList; + TQWidgetStack *fStack; + TQPushButton *fConfigureButton; + TQPushButton *fConfigureWizard,*fConfigureKontact; + TQLabel *fActionDescription; + TQLabel *fTitleText; // Dialog title above fStack } ; class ConduitConfigWidget : public ConduitConfigWidgetBase { Q_OBJECT public: - ConduitConfigWidget(QWidget *, + ConduitConfigWidget(TQWidget *, const char *name=0L, bool ownButtons=false); virtual ~ConduitConfigWidget(); protected: void fillLists(); - void warnNoExec(const QListViewItem *); - void warnNoLibrary(const QListViewItem *); + void warnNoExec(const TQListViewItem *); + void warnNoLibrary(const TQListViewItem *); - void loadAndConfigure(QListViewItem *); // ,bool); + void loadAndConfigure(TQListViewItem *); // ,bool); public: /** @@ -90,7 +90,7 @@ public slots: // void slotApply(); signals: - void selectionChanged(QListViewItem *); + void selectionChanged(TQListViewItem *); void sizeChanged(); protected slots: @@ -98,14 +98,14 @@ protected slots: void configureWizard(); void unselect(); // Helper slot when cancelling a change in selection - void selected(QListViewItem *); - void conduitsChanged(QListViewItem*); - void reopenItem(QListViewItem *); + void selected(TQListViewItem *); + void conduitsChanged(TQListViewItem*); + void reopenItem(TQListViewItem *); private: - QPushButton *fConfigure; - QListViewItem *fCurrentConduit; - QListViewItem *fGeneralPage; + TQPushButton *fConfigure; + TQListViewItem *fCurrentConduit; + TQListViewItem *fGeneralPage; ConduitConfigBase *fCurrentConfig; }; diff --git a/kpilot/kpilot/datebookWidget.cc b/kpilot/kpilot/datebookWidget.cc index 64888560c..bc2dff5e9 100644 --- a/kpilot/kpilot/datebookWidget.cc +++ b/kpilot/kpilot/datebookWidget.cc @@ -31,9 +31,9 @@ #include "options.h" -#include <qlayout.h> -#include <qdir.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqpushbutton.h> #include <klistview.h> #include <kdatepicker.h> @@ -41,27 +41,27 @@ #include "datebookWidget.moc" -DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) : +DatebookWidget::DatebookWidget(TQWidget *parent, const TQString &dbpath) : PilotComponent(parent,"component_generic",dbpath) { FUNCTIONSETUP; - QGridLayout *g = new QGridLayout(this,1,1,SPACING); + TQGridLayout *g = new TQGridLayout(this,1,1,SPACING); fDatePicker = new KDatePicker( this, "fDatePicker" ); - fDatePicker->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) ); + fDatePicker->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) ); g->addMultiCellWidget(fDatePicker,0,0,0,2); - QSpacerItem* spacer = new QSpacerItem( 20, 180, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); g->addItem( spacer, 1, 1 ); - fAddButton = new QPushButton( i18n( "&Add..." ), this, "pushButton1" ); + fAddButton = new TQPushButton( i18n( "&Add..." ), this, "pushButton1" ); g->addWidget( fAddButton, 2, 0 ); - fEditButton = new QPushButton( i18n( "&Edit..." ), this, "pushButton2" ); + fEditButton = new TQPushButton( i18n( "&Edit..." ), this, "pushButton2" ); g->addWidget( fEditButton, 2, 1 ); - fDeleteButton = new QPushButton( i18n( "&Delete..." ), this, "pushButton3" ); + fDeleteButton = new TQPushButton( i18n( "&Delete..." ), this, "pushButton3" ); g->addWidget( fDeleteButton, 2, 2 ); fEventList = new KListView( this, "kListView1" ); @@ -69,18 +69,18 @@ DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) : fEventList->addColumn( i18n( "Al" ) ); fEventList->addColumn( i18n( "Rec" ) ); fEventList->addColumn( i18n( "Description" ) ); -// fEventList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) ); +// fEventList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) ); fEventList->setAllColumnsShowFocus( TRUE ); fEventList->setShowSortIndicator( TRUE ); fEventList->setResizeMode( KListView::/*LastColumn*/AllColumns ); fEventList->setFullWidth( TRUE ); -// fEventList->setAlternateBackground( QColor( 221, 146, 240 ) ); +// fEventList->setAlternateBackground( TQColor( 221, 146, 240 ) ); g->addMultiCellWidget(fEventList, 0, 2, 3, 3); - connect(fDatePicker, SIGNAL(dateChanged()), SLOT(slotDayChanged())); - connect(fAddButton, SIGNAL(clicked()), SLOT(slotAddEvent())); - connect(fEditButton, SIGNAL(clicked()), SLOT(slotEditEvent())); - connect(fDeleteButton, SIGNAL(clicked()), SLOT(slotDeleteEvent())); + connect(fDatePicker, TQT_SIGNAL(dateChanged()), TQT_SLOT(slotDayChanged())); + connect(fAddButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEvent())); + connect(fEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditEvent())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteEvent())); } DatebookWidget::~DatebookWidget() diff --git a/kpilot/kpilot/datebookWidget.h b/kpilot/kpilot/datebookWidget.h index 28ff0799a..9a144cc3c 100644 --- a/kpilot/kpilot/datebookWidget.h +++ b/kpilot/kpilot/datebookWidget.h @@ -41,7 +41,7 @@ class DatebookWidget : public PilotComponent Q_OBJECT public: - DatebookWidget(QWidget* parent, const QString& dbpath); + DatebookWidget(TQWidget* parent, const TQString& dbpath); virtual ~DatebookWidget(); // Pilot component methods @@ -56,9 +56,9 @@ protected slots: private: KDatePicker*fDatePicker; - QPushButton*fAddButton; - QPushButton*fEditButton; - QPushButton*fDeleteButton; + TQPushButton*fAddButton; + TQPushButton*fEditButton; + TQPushButton*fDeleteButton; KListView*fEventList; }; diff --git a/kpilot/kpilot/dbAppInfoEditor.cc b/kpilot/kpilot/dbAppInfoEditor.cc index ab5516fca..2e9e4b5fd 100644 --- a/kpilot/kpilot/dbAppInfoEditor.cc +++ b/kpilot/kpilot/dbAppInfoEditor.cc @@ -27,8 +27,8 @@ #include "options.h" -#include <qtextedit.h> -#include <qlabel.h> +#include <tqtextedit.h> +#include <tqlabel.h> #include <kdialogbase.h> #include <kmessagebox.h> @@ -41,7 +41,7 @@ using namespace KHE; /************************************************* **************************************************/ -DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) : +DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent) : KDialogBase(parent, "AppBlock Editor",false, i18n("Edit AppInfo Block"), Ok|Cancel), @@ -65,11 +65,11 @@ DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) : } else { - QLabel*tmpW = new QLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this ); + TQLabel*tmpW = new TQLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); fAppInfoEdit = tmpW; } setMainWidget( fAppInfoEdit ); diff --git a/kpilot/kpilot/dbAppInfoEditor.h b/kpilot/kpilot/dbAppInfoEditor.h index 5a0896d82..692cd251a 100644 --- a/kpilot/kpilot/dbAppInfoEditor.h +++ b/kpilot/kpilot/dbAppInfoEditor.h @@ -36,13 +36,13 @@ class DBAppInfoEditor : public KDialogBase { Q_OBJECT public: - DBAppInfoEditor(char*appInfoData, int l, QWidget *parent = 0); + DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent = 0); ~DBAppInfoEditor(); char*appInfo; int len; protected: void fillWidgets(); - QWidget*fAppInfoEdit; + TQWidget*fAppInfoEdit; protected slots: virtual void slotOk(); }; diff --git a/kpilot/kpilot/dbFlagsEditor.cc b/kpilot/kpilot/dbFlagsEditor.cc index 0d6adeb99..89f14d03a 100644 --- a/kpilot/kpilot/dbFlagsEditor.cc +++ b/kpilot/kpilot/dbFlagsEditor.cc @@ -29,8 +29,8 @@ #include <pi-dlp.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kdatewidget.h> #include <ktimewidget.h> #include <kmessagebox.h> @@ -40,7 +40,7 @@ #include "dbFlagsEditor_base.h" -DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, QWidget *parent) : +DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, TQWidget *parent) : KDialogBase(parent, "FlagsEditor",false, i18n("Edit Database Flags"), Ok|Cancel), dbi(dbinfo) @@ -83,7 +83,7 @@ void DBFlagsEditor::slotOk() dbi->miscFlags |= dlpDBMiscFlagExcludeFromSync; else dbi->miscFlags &= ~dlpDBMiscFlagExcludeFromSync; - QDateTime ttime; + TQDateTime ttime; ttime.setDate(widget->fCreationDate->date()); #if KDE_IS_VERSION(3,1,9) ttime.setTime(widget->fCreationTime->time()); @@ -115,15 +115,15 @@ void DBFlagsEditor::fillWidgets() { // FUNCTIONSETUP - widget->fDBName->setText(QString::fromLatin1(dbi->name)); + widget->fDBName->setText(TQString::fromLatin1(dbi->name)); char buff[5]; set_long(buff, dbi->type); buff[4]='\0'; - widget->fType->setText(QString::fromLatin1(buff)); + widget->fType->setText(TQString::fromLatin1(buff)); set_long(buff, dbi->creator); buff[4]='\0'; - widget->fCreator->setText(QString::fromLatin1(buff)); + widget->fCreator->setText(TQString::fromLatin1(buff)); widget->fRessourceDB->setChecked(dbi->flags & dlpDBFlagResource); widget->fReadOnly->setChecked(dbi->flags & dlpDBFlagReadOnly); @@ -133,7 +133,7 @@ void DBFlagsEditor::fillWidgets() widget->fReset->setChecked(dbi->flags & dlpDBFlagReset); widget->fExcludeDB->setChecked(dbi->miscFlags & dlpDBMiscFlagExcludeFromSync); - QDateTime ttime; + TQDateTime ttime; ttime.setTime_t(dbi->createDate); widget->fCreationDate->setDate(ttime.date()); #if KDE_IS_VERSION(3,1,9) diff --git a/kpilot/kpilot/dbFlagsEditor.h b/kpilot/kpilot/dbFlagsEditor.h index d4c7c6948..c5ad3c080 100644 --- a/kpilot/kpilot/dbFlagsEditor.h +++ b/kpilot/kpilot/dbFlagsEditor.h @@ -39,7 +39,7 @@ class DBFlagsEditor : public KDialogBase { Q_OBJECT public: - DBFlagsEditor(DBInfo*dbinfo=0L, QWidget *parent = 0); + DBFlagsEditor(DBInfo*dbinfo=0L, TQWidget *parent = 0); ~DBFlagsEditor(); protected: diff --git a/kpilot/kpilot/dbFlagsEditor_base.ui.h b/kpilot/kpilot/dbFlagsEditor_base.ui.h index 0186648c0..189f09d15 100644 --- a/kpilot/kpilot/dbFlagsEditor_base.ui.h +++ b/kpilot/kpilot/dbFlagsEditor_base.ui.h @@ -17,7 +17,7 @@ class KTimeWidget : public QWidget { public: - KTimeWidget(QWidget *p, const char *n) : QWidget(p,n) {}; + KTimeWidget(TQWidget *p, const char *n) : TQWidget(p,n) {}; } ; diff --git a/kpilot/kpilot/dbRecordEditor.cc b/kpilot/kpilot/dbRecordEditor.cc index 2b2d5b39a..b3dfd8f70 100644 --- a/kpilot/kpilot/dbRecordEditor.cc +++ b/kpilot/kpilot/dbRecordEditor.cc @@ -27,14 +27,14 @@ #include "options.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> #include <kmessagebox.h> @@ -49,12 +49,12 @@ using namespace KHE; -DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, QWidget *parent) +DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, TQWidget *parent) : KDialogBase(parent, "RecordEditor",false,i18n("Edit Record"), Ok|Cancel), rec(r), nr(n) { // fWidget=new DBRecordEditorBase(this); - fWidget=new QWidget(this); + fWidget=new TQWidget(this); setMainWidget(fWidget); fBuffer = new char[4096]; @@ -119,46 +119,46 @@ void DBRecordEditor::initWidgets() { // FUNCTIONSETUP - DBRecordEditorBaseLayout = new QGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout"); + DBRecordEditorBaseLayout = new TQGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout"); - fRecordIndexLabel = new QLabel( fWidget, "fRecordIndexLabel" ); + fRecordIndexLabel = new TQLabel( fWidget, "fRecordIndexLabel" ); DBRecordEditorBaseLayout->addWidget( fRecordIndexLabel, 0, 0 ); - fRecordIDLabel = new QLabel( fWidget, "fRecordIDLabel" ); + fRecordIDLabel = new TQLabel( fWidget, "fRecordIDLabel" ); DBRecordEditorBaseLayout->addWidget( fRecordIDLabel, 0, 2 ); - fRecordIndex = new QLineEdit( fWidget, "fRecordIndex" ); + fRecordIndex = new TQLineEdit( fWidget, "fRecordIndex" ); fRecordIndex->setReadOnly( TRUE ); DBRecordEditorBaseLayout->addWidget( fRecordIndex, 0, 1 ); - fRecordID = new QLineEdit( fWidget, "fRecordID" ); + fRecordID = new TQLineEdit( fWidget, "fRecordID" ); fRecordID->setReadOnly( TRUE ); DBRecordEditorBaseLayout->addWidget( fRecordID, 0, 3 ); - fFlagsGroup = new QButtonGroup( fWidget, "fFlagsGroup" ); - fFlagsGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, - (QSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) ); + fFlagsGroup = new TQButtonGroup( fWidget, "fFlagsGroup" ); + fFlagsGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, + (TQSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) ); fFlagsGroup->setColumnLayout(0, Qt::Vertical ); fFlagsGroup->layout()->setSpacing( 6 ); fFlagsGroup->layout()->setMargin( 11 ); - fFlagsGroupLayout = new QGridLayout( fFlagsGroup->layout() ); + fFlagsGroupLayout = new TQGridLayout( fFlagsGroup->layout() ); fFlagsGroupLayout->setAlignment( Qt::AlignTop ); - fDirty = new QCheckBox( fFlagsGroup, "fDirty" ); + fDirty = new TQCheckBox( fFlagsGroup, "fDirty" ); fFlagsGroupLayout->addWidget( fDirty, 0, 0 ); - fDeleted = new QCheckBox( fFlagsGroup, "fDeleted" ); + fDeleted = new TQCheckBox( fFlagsGroup, "fDeleted" ); fFlagsGroupLayout->addWidget( fDeleted, 1, 0 ); - fBusy = new QCheckBox( fFlagsGroup, "fBusy" ); + fBusy = new TQCheckBox( fFlagsGroup, "fBusy" ); fFlagsGroupLayout->addWidget( fBusy, 0, 1 ); - fSecret = new QCheckBox( fFlagsGroup, "fSecret" ); + fSecret = new TQCheckBox( fFlagsGroup, "fSecret" ); fFlagsGroupLayout->addMultiCellWidget( fSecret, 1, 1, 1, 2 ); - fArchived = new QCheckBox( fFlagsGroup, "fArchived" ); + fArchived = new TQCheckBox( fFlagsGroup, "fArchived" ); fFlagsGroupLayout->addWidget( fArchived, 0, 2 ); DBRecordEditorBaseLayout->addMultiCellWidget( fFlagsGroup, 1, 1, 0, 3 ); @@ -190,11 +190,11 @@ void DBRecordEditor::initWidgets() } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); fRecordData = tmpW; fRecordDataIf = 0; } @@ -202,15 +202,15 @@ void DBRecordEditor::initWidgets() DBRecordEditorBaseLayout->addMultiCellWidget( fRecordData, 2, 2, 0, 3 ); languageChange(); - resize( QSize(600, 561).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 561).expandedTo(minimumSizeHint()) ); } void DBRecordEditor::fillWidgets() { // FUNCTIONSETUP - fRecordIndex->setText(QString::number(nr)); - fRecordID->setText(QString::number(rec->id())); + fRecordIndex->setText(TQString::number(nr)); + fRecordID->setText(TQString::number(rec->id())); int att=rec->attributes(); fDirty->setChecked(att & dlpRecAttrDirty); diff --git a/kpilot/kpilot/dbRecordEditor.h b/kpilot/kpilot/dbRecordEditor.h index 97bea4ed6..a6c3ff555 100644 --- a/kpilot/kpilot/dbRecordEditor.h +++ b/kpilot/kpilot/dbRecordEditor.h @@ -54,30 +54,30 @@ class DBRecordEditor : public KDialogBase { Q_OBJECT public: - DBRecordEditor(PilotRecord*r=0L, int n=-1, QWidget *parent = 0); + DBRecordEditor(PilotRecord*r=0L, int n=-1, TQWidget *parent = 0); ~DBRecordEditor(); protected: - QLabel* fRecordIndexLabel; - QLabel* fRecordIDLabel; - QLineEdit* fRecordIndex; - QLineEdit* fRecordID; - QButtonGroup* fFlagsGroup; - QCheckBox* fDirty; - QCheckBox* fDeleted; - QCheckBox* fBusy; - QCheckBox* fSecret; - QCheckBox* fArchived; - QWidget* fRecordData; + TQLabel* fRecordIndexLabel; + TQLabel* fRecordIDLabel; + TQLineEdit* fRecordIndex; + TQLineEdit* fRecordID; + TQButtonGroup* fFlagsGroup; + TQCheckBox* fDirty; + TQCheckBox* fDeleted; + TQCheckBox* fBusy; + TQCheckBox* fSecret; + TQCheckBox* fArchived; + TQWidget* fRecordData; KHE::BytesEditInterface*fRecordDataIf; protected: - QGridLayout* DBRecordEditorBaseLayout; - QGridLayout* fFlagsGroupLayout; + TQGridLayout* DBRecordEditorBaseLayout; + TQGridLayout* fFlagsGroupLayout; protected: // DBRecordEditorBase*fWidget; - QWidget*fWidget; + TQWidget*fWidget; char*fBuffer; protected slots: virtual void languageChange(); diff --git a/kpilot/kpilot/dbSelectionDialog.cc b/kpilot/kpilot/dbSelectionDialog.cc index 7a875515f..683b8a8ca 100644 --- a/kpilot/kpilot/dbSelectionDialog.cc +++ b/kpilot/kpilot/dbSelectionDialog.cc @@ -30,8 +30,8 @@ #include "options.h" -#include <qlistview.h> -#include <qpushbutton.h> +#include <tqlistview.h> +#include <tqpushbutton.h> #include <klistview.h> #include <kmessagebox.h> #include <kpushbutton.h> @@ -41,9 +41,9 @@ #include "dbSelectionDialog.moc" -KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs, - QStringList &addedDBs, QWidget *w, const char *n) : - KDialogBase(w, n, true, QString::null, KDialogBase::Ok | KDialogBase::Cancel, +KPilotDBSelectionDialog::KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs, + TQStringList &addedDBs, TQWidget *w, const char *n) : + KDialogBase(w, n, true, TQString::null, KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false), fSelectedDBs(selectedDBs), fAddedDBs(addedDBs), @@ -55,27 +55,27 @@ KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStri setMainWidget(fSelectionWidget); // Fill the encodings list - QStringList items(deviceDBs); - for ( QStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) { + TQStringList items(deviceDBs); + for ( TQStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) { if (items.contains(*it)==0) items << (*it); } - for ( QStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) { + for ( TQStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) { if (items.contains(*it)==0) items << (*it); } items.sort(); - for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) { - QCheckListItem*checkitem=new QCheckListItem(fSelectionWidget->fDatabaseList, - *it, QCheckListItem::CheckBox); + for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { + TQCheckListItem*checkitem=new TQCheckListItem(fSelectionWidget->fDatabaseList, + *it, TQCheckListItem::CheckBox); if (fSelectedDBs.contains(*it)) checkitem->setOn(true); } - connect(fSelectionWidget->fNameEdit, SIGNAL(textChanged( const QString & )), - this, SLOT(slotTextChanged( const QString &))); - connect(fSelectionWidget->fAddButton, SIGNAL(clicked()), - this, SLOT(addDB())); - connect(fSelectionWidget->fRemoveButton, SIGNAL(clicked()), - this, SLOT(removeDB())); + connect(fSelectionWidget->fNameEdit, TQT_SIGNAL(textChanged( const TQString & )), + this, TQT_SLOT(slotTextChanged( const TQString &))); + connect(fSelectionWidget->fAddButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addDB())); + connect(fSelectionWidget->fRemoveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeDB())); } KPilotDBSelectionDialog::~KPilotDBSelectionDialog() @@ -86,12 +86,12 @@ KPilotDBSelectionDialog::~KPilotDBSelectionDialog() void KPilotDBSelectionDialog::addDB() { FUNCTIONSETUP; - QString dbname(fSelectionWidget->fNameEdit->text()); + TQString dbname(fSelectionWidget->fNameEdit->text()); if (!dbname.isEmpty()) { fSelectionWidget->fNameEdit->clear(); - new QCheckListItem(fSelectionWidget->fDatabaseList, dbname, - QCheckListItem::CheckBox); + new TQCheckListItem(fSelectionWidget->fDatabaseList, dbname, + TQCheckListItem::CheckBox); fAddedDBs << dbname; } } @@ -99,10 +99,10 @@ void KPilotDBSelectionDialog::addDB() void KPilotDBSelectionDialog::removeDB() { FUNCTIONSETUP; - QListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem()); + TQListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem()); if (item) { - QString dbname=item->text(0); + TQString dbname=item->text(0); if (fDeviceDBs.contains(dbname)) { KMessageBox::error(this, i18n("This is a database that exists on the device. It was not added manually, so it can not removed from the list."), i18n("Database on Device")); @@ -120,14 +120,14 @@ void KPilotDBSelectionDialog::removeDB() } } -QStringList KPilotDBSelectionDialog::getSelectedDBs() +TQStringList KPilotDBSelectionDialog::getSelectedDBs() { fSelectedDBs.clear(); // update the list of selected databases - QListViewItemIterator it( fSelectionWidget->fDatabaseList ); + TQListViewItemIterator it( fSelectionWidget->fDatabaseList ); while ( it.current() ) { - QCheckListItem *item = dynamic_cast<QCheckListItem*>(it.current()); + TQCheckListItem *item = dynamic_cast<TQCheckListItem*>(it.current()); ++it; if ( item && item->isOn() ) @@ -137,7 +137,7 @@ QStringList KPilotDBSelectionDialog::getSelectedDBs() return fSelectedDBs; } -void KPilotDBSelectionDialog::slotTextChanged( const QString& dbname) +void KPilotDBSelectionDialog::slotTextChanged( const TQString& dbname) { FUNCTIONSETUP; fSelectionWidget->fAddButton->setDisabled(dbname.isEmpty()); diff --git a/kpilot/kpilot/dbSelectionDialog.h b/kpilot/kpilot/dbSelectionDialog.h index 5be8a85b8..ee0df63d3 100644 --- a/kpilot/kpilot/dbSelectionDialog.h +++ b/kpilot/kpilot/dbSelectionDialog.h @@ -38,20 +38,20 @@ class KPilotDBSelectionDialog : public KDialogBase { Q_OBJECT public: - KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs, - QStringList &addedDBs, QWidget *, const char *); + KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs, + TQStringList &addedDBs, TQWidget *, const char *); virtual ~KPilotDBSelectionDialog(); - QStringList getSelectedDBs(); - QStringList getAddedDBs() const {return fAddedDBs; }; + TQStringList getSelectedDBs(); + TQStringList getAddedDBs() const {return fAddedDBs; }; private: - QStringList fSelectedDBs; - QStringList fAddedDBs; - QStringList fDeviceDBs; + TQStringList fSelectedDBs; + TQStringList fAddedDBs; + TQStringList fDeviceDBs; protected slots: void addDB(); void removeDB(); - void slotTextChanged( const QString& dbname); + void slotTextChanged( const TQString& dbname); private: KPilotDBSelectionWidget *fSelectionWidget; diff --git a/kpilot/kpilot/dbviewerWidget.cc b/kpilot/kpilot/dbviewerWidget.cc index fa7a5ab23..b5f046320 100644 --- a/kpilot/kpilot/dbviewerWidget.cc +++ b/kpilot/kpilot/dbviewerWidget.cc @@ -37,10 +37,10 @@ #include <pi-file.h> #include <pi-dlp.h> -#include <qlayout.h> -#include <qdir.h> -#include <qregexp.h> -#include <qlistview.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqlistview.h> #include <klistbox.h> #include <ktextedit.h> @@ -64,7 +64,7 @@ #include "dbviewerWidget.moc" -GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) : +GenericDBWidget::GenericDBWidget(TQWidget *parent, const TQString &dbpath) : PilotComponent(parent,"component_generic",dbpath), fDB(0L) { FUNCTIONSETUP; @@ -75,7 +75,7 @@ GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) : void GenericDBWidget::setupWidget() { - QGridLayout *g = new QGridLayout( this, 1, 1, SPACING); + TQGridLayout *g = new TQGridLayout( this, 1, 1, SPACING); fDBList = new KListBox( this ); g->addWidget( fDBList, 0, 0 ); @@ -85,9 +85,9 @@ void GenericDBWidget::setupWidget() fDBType->insertItem( i18n( "Only Applications (*.prc)" ) ); fDBType->insertItem( i18n( "Only Databases (*.pdb)" ) ); - QGridLayout *g1 = new QGridLayout( 0, 1, 1); + TQGridLayout *g1 = new TQGridLayout( 0, 1, 1); fDBInfo = new KTextEdit( this ); - fDBInfo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) ); + fDBInfo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) ); fDBInfo->setReadOnly( TRUE ); g1->addWidget( fDBInfo, 0, 0 ); fDBInfoButton = new KPushButton( i18n( "General Database &Information" ), this ); @@ -95,7 +95,7 @@ void GenericDBWidget::setupWidget() fAppInfoButton = new KPushButton( i18n( "&Application Info Block (Categories etc.)" ), this ); g1->addWidget( fAppInfoButton, 2, 0 ); - QGridLayout *g2 = new QGridLayout( 0, 1, 1); + TQGridLayout *g2 = new TQGridLayout( 0, 1, 1); fRecordList = new KListView( this ); g2->addMultiCellWidget( fRecordList, 0, 0, 0, 2 ); fRecordList->addColumn(i18n("Rec. Nr.")); @@ -117,24 +117,24 @@ void GenericDBWidget::setupWidget() g->addMultiCellLayout( g1, 0, 1, 1, 1 ); - resize( QSize(682, 661).expandedTo(minimumSizeHint()) ); - - connect(fDBList, SIGNAL(highlighted(const QString &)), - this, SLOT(slotSelected(const QString &))); - connect(fDBType, SIGNAL(activated(int)), - this, SLOT(slotDBType(int))); - connect(fDBInfoButton, SIGNAL(clicked()), - this, SLOT(slotShowDBInfo())); - connect(fAppInfoButton, SIGNAL(clicked()), - this, SLOT(slotShowAppInfo())); - connect(fAddRecord, SIGNAL(clicked()), - this, SLOT(slotAddRecord())); - connect(fEditRecord, SIGNAL(clicked()), - this, SLOT(slotEditRecord())); - connect(fDeleteRecord, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); - connect(fRecordList, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); + resize( TQSize(682, 661).expandedTo(minimumSizeHint()) ); + + connect(fDBList, TQT_SIGNAL(highlighted(const TQString &)), + this, TQT_SLOT(slotSelected(const TQString &))); + connect(fDBType, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotDBType(int))); + connect(fDBInfoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowDBInfo())); + connect(fAppInfoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowAppInfo())); + connect(fAddRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddRecord())); + connect(fEditRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditRecord())); + connect(fDeleteRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); + connect(fRecordList, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); } @@ -148,7 +148,7 @@ GenericDBWidget::~GenericDBWidget() void GenericDBWidget::showComponent() { FUNCTIONSETUP; - fDBInfo->setText(QString::null); + fDBInfo->setText(TQString::null); slotDBType(0); fDBList->show(); @@ -160,14 +160,14 @@ void GenericDBWidget::hideComponent() reset(); } -void GenericDBWidget::slotSelected(const QString &dbname) +void GenericDBWidget::slotSelected(const TQString &dbname) { FUNCTIONSETUP; #ifdef DEBUG DEBUGKPILOT << fname << ": Selected DB " << dbname << endl; #endif struct DBInfo dbinfo; - QString display; + TQString display; fRecList.clear(); fRecordList->clear(); @@ -181,7 +181,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) // We are dealing with a database currentDBtype=eDatabase; - currentDB.remove( QRegExp(CSL1(".(pdb|PDB)$")) ); + currentDB.remove( TQRegExp(CSL1(".(pdb|PDB)$")) ); fDB=new PilotLocalDatabase(dbPath(), currentDB, false); if (!fDB || !fDB->isOpen()) @@ -192,14 +192,14 @@ void GenericDBWidget::slotSelected(const QString &dbname) } dbinfo=fDB->getDBInfo(); display.append(i18n("<B>Database:</B> %1, %2 records<BR>") - .arg(QString::fromLatin1(dbinfo.name)).arg(fDB->recordCount())); + .arg(TQString::fromLatin1(dbinfo.name)).arg(fDB->recordCount())); char buff[5]; set_long(buff, dbinfo.type); buff[4]='\0'; - QString tp = QString::fromLatin1(buff); + TQString tp = TQString::fromLatin1(buff); set_long(buff, dbinfo.creator); buff[4]='\0'; - QString cr = QString::fromLatin1(buff); + TQString cr = TQString::fromLatin1(buff); display.append(i18n("<B>Type:</B> %1, <B>Creator:</B> %2<br><br>").arg(tp).arg(cr)); int currentRecord = 0; @@ -214,9 +214,9 @@ void GenericDBWidget::slotSelected(const QString &dbname) // if (!(pilotRec->isDeleted()) ) { PilotListViewItem*item=new PilotListViewItem(fRecordList, - QString::number(currentRecord), QString::number(pilotRec->size()), - QString::number(pilotRec->id()), - QString::null, + TQString::number(currentRecord), TQString::number(pilotRec->size()), + TQString::number(pilotRec->id()), + TQString::null, pilotRec->id(), pilotRec); item->setNumericCol(0, true); item->setNumericCol(1, true); @@ -238,7 +238,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) // we are dealing with an application currentDBtype=eApplication; - QCString filename = QFile::encodeName(dbPath() + CSL1("/") + dbname); + TQCString filename = TQFile::encodeName(dbPath() + CSL1("/") + dbname); const char *s = filename; struct pi_file *pf = pi_file_open(const_cast<char *>(s)); if (!pf) @@ -261,7 +261,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) } enableWidgets(currentDBtype==eDatabase); - QDateTime ttime; + TQDateTime ttime; ttime.setTime_t(dbinfo.createDate); display.append(i18n("Created: %1<BR>").arg(ttime.toString())); @@ -282,7 +282,7 @@ void GenericDBWidget::slotDBType(int mode) reset(); - QDir dir(dbPath()); + TQDir dir(dbPath()); switch (mode) { case 1: @@ -293,7 +293,7 @@ void GenericDBWidget::slotDBType(int mode) default: dir.setNameFilter(CSL1("*.pdb;*.prc")); break; } - QStringList l = dir.entryList(); + TQStringList l = dir.entryList(); fDBList->insertStringList(l); } @@ -304,7 +304,7 @@ void GenericDBWidget::reset() fDBInfo->clear(); fRecordList->clear(); if (fDB) KPILOT_DELETE(fDB); - currentDB=QString::null; + currentDB=TQString::null; } void GenericDBWidget::slotAddRecord() @@ -313,8 +313,8 @@ void GenericDBWidget::slotAddRecord() pi_buffer_t *b = pi_buffer_new(0); PilotRecord *rec=new PilotRecord(b, 0, 0, 0); PilotListViewItem*item=new PilotListViewItem(fRecordList, - QString::number(-1), QString::number(rec->size()), - QString::number(rec->id()), QString::null, + TQString::number(-1), TQString::number(rec->size()), + TQString::number(rec->id()), TQString::null, rec->id(), rec); if (slotEditRecord(item)) { @@ -327,7 +327,7 @@ void GenericDBWidget::slotAddRecord() } } -bool GenericDBWidget::slotEditRecord(QListViewItem*item) +bool GenericDBWidget::slotEditRecord(TQListViewItem*item) { FUNCTIONSETUP; PilotListViewItem*currRecItem=dynamic_cast<PilotListViewItem*>(item); @@ -338,8 +338,8 @@ bool GenericDBWidget::slotEditRecord(QListViewItem*item) DBRecordEditor*dlg=new DBRecordEditor(rec, nr, this); if (dlg->exec()) { - currRecItem->setText(1, QString::number(rec->size())); - currRecItem->setText(2, QString::number(rec->id())); + currRecItem->setText(1, TQString::number(rec->size())); + currRecItem->setText(2, TQString::number(rec->id())); fRecordList->triggerUpdate(); writeRecord(rec); KPILOT_DELETE(dlg); diff --git a/kpilot/kpilot/dbviewerWidget.h b/kpilot/kpilot/dbviewerWidget.h index 9ef3ad8da..877a8699b 100644 --- a/kpilot/kpilot/dbviewerWidget.h +++ b/kpilot/kpilot/dbviewerWidget.h @@ -45,24 +45,24 @@ class GenericDBWidget : public PilotComponent Q_OBJECT public: - GenericDBWidget(QWidget* parent, const QString& dbpath); + GenericDBWidget(TQWidget* parent, const TQString& dbpath); virtual ~GenericDBWidget(); // Pilot component methods /* virtual */ void showComponent(); /* virtual */ void hideComponent(); - QString getCurrentDB() const { return currentDB; } + TQString getCurrentDB() const { return currentDB; } protected: void setupWidget(); protected slots: - void slotSelected(const QString &dbname); + void slotSelected(const TQString &dbname); void slotDBType(int mode); void reset(); void slotAddRecord(); void slotEditRecord(); - bool slotEditRecord(QListViewItem*); + bool slotEditRecord(TQListViewItem*); void slotDeleteRecord(); void slotShowAppInfo(); void slotShowDBInfo(); @@ -83,8 +83,8 @@ private: } currentDBtype; PilotLocalDatabase*fDB; - QString currentDB; - QPtrList<PilotRecord> fRecList; + TQString currentDB; + TQPtrList<PilotRecord> fRecList; }; diff --git a/kpilot/kpilot/fileInstallWidget.cc b/kpilot/kpilot/fileInstallWidget.cc index e8111ce87..69909302d 100644 --- a/kpilot/kpilot/fileInstallWidget.cc +++ b/kpilot/kpilot/fileInstallWidget.cc @@ -35,15 +35,15 @@ #include <unistd.h> -#include <qlistbox.h> -#include <qstring.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qpopupmenu.h> +#include <tqlistbox.h> +#include <tqstring.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> #include <kfiledialog.h> #include <kurldrag.h> @@ -58,43 +58,43 @@ #include "fileInstallWidget.moc" -FileInstallWidget::FileInstallWidget(QWidget * parent, - const QString & path) : +FileInstallWidget::FileInstallWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_files", path), fSaveFileList(false), fInstaller(0L) { FUNCTIONSETUP; - QGridLayout *grid = new QGridLayout(this, 5, 5, SPACING); + TQGridLayout *grid = new TQGridLayout(this, 5, 5, SPACING); - QLabel *label = new QLabel(i18n("Files to install:"), this); + TQLabel *label = new TQLabel(i18n("Files to install:"), this); grid->addWidget(label, 1, 1); - QPushButton *abutton; + TQPushButton *abutton; - abutton = addButton = new QPushButton(i18n("Add File..."), this); - connect(abutton, SIGNAL(clicked()), this, SLOT(slotAddFile())); + abutton = addButton = new TQPushButton(i18n("Add File..."), this); + connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddFile())); grid->addWidget(abutton, 3, 1); - QWhatsThis::add(abutton, + TQWhatsThis::add(abutton, i18n("<qt>Choose a file to add to the list of files to install.</qt>")); - abutton = clearButton= new QPushButton(i18n("Clear List"), this); - connect(abutton, SIGNAL(clicked()), this, SLOT(slotClearButton())); + abutton = clearButton= new TQPushButton(i18n("Clear List"), this); + connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearButton())); grid->addWidget(abutton, 4, 1); - QWhatsThis::add(abutton, + TQWhatsThis::add(abutton, i18n("<qt>Clear the list of files to install. No files will be installed.</qt>")); fIconView = new KIconView(this); - connect(fIconView, SIGNAL(dropped(QDropEvent *, const QValueList<QIconDragItem> &)), - this, SLOT(slotDropEvent(QDropEvent *, const QValueList<QIconDragItem> &))); + connect(fIconView, TQT_SIGNAL(dropped(TQDropEvent *, const TQValueList<TQIconDragItem> &)), + this, TQT_SLOT(slotDropEvent(TQDropEvent *, const TQValueList<TQIconDragItem> &))); grid->addMultiCellWidget(fIconView, 1, 4, 2, 3); - QWhatsThis::add(fIconView, + TQWhatsThis::add(fIconView, i18n ("<qt>This lists files that will be installed on the Pilot during the next HotSync. Drag files here or use the Add button.</qt>")); fIconView->setAcceptDrops(true); - fIconView->setSelectionMode(QIconView::Extended); + fIconView->setSelectionMode(TQIconView::Extended); fIconView->viewport()->installEventFilter(this); grid->setRowStretch(2, 100); @@ -104,8 +104,8 @@ FileInstallWidget::FileInstallWidget(QWidget * parent, grid->addRowSpacing(5, SPACING); fInstaller = new FileInstaller; - connect(fInstaller, SIGNAL(filesChanged()), - this, SLOT(refreshFileInstallList())); + connect(fInstaller, TQT_SIGNAL(filesChanged()), + this, TQT_SLOT(refreshFileInstallList())); } @@ -114,12 +114,12 @@ FileInstallWidget::~FileInstallWidget() KPILOT_DELETE(fInstaller); } -static inline bool pdbOrPrc(const QString &s) +static inline bool pdbOrPrc(const TQString &s) { return s.endsWith(CSL1(".pdb"),false) || s.endsWith(CSL1(".prc"),false) ; } -void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) +void FileInstallWidget::dragEnterEvent(TQDragEnterEvent *event) { FUNCTIONSETUP; @@ -130,7 +130,7 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) } KURL::List::const_iterator it; - QString filename; + TQString filename; for ( it = urls.begin(); it != urls.end(); ++it ) { filename = (*it).fileName(); if(!pdbOrPrc(filename)) { @@ -141,32 +141,32 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) event->accept(true); } -bool FileInstallWidget::eventFilter(QObject *watched, QEvent *event) +bool FileInstallWidget::eventFilter(TQObject *watched, TQEvent *event) { FUNCTIONSETUP; if(watched == fIconView->viewport()) { - if(event->type() == QEvent::DragEnter) { - dragEnterEvent(static_cast<QDragEnterEvent*>(event)); + if(event->type() == TQEvent::DragEnter) { + dragEnterEvent(static_cast<TQDragEnterEvent*>(event)); return true; } // We have to skip the DragMove event, because it seems to override the // accept state, when it is set to false by dragEnterEvent() (event->accept(false);) - if(event->type() == QEvent::DragMove) { + if(event->type() == TQEvent::DragMove) { return true; } - if(event->type() == QEvent::MouseButtonPress) { - contextMenu(static_cast<QMouseEvent*>(event)); + if(event->type() == TQEvent::MouseButtonPress) { + contextMenu(static_cast<TQMouseEvent*>(event)); } } return false; } -void FileInstallWidget::dropEvent(QDropEvent * drop) +void FileInstallWidget::dropEvent(TQDropEvent * drop) { FUNCTIONSETUP; if (!shown) return; @@ -180,7 +180,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop) DEBUGKPILOT << ": Got " << list.first().prettyURL() << endl; #endif - QStringList files; + TQStringList files; for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it) { if ((*it).isLocalFile()) @@ -190,7 +190,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop) fInstaller->addFiles(files, this ); } -void FileInstallWidget::slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & /*lst*/) +void FileInstallWidget::slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & /*lst*/) { FUNCTIONSETUP; dropEvent(drop); @@ -213,16 +213,16 @@ void FileInstallWidget::slotAddFile() FUNCTIONSETUP; if (!shown) return; - QStringList fileNames = KFileDialog::getOpenFileNames( - QString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)")); + TQStringList fileNames = KFileDialog::getOpenFileNames( + TQString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)")); - for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) + for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) { fInstaller->addFile(*fileName, this ); } } -bool FileInstallWidget::preHotSync(QString &) +bool FileInstallWidget::preHotSync(TQString &) { FUNCTIONSETUP; @@ -250,12 +250,12 @@ void FileInstallWidget::refreshFileInstallList() { FUNCTIONSETUP; - QStringList fileNames = fInstaller->fileNames(); - QPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop); + TQStringList fileNames = fInstaller->fileNames(); + TQPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop); fIconView->clear(); - for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) + for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) { if(pdbOrPrc(*fileName)) { @@ -268,22 +268,22 @@ void FileInstallWidget::refreshFileInstallList() } } -void FileInstallWidget::contextMenu(QMouseEvent *event) +void FileInstallWidget::contextMenu(TQMouseEvent *event) { FUNCTIONSETUP; if(event->button() == Qt::LeftButton) return; - QIconViewItem *item; - QStringList files; + TQIconViewItem *item; + TQStringList files; for(item = fIconView->firstItem(); item; item = item->nextItem()) { if(item->isSelected()) files.append(item->text()); } - QPopupMenu popup(fIconView); + TQPopupMenu popup(fIconView); item = fIconView->findItem(event->pos()); if(item) { diff --git a/kpilot/kpilot/fileInstallWidget.h b/kpilot/kpilot/fileInstallWidget.h index b4bd205c9..6fff2c02b 100644 --- a/kpilot/kpilot/fileInstallWidget.h +++ b/kpilot/kpilot/fileInstallWidget.h @@ -47,12 +47,12 @@ class FileInstallWidget : public PilotComponent Q_OBJECT public: - FileInstallWidget(QWidget* parent, const QString& dbPath); + FileInstallWidget(TQWidget* parent, const TQString& dbPath); virtual ~FileInstallWidget(); // Pilot Component Methods: void showComponent(); - bool preHotSync(QString &); + bool preHotSync(TQString &); void postHotSync(); @@ -63,11 +63,11 @@ protected: void setSaveFileList(bool saveIt) { fSaveFileList = saveIt; } bool getSaveFileList() { return fSaveFileList; } - /* virtual */ void dragEnterEvent(QDragEnterEvent* event); - /* virtual */ void dropEvent(QDropEvent* drop); - /* virtual */ bool eventFilter (QObject *watched, QEvent *event ); + /* virtual */ void dragEnterEvent(TQDragEnterEvent* event); + /* virtual */ void dropEvent(TQDropEvent* drop); + /* virtual */ bool eventFilter (TQObject *watched, TQEvent *event ); - void contextMenu(QMouseEvent *event); + void contextMenu(TQMouseEvent *event); KPilotInstaller* getPilotInstallerApp() { return fKPilotInstaller; } @@ -77,13 +77,13 @@ private: KPilotInstaller* fKPilotInstaller; FileInstaller *fInstaller; - QPushButton *clearButton,*addButton; + TQPushButton *clearButton,*addButton; protected slots: void slotClearButton(); void slotAddFile(); - void slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & lst); + void slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & lst); public slots: void refreshFileInstallList(); diff --git a/kpilot/kpilot/fileInstaller.cc b/kpilot/kpilot/fileInstaller.cc index 6c26a79f4..d46c67d23 100644 --- a/kpilot/kpilot/fileInstaller.cc +++ b/kpilot/kpilot/fileInstaller.cc @@ -34,9 +34,9 @@ #include <unistd.h> -#include <qstring.h> -#include <qstrlist.h> -#include <qdir.h> +#include <tqstring.h> +#include <tqstrlist.h> +#include <tqdir.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -69,13 +69,13 @@ void FileInstaller::clearPending() unsigned int i; - QDir installDir(fDirName); + TQDir installDir(fDirName); // Start from 2 to skip . and .. // for (i = 2; i < installDir.count(); i++) { - QFile::remove(fDirName + installDir[i]); + TQFile::remove(fDirName + installDir[i]); } if (i > 2) @@ -84,24 +84,24 @@ void FileInstaller::clearPending() } } -void FileInstaller::deleteFile(const QString &file) +void FileInstaller::deleteFile(const TQString &file) { - QFile::remove(fDirName + file); + TQFile::remove(fDirName + file); emit filesChanged(); } -void FileInstaller::deleteFiles(const QStringList &files) +void FileInstaller::deleteFiles(const TQStringList &files) { if(files.empty()) return; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) - QFile::remove(fDirName + *it); + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) + TQFile::remove(fDirName + *it); emit filesChanged(); } -/* virtual */ bool FileInstaller::runCopy(const QString & s, QWidget* w ) +/* virtual */ bool FileInstaller::runCopy(const TQString & s, TQWidget* w ) { FUNCTIONSETUP; @@ -127,7 +127,7 @@ void FileInstaller::deleteFiles(const QStringList &files) } -void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) +void FileInstaller::addFiles(const TQStringList & fileList, TQWidget* w) { FUNCTIONSETUP; @@ -135,7 +135,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) unsigned int succ = 0; - for(QStringList::ConstIterator it = fileList.begin(); + for(TQStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it) { if (runCopy( *it, w )) @@ -148,7 +148,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) } } -void FileInstaller::addFile( const QString & file, QWidget* w ) +void FileInstaller::addFile( const TQString & file, TQWidget* w ) { FUNCTIONSETUP; @@ -165,14 +165,14 @@ void FileInstaller::addFile( const QString & file, QWidget* w ) FUNCTIONSETUP; } -const QStringList FileInstaller::fileNames() const +const TQStringList FileInstaller::fileNames() const { FUNCTIONSETUP; - QDir installDir(fDirName); + TQDir installDir(fDirName); - return installDir.entryList(QDir::Files | - QDir::NoSymLinks | QDir::Readable); + return installDir.entryList(TQDir::Files | + TQDir::NoSymLinks | TQDir::Readable); } /* slot */ void FileInstaller::setEnabled(bool b) diff --git a/kpilot/kpilot/fileInstaller.h b/kpilot/kpilot/fileInstaller.h index 3c23f5712..367a6a2b9 100644 --- a/kpilot/kpilot/fileInstaller.h +++ b/kpilot/kpilot/fileInstaller.h @@ -33,7 +33,7 @@ #ifndef _KPILOT_FILEINSTALLER_H #define _KPILOT_FILEINSTALLER_H -#include <qobject.h> +#include <tqobject.h> class QStringList; @@ -48,24 +48,24 @@ public: void clearPending(); - void addFiles( const QStringList&, QWidget* w ); - void addFile( const QString&, QWidget* w ); + void addFiles( const TQStringList&, TQWidget* w ); + void addFile( const TQString&, TQWidget* w ); - void deleteFile(const QString &); - void deleteFiles(const QStringList &); + void deleteFile(const TQString &); + void deleteFiles(const TQStringList &); /** * Returns information about this installer. Note particularly * that fileNames() returns only filenames, not paths. In particular, * you'll need to prepend dir()+"/" to get pathnames. */ - const QString &dir() const { return fDirName; } ; - const QStringList fileNames() const ; + const TQString &dir() const { return fDirName; } ; + const TQStringList fileNames() const ; protected: - virtual bool runCopy( const QString &src, QWidget*w ); + virtual bool runCopy( const TQString &src, TQWidget*w ); public slots: void copyCompleted(); @@ -74,7 +74,7 @@ public slots: signals: void filesChanged(); private: - QString fDirName; + TQString fDirName; int fPendingCopies; bool enabled; } ; diff --git a/kpilot/kpilot/hotSync.cc b/kpilot/kpilot/hotSync.cc index 60bb9356b..7a4d3e44c 100644 --- a/kpilot/kpilot/hotSync.cc +++ b/kpilot/kpilot/hotSync.cc @@ -41,14 +41,14 @@ #include <pi-file.h> #include <pi-util.h> -#include <qtimer.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qvaluelist.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qthread.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqvaluelist.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqthread.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -70,11 +70,11 @@ class BackupAction::Thread : public QThread public: Thread( BackupAction *parent, KPilotLink *link, - const QString &filename, + const TQString &filename, const DBInfo *info ); enum { - TerminateOK = QEvent::User, + TerminateOK = TQEvent::User, TerminateFailure } ; @@ -83,7 +83,7 @@ protected: private: BackupAction *fParent; KPilotLink *fLink; - QString fFilename; + TQString fFilename; struct DBInfo fDBInfo; } ; @@ -91,16 +91,16 @@ class BackupAction::Private { public: bool fFullBackup; ///< Is this a full backup (all DBs, not just changed ones)? - QStringList fNoBackupDBs; - QValueList<unsigned long> fNoBackupCreators; - QStringList fDeviceDBs; + TQStringList fNoBackupDBs; + TQValueList<unsigned long> fNoBackupCreators; + TQStringList fDeviceDBs; - QString fPreferBackupDir; ///< Directory to write backup in, overrides default + TQString fPreferBackupDir; ///< Directory to write backup in, overrides default // Remainder is used to hand around info during sync int fDBIndex; ///< Database number we're now doing - QString fBackupDir; ///< Directory to write backup in. + TQString fBackupDir; ///< Directory to write backup in. /** * Add the database described by the info block to the list of @@ -117,9 +117,9 @@ public: set_long( &buff[1], info->creator ); buff[5] = ']'; buff[6] = '\0'; - QString creator = QString::fromLatin1( buff ); + TQString creator = TQString::fromLatin1( buff ); - QString dbname = Pilot::fromPilot( info->name, 32 ); + TQString dbname = Pilot::fromPilot( info->name, 32 ); if ( !fDeviceDBs.contains( creator ) ) { @@ -157,11 +157,11 @@ public: } // Now take wildcards into account - QString db = Pilot::fromPilot(info->name); - for (QStringList::const_iterator i = fNoBackupDBs.begin(); + TQString db = Pilot::fromPilot(info->name); + for (TQStringList::const_iterator i = fNoBackupDBs.begin(); i != fNoBackupDBs.end(); ++i) { - QRegExp re(*i,true,true); // Wildcard match + TQRegExp re(*i,true,true); // Wildcard match if (re.exactMatch(db)) { return false; @@ -182,10 +182,10 @@ BackupAction::BackupAction(KPilotLink * p, bool full) : fP->fFullBackup = full; } -/* virtual */ QString BackupAction::statusString() const +/* virtual */ TQString BackupAction::statusString() const { FUNCTIONSETUP; - QString s(CSL1("BackupAction=")); + TQString s(CSL1("BackupAction=")); switch (status()) { @@ -212,14 +212,14 @@ BackupAction::BackupAction(KPilotLink * p, bool full) : break; default: s.append(CSL1("(unknown ")); - s.append(QString::number(status())); + s.append(TQString::number(status())); s.append(CSL1(")")); } return s; } -void BackupAction::setDirectory( const QString &p ) +void BackupAction::setDirectory( const TQString &p ) { fP->fPreferBackupDir = p; if (!p.endsWith(CSL1("/"))) @@ -228,19 +228,19 @@ void BackupAction::setDirectory( const QString &p ) } } -static inline void initNoBackup(QStringList &dbnames, - QValueList<unsigned long> &dbcreators) +static inline void initNoBackup(TQStringList &dbnames, + TQValueList<unsigned long> &dbcreators) { FUNCTIONSETUP; dbnames.clear(); dbcreators.clear(); - QStringList configuredSkip = KPilotSettings::skipBackupDB(); - QStringList::const_iterator e = configuredSkip.end(); - for (QStringList::const_iterator i = configuredSkip.begin(); + TQStringList configuredSkip = KPilotSettings::skipBackupDB(); + TQStringList::const_iterator e = configuredSkip.end(); + for (TQStringList::const_iterator i = configuredSkip.begin(); i!= e; ++i) { - QString s = *i; + TQString s = *i; if (s.startsWith(CSL1("[")) && s.endsWith(CSL1("]"))) { if (s.length() != 6) @@ -249,7 +249,7 @@ static inline void initNoBackup(QStringList &dbnames, } else { - QCString data = s.mid(1,4).latin1(); + TQCString data = s.mid(1,4).latin1(); unsigned long creator = pi_mktag(data[0],data[1],data[2],data[3]); dbcreators.append(creator); } @@ -262,9 +262,9 @@ static inline void initNoBackup(QStringList &dbnames, DEBUGKPILOT << fname << ": Will skip databases " << dbnames.join(CSL1(",")) << endl; - QString creatorids; + TQString creatorids; char buf[5]; - for (QValueList<unsigned long>::const_iterator i = dbcreators.begin(); + for (TQValueList<unsigned long>::const_iterator i = dbcreators.begin(); i != dbcreators.end(); ++i) { unsigned long tag = *i; @@ -280,10 +280,10 @@ static inline void initNoBackup(QStringList &dbnames, * if this is not the case. This method will try * to create the directory if it doesn't exist yet. */ -static inline bool checkBackupDirectory( const QString &backupDir ) +static inline bool checkBackupDirectory( const TQString &backupDir ) { FUNCTIONSETUP; - QFileInfo fi(backupDir); + TQFileInfo fi(backupDir); if (fi.exists() && fi.isDir()) { @@ -313,7 +313,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) KStandardDirs::makeDir( backupDir ); - fi = QFileInfo(backupDir); + fi = TQFileInfo(backupDir); return fi.exists() && fi.isDir(); } @@ -369,7 +369,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) initNoBackup( fP->fNoBackupDBs, fP->fNoBackupCreators ); fP->fDBIndex = 0; - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } @@ -380,7 +380,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) struct DBInfo info; // TODO: make the progress reporting more accurate - emit logProgress(QString::null, fP->fDBIndex); + emit logProgress(TQString::null, fP->fDBIndex); if (openConduit() < 0) { @@ -444,11 +444,11 @@ static inline bool checkBackupDirectory( const QString &backupDir ) { DEBUGKPILOT << fname << ": Skipping database <" << info.name << "> (no-backup list)" << endl; - QString s = i18n("Skipping %1") + TQString s = i18n("Skipping %1") .arg(Pilot::fromPilot(info.name)); addSyncLogEntry(s); } - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); } /** @@ -500,10 +500,10 @@ bool BackupAction::startBackupThread(DBInfo *info) // if we're here then we are going to back this database up. do some basic sanity // checks and proceed.... - QString databaseName(Pilot::fromPilot(info->name)); + TQString databaseName(Pilot::fromPilot(info->name)); databaseName.replace('/', '_'); - QString fullBackupName = fP->fBackupDir + databaseName; + TQString fullBackupName = fP->fBackupDir + databaseName; if (PilotDatabase::isResource(info)) { @@ -531,22 +531,22 @@ bool BackupAction::startBackupThread(DBInfo *info) return true; } -/* virtual */ bool BackupAction::event( QEvent *e ) +/* virtual */ bool BackupAction::event( TQEvent *e ) { - if (e->type() == (QEvent::Type)Thread::TerminateOK) + if (e->type() == (TQEvent::Type)Thread::TerminateOK) { KPILOT_DELETE(fBackupThread); // This was a successful termination. addSyncLogEntry( i18n("... OK.\n"), false ); - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } - if (e->type() == (QEvent::Type)Thread::TerminateFailure) + if (e->type() == (TQEvent::Type)Thread::TerminateFailure) { KPILOT_DELETE(fBackupThread); // Unsuccessful termination. addSyncLogEntry( i18n("Backup failed.") ); - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } return SyncAction::event(e); @@ -559,8 +559,8 @@ void BackupAction::endBackup() fP->fDBIndex = (-1); fActionStatus = BackupEnded; fP->fDeviceDBs.sort(); - QString old( QString::null ); - QStringList::Iterator itr = fP->fDeviceDBs.begin(); + TQString old( TQString::null ); + TQStringList::Iterator itr = fP->fDeviceDBs.begin(); while ( itr != fP->fDeviceDBs.end() ) { if ( old == *itr ) { itr = fP->fDeviceDBs.remove( itr ); @@ -575,7 +575,7 @@ void BackupAction::endBackup() } FileInstallAction::FileInstallAction(KPilotLink * p, - const QString & d) : + const TQString & d) : SyncAction(p, "fileInstall"), fDBIndex(-1), fTimer(0L), @@ -595,9 +595,9 @@ FileInstallAction::~FileInstallAction() { FUNCTIONSETUP; - QDir installDir(fDir); - fList = installDir.entryList(QDir::Files | - QDir::NoSymLinks | QDir::Readable); + TQDir installDir(fDir); + fList = installDir.entryList(TQDir::Files | + TQDir::NoSymLinks | TQDir::Readable); #ifdef DEBUG DEBUGKPILOT << fname << ": Installing " << fList.count() << " files" << endl; @@ -614,9 +614,9 @@ FileInstallAction::~FileInstallAction() return true; } - fTimer = new QTimer(this); - QObject::connect(fTimer, SIGNAL(timeout()), - this, SLOT(installNextFile())); + fTimer = new TQTimer(this); + TQObject::connect(fTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(installNextFile())); fTimer->start(0, false); @@ -651,8 +651,8 @@ FileInstallAction::~FileInstallAction() return; } - const QString filePath = fDir + fList[fDBIndex]; - const QString fileName = fList[fDBIndex]; + const TQString filePath = fDir + fList[fDBIndex]; + const TQString fileName = fList[fDBIndex]; fDBIndex++; @@ -660,7 +660,7 @@ FileInstallAction::~FileInstallAction() DEBUGKPILOT << fname << ": Installing file " << filePath << endl; #endif - QString m = i18n("Installing %1").arg(fileName); + TQString m = i18n("Installing %1").arg(fileName); emit logProgress(m,(100 * fDBIndex) / (fList.count()+1)); m+=CSL1("\n"); emit addSyncLogEntry(m,false /* Don't print in KPilot's log. */ ); @@ -671,7 +671,7 @@ FileInstallAction::~FileInstallAction() if (!resourceOK(fileName,filePath)) goto nextFile; f = pi_file_open(const_cast <char *> - ((const char *) QFile::encodeName(filePath))); + ((const char *) TQFile::encodeName(filePath))); #if PILOT_LINK_NUMBER < PILOT_LINK_0_12_0 @@ -688,7 +688,7 @@ FileInstallAction::~FileInstallAction() } else { - QFile::remove(filePath); + TQFile::remove(filePath); } @@ -704,11 +704,11 @@ nextFile: // Check that the given file path is a good resource // file - in particular that the resource name is ok. -bool FileInstallAction::resourceOK(const QString &fileName, const QString &filePath) +bool FileInstallAction::resourceOK(const TQString &fileName, const TQString &filePath) { FUNCTIONSETUP; - if (!QFile::exists(filePath)) + if (!TQFile::exists(filePath)) { emit logError(i18n("Unable to open file "%1"."). arg(fileName)); @@ -716,7 +716,7 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP } struct pi_file *f = pi_file_open(const_cast <char *> - ((const char *) QFile::encodeName(filePath))); + ((const char *) TQFile::encodeName(filePath))); if (!f) { @@ -754,27 +754,27 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP return r; } -/* virtual */ QString FileInstallAction::statusString() const +/* virtual */ TQString FileInstallAction::statusString() const { FUNCTIONSETUP; if (fDBIndex < 0) { - return QString(CSL1("Idle")); + return TQString(CSL1("Idle")); } else { if ((unsigned) fDBIndex >= fList.count()) { - return QString(CSL1("Index out of range")); + return TQString(CSL1("Index out of range")); } else { - return QString(CSL1("Installing %1")).arg(fList[fDBIndex]); + return TQString(CSL1("Installing %1")).arg(fList[fDBIndex]); } } } -CheckUser::CheckUser(KPilotLink * p, QWidget * vp): +CheckUser::CheckUser(KPilotLink * p, TQWidget * vp): SyncAction(p, vp, "userCheck") { FUNCTIONSETUP; @@ -790,8 +790,8 @@ CheckUser::~CheckUser() { FUNCTIONSETUP; - QString guiUserName = KPilotSettings::userName(); - QString pilotUserName = fHandle->getPilotUser().name(); + TQString guiUserName = KPilotSettings::userName(); + TQString pilotUserName = fHandle->getPilotUser().name(); bool pilotUserEmpty = pilotUserName.isEmpty(); // 4 cases to handle: // guiUserName empty / not empty @@ -802,10 +802,10 @@ CheckUser::~CheckUser() { if (pilotUserEmpty) { - QString defaultUserName = + TQString defaultUserName = i18n("A common name", "John Doe"); - QString q = i18n("<qt>Neither KPilot nor the " + TQString q = i18n("<qt>Neither KPilot nor the " "handheld have a username set. " "They <i>should</i> be set. " "Should KPilot set them to a default value " @@ -823,7 +823,7 @@ CheckUser::~CheckUser() } else { - QString q = i18n("<qt>The handheld has a username set " + TQString q = i18n("<qt>The handheld has a username set " "(<i>%1</i>) but KPilot does not. Should " "KPilot use this username in future?</qt>"). arg(pilotUserName); @@ -840,7 +840,7 @@ CheckUser::~CheckUser() { if (pilotUserEmpty) { - QString q = CSL1("<qt>"); + TQString q = CSL1("<qt>"); q += i18n("KPilot has a username set " "(<i>%1</i>) but the handheld does not. " "Should KPilot's username be set in the " @@ -874,7 +874,7 @@ CheckUser::~CheckUser() { if (guiUserName != pilotUserName) { - QString q = i18n("<qt>The handheld thinks that " + TQString q = i18n("<qt>The handheld thinks that " "the username is %1; " "however, KPilot says you are %2." "Which of these is the correct name?\n" @@ -885,7 +885,7 @@ CheckUser::~CheckUser() int r = questionYesNoCancel(q, i18n("User Mismatch"), - QString::null, + TQString::null, 20, i18n("Use KPilot Name"), i18n("Use Handheld Name")); @@ -923,7 +923,7 @@ CheckUser::~CheckUser() // fix the database location for local databases. // // - QString pathName = KGlobal::dirs()->saveLocation("data", + TQString pathName = KGlobal::dirs()->saveLocation("data", CSL1("kpilot/DBBackup/")); if (!guiUserName.isEmpty()) { @@ -940,22 +940,22 @@ class RestoreInfo { public: struct DBInfo DBInfo; - QString path; + TQString path; } ; class RestoreAction::Private { public: - QString fPreferRestoreDir; /**< Preference setting where to get data from. */ + TQString fPreferRestoreDir; /**< Preference setting where to get data from. */ - QValueList<RestoreInfo> fDBList; - QTimer fTimer; - QValueList<RestoreInfo>::ConstIterator fDBIterator; + TQValueList<RestoreInfo> fDBList; + TQTimer fTimer; + TQValueList<RestoreInfo>::ConstIterator fDBIterator; int fDBIndex; }; -RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) : +RestoreAction::RestoreAction(KPilotLink * p, TQWidget * visible ) : SyncAction(p, visible, "restoreAction") { FUNCTIONSETUP; @@ -963,7 +963,7 @@ RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) : fP = new Private; } -void RestoreAction::setDirectory( const QString &path ) +void RestoreAction::setDirectory( const TQString &path ) { fP->fPreferRestoreDir = path; } @@ -972,7 +972,7 @@ void RestoreAction::setDirectory( const QString &path ) { FUNCTIONSETUP; - QString dirname; + TQString dirname; if (fP->fPreferRestoreDir.isEmpty()) { dirname = PilotLocalDatabase::getDBPath(); @@ -986,8 +986,8 @@ void RestoreAction::setDirectory( const QString &path ) DEBUGKPILOT << fname << ": Restoring user " << dirname << endl; #endif - QDir dir(dirname, QString::null, QDir::Name, - QDir::Files | QDir::Readable | QDir::NoSymLinks); + TQDir dir(dirname, TQString::null, TQDir::Name, + TQDir::Files | TQDir::Readable | TQDir::NoSymLinks); if (!dir.exists()) { @@ -1021,14 +1021,14 @@ void RestoreAction::setDirectory( const QString &path ) } - emit logProgress(i18n("Restoring %1...").arg(QString::null),1); + emit logProgress(i18n("Restoring %1...").arg(TQString::null),1); for (unsigned int i = 0; i < dir.count(); i++) { - QString s; + TQString s; RestoreInfo info; - s = dirname + QDir::separator() + dir[i]; + s = dirname + TQDir::separator() + dir[i]; DEBUGKPILOT << fname << ": Adding " << s << " to restore list." << endl; @@ -1049,8 +1049,8 @@ void RestoreAction::setDirectory( const QString &path ) fP->fDBIterator = fP->fDBList.begin(); fActionStatus = InstallingFiles; - QObject::connect(&(fP->fTimer), SIGNAL(timeout()), - this, SLOT(installNextFile())); + TQObject::connect(&(fP->fTimer), TQT_SIGNAL(timeout()), + this, TQT_SLOT(installNextFile())); fP->fTimer.start(0, false); return true; @@ -1089,7 +1089,7 @@ void RestoreAction::setDirectory( const QString &path ) return; } - QFileInfo databaseInfo(dbi.path); + TQFileInfo databaseInfo(dbi.path); addSyncLogEntry(databaseInfo.fileName()); emit logProgress(i18n("Restoring %1...").arg(databaseInfo.fileName()), (100*fP->fDBIndex) / (fP->fDBList.count()+1)) ; @@ -1102,21 +1102,21 @@ void RestoreAction::setDirectory( const QString &path ) } } -/* virtual */ QString RestoreAction::statusString() const +/* virtual */ TQString RestoreAction::statusString() const { FUNCTIONSETUP; - QString s; + TQString s; switch (status()) { case InstallingFiles: s.append(CSL1("Installing Files (")); - s.append(QString::number(fP->fDBIndex)); + s.append(TQString::number(fP->fDBIndex)); s.append(CSL1(")")); break; case GettingFileInfo: s.append(CSL1("Getting File Info (")); - s.append(QString::number(fP->fDBIndex)); + s.append(TQString::number(fP->fDBIndex)); s.append(CSL1(")")); break; default: @@ -1130,7 +1130,7 @@ void RestoreAction::setDirectory( const QString &path ) BackupAction::Thread::Thread( BackupAction *parent, KPilotLink *link, - const QString &filename, + const TQString &filename, const DBInfo *info ) { fParent = parent; @@ -1144,12 +1144,12 @@ void BackupAction::Thread::run() if (fLink->retrieveDatabase(fFilename,&fDBInfo)) { // Successful. - QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateOK ) ); + TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateOK ) ); } else { // Failed - QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateFailure ) ); + TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateFailure ) ); } } diff --git a/kpilot/kpilot/hotSync.h b/kpilot/kpilot/hotSync.h index 580c2d616..33ef55315 100644 --- a/kpilot/kpilot/hotSync.h +++ b/kpilot/kpilot/hotSync.h @@ -41,7 +41,7 @@ class QTimer; class CheckUser : public SyncAction { public: - CheckUser(KPilotLink *p,QWidget *w=0L); + CheckUser(KPilotLink *p,TQWidget *w=0L); virtual ~CheckUser(); protected: @@ -72,7 +72,7 @@ public: BackupEnded, BackupComplete } ; - virtual QString statusString() const; + virtual TQString statusString() const; /** By default, a path based on the user name (either * on the handheld or set in KPilot) is used to @@ -83,10 +83,10 @@ public: * @p path to restore the default behavior of using * the username. */ - void setDirectory( const QString &path ); + void setDirectory( const TQString &path ); // Reimplemented to support threaded backup. - virtual bool event( QEvent *e ); + virtual bool event( TQEvent *e ); protected: virtual bool exec(); @@ -119,10 +119,10 @@ class FileInstallAction : public SyncAction Q_OBJECT public: FileInstallAction(KPilotLink *, - const QString &fileDir); + const TQString &fileDir); virtual ~FileInstallAction(); - virtual QString statusString() const; + virtual TQString statusString() const; protected: virtual bool exec(); @@ -132,23 +132,23 @@ protected slots: private: int fDBIndex; - QTimer *fTimer; - QString fDir; - QStringList fList; + TQTimer *fTimer; + TQString fDir; + TQStringList fList; // TODO: not const because it calls logError(), which is // non-const (but might be - can signals be const, anyway?) - bool resourceOK(const QString &, const QString &) /* const */ ; + bool resourceOK(const TQString &, const TQString &) /* const */ ; } ; class RestoreAction : public SyncAction { Q_OBJECT public: - RestoreAction(KPilotLink *,QWidget *w=0L); + RestoreAction(KPilotLink *,TQWidget *w=0L); typedef enum { InstallingFiles, GettingFileInfo,Done } Status; - virtual QString statusString() const; + virtual TQString statusString() const; /** By default, a path based on the user name (either * on the handheld or set in KPilot) is used to @@ -159,7 +159,7 @@ public: * @p path to restore the default behavior of using * the username. */ - void setDirectory( const QString &path ); + void setDirectory( const TQString &path ); protected: virtual bool exec(); diff --git a/kpilot/kpilot/internalEditorAction.cc b/kpilot/kpilot/internalEditorAction.cc index cee58ba21..bc4bdb3ed 100644 --- a/kpilot/kpilot/internalEditorAction.cc +++ b/kpilot/kpilot/internalEditorAction.cc @@ -27,9 +27,9 @@ #include <options.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kmessagebox.h> #include <kdialog.h> #include <ktextedit.h> @@ -61,7 +61,7 @@ bool InternalEditorAction::exec() FUNCTIONSETUP; emit logMessage(i18n("[Internal Editors]")); fInternalEditorSyncStatus=eSyncStarted; - QTimer::singleShot(0, this, SLOT(syncDirtyDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB())); return true; } @@ -82,9 +82,9 @@ void InternalEditorAction::syncDirtyDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setDirtyDatabases(QStringList()); + KPilotSettings::setDirtyDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(syncFlagsChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncFlagsChangedDB())); return; } #ifdef DEBUG @@ -146,14 +146,14 @@ nextDB: localDB->resetSyncFlags(); KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncDirtyDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB())); } -bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db) +bool InternalEditorAction::queryUseKPilotChanges(TQString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db) { FUNCTIONSETUP; bool knownDB=true; - QString localEntry, serialEntry, recType(i18n("record")); + TQString localEntry, serialEntry, recType(i18n("record")); if (dbName==CSL1("AddressDB") && db) { @@ -201,7 +201,7 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, knownDB=false; } - QString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed " + TQString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed " "on the handheld and in the internal editor. Shall the changes in KPilot be copied to the handheld, and so override the changes there?"). arg(recType).arg(id).arg(dbName)); @@ -212,40 +212,40 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, resdlg->setButtonText(KDialogBase::Ok, i18n("Use &KPilot")); resdlg->setButtonText(KDialogBase::Cancel, i18n("Use &Handheld")); - QWidget*page=new QWidget(resdlg); + TQWidget*page=new TQWidget(resdlg); resdlg->setMainWidget(page); - QGridLayout*layout = new QGridLayout( page, 1, 1); + TQGridLayout*layout = new TQGridLayout( page, 1, 1); - QLabel *label=new QLabel(dialogText, page); - label->setAlignment( QLabel::WordBreak ); + TQLabel *label=new TQLabel(dialogText, page); + label->setAlignment( TQLabel::WordBreak ); layout->addMultiCellWidget( label, 0,0, 0,1 ); - layout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Minimum, - QSizePolicy::Fixed ), 1, 0 ); + layout->addItem( new TQSpacerItem( 20, 10, TQSizePolicy::Minimum, + TQSizePolicy::Fixed ), 1, 0 ); if (knownDB) { - label=new QLabel(i18n("Entry in KPilot"), page); + label=new TQLabel(i18n("Entry in KPilot"), page); layout->addWidget( label, 2,0); - KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), QString::null, page); + KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), TQString::null, page); textBrowser->setReadOnly(true); layout->addWidget( textBrowser, 3,0); - label=new QLabel(i18n("Entry on Handheld"), page); + label=new TQLabel(i18n("Entry on Handheld"), page); layout->addWidget( label, 2,1); - textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), QString::null, page); + textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), TQString::null, page); textBrowser->setReadOnly(true); layout->addWidget( textBrowser, 3,1); } else { - label=new QLabel(i18n("Entry in KPilot"), page); + label=new TQLabel(i18n("Entry in KPilot"), page); layout->addMultiCellWidget( label, 2,2,0,1); // directly display the record's data: - QWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" ); + TQWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" ); if( hexEdit ) { KHE::BytesEditInterface* hexEditIf = KHE::bytesEditInterface( hexEdit ); @@ -260,16 +260,16 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); hexEdit = tmpW; } layout->addMultiCellWidget( hexEdit, 3,3,0,1); - label=new QLabel(i18n("Entry on Handheld"), page); + label=new TQLabel(i18n("Entry on Handheld"), page); layout->addMultiCellWidget( label, 4,4,0,1); // directly display the record's data: @@ -288,11 +288,11 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); hexEdit = tmpW; } layout->addMultiCellWidget( hexEdit, 5,5,0,1); @@ -321,9 +321,9 @@ void InternalEditorAction::syncFlagsChangedDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setFlagsChangedDatabases(QStringList()); + KPilotSettings::setFlagsChangedDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); return; } @@ -331,7 +331,7 @@ void InternalEditorAction::syncFlagsChangedDB() DEBUGKPILOT<<"syncFlagsChangedDB for DB "<<(*dbIter)<<endl; #endif emit logError(i18n("Setting the database flags on the handheld is not yet supported.")); -QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); +TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); return; PilotLocalDatabase*localDB=new PilotLocalDatabase(*dbIter, false); @@ -343,7 +343,7 @@ return; KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); } void InternalEditorAction::syncAppBlockChangedDB() @@ -362,9 +362,9 @@ void InternalEditorAction::syncAppBlockChangedDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setAppBlockChangedDatabases(QStringList()); + KPilotSettings::setAppBlockChangedDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } #ifdef DEBUG @@ -381,7 +381,7 @@ void InternalEditorAction::syncAppBlockChangedDB() KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); } void InternalEditorAction::cleanup() diff --git a/kpilot/kpilot/internalEditorAction.h b/kpilot/kpilot/internalEditorAction.h index 8e988348d..ed26cb35f 100644 --- a/kpilot/kpilot/internalEditorAction.h +++ b/kpilot/kpilot/internalEditorAction.h @@ -28,7 +28,7 @@ */ -#include <qstringlist.h> +#include <tqstringlist.h> #include "syncAction.h" @@ -52,10 +52,10 @@ private slots: void cleanup(); private: - bool queryUseKPilotChanges(QString dbName, recordid_t id, + bool queryUseKPilotChanges(TQString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db); - QStringList dirtyDBs; - QStringList::Iterator dbIter; + TQStringList dirtyDBs; + TQStringList::Iterator dbIter; enum eInternalEditorSyncStatus { eSyncStarted, eSyncDirtyDB, diff --git a/kpilot/kpilot/kpilot.cc b/kpilot/kpilot/kpilot.cc index 9207db02a..4b38c509a 100644 --- a/kpilot/kpilot/kpilot.cc +++ b/kpilot/kpilot/kpilot.cc @@ -31,11 +31,11 @@ #include "options.h" -#include <qfile.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qvbox.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqtimer.h> #include <kjanuswidget.h> #include <kurl.h> @@ -86,7 +86,7 @@ class KPilotInstaller::KPilotPrivate { public: - typedef QPtrList<PilotComponent> ComponentList; + typedef TQPtrList<PilotComponent> ComponentList; private: ComponentList fPilotComponentList; @@ -145,11 +145,11 @@ void KPilotInstaller::startDaemonIfNeeded() fAppStatus=WaitingForDaemon; - QString daemonError; - QCString daemonDCOP; + TQString daemonError; + TQCString daemonDCOP; int daemonPID; - QString s = getDaemon().statusString(); + TQString s = getDaemon().statusString(); DEBUGKPILOT << fname << ": Daemon status is " << ( s.isEmpty() ? CSL1("<none>") : s ) << endl; @@ -169,7 +169,7 @@ void KPilotInstaller::startDaemonIfNeeded() if (!fDaemonWasRunning && KApplication::startServiceByDesktopName( CSL1("kpilotdaemon"), - QString::null, &daemonError, &daemonDCOP, &daemonPID + TQString::null, &daemonError, &daemonDCOP, &daemonPID , "0" /* no notify */ )) { @@ -231,14 +231,14 @@ void KPilotInstaller::setupWidget() fManagingWidget->setMinimumSize(fManagingWidget->sizeHint()); fManagingWidget->show(); setCentralWidget(fManagingWidget); - connect( fManagingWidget, SIGNAL( aboutToShowPage ( QWidget* ) ), - this, SLOT( slotAboutToShowComponent( QWidget* ) ) ); + connect( fManagingWidget, TQT_SIGNAL( aboutToShowPage ( TQWidget* ) ), + this, TQT_SLOT( slotAboutToShowComponent( TQWidget* ) ) ); initIcons(); initMenu(); initComponents(); - setMinimumSize(sizeHint() + QSize(10,60)); + setMinimumSize(sizeHint() + TQSize(10,60)); createGUI(CSL1("kpilotui.rc"), false); setAutoSaveSettings(); @@ -248,15 +248,15 @@ void KPilotInstaller::initComponents() { FUNCTIONSETUP; - QString defaultDBPath = KPilotConfig::getDefaultDBPath(); + TQString defaultDBPath = KPilotConfig::getDefaultDBPath(); - QPixmap pixmap; - QString pixfile; - QWidget *w; + TQPixmap pixmap; + TQString pixfile; + TQWidget *w; #define ADDICONPAGE(a,b) \ pixmap = KGlobal::iconLoader()->loadIcon(b, KIcon::Desktop, 64); \ - w = getManagingWidget()->addVBoxPage(a,QString::null, pixmap) ; + w = getManagingWidget()->addVBoxPage(a,TQString::null, pixmap) ; ADDICONPAGE(i18n("HotSync"),CSL1("kpilotbhotsync")); fLogWidget = new LogWidget(w); @@ -286,7 +286,7 @@ void KPilotInstaller::initComponents() #undef ADDICONPAGE - QTimer::singleShot(500,this,SLOT(initializeComponents())); + TQTimer::singleShot(500,this,TQT_SLOT(initializeComponents())); } @@ -299,7 +299,7 @@ void KPilotInstaller::initIcons() -void KPilotInstaller::slotAboutToShowComponent( QWidget *c ) +void KPilotInstaller::slotAboutToShowComponent( TQWidget *c ) { FUNCTIONSETUP; int ix = fManagingWidget->pageIndex( c ); @@ -320,14 +320,14 @@ void KPilotInstaller::slotSelectComponent(PilotComponent *c) return; } - QObject *o = c->parent(); + TQObject *o = c->parent(); if (!o) { WARNINGKPILOT << "Widget has no parent." << endl; return; } - QWidget *parent = dynamic_cast<QWidget *>(o); + TQWidget *parent = dynamic_cast<TQWidget *>(o); if (!parent) { WARNINGKPILOT << "Widget's parent is not a widget." << endl; @@ -446,8 +446,8 @@ bool KPilotInstaller::componentPreSync() { FUNCTIONSETUP; - QString reason; - QString rprefix(i18n("Cannot start a Sync now. %1")); + TQString reason; + TQString rprefix(i18n("Cannot start a Sync now. %1")); for (fP->list().first(); fP->list().current(); fP->list().next()) @@ -477,7 +477,7 @@ void KPilotInstaller::componentPostSync() } } -void KPilotInstaller::setupSync(int kind, const QString & message) +void KPilotInstaller::setupSync(int kind, const TQString & message) { FUNCTIONSETUP; @@ -487,7 +487,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message) } if (!message.isEmpty()) { - QString m(message); + TQString m(message); if (fLogWidget) { fLogWidget->logMessage(m); @@ -496,7 +496,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message) getDaemon().requestSync(kind); } -void KPilotInstaller::closeEvent(QCloseEvent * e) +void KPilotInstaller::closeEvent(TQCloseEvent * e) { FUNCTIONSETUP; @@ -518,12 +518,12 @@ void KPilotInstaller::initMenu() syncPopup->setWhatsThis(i18n("Select the kind of HotSync to perform next. " "This applies only to the next HotSync; to change the default, use " "the configuration dialog.")); - connect(syncPopup, SIGNAL(activated()), - this, SLOT(slotHotSyncRequested())); + connect(syncPopup, TQT_SIGNAL(activated()), + this, TQT_SLOT(slotHotSyncRequested())); // File actions, keep this list synced with kpilotui.rc and pilotDaemon.cc a = new KAction(i18n("&HotSync"), CSL1("hotsync"), 0, - this, SLOT(slotHotSyncRequested()), + this, TQT_SLOT(slotHotSyncRequested()), actionCollection(), "file_hotsync"); a->setToolTip(i18n("Next HotSync will be normal HotSync.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -531,7 +531,7 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("Full&Sync"), CSL1("fullsync"), 0, - this, SLOT(slotFullSyncRequested()), + this, TQT_SLOT(slotFullSyncRequested()), actionCollection(), "file_fullsync"); a->setToolTip(i18n("Next HotSync will be a FullSync.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -539,7 +539,7 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("&Backup"), CSL1("backup"), 0, - this, SLOT(slotBackupRequested()), + this, TQT_SLOT(slotBackupRequested()), actionCollection(), "file_backup"); a->setToolTip(i18n("Next HotSync will be backup.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -547,15 +547,15 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("&Restore"), CSL1("restore"), 0, - this, SLOT(slotRestoreRequested()), + this, TQT_SLOT(slotRestoreRequested()), actionCollection(), "file_restore"); a->setToolTip(i18n("Next HotSync will be restore.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " "should restore the Handheld from data on the PC.")); syncPopup->insert(a); - a = new KAction(i18n("Copy Handheld to PC"), QString::null, 0, - this, SLOT(slotHHtoPCRequested()), + a = new KAction(i18n("Copy Handheld to PC"), TQString::null, 0, + this, TQT_SLOT(slotHHtoPCRequested()), actionCollection(), "file_HHtoPC"); a->setToolTip(i18n("Next HotSync will be backup.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -563,8 +563,8 @@ void KPilotInstaller::initMenu() "overwriting entries on the PC.")); syncPopup->insert(a); - a = new KAction(i18n("Copy PC to Handheld"), QString::null, 0, - this, SLOT(slotPCtoHHRequested()), + a = new KAction(i18n("Copy PC to Handheld"), TQString::null, 0, + this, TQT_SLOT(slotPCtoHHRequested()), actionCollection(), "file_PCtoHH"); a->setToolTip(i18n("Next HotSync will copy PC to Handheld.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -575,7 +575,7 @@ void KPilotInstaller::initMenu() #if 0 a = new KAction(i18n("&List Only"),CSL1("listsync"),0, - this,SLOT(slotTestSyncRequested()), + this,TQT_SLOT(slotTestSyncRequested()), actionCollection(), "file_list"); a->setToolTip(i18n("Next HotSync will list databases.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -586,14 +586,14 @@ void KPilotInstaller::initMenu() a = new KAction(i18n("Rese&t Link"),CSL1("reload"), 0, - this, SLOT(slotResetLink()), + this, TQT_SLOT(slotResetLink()), actionCollection(),"file_reload"); a->setToolTip(i18n("Reset the device connection.")); a->setWhatsThis(i18n("Try to reset the daemon and its connection " "to the Handheld.")); - a = KStdAction::quit(this, SLOT(quit()), actionCollection()); + a = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection()); a->setWhatsThis(i18n("Quit KPilot, (and stop the daemon " "if configured that way).")); @@ -603,15 +603,15 @@ void KPilotInstaller::initMenu() createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - (void) KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), + (void) KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); - (void) KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), + (void) KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - (void) KStdAction::preferences(this, SLOT(configure()), + (void) KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection()); a = new KAction(i18n("Configuration &Wizard..."), CSL1("wizard"), 0, - this, SLOT(configureWizard()), + this, TQT_SLOT(configureWizard()), actionCollection(), "options_configure_wizard"); a->setWhatsThis(i18n("Configure KPilot using the configuration wizard.")); @@ -629,7 +629,7 @@ void KPilotInstaller::quit() for (fP->list().first(); fP->list().current(); fP->list().next()) { - QString reason; + TQString reason; if (!fP->list().current()->preHotSync(reason)) { WARNINGKPILOT @@ -644,7 +644,7 @@ void KPilotInstaller::quit() } void KPilotInstaller::addComponentPage(PilotComponent * p, - const QString & name) + const TQString & name) { FUNCTIONSETUP; @@ -685,13 +685,13 @@ void KPilotInstaller::addComponentPage(PilotComponent * p, KToggleAction *pt = new KToggleAction(name, /* "kpilot" -- component icon, */ 0, - p, SLOT(slotShowComponent()), + p, TQT_SLOT(slotShowComponent()), actionCollection(), actionname); pt->setExclusiveGroup(CSL1("view_menu")); - connect(p, SIGNAL(showComponent(PilotComponent *)), - this, SLOT(slotSelectComponent(PilotComponent *))); + connect(p, TQT_SIGNAL(showComponent(PilotComponent *)), + this, TQT_SLOT(slotSelectComponent(PilotComponent *))); } /* slot */ void KPilotInstaller::initializeComponents() @@ -719,7 +719,7 @@ void KPilotInstaller::optionsConfigureToolbars() // This was added in KDE 3.1 saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -741,7 +741,7 @@ void KPilotInstaller::slotResetLink() /* ** Can't be a member function because it needs to be called even with no KPilotInstaller. */ -static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent) +static bool runConfigure(PilotDaemonDCOP_stub &daemon,TQWidget *parent) { FUNCTIONSETUP; bool ret = false; @@ -796,7 +796,7 @@ static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent) * canceled, though). */ typedef enum { Failed, OK, Cancel } WizardResult; -static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) +static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,TQWidget *parent) { FUNCTIONSETUP; WizardResult ret = Failed ; @@ -805,7 +805,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) KPilotSettings::self()->readConfig(); // Declarations at top because of goto's in this function - ConfigWizard *(* f) (QWidget *, int) = 0L ; + ConfigWizard *(* f) (TQWidget *, int) = 0L ; ConfigWizard *w = 0L; KLibrary *l = KLibLoader::self()->library("kcm_kpilot"); @@ -817,7 +817,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) if (l->hasSymbol("create_wizard")) { - f = ( ConfigWizard * (*) (QWidget *, int) ) (l->symbol("create_wizard")) ; + f = ( ConfigWizard * (*) (TQWidget *, int) ) (l->symbol("create_wizard")) ; } if (!f) @@ -869,7 +869,7 @@ void KPilotInstaller::componentUpdate() { FUNCTIONSETUP; - QString defaultDBPath = KPilotConfig::getDefaultDBPath(); + TQString defaultDBPath = KPilotConfig::getDefaultDBPath(); bool dbPathChanged = false; for (fP->list().first(); @@ -1124,7 +1124,7 @@ int main(int argc, char **argv) return 1; } - QTimer::singleShot(0,tp,SLOT(startDaemonIfNeeded())); + TQTimer::singleShot(0,tp,TQT_SLOT(startDaemonIfNeeded())); KGlobal::dirs()->addResourceType("pilotdbs", CSL1("share/apps/kpilot/DBBackup")); diff --git a/kpilot/kpilot/kpilot.h b/kpilot/kpilot/kpilot.h index 64bc770cb..998e087de 100644 --- a/kpilot/kpilot/kpilot.h +++ b/kpilot/kpilot/kpilot.h @@ -54,7 +54,7 @@ Q_OBJECT public: KPilotInstaller(); - KPilotInstaller(QStrList& fileList); + KPilotInstaller(TQStrList& fileList); ~KPilotInstaller(); /** @@ -67,14 +67,14 @@ public: // Adds 'name' to the pull down menu of components - void addComponentPage(PilotComponent *, const QString &name); + void addComponentPage(PilotComponent *, const TQString &name); KPilotStatus status() const { return fAppStatus; } ; protected: - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); KJanusWidget *getManagingWidget() { return fManagingWidget; } /** @@ -141,7 +141,7 @@ protected: * Run all the internal conduits' presync functions. */ bool componentPreSync(); - void setupSync(int kind,const QString& msg); + void setupSync(int kind,const TQString& msg); void componentPostSync(); /** * Run after a configuration change to force @@ -196,7 +196,7 @@ protected slots: * or activated through the signal mechanism. * */ void slotSelectComponent( PilotComponent *c ); - void slotAboutToShowComponent( QWidget *c ); + void slotAboutToShowComponent( TQWidget *c ); /** * Delayed initialization of the components. diff --git a/kpilot/kpilot/kpilotConfig.cc b/kpilot/kpilot/kpilotConfig.cc index 72acdb9b4..285890262 100644 --- a/kpilot/kpilot/kpilotConfig.cc +++ b/kpilot/kpilot/kpilotConfig.cc @@ -31,9 +31,9 @@ #include <stdlib.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kstandarddirs.h> #include <kconfig.h> @@ -83,12 +83,12 @@ KPilotSettings::setConfigVersion( ConfigurationVersion ); } -/* static */ QString KPilotConfig::getDefaultDBPath() +/* static */ TQString KPilotConfig::getDefaultDBPath() { FUNCTIONSETUP; - QString lastUser = KPilotSettings::userName(); - QString dbsubpath = CSL1("kpilot/DBBackup/"); - QString defaultDBPath = KGlobal::dirs()-> + TQString lastUser = KPilotSettings::userName(); + TQString dbsubpath = CSL1("kpilot/DBBackup/"); + TQString defaultDBPath = KGlobal::dirs()-> saveLocation("data", dbsubpath + lastUser + CSL1("/")); return defaultDBPath; } @@ -108,23 +108,23 @@ return debug_level; } -static QFont *thefont = 0L; +static TQFont *thefont = 0L; -/* static */ const QFont & KPilotConfig::fixed() +/* static */ const TQFont & KPilotConfig::fixed() { FUNCTIONSETUP; if (!thefont) - thefont = new QFont(KGlobalSettings::fixedFont()); + thefont = new TQFont(KGlobalSettings::fixedFont()); return *thefont; } -void KPilotConfig::addDirtyDatabase(QString db) +void KPilotConfig::addDirtyDatabase(TQString db) { FUNCTIONSETUP; - QStringList l(KPilotSettings::dirtyDatabases()); + TQStringList l(KPilotSettings::dirtyDatabases()); if (!l.contains(db)) { l.append(db); @@ -133,9 +133,9 @@ void KPilotConfig::addDirtyDatabase(QString db) } -void KPilotConfig::addAppBlockChangedDatabase(QString db) +void KPilotConfig::addAppBlockChangedDatabase(TQString db) { - QStringList l(KPilotSettings::appBlockChangedDatabases()); + TQStringList l(KPilotSettings::appBlockChangedDatabases()); if (!l.contains(db)) { l.append(db); @@ -143,9 +143,9 @@ void KPilotConfig::addAppBlockChangedDatabase(QString db) } } -void KPilotConfig::addFlagsChangedDatabase(QString db) +void KPilotConfig::addFlagsChangedDatabase(TQString db) { - QStringList l(KPilotSettings::flagsChangedDatabases()); + TQStringList l(KPilotSettings::flagsChangedDatabases()); if (!l.contains(db)) { l.append(db); @@ -156,10 +156,10 @@ void KPilotConfig::addFlagsChangedDatabase(QString db) -/* static */ QString KPilotConfig::versionDetails(int fileversion, bool run) +/* static */ TQString KPilotConfig::versionDetails(int fileversion, bool run) { FUNCTIONSETUP; - QString s = CSL1("<qt><p>"); + TQString s = CSL1("<qt><p>"); s += i18n("The configuration file is outdated."); s += ' '; s += i18n("The configuration file has version %1, while KPilot " @@ -206,10 +206,10 @@ static void update440() { // Try to update conduit list { - QStringList conduits( KPilotSettings::installedConduits() ); + TQStringList conduits( KPilotSettings::installedConduits() ); KConfig*c = KPilotSettings::self()->config(); /// c->resetGroup(); - c->setGroup( QString::null ); + c->setGroup( TQString::null ); bool installFiles = c->readBoolEntry("SyncFiles",true); if (installFiles) conduits.append( CSL1("internal_fileinstall") ); c->deleteEntry("SyncFiles"); @@ -228,14 +228,14 @@ static void update440() // Search for old conduit libraries. { - QStringList foundlibs ; + TQStringList foundlibs ; static const char *oldconduits[] = { "null", "address", "doc", "knotes", "sysinfo", "time", "todo", "vcal", 0L } ; const char **s = oldconduits; while (*s) { - QString libname = CSL1("kde3/lib%1conduit.so").arg(QString::fromLatin1(*s)); - QString foundlib = ::locate("lib",libname); + TQString libname = CSL1("kde3/lib%1conduit.so").arg(TQString::fromLatin1(*s)); + TQString foundlib = ::locate("lib",libname); if (!foundlib.isEmpty()) { foundlibs.append(foundlib); @@ -258,15 +258,15 @@ static void update443() { FUNCTIONSETUP; - QStringList skip = KPilotSettings::skipBackupDB(); - QStringList fixSkip; + TQStringList skip = KPilotSettings::skipBackupDB(); + TQStringList fixSkip; bool fixedSome = false; #ifdef DEBUG DEBUGKPILOT << fname << ": Skip databases are: " << skip.join(CSL1(",")) << endl; #endif - for (QStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i) + for (TQStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i) { if ((*i).length()==4) { diff --git a/kpilot/kpilot/kpilotConfig.h b/kpilot/kpilot/kpilotConfig.h index 6b260bf7f..bc15c0aca 100644 --- a/kpilot/kpilot/kpilotConfig.h +++ b/kpilot/kpilot/kpilotConfig.h @@ -50,16 +50,16 @@ public: } RunMode; /** - * @return QString of default path for the BackupDB files + * @return TQString of default path for the BackupDB files * are located */ - static QString getDefaultDBPath(); + static TQString getDefaultDBPath(); // Conduit configuration information - static void addDirtyDatabase(QString db); - static void addAppBlockChangedDatabase(QString db); - static void addFlagsChangedDatabase(QString db); + static void addDirtyDatabase(TQString db); + static void addAppBlockChangedDatabase(TQString db); + static void addFlagsChangedDatabase(TQString db); /** * This number can be changed every time a new @@ -89,7 +89,7 @@ public: * admonition to run kpilot in config mode to fix this. * sorryVersionOutdated() uses KMessageBox to display it. */ - static QString versionDetails(int fileversion, bool run); + static TQString versionDetails(int fileversion, bool run); static void sorryVersionOutdated(int fileversion); /** * Update the config file as best we can, and inform the user. @@ -116,7 +116,7 @@ public: * Returns the user's preference for the system-wide * fixed font. */ - static const QFont& fixed() ; + static const TQFont& fixed() ; static void sync(); } ; diff --git a/kpilot/kpilot/kpilotConfigDialog.cc b/kpilot/kpilot/kpilotConfigDialog.cc index 1cb12c163..34cf82478 100644 --- a/kpilot/kpilot/kpilotConfigDialog.cc +++ b/kpilot/kpilot/kpilotConfigDialog.cc @@ -34,15 +34,15 @@ #include <pi-version.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qtabwidget.h> -#include <qspinbox.h> -#include <qfile.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqtabwidget.h> +#include <tqspinbox.h> +#include <tqfile.h> #include <kmessagebox.h> #include <kcharsets.h> @@ -63,21 +63,21 @@ #include "syncAction.h" #include "dbSelectionDialog.h" -/* virtual */ QString ConfigPage::maybeSaveText() const +/* virtual */ TQString ConfigPage::maybeSaveText() const { return i18n("<qt>The settings for configuration page <i>%1</i> have been changed. Do you " "want to save the changes before continuing?</qt>").arg(this->conduitName()); } -DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +DeviceConfigPage::DeviceConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; fConfigWidget = new DeviceConfigWidget( w ); // Fill the encodings list { - QStringList l = KGlobal::charsets()->descriptiveEncodingNames(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) + TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { fConfigWidget->fPilotEncoding->insertItem(*it); } @@ -91,12 +91,12 @@ DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w, #endif -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fPilotDevice, SIGNAL(textChanged(const QString &))); - CM(fPilotSpeed, SIGNAL(activated(int))); - CM(fPilotEncoding, SIGNAL(textChanged(const QString &))); - CM(fUserName, SIGNAL(textChanged(const QString &))); - CM(fWorkaround, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fPilotDevice, TQT_SIGNAL(textChanged(const TQString &))); + CM(fPilotSpeed, TQT_SIGNAL(activated(int))); + CM(fPilotEncoding, TQT_SIGNAL(textChanged(const TQString &))); + CM(fUserName, TQT_SIGNAL(textChanged(const TQString &))); + CM(fWorkaround, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("Device"); @@ -136,7 +136,7 @@ void DeviceConfigPage::load() int r = KMessageBox::Yes; #if PILOT_LINK_NUMBER < PILOT_LINK_0_10_0 - QString d = fConfigWidget->fPilotDevice->text(); + TQString d = fConfigWidget->fPilotDevice->text(); if (d.length() > 13) { @@ -202,7 +202,7 @@ void DeviceConfigPage::load() void DeviceConfigPage::getEncoding() { FUNCTIONSETUP; - QString e = KPilotSettings::encoding(); + TQString e = KPilotSettings::encoding(); if (e.isEmpty()) fConfigWidget->fPilotEncoding->setCurrentText(CSL1("ISO8859-15")); else @@ -213,7 +213,7 @@ void DeviceConfigPage::setEncoding() { FUNCTIONSETUP; - QString enc = fConfigWidget->fPilotEncoding->currentText(); + TQString enc = fConfigWidget->fPilotEncoding->currentText(); if (enc.isEmpty()) { WARNINGKPILOT << "Empty encoding. Will ignore it." << endl; @@ -224,7 +224,7 @@ void DeviceConfigPage::setEncoding() } } -SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +SyncConfigPage::SyncConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -232,11 +232,11 @@ SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fSpecialSync, SIGNAL(activated(int))); - CM(fFullSyncCheck, SIGNAL(toggled(bool))); - CM(fScreenlockSecure, SIGNAL(toggled(bool))); - CM(fConflictResolution, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fSpecialSync, TQT_SIGNAL(activated(int))); + CM(fFullSyncCheck, TQT_SIGNAL(toggled(bool))); + CM(fScreenlockSecure, TQT_SIGNAL(toggled(bool))); + CM(fConflictResolution, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("HotSync"); @@ -306,7 +306,7 @@ void SyncConfigPage::load() } -BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +BackupConfigPage::BackupConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -314,15 +314,15 @@ BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w, fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; - connect(fConfigWidget->fBackupOnlyChooser, SIGNAL( clicked() ), - SLOT( slotSelectNoBackupDBs() ) ); - connect(fConfigWidget->fSkipDBChooser, SIGNAL(clicked()), - SLOT(slotSelectNoRestoreDBs())); + connect(fConfigWidget->fBackupOnlyChooser, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotSelectNoBackupDBs() ) ); + connect(fConfigWidget->fSkipDBChooser, TQT_SIGNAL(clicked()), + TQT_SLOT(slotSelectNoRestoreDBs())); -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fBackupOnly, SIGNAL(textChanged(const QString &))); - CM(fSkipDB, SIGNAL(textChanged(const QString &))); - CM(fBackupFrequency, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fBackupOnly, TQT_SIGNAL(textChanged(const TQString &))); + CM(fSkipDB, TQT_SIGNAL(textChanged(const TQString &))); + CM(fBackupFrequency, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("Backup"); @@ -351,9 +351,9 @@ void BackupConfigPage::load() /* Backup tab */ KPilotSettings::setSkipBackupDB( - QStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text())); + TQStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text())); KPilotSettings::setSkipRestoreDB( - QStringList::split(CSL1(","),fConfigWidget->fSkipDB->text())); + TQStringList::split(CSL1(","),fConfigWidget->fSkipDB->text())); KPilotSettings::setRunConduitsWithBackup(fConfigWidget->fRunConduitsWithBackup->isChecked()); KPilotSettings::setBackupFrequency(fConfigWidget->fBackupFrequency->currentItem()); @@ -366,12 +366,12 @@ void BackupConfigPage::slotSelectNoBackupDBs() { FUNCTIONSETUP; - QStringList selectedDBs(QStringList::split(',', fConfigWidget->fBackupOnly->text() )); + TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fBackupOnly->text() )); - QStringList deviceDBs=KPilotSettings::deviceDBs(); - QStringList addedDBs=KPilotSettings::addedDBs(); + TQStringList deviceDBs=KPilotSettings::deviceDBs(); + TQStringList addedDBs=KPilotSettings::addedDBs(); KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoBackupDBs"); - if (dlg && (dlg->exec()==QDialog::Accepted) ) + if (dlg && (dlg->exec()==TQDialog::Accepted) ) { fConfigWidget->fBackupOnly->setText( dlg->getSelectedDBs().join(CSL1(","))); @@ -384,12 +384,12 @@ void BackupConfigPage::slotSelectNoRestoreDBs() { FUNCTIONSETUP; - QStringList selectedDBs(QStringList::split(',', fConfigWidget->fSkipDB->text() )); + TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fSkipDB->text() )); - QStringList deviceDBs=KPilotSettings::deviceDBs(); - QStringList addedDBs=KPilotSettings::addedDBs(); + TQStringList deviceDBs=KPilotSettings::deviceDBs(); + TQStringList addedDBs=KPilotSettings::addedDBs(); KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoRestoreDBs"); - if (dlg && (dlg->exec()==QDialog::Accepted) ) + if (dlg && (dlg->exec()==TQDialog::Accepted) ) { fConfigWidget->fSkipDB->setText( dlg->getSelectedDBs().join(CSL1(","))); @@ -400,7 +400,7 @@ void BackupConfigPage::slotSelectNoRestoreDBs() -ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +ViewersConfigPage::ViewersConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -408,11 +408,11 @@ ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage( fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fInternalEditors, SIGNAL(toggled(bool))); - CM(fUseSecret, SIGNAL(toggled(bool))); - CM(fAddressGroup, SIGNAL(clicked(int))); - CM(fUseKeyField, SIGNAL(toggled(bool))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fInternalEditors, TQT_SIGNAL(toggled(bool))); + CM(fUseSecret, TQT_SIGNAL(toggled(bool))); + CM(fAddressGroup, TQT_SIGNAL(clicked(int))); + CM(fUseKeyField, TQT_SIGNAL(toggled(bool))); #undef CM fConduitName = i18n("Viewers"); @@ -452,7 +452,7 @@ void ViewersConfigPage::load() -StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +StartExitConfigPage::StartExitConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -460,11 +460,11 @@ StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPa fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fStartDaemonAtLogin, SIGNAL(toggled(bool))); - CM(fKillDaemonOnExit, SIGNAL(toggled(bool))); - CM(fDockDaemon, SIGNAL(toggled(bool))); - CM(fQuitAfterSync, SIGNAL(toggled(bool))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fStartDaemonAtLogin, TQT_SIGNAL(toggled(bool))); + CM(fKillDaemonOnExit, TQT_SIGNAL(toggled(bool))); + CM(fDockDaemon, TQT_SIGNAL(toggled(bool))); + CM(fQuitAfterSync, TQT_SIGNAL(toggled(bool))); #undef CM fConduitName = i18n("Startup and Exit"); @@ -487,10 +487,10 @@ void StartExitConfigPage::load() { FUNCTIONSETUP; - QString autostart = KGlobalSettings::autostartPath(); - QString desktopfile = CSL1("kpilotdaemon.desktop"); - QString desktopcategory = CSL1("kde/"); - QString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile); + TQString autostart = KGlobalSettings::autostartPath(); + TQString desktopfile = CSL1("kpilotdaemon.desktop"); + TQString desktopcategory = CSL1("kde/"); + TQString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile); if (location.isEmpty()) // Fallback to KDE 3.0? { location = KGlobal::dirs()->findResource("apps",desktopfile); @@ -516,7 +516,7 @@ void StartExitConfigPage::load() } else { - QFile::remove(autostart+desktopfile); + TQFile::remove(autostart+desktopfile); } KPilotSettings::setDockDaemon(fConfigWidget->fDockDaemon->isChecked()); KPilotSettings::setKillDaemonAtExit(fConfigWidget->fKillDaemonOnExit->isChecked()); diff --git a/kpilot/kpilot/kpilotConfigDialog.h b/kpilot/kpilot/kpilotConfigDialog.h index 50a182dfa..11960f8df 100644 --- a/kpilot/kpilot/kpilotConfigDialog.h +++ b/kpilot/kpilot/kpilotConfigDialog.h @@ -44,17 +44,17 @@ class BackupConfigWidget; class ConfigPage : public ConduitConfigBase { public: - ConfigPage( QWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ; + ConfigPage( TQWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ; protected: // Override base class virtual function. - virtual QString maybeSaveText() const; + virtual TQString maybeSaveText() const; } ; class DeviceConfigPage : public ConfigPage { Q_OBJECT public: - DeviceConfigPage( QWidget *, const char * ); + DeviceConfigPage( TQWidget *, const char * ); protected: virtual bool validate(); @@ -77,7 +77,7 @@ private: class KDE_EXPORT SyncConfigPage : public ConfigPage { public: - SyncConfigPage( QWidget *, const char * ); + SyncConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -91,7 +91,7 @@ class BackupConfigPage : public ConfigPage { Q_OBJECT public: - BackupConfigPage( QWidget *, const char * ); + BackupConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -108,7 +108,7 @@ private: class StartExitConfigPage : public ConfigPage { public: - StartExitConfigPage( QWidget *, const char * ); + StartExitConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -121,7 +121,7 @@ private: class ViewersConfigPage : public ConfigPage { public: - ViewersConfigPage( QWidget *, const char * ); + ViewersConfigPage( TQWidget *, const char * ); protected: virtual void load(); diff --git a/kpilot/kpilot/kpilotConfigWizard.cc b/kpilot/kpilot/kpilotConfigWizard.cc index d21ec5d81..9df81b412 100644 --- a/kpilot/kpilot/kpilotConfigWizard.cc +++ b/kpilot/kpilot/kpilotConfigWizard.cc @@ -28,10 +28,10 @@ //#include "options.h" -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> #include <kmessagebox.h> #include <kglobal.h> @@ -52,7 +52,7 @@ #include "kpilotProbeDialog.h" -ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) : +ConfigWizard::ConfigWizard(TQWidget *parent, const char *n, int m) : KWizard(parent, n), fMode((Mode)m) { @@ -67,8 +67,8 @@ ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) : setHelpEnabled( page2, false ); setHelpEnabled( page3, false ); - connect( page2->fProbeButton, SIGNAL( pressed() ), - this, SLOT( probeHandheld() ) ); + connect( page2->fProbeButton, TQT_SIGNAL( pressed() ), + this, TQT_SLOT( probeHandheld() ) ); KPilotSettings::self()->readConfig(); page2->fUserName->setText( KPilotSettings::userName() ); @@ -84,8 +84,8 @@ ConfigWizard::~ConfigWizard() void ConfigWizard::accept() { FUNCTIONSETUP; - QString username( page2->fUserName->text() ); - QString devicename( page2->fDeviceName->text() ); + TQString username( page2->fUserName->text() ); + TQString devicename( page2->fDeviceName->text() ); // int devicetype( page1->fConnectionType->selectedId() ); enum eSyncApp { eAppKDE=0, @@ -121,10 +121,10 @@ void ConfigWizard::accept() todoConfig->readConfig(); calendarConfig->readConfig(); - QStringList conduits = KPilotSettings::installedConduits(); + TQStringList conduits = KPilotSettings::installedConduits(); int version(0); #define APPEND_CONDUIT(a) if (!conduits.contains(a)) conduits.append(a) - QString applicationName(i18n("general KDE-PIM")); + TQString applicationName(i18n("general KDE-PIM")); APPEND_CONDUIT("internal_fileinstall"); APPEND_CONDUIT("todo-conduit"); APPEND_CONDUIT("vcal-conduit"); @@ -197,7 +197,7 @@ void ConfigWizard::accept() KPilotSettings::setInstalledConduits( conduits ); #undef APPEND_CONDUIT - QString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName); + TQString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName); if (fMode == InDialog) { finishMessage.append(CSL1("\n")); @@ -209,7 +209,7 @@ void ConfigWizard::accept() KMessageBox::information(this, finishMessage, i18n("Automatic Configuration Finished")); KPilotSettings::self()->writeConfig(); - QDialog::accept(); + TQDialog::accept(); } void ConfigWizard::probeHandheld() diff --git a/kpilot/kpilot/kpilotConfigWizard.h b/kpilot/kpilot/kpilotConfigWizard.h index 3a448c4fa..742df3925 100644 --- a/kpilot/kpilot/kpilotConfigWizard.h +++ b/kpilot/kpilot/kpilotConfigWizard.h @@ -40,7 +40,7 @@ Q_OBJECT public: enum Mode { InDialog=0, Standalone=1 } ; - ConfigWizard(QWidget *p=0L,const char *n=0L, int mode=(int)InDialog); + ConfigWizard(TQWidget *p=0L,const char *n=0L, int mode=(int)InDialog); ~ConfigWizard(); protected slots: @@ -52,7 +52,7 @@ protected: ConfigWizard_base3 *page3; Mode fMode; - QStringList mDBs; + TQStringList mDBs; } ; #endif diff --git a/kpilot/kpilot/kpilotProbeDialog.cc b/kpilot/kpilot/kpilotProbeDialog.cc index f7e04268b..fd7fcb3cd 100644 --- a/kpilot/kpilot/kpilotProbeDialog.cc +++ b/kpilot/kpilot/kpilotProbeDialog.cc @@ -28,14 +28,14 @@ #include "options.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kmessagebox.h> #include <kglobal.h> @@ -86,23 +86,23 @@ and the module can't be unloaded. */ -ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : +ProbeDialog::ProbeDialog(TQWidget *parent, const char *n) : KDialogBase(parent, n, true, i18n("Autodetecting Your Handheld"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Cancel, true, i18n("Restart Detection")), mDetected(false), mUserName(), mDevice() { FUNCTIONSETUP; - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - fInfoText = new QLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); - fInfoText->setAlignment( QLabel::WordBreak ); + fInfoText = new TQLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); + fInfoText->setAlignment( TQLabel::WordBreak ); - fStatusGroup = new QGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); + fStatusGroup = new TQGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); fStatusGroup->setColumnLayout(0, Qt::Vertical ); - fStatusGroupLayout = new QGridLayout( fStatusGroup->layout() ); + fStatusGroupLayout = new TQGridLayout( fStatusGroup->layout() ); - fStatus = new QLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); - fStatus->setAlignment( QLabel::WordBreak ); + fStatus = new TQLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); + fStatus->setAlignment( TQLabel::WordBreak ); fStatusGroupLayout->addWidget( fStatus, 0, 0 ); fProgress = new KProgress( 100, fStatusGroup, "fProgress" ); @@ -110,27 +110,27 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : - fResultsGroup = new QGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); + fResultsGroup = new TQGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); fResultsGroup->setEnabled( FALSE ); fResultsGroup->setColumnLayout(0, Qt::Vertical ); - fResultsGroupLayout = new QGridLayout( fResultsGroup->layout() ); + fResultsGroupLayout = new TQGridLayout( fResultsGroup->layout() ); fResultsGroupLayout->setAlignment( Qt::AlignTop ); - fUserLabel = new QLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); - fUserLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); + fUserLabel = new TQLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); + fUserLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); fResultsGroupLayout->addWidget( fUserLabel, 0, 0 ); - fDeviceLabel = new QLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); + fDeviceLabel = new TQLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); fResultsGroupLayout->addWidget( fDeviceLabel, 1, 0 ); - fUser = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); + fUser = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); fResultsGroupLayout->addWidget( fUser, 0, 1 ); - fDevice = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); + fDevice = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); fResultsGroupLayout->addWidget( fDevice, 1, 1 ); - resize( QSize(459, 298).expandedTo(minimumSizeHint()) ); + resize( TQSize(459, 298).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); enableButtonOK(false); @@ -150,15 +150,15 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : <<"/dev/cuad1"<<"/dev/cuad3" <<"/dev/ucom1"<<"/dev/ucom3"; - fProcessEventsTimer = new QTimer( this ); - fTimeoutTimer = new QTimer( this ); - fProgressTimer = new QTimer( this ); - fRotateLinksTimer = new QTimer( this ); - connect( fProcessEventsTimer, SIGNAL(timeout()), this, SLOT(processEvents()) ); - connect( fTimeoutTimer, SIGNAL(timeout()), this, SLOT(timeout()) ); - connect( fProgressTimer, SIGNAL(timeout()), this, SLOT( progress()) ); - connect( fRotateLinksTimer, SIGNAL(timeout()), this, SLOT( detect()) ); - connect( this, SIGNAL(finished()), this, SLOT(disconnectDevices()) ); + fProcessEventsTimer = new TQTimer( this ); + fTimeoutTimer = new TQTimer( this ); + fProgressTimer = new TQTimer( this ); + fRotateLinksTimer = new TQTimer( this ); + connect( fProcessEventsTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processEvents()) ); + connect( fTimeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); + connect( fProgressTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( progress()) ); + connect( fRotateLinksTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( detect()) ); + connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(disconnectDevices()) ); } ProbeDialog::~ProbeDialog() @@ -180,9 +180,9 @@ void ProbeDialog::progress() int ProbeDialog::exec() { mDetected = false; - mUserName = QString(); - mDevice = QString(); - QTimer::singleShot( 0, this, SLOT( startDetection() ) ); + mUserName = TQString(); + mDevice = TQString(); + TQTimer::singleShot( 0, this, TQT_SLOT( startDetection() ) ); return KDialogBase::exec(); } @@ -193,7 +193,7 @@ void ProbeDialog::startDetection() disconnectDevices(); fProgress->setProgress(0); fStatus->setText( i18n("Starting detection...") ); - QTimer::singleShot(0, this, SLOT(processEvents()) ); + TQTimer::singleShot(0, this, TQT_SLOT(processEvents()) ); processEvents(); PilotDaemonDCOP_stub *daemonStub = new PilotDaemonDCOP_stub("kpilotDaemon", "KPilotDaemonIface"); if (daemonStub) { @@ -217,8 +217,8 @@ void ProbeDialog::startDetection() KPilotDeviceLink*link; for (int i=0; i<3; i++) { - QStringList::iterator end(mDevicesToProbe[i].end()); - for (QStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) + TQStringList::iterator end(mDevicesToProbe[i].end()); + for (TQStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) { link = new KPilotDeviceLink(); link->setDevice((*it)); @@ -226,7 +226,7 @@ void ProbeDialog::startDetection() DEBUGKPILOT<<"new kpilotDeviceLink for "<<(*it)<<endl; #endif mDeviceLinks[i].append( link ); - connect( link, SIGNAL(deviceReady(KPilotDeviceLink*)), this, SLOT(connection(KPilotDeviceLink*)) ); + connect( link, TQT_SIGNAL(deviceReady(KPilotDeviceLink*)), this, TQT_SLOT(connection(KPilotDeviceLink*)) ); processEvents(); } } @@ -293,7 +293,7 @@ void ProbeDialog::connection( KPilotDeviceLink*lnk) fResultsGroup->setEnabled( true ); enableButtonOK(true); - QTimer::singleShot(0, this, SLOT(retrieveDBList())); + TQTimer::singleShot(0, this, TQT_SLOT(retrieveDBList())); } void ProbeDialog::retrieveDBList() @@ -309,14 +309,14 @@ void ProbeDialog::retrieveDBList() set_long( &buff[1], (*i).creator ); buff[5] = ']'; buff[6] = '\0'; - QString cr( buff ); + TQString cr( buff ); mDBs << cr; - mDBs << QString( (*i).name ); + mDBs << TQString( (*i).name ); } mDBs.sort(); - QString old( QString::null ); - QStringList::Iterator itr = mDBs.begin(); + TQString old( TQString::null ); + TQStringList::Iterator itr = mDBs.begin(); while ( itr != mDBs.end() ) { if ( old == *itr ) { itr = mDBs.remove( itr ); @@ -329,7 +329,7 @@ void ProbeDialog::retrieveDBList() // End sync gracefully, but don't change settings on the handheld. mActiveLink->endSync( KPilotLink::NoUpdate ); - QTimer::singleShot(0, this, SLOT(disconnectDevices())); + TQTimer::singleShot(0, this, TQT_SLOT(disconnectDevices())); } void ProbeDialog::disconnectDevices() { diff --git a/kpilot/kpilot/kpilotProbeDialog.h b/kpilot/kpilot/kpilotProbeDialog.h index be02dff6e..ccfa7fee3 100644 --- a/kpilot/kpilot/kpilotProbeDialog.h +++ b/kpilot/kpilot/kpilotProbeDialog.h @@ -39,21 +39,21 @@ class QGridLayout; template <class T> class QValueList; template<class Key, class T> class QMap; -typedef QValueList<KPilotDeviceLink*> PilotLinkList; +typedef TQValueList<KPilotDeviceLink*> PilotLinkList; -typedef QMap<QString, KPilotDeviceLink*> PilotLinkMap; +typedef TQMap<TQString, KPilotDeviceLink*> PilotLinkMap; class ProbeDialog : public KDialogBase { Q_OBJECT public: - ProbeDialog(QWidget *p=0L,const char *n=0L); + ProbeDialog(TQWidget *p=0L,const char *n=0L); ~ProbeDialog(); bool detected() const { return mDetected; } - QString userName() const { return mUserName; } - QString device() const { return mDevice; } - QStringList dbs() const { return mDBs; } + TQString userName() const { return mUserName; } + TQString device() const { return mDevice; } + TQStringList dbs() const { return mDBs; } protected slots: @@ -70,33 +70,33 @@ public slots: int exec(); void slotUser1 () { startDetection(); } protected: - QLabel* fInfoText; - QGroupBox* fResultsGroup; - QLabel* fUserLabel; - QLabel* fDeviceLabel; - QLabel* fUser; - QLabel* fDevice; - QGroupBox* fStatusGroup; - QLabel* fStatus; + TQLabel* fInfoText; + TQGroupBox* fResultsGroup; + TQLabel* fUserLabel; + TQLabel* fDeviceLabel; + TQLabel* fUser; + TQLabel* fDevice; + TQGroupBox* fStatusGroup; + TQLabel* fStatus; KProgress* fProgress; - QTimer* fProcessEventsTimer; - QTimer* fTimeoutTimer; - QTimer* fProgressTimer; - QTimer* fRotateLinksTimer; + TQTimer* fProcessEventsTimer; + TQTimer* fTimeoutTimer; + TQTimer* fProgressTimer; + TQTimer* fRotateLinksTimer; protected: - QGridLayout* fResultsGroupLayout; - QGridLayout* fStatusGroupLayout; + TQGridLayout* fResultsGroupLayout; + TQGridLayout* fStatusGroupLayout; - QStringList mDevicesToProbe[3]; + TQStringList mDevicesToProbe[3]; PilotLinkList mDeviceLinks[3]; int mProbeDevicesIndex; KPilotDeviceLink *mActiveLink; bool mDetected; - QString mUserName; - QString mDevice; - QStringList mDBs; + TQString mUserName; + TQString mDevice; + TQStringList mDBs; } ; #endif diff --git a/kpilot/kpilot/kroupware.cc b/kpilot/kpilot/kroupware.cc index fc57b4b5c..212df17d1 100644 --- a/kpilot/kpilot/kroupware.cc +++ b/kpilot/kpilot/kroupware.cc @@ -30,7 +30,7 @@ #include "options.h" -#include <qfile.h> +#include <tqfile.h> #include <dcopclient.h> #include <ktempfile.h> @@ -71,7 +71,7 @@ void KroupwareSync::cleanupConfig() KConfig* c = KPilotSettings::self()->config(); c->setGroup("todoOptions"); if ( c->hasKey( "CalFileBackup") ) { - QString fn = c->readPathEntry( "CalFileBackup" ); + TQString fn = c->readPathEntry( "CalFileBackup" ); if ( fn != CSL1("empty") ) { c->writePathEntry( "CalFile" ,fn ); c->writeEntry( "CalFileBackup" , "empty" ); @@ -79,7 +79,7 @@ void KroupwareSync::cleanupConfig() } c->setGroup("vcalOptions"); if ( c->hasKey( "CalFileBackup") ) { - QString fn = c->readPathEntry( "CalFileBackup" ); + TQString fn = c->readPathEntry( "CalFileBackup" ); if ( fn != CSL1("empty") ) { c->writePathEntry( "CalFile" ,fn ); c->writeEntry( "CalFileBackup" , "empty" ); @@ -103,14 +103,14 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) KConfig*c = KPilotSettings::self()->config(); DCOPClient *client = kapp->dcopClient(); KTempFile tempfile; - QString filename = tempfile.name(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQString filename = tempfile.name(); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" , "KOrganizerSyncIface", - "pullSyncData(QString)", + "pullSyncData(TQString)", data, reply_type, reply_data)) { @@ -125,7 +125,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) if ( todos ) { logMessage( i18n("Syncing to-dos with KMail" )); c->setGroup("todoOptions"); - QString fn = c->readPathEntry( "CalFile" ); + TQString fn = c->readPathEntry( "CalFile" ); c->writePathEntry( "CalFileBackup" ,fn ); c->writePathEntry( "CalFile" ,filename ); } @@ -134,7 +134,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) if ( cal ) { logMessage( i18n("Syncing calendar with KMail" )); c->setGroup("vcalOptions"); - QString fn = c->readPathEntry( "CalFile" ); + TQString fn = c->readPathEntry( "CalFile" ); c->writePathEntry( "CalFileBackup" ,fn ); c->writePathEntry( "CalFile" ,filename ); } @@ -149,14 +149,14 @@ void KroupwareSync::start_syncAddWithKMail() logMessage( CSL1("Syncing Addresses with KMail" )); DCOPClient *client = kapp->dcopClient(); KTempFile tempfile; - QString filename = tempfile.name(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQString filename = tempfile.name(); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" , "KMailIface", - "requestAddresses(QString)", + "requestAddresses(TQString)", data, reply_type, reply_data)) { @@ -182,7 +182,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) { if ( !cal && ! todos ) return; - QString filename; + TQString filename; KConfig*c=KPilotSettings::self()->config(); if ( todos ) { logMessage( i18n("Rewriting to-dos to KMail..." )); @@ -195,7 +195,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage( i18n("Rewriting Calendar to KMail" )); c->setGroup("vcalOptions"); filename = c->readPathEntry( "CalFile" ); - QString tf = c->readPathEntry( "CalFileBackup" ) ; + TQString tf = c->readPathEntry( "CalFileBackup" ) ; c->writePathEntry( "CalFile" , tf ); c->writeEntry( "CalFileBackup" ,"empty"); } @@ -204,13 +204,13 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage(CSL1("Try to call KMail via DCOP to finish sync...")); // try DCOP connection to KMail DCOPClient *client = kapp->dcopClient(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" /*"korganizer" kmdcop */, "KOrganizerSyncIface", - "pushSyncData(QString)", + "pushSyncData(TQString)", data, reply_type, reply_data)) { @@ -222,7 +222,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage(CSL1("Calling over DCOP succeeded")); logMessage(CSL1("Sync to KMail has finished successfully")); } - QFile::remove( filename ); + TQFile::remove( filename ); } } void KroupwareSync::end_syncAddWithKMail() @@ -232,17 +232,17 @@ void KroupwareSync::end_syncAddWithKMail() // TODO!! better config handling (KConfig XT) KConfig*c = KPilotSettings::self()->config(); c->setGroup("Abbrowser-conduit"); - QString filename = c->readPathEntry( "KMailTempFile" ); + TQString filename = c->readPathEntry( "KMailTempFile" ); c->writeEntry( "KMailTempFile" , "empty" ); KPilotSettings::writeConfig(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; - arg << QStringList(); + arg << TQStringList(); if (!client->call( "kmail" , "KMailIface", - "storeAddresses(QString, QStringList)", + "storeAddresses(TQString, TQStringList)", data, reply_type, reply_data)) { @@ -252,7 +252,7 @@ void KroupwareSync::end_syncAddWithKMail() else { logMessage(CSL1("Calling store addresses over DCOP succeeded")); } - //QFile::remove( filename ); + //TQFile::remove( filename ); } void KroupwareSync::end_syncNotesWithKMail() { @@ -262,16 +262,16 @@ void KroupwareSync::end_syncNotesWithKMail() -/* static */ bool KroupwareSync::startKMail(QString *error) +/* static */ bool KroupwareSync::startKMail(TQString *error) { FUNCTIONSETUP; - QCString kmdcop; - QString mess; + TQCString kmdcop; + TQString mess; int pid; return KApplication::startServiceByDesktopName(CSL1("kmail"), - QString::null, + TQString::null, error, &kmdcop, &pid diff --git a/kpilot/kpilot/kroupware.h b/kpilot/kpilot/kroupware.h index 8cce32eaf..f7be71802 100644 --- a/kpilot/kpilot/kroupware.h +++ b/kpilot/kpilot/kroupware.h @@ -80,7 +80,7 @@ private: public: /* Try to start KMail. Returns true on success. */ - static bool startKMail(QString *errormessage); + static bool startKMail(TQString *errormessage); } ; #endif diff --git a/kpilot/kpilot/listCat.cc b/kpilot/kpilot/listCat.cc index 281bfe001..6faa3efa1 100644 --- a/kpilot/kpilot/listCat.cc +++ b/kpilot/kpilot/listCat.cc @@ -30,13 +30,13 @@ #include "options.h" -#include <qpainter.h> +#include <tqpainter.h> #include <klocale.h> #include "listCat.moc" -ListCategorizer::ListCategorizer(QWidget * parent, +ListCategorizer::ListCategorizer(TQWidget * parent, const char *name) : KListView(parent, name), fStartOpen(false) @@ -45,9 +45,9 @@ ListCategorizer::ListCategorizer(QWidget * parent, setupWidget(); } -ListCategorizer::ListCategorizer(const QStringList & i, +ListCategorizer::ListCategorizer(const TQStringList & i, bool startOpen, - QWidget * parent, + TQWidget * parent, const char *name) : KListView(parent, name), fStartOpen(startOpen) @@ -56,10 +56,10 @@ ListCategorizer::ListCategorizer(const QStringList & i, addCategories(i); } -void ListCategorizer::addCategories(const QStringList & l) +void ListCategorizer::addCategories(const TQStringList & l) { FUNCTIONSETUP; - QStringList::ConstIterator i; + TQStringList::ConstIterator i; for (i = l.begin(); i != l.end(); ++i) { @@ -67,11 +67,11 @@ void ListCategorizer::addCategories(const QStringList & l) } } -QListViewItem *ListCategorizer::addCategory(const QString & name, - const QString & desc) +TQListViewItem *ListCategorizer::addCategory(const TQString & name, + const TQString & desc) { FUNCTIONSETUP; - QListViewItem *m = new QListViewItem(this, name, desc); + TQListViewItem *m = new TQListViewItem(this, name, desc); m->setSelectable(false); m->setOpen(fStartOpen); @@ -90,12 +90,12 @@ void ListCategorizer::setupWidget() setRootIsDecorated(true); } -/* virtual */ bool ListCategorizer::acceptDrag(QDropEvent * event) const +/* virtual */ bool ListCategorizer::acceptDrag(TQDropEvent * event) const { FUNCTIONSETUP; if (!(event->source())) return false; - QListViewItem *p = itemAt(event->pos()); + TQListViewItem *p = itemAt(event->pos()); if (!p) return false; @@ -103,7 +103,7 @@ void ListCategorizer::setupWidget() return true; } -/* virtual */ void ListCategorizer::contentsDropEvent(QDropEvent * e) +/* virtual */ void ListCategorizer::contentsDropEvent(TQDropEvent * e) { FUNCTIONSETUP; cleanDropVisualizer(); @@ -112,8 +112,8 @@ void ListCategorizer::setupWidget() return; e->accept(); - QListViewItem *p = itemAt(e->pos()); - QListViewItem *selection = currentItem(); + TQListViewItem *p = itemAt(e->pos()); + TQListViewItem *selection = currentItem(); if (!p) { @@ -121,7 +121,7 @@ void ListCategorizer::setupWidget() return; } - QListViewItem *category = p->parent(); + TQListViewItem *category = p->parent(); if (!category) { @@ -134,7 +134,7 @@ void ListCategorizer::setupWidget() /* virtual */ void ListCategorizer::startDrag() { FUNCTIONSETUP; - QListViewItem *p = currentItem(); + TQListViewItem *p = currentItem(); if (!p || !p->parent()) return; @@ -142,10 +142,10 @@ void ListCategorizer::setupWidget() KListView::startDrag(); } -QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) const +TQStringList ListCategorizer::listSiblings(const TQListViewItem * p, int column) const { FUNCTIONSETUP; - QStringList l; + TQStringList l; while (p) { @@ -156,10 +156,10 @@ QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) c return l; } -QListViewItem *ListCategorizer::findCategory(const QString & category) const +TQListViewItem *ListCategorizer::findCategory(const TQString & category) const { FUNCTIONSETUP; - QListViewItem *p = firstChild(); + TQListViewItem *p = firstChild(); while (p) { @@ -171,24 +171,24 @@ QListViewItem *ListCategorizer::findCategory(const QString & category) const return 0L; } -QListViewItem *ListCategorizer::addItem(const QString & category, - const QString & name, const QString & description) +TQListViewItem *ListCategorizer::addItem(const TQString & category, + const TQString & name, const TQString & description) { FUNCTIONSETUP; - QListViewItem *p = findCategory(category); + TQListViewItem *p = findCategory(category); if (!p) return 0L; - return new QListViewItem(p, name, description); + return new TQListViewItem(p, name, description); } #define RVPAD (4) -RichListViewItem::RichListViewItem(QListViewItem *p, - QString l, +RichListViewItem::RichListViewItem(TQListViewItem *p, + TQString l, int c) : - QListViewItem(p,l) + TQListViewItem(p,l) { FUNCTIONSETUP; @@ -216,7 +216,7 @@ void RichListViewItem::computeHeight(int c) if (!fIsRich[c]) return; - QListView *v = listView(); + TQListView *v = listView(); fRect[c] = v->fontMetrics().boundingRect(v->itemMargin()+RVPAD,0+RVPAD, v->columnWidth(c)-v->itemMargin()-RVPAD,300, @@ -229,7 +229,7 @@ void RichListViewItem::computeHeight(int c) { FUNCTIONSETUP; - QListViewItem::setup(); + TQListViewItem::setup(); int h = height(); @@ -243,8 +243,8 @@ void RichListViewItem::computeHeight(int c) } -/* virtual */ void RichListViewItem::paintCell(QPainter *p, - const QColorGroup &gc, +/* virtual */ void RichListViewItem::paintCell(TQPainter *p, + const TQColorGroup &gc, int column, int width, int alignment) @@ -253,11 +253,11 @@ void RichListViewItem::computeHeight(int c) if ((!column) || (!fIsRich[column])) { - QListViewItem::paintCell(p,gc,column,width,alignment); + TQListViewItem::paintCell(p,gc,column,width,alignment); return; } - QListView *v = listView(); + TQListView *v = listView(); p->eraseRect(0,0,width,height()); p->setBackgroundColor(gc.background()); diff --git a/kpilot/kpilot/listCat.h b/kpilot/kpilot/listCat.h index fd53413b7..e2063303f 100644 --- a/kpilot/kpilot/listCat.h +++ b/kpilot/kpilot/listCat.h @@ -51,8 +51,8 @@ class QStringList; * ListCategorizer *lc = new ListCategorizer(this,colors); * lc->setColumnText(0,i18n("Color")); * lc->setColumnText(1,i18n("HTML")); - * QListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE")); - * (void) new QListViewItem(stdKDE,i18n("red"),"#FF0000"); + * TQListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE")); + * (void) new TQListViewItem(stdKDE,i18n("red"),"#FF0000"); * @endcode * to set sensible column headers for a list of colors * and their HTML equivalents (although why you would want @@ -73,7 +73,7 @@ public: * startOpen set to false. The parameters * @p parent and @p name are the usual Qt ones. */ - ListCategorizer(QWidget *parent, + ListCategorizer(TQWidget *parent, const char *name = 0); /** * Constructor. @@ -82,9 +82,9 @@ public: * already inserted. In addition, this constructor lets you * specify whether or not startOpen is set. */ - ListCategorizer(const QStringList& categories, + ListCategorizer(const TQStringList& categories, bool startOpen, - QWidget *parent, + TQWidget *parent, const char *name = 0); /** @@ -92,7 +92,7 @@ public: * All the categories are added without descriptions; * use addCategory on a per-category basis for that. */ - void addCategories(const QStringList&); + void addCategories(const TQStringList&); /** * Add a category with name @p name and optional * @p description. This can be useful if you want @@ -100,15 +100,15 @@ public: * refer to this category in the future without * using findCategory(). * - * @return the QListViewItem created for the category + * @return the TQListViewItem created for the category */ - QListViewItem *addCategory(const QString& name, - const QString& description = QString::null); + TQListViewItem *addCategory(const TQString& name, + const TQString& description = TQString::null); /** * Returns the list of names of the categories in * the ListCategorizer. */ - QStringList categories() const + TQStringList categories() const { return listSiblings(firstChild()); } ; @@ -121,18 +121,18 @@ public: * constructor. That way you can also hide more data in * the remaining columns. */ - QListViewItem *addItem(const QString& category, - const QString& name, - const QString& description = QString::null); + TQListViewItem *addItem(const TQString& category, + const TQString& name, + const TQString& description = TQString::null); /** * Returns the list of strings in column @p column under * category @p category. You can do this to get, for example * the names of all the items categorized under a given * category, or, more usefully, set @p column to something * other that 0 (name) or 1 (description) to return the - * QStringList hidden in the non-visible columns. + * TQStringList hidden in the non-visible columns. */ - QStringList items(const QString& category,int column=0) const + TQStringList items(const TQString& category,int column=0) const { return listSiblings(findCategory(category),column); } @@ -143,18 +143,18 @@ public: * since just remembering the pointer addCategory gives * you is faster and uses hardly any memory. */ - QListViewItem *findCategory(const QString& categoryName) const; + TQListViewItem *findCategory(const TQString& categoryName) const; /** * Return the list of strings in column @p column of all siblings * of the given item @p p. If you remembered a pointer to a * category, you can use * @code - * QStringList l = lc->listSiblings(stdKDE->firstChild(),2); + * TQStringList l = lc->listSiblings(stdKDE->firstChild(),2); * @endcode * to get the list of strings in hidden column 2 under * the category you remembered. */ - QStringList listSiblings(const QListViewItem *p,int column=0) const; + TQStringList listSiblings(const TQListViewItem *p,int column=0) const; /** * @return whether new categories are inserted in an @@ -174,7 +174,7 @@ protected: /** * Reimplemented to prevent categories from being dragged. */ - virtual bool acceptDrag (QDropEvent* event) const; + virtual bool acceptDrag (TQDropEvent* event) const; /** * Reimplemented to prevent categories from being dragged. */ @@ -182,7 +182,7 @@ protected: /** * Reimplemented to prevent categories from being dragged. */ - virtual void contentsDropEvent (QDropEvent*); + virtual void contentsDropEvent (TQDropEvent*); @@ -200,13 +200,13 @@ private: class RichListViewItem : public QListViewItem { public: - RichListViewItem(QListViewItem *parent, - QString, + RichListViewItem(TQListViewItem *parent, + TQString, int); virtual ~RichListViewItem(); - virtual void paintCell(QPainter *, - const QColorGroup &, + virtual void paintCell(TQPainter *, + const TQColorGroup &, int column, int width, int alignment); @@ -221,7 +221,7 @@ protected: protected: bool *fIsRich; - QRect *fRect; + TQRect *fRect; int fColumns; } ; diff --git a/kpilot/kpilot/listItems.cc b/kpilot/kpilot/listItems.cc index 1c8315b86..9984f0047 100644 --- a/kpilot/kpilot/listItems.cc +++ b/kpilot/kpilot/listItems.cc @@ -30,9 +30,9 @@ #include "options.h" -#include <qstring.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <tqstring.h> +#include <tqlistbox.h> +#include <tqlistview.h> #ifndef _KPILOT_LISTITEMS_H @@ -52,9 +52,9 @@ } #endif -PilotListItem::PilotListItem(const QString & text, +PilotListItem::PilotListItem(const TQString & text, recordid_t pilotid, void *r) : - QListBoxText(text), + TQListBoxText(text), fid(pilotid), fr(r) { @@ -94,8 +94,8 @@ PilotListItem::~PilotListItem() } #endif -PilotCheckListItem::PilotCheckListItem(QListView * parent, const QString & text, recordid_t pilotid, void *r) : - QCheckListItem(parent, text, QCheckListItem::CheckBox), +PilotCheckListItem::PilotCheckListItem(TQListView * parent, const TQString & text, recordid_t pilotid, void *r) : + TQCheckListItem(parent, text, TQCheckListItem::CheckBox), fid(pilotid), fr(r) { @@ -122,7 +122,7 @@ PilotCheckListItem::~PilotCheckListItem() void PilotCheckListItem::stateChange ( bool on) { // FUNCTIONSETUP; - QCheckListItem::stateChange(on); + TQCheckListItem::stateChange(on); } @@ -142,11 +142,11 @@ void PilotCheckListItem::stateChange ( bool on) } #endif -PilotListViewItem::PilotListViewItem( QListView * parent, - QString label1, QString label2, QString label3, QString label4, +PilotListViewItem::PilotListViewItem( TQListView * parent, + TQString label1, TQString label2, TQString label3, TQString label4, recordid_t pilotid, void *r): - QListViewItem(parent, label1, label2, label3, label4, - QString::null, QString::null, QString::null, QString::null), + TQListViewItem(parent, label1, label2, label3, label4, + TQString::null, TQString::null, TQString::null, TQString::null), fid(pilotid), fr(r), d(new PilotListViewItemData) @@ -204,7 +204,7 @@ unsigned long PilotListViewItem::colValue(int col, bool *ok) const return d->val; } -int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int PilotListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { // FUNCTIONSETUP; PilotListViewItem*item=dynamic_cast<PilotListViewItem*>(i); @@ -237,6 +237,6 @@ int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) cons return res; } } - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } diff --git a/kpilot/kpilot/listItems.h b/kpilot/kpilot/listItems.h index 914d4b006..4987219f8 100644 --- a/kpilot/kpilot/listItems.h +++ b/kpilot/kpilot/listItems.h @@ -3,7 +3,7 @@ ** Copyright (C) 1998-2001 by Dan Pilone ** Copyright (C) 2003-2004 Reinhold Kainhofer <[email protected]> ** -** This file defines a subclasse of QListBoxText that carries +** This file defines a subclasse of TQListBoxText that carries ** additional information useful for Pilot records. In particular it ** carries an int (for the pilot's uid?) and a void * (for pilotrecord?) */ @@ -32,13 +32,13 @@ #ifndef _KPILOT_LISTITEMS_H #define _KPILOT_LISTITEMS_H -#include <qlistview.h> +#include <tqlistview.h> #include <pi-dlp.h> class PilotListItem : public QListBoxText { public: - PilotListItem(const QString &text, recordid_t pilotid=0, void *r=0); + PilotListItem(const TQString &text, recordid_t pilotid=0, void *r=0); virtual ~PilotListItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; @@ -59,7 +59,7 @@ private: class PilotCheckListItem : public QCheckListItem { public: - PilotCheckListItem( QListView * parent, const QString & text, recordid_t pilotid=0, void *r=0); + PilotCheckListItem( TQListView * parent, const TQString & text, recordid_t pilotid=0, void *r=0); virtual ~PilotCheckListItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; @@ -85,18 +85,18 @@ struct PilotListViewItemData class PilotListViewItem : public QListViewItem { public: - PilotListViewItem( QListView * parent, - QString label1, QString label2 = QString::null, - QString label3 = QString::null, QString label4 = QString::null, + PilotListViewItem( TQListView * parent, + TQString label1, TQString label2 = TQString::null, + TQString label3 = TQString::null, TQString label4 = TQString::null, recordid_t pilotid=0, void *r=0); virtual ~PilotListViewItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; public: void setNumericCol(int col, bool numeric); - int compare( QListViewItem *i, int col, bool ascending ) const; + int compare( TQListViewItem *i, int col, bool ascending ) const; protected: - QValueList<int> numericCols; + TQValueList<int> numericCols; recordid_t fid; void *fr; // Caching to make sorting faster: diff --git a/kpilot/kpilot/logFile.cc b/kpilot/kpilot/logFile.cc index b93b060ce..b7868bfda 100644 --- a/kpilot/kpilot/logFile.cc +++ b/kpilot/kpilot/logFile.cc @@ -30,9 +30,9 @@ #include "options.h" -#include <qfile.h> -#include <qtextstream.h> -#include <qdatetime.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqdatetime.h> #include <pi-version.h> @@ -45,7 +45,7 @@ #include "logFile.moc" -LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(false) +LogFile::LogFile() : DCOPObject("LogIface"), TQObject(), fOutfile(0L), fSyncing(false) { FUNCTIONSETUP; } @@ -57,7 +57,7 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f // If a sync is already running (something went wrong then!), close that old log if (fSyncing) logEndSync(); - fOutfile = new QFile(KPilotSettings::logFileName()); + fOutfile = new TQFile(KPilotSettings::logFileName()); if (!fOutfile || !fOutfile->open(IO_WriteOnly)) { @@ -70,21 +70,21 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f fSyncing = true; fLogStream.setDevice(fOutfile); - fLogStream<<(CSL1("KPilot HotSync log, %1").arg(QDateTime::currentDateTime().toString()))<<endl<<endl<<endl; - fLogStream<<(CSL1("Version: KPilot %1").arg(QString::fromLatin1(KPILOT_VERSION)))<<endl; + fLogStream<<(CSL1("KPilot HotSync log, %1").arg(TQDateTime::currentDateTime().toString()))<<endl<<endl<<endl; + fLogStream<<(CSL1("Version: KPilot %1").arg(TQString::fromLatin1(KPILOT_VERSION)))<<endl; fLogStream<<(CSL1("Version: pilot-link %1.%2.%3%4" ) .arg(PILOT_LINK_VERSION).arg(PILOT_LINK_MAJOR).arg(PILOT_LINK_MINOR) #ifdef PILOT_LINK_PATCH - .arg(QString::fromLatin1(PILOT_LINK_PATCH)) + .arg(TQString::fromLatin1(PILOT_LINK_PATCH)) #else - .arg(QString()) + .arg(TQString()) #endif )<<endl; #ifdef KDE_VERSION_STRING - fLogStream<<(CSL1("Version: KDE %1" ).arg(QString::fromLatin1(KDE_VERSION_STRING)) )<<endl; + fLogStream<<(CSL1("Version: KDE %1" ).arg(TQString::fromLatin1(KDE_VERSION_STRING)) )<<endl; #endif #ifdef QT_VERSION_STR - fLogStream<<(CSL1("Version: Qt %1" ).arg(QString::fromLatin1(QT_VERSION_STR)) )<<endl; + fLogStream<<(CSL1("Version: Qt %1" ).arg(TQString::fromLatin1(QT_VERSION_STR)) )<<endl; #endif fLogStream<<endl<<endl; @@ -102,27 +102,27 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f } } -/* DCOP */ ASYNC LogFile::logMessage(QString s) +/* DCOP */ ASYNC LogFile::logMessage(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogFile::logError(QString s) +/* DCOP */ ASYNC LogFile::logError(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogFile::logProgress(QString, int) +/* DCOP */ ASYNC LogFile::logProgress(TQString, int) { } -void LogFile::addMessage(const QString & s) +void LogFile::addMessage(const TQString & s) { FUNCTIONSETUP; if ( fSyncing && !s.isEmpty() ) { - fLogStream<<QTime::currentTime().toString()<<" "<<s<<endl; + fLogStream<<TQTime::currentTime().toString()<<" "<<s<<endl; } } diff --git a/kpilot/kpilot/logFile.h b/kpilot/kpilot/logFile.h index 5ed93d43a..d710d7795 100644 --- a/kpilot/kpilot/logFile.h +++ b/kpilot/kpilot/logFile.h @@ -31,12 +31,12 @@ */ #include "loggerDCOP.h" -#include "qobject.h" +#include "tqobject.h" class QFile; class QTextStream; -class LogFile : public QObject, public LoggerDCOP +class LogFile : public TQObject, public LoggerDCOP { Q_OBJECT @@ -49,16 +49,16 @@ public: */ virtual ASYNC logStartSync(); virtual ASYNC logEndSync(); - virtual ASYNC logError(QString); - virtual ASYNC logMessage(QString); - virtual ASYNC logProgress(QString,int); + virtual ASYNC logError(TQString); + virtual ASYNC logMessage(TQString); + virtual ASYNC logProgress(TQString,int); - void addMessage(const QString &); + void addMessage(const TQString &); private: - QFile*fOutfile; + TQFile*fOutfile; bool fSyncing; - QTextStream fLogStream; + TQTextStream fLogStream; } ; #endif diff --git a/kpilot/kpilot/logWidget.cc b/kpilot/kpilot/logWidget.cc index b64ed4a87..c7bddb617 100644 --- a/kpilot/kpilot/logWidget.cc +++ b/kpilot/kpilot/logWidget.cc @@ -29,18 +29,18 @@ #include "options.h" -#include <qfile.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qwhatsthis.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qtextstream.h> -#include <qpainter.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqwhatsthis.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqtextstream.h> +#include <tqpainter.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -63,9 +63,9 @@ #endif -LogWidget::LogWidget(QWidget * parent) : +LogWidget::LogWidget(TQWidget * parent) : DCOPObject("LogIface"), - PilotComponent(parent, "component_log", QString::null), + PilotComponent(parent, "component_log", TQString::null), fLog(0L), fShowTime(false), fSplash(0L), @@ -74,7 +74,7 @@ LogWidget::LogWidget(QWidget * parent) : fButtonBox(0L) { FUNCTIONSETUP; - QGridLayout *grid = new QGridLayout(this, 4, 4, SPACING); + TQGridLayout *grid = new TQGridLayout(this, 4, 4, SPACING); grid->addRowSpacing(0, SPACING); grid->addRowSpacing(1, 100); @@ -85,42 +85,42 @@ LogWidget::LogWidget(QWidget * parent) : grid->setRowStretch(1, 50); grid->setColStretch(2, 50); - fLog = new QTextEdit(this); + fLog = new TQTextEdit(this); fLog->setReadOnly(true); - fLog->setWordWrap(QTextEdit::WidgetWidth); - fLog->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary); + fLog->setWordWrap(TQTextEdit::WidgetWidth); + fLog->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); #if QT_VERSION < 0x030100 /* nothing, use AutoText */ #else fLog->setTextFormat(Qt::LogText); #endif - QWhatsThis::add(fLog, i18n("<qt>This lists all the messages received " + TQWhatsThis::add(fLog, i18n("<qt>This lists all the messages received " "during the current HotSync</qt>")); grid->addMultiCellWidget(fLog, 1, 1,1,2); - QString initialText ; + TQString initialText ; initialText.append(CSL1("<b>Version:</b> KPilot %1" TE_EOL) - .arg(QString::fromLatin1(KPILOT_VERSION))); + .arg(TQString::fromLatin1(KPILOT_VERSION))); initialText.append(CSL1("<b>Version:</b> pilot-link %1.%2.%3%4" TE_EOL) .arg(PILOT_LINK_VERSION) .arg(PILOT_LINK_MAJOR) .arg(PILOT_LINK_MINOR) #ifdef PILOT_LINK_PATCH - .arg(QString::fromLatin1(PILOT_LINK_PATCH)) + .arg(TQString::fromLatin1(PILOT_LINK_PATCH)) #else - .arg(QString()) + .arg(TQString()) #endif ); #ifdef KDE_VERSION_STRING initialText.append(CSL1("<b>Version:</b> KDE %1" TE_EOL) - .arg(QString::fromLatin1(KDE_VERSION_STRING))); + .arg(TQString::fromLatin1(KDE_VERSION_STRING))); #endif #ifdef QT_VERSION_STR initialText.append(CSL1("<b>Version:</b> Qt %1" TE_EOL) - .arg(QString::fromLatin1(QT_VERSION_STR))); + .arg(TQString::fromLatin1(QT_VERSION_STR))); #endif initialText.append(CSL1(TE_EOL)); @@ -136,51 +136,51 @@ LogWidget::LogWidget(QWidget * parent) : fLog->setText(initialText); fLog->scrollToBottom(); - QHBox *h = new QHBox(this); + TQHBox *h = new TQHBox(this); h->setSpacing(SPACING); - QPushButton *b = new QPushButton( + TQPushButton *b = new TQPushButton( i18n("Clear the text of HotSync messages","Clear Log"), h); - QWhatsThis::add(b,i18n("<qt>Clears the list of messages from the " + TQWhatsThis::add(b,i18n("<qt>Clears the list of messages from the " "current HotSync.</qt>")); - connect(b,SIGNAL(clicked()),this,SLOT(clearLog())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearLog())); - b = new QPushButton(i18n("Save Log..."),h); - QWhatsThis::add(b,i18n("<qt>You can save the list of messages received " + b = new TQPushButton(i18n("Save Log..."),h); + TQWhatsThis::add(b,i18n("<qt>You can save the list of messages received " "during this HotSync to a file (for example for use in a " "bug report) by clicking here.</qt>")); - connect(b,SIGNAL(clicked()),this,SLOT(saveLog())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveLog())); fButtonBox = h; grid->addMultiCellWidget(h,2,2,1,2); - fLabel = new QLabel(i18n("Sync progress:"),this); + fLabel = new TQLabel(i18n("Sync progress:"),this); grid->addWidget(fLabel,3,1); fProgress = new KProgress(this); - QWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage " + TQWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage " "completed in the current HotSync.</qt>")); grid->addWidget(fProgress,3,2); - QString splashPath = + TQString splashPath = KGlobal::dirs()->findResource("data", CSL1("kpilot/kpilot-splash.png")); - if (!splashPath.isEmpty() && QFile::exists(splashPath)) + if (!splashPath.isEmpty() && TQFile::exists(splashPath)) { fLog->hide(); fLabel->hide(); fProgress->hide(); - QPixmap splash(splashPath); - QPainter painter(&splash); - painter.setPen(QColor(0, 255, 0)); + TQPixmap splash(splashPath); + TQPainter painter(&splash); + painter.setPen(TQColor(0, 255, 0)); // This latin1() is ok; KPILOT_VERSION is a #define // of a constant string. int textWidth =fontMetrics().width( - QString::fromLatin1(KPILOT_VERSION)) ; + TQString::fromLatin1(KPILOT_VERSION)) ; int textHeight = fontMetrics().height(); #ifdef DEBUG @@ -197,11 +197,11 @@ LogWidget::LogWidget(QWidget * parent) : black); painter.drawText(splash.width() - 25 - textWidth, splash.height() - 8, - QString::fromLatin1(KPILOT_VERSION)); - fSplash = new QLabel(this); + TQString::fromLatin1(KPILOT_VERSION)); + fSplash = new TQLabel(this); fSplash->setPixmap(splash); fSplash->setAlignment(AlignCenter); - QTimer::singleShot(3000,this,SLOT(hideSplash())); + TQTimer::singleShot(3000,this,TQT_SLOT(hideSplash())); grid->addMultiCellWidget(fSplash,1,3,1,2); grid->addColSpacing(0,10); grid->setColStretch(1,50); @@ -211,18 +211,18 @@ LogWidget::LogWidget(QWidget * parent) : } -void LogWidget::addMessage(const QString & s) +void LogWidget::addMessage(const TQString & s) { FUNCTIONSETUP; if (s.isEmpty()) return; if (!fLog) return; - QString t; + TQString t; if (fShowTime) { t.append(CSL1("<b>")); - t.append(QTime::currentTime().toString()); + t.append(TQTime::currentTime().toString()); t.append(CSL1("</b> ")); } @@ -237,7 +237,7 @@ void LogWidget::addMessage(const QString & s) fLog->scrollToBottom(); } -void LogWidget::addError(const QString & s) +void LogWidget::addError(const TQString & s) { FUNCTIONSETUP; @@ -247,7 +247,7 @@ void LogWidget::addError(const QString & s) if (!fLog) return; - QString t; + TQString t; t.append(CSL1("<i>")); t.append(s); @@ -256,7 +256,7 @@ void LogWidget::addError(const QString & s) addMessage(t); } -void LogWidget::addProgress(const QString &s,int i) +void LogWidget::addProgress(const TQString &s,int i) { FUNCTIONSETUP; @@ -299,17 +299,17 @@ void LogWidget::hideSplash() } -/* DCOP */ ASYNC LogWidget::logMessage(QString s) +/* DCOP */ ASYNC LogWidget::logMessage(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogWidget::logError(QString s) +/* DCOP */ ASYNC LogWidget::logError(TQString s) { addError(s); } -/* DCOP */ ASYNC LogWidget::logProgress(QString s, int i) +/* DCOP */ ASYNC LogWidget::logProgress(TQString s, int i) { addProgress(s,i); } @@ -328,7 +328,7 @@ void LogWidget::hideSplash() if (fLog) { - fLog->setText(QString::null); + fLog->setText(TQString::null); } } @@ -340,14 +340,14 @@ void LogWidget::hideSplash() while (!finished) { - QString saveFileName = KFileDialog::getSaveFileName( - QString::null, /* default */ + TQString saveFileName = KFileDialog::getSaveFileName( + TQString::null, /* default */ CSL1("*.log"), /* show log files by default */ this, i18n("Save Log")); if (saveFileName.isEmpty()) return; - if (QFile::exists(saveFileName)) + if (TQFile::exists(saveFileName)) { int r = KMessageBox::warningYesNoCancel( this, @@ -369,11 +369,11 @@ void LogWidget::hideSplash() } -bool LogWidget::saveFile(const QString &saveFileName) +bool LogWidget::saveFile(const TQString &saveFileName) { FUNCTIONSETUP; - QFile f(saveFileName); + TQFile f(saveFileName); if (!f.open(IO_WriteOnly)) { int r = KMessageBox::questionYesNo(this, @@ -386,7 +386,7 @@ bool LogWidget::saveFile(const QString &saveFileName) } else { - QTextStream t(&f); + TQTextStream t(&f); t << fLog->text(); } diff --git a/kpilot/kpilot/logWidget.h b/kpilot/kpilot/logWidget.h index 4c89c7185..9d99ab53c 100644 --- a/kpilot/kpilot/logWidget.h +++ b/kpilot/kpilot/logWidget.h @@ -42,7 +42,7 @@ class LogWidget : public PilotComponent , public LoggerDCOP Q_OBJECT public: - LogWidget(QWidget *); + LogWidget(TQWidget *); ~LogWidget() { } ; // Pilot Component Methods: @@ -53,21 +53,21 @@ public: /** * DCOP interface. */ - virtual ASYNC logError(QString); - virtual ASYNC logMessage(QString); - virtual ASYNC logProgress(QString,int); + virtual ASYNC logError(TQString); + virtual ASYNC logMessage(TQString); + virtual ASYNC logProgress(TQString,int); virtual ASYNC logStartSync(); virtual ASYNC logEndSync(); // GUI customization hooks // // - QHBox *buttonBox() const { return fButtonBox; } ; + TQHBox *buttonBox() const { return fButtonBox; } ; public slots: - void addMessage(const QString &); - void addError(const QString &); - void addProgress(const QString &,int); + void addMessage(const TQString &); + void addError(const TQString &); + void addProgress(const TQString &,int); void syncDone(); private slots: @@ -76,15 +76,15 @@ private slots: void saveLog(); private: - bool saveFile(const QString &); + bool saveFile(const TQString &); private: - QTextEdit *fLog; + TQTextEdit *fLog; bool fShowTime; - QLabel *fSplash; - QLabel *fLabel; + TQLabel *fSplash; + TQLabel *fLabel; KProgress *fProgress; - QHBox *fButtonBox; + TQHBox *fButtonBox; } ; #endif diff --git a/kpilot/kpilot/loggerDCOP.h b/kpilot/kpilot/loggerDCOP.h index 9d8462343..3ea3101de 100644 --- a/kpilot/kpilot/loggerDCOP.h +++ b/kpilot/kpilot/loggerDCOP.h @@ -44,13 +44,13 @@ k_dcop: virtual ASYNC logEndSync() = 0 ; // Adds a single message to the log, with formatting // showing it's an error message. - virtual ASYNC logError(QString) = 0 ; + virtual ASYNC logError(TQString) = 0 ; // Adds a regular message. - virtual ASYNC logMessage(QString) = 0 ; + virtual ASYNC logMessage(TQString) = 0 ; // Adds a message if the string is non-null, and // sets the progress bar to @p n%. Limit @p n // to the range 0 .. 100. - virtual ASYNC logProgress(QString,int n) = 0 ; + virtual ASYNC logProgress(TQString,int n) = 0 ; } ; diff --git a/kpilot/kpilot/main-test.cc b/kpilot/kpilot/main-test.cc index ad57bdabc..f9c9fe80a 100644 --- a/kpilot/kpilot/main-test.cc +++ b/kpilot/kpilot/main-test.cc @@ -36,9 +36,9 @@ #include <time.h> #include <iostream> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qtimer.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqtimer.h> #include <kapplication.h> #include <klocale.h> @@ -137,32 +137,32 @@ void connectStack( KPilotLink *l, ActionQueue *a, bool loop = false ) if (l && a) { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - l, SLOT(close())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + l, TQT_SLOT(close())); if (!loop) { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - kapp, SLOT(quit())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + kapp, TQT_SLOT(quit())); } else { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - l, SLOT(reset())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + l, TQT_SLOT(reset())); } - QObject::connect(l, SIGNAL(deviceReady(KPilotLink*)), - a, SLOT(execConduit())); + TQObject::connect(l, TQT_SIGNAL(deviceReady(KPilotLink*)), + a, TQT_SLOT(execConduit())); } } -int exec(const QString &device, const QString &what, KCmdLineArgs *p) +int exec(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; // get --exec-conduit value if (what.isEmpty()) return 1; - QStringList l; + TQStringList l; l.append(what); SyncAction::SyncMode::Mode syncMode = SyncAction::SyncMode::eHotSync; @@ -181,7 +181,7 @@ int exec(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int backup(const QString &device, const QString &what, KCmdLineArgs *p) +int backup(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -196,7 +196,7 @@ int backup(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int restore(const QString &device, const QString &what, KCmdLineArgs *p) +int restore(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -211,7 +211,7 @@ int restore(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int listDB(const QString &device, KCmdLineArgs *p) +int listDB(const TQString &device, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -224,7 +224,7 @@ int listDB(const QString &device, KCmdLineArgs *p) return kapp->exec(); } -int check( const QString &device, const QString &what, KCmdLineArgs *p ) +int check( const TQString &device, const TQString &what, KCmdLineArgs *p ) { FUNCTIONSETUP; @@ -265,7 +265,7 @@ void listConduits() // sure that nothing gets listed in both. // // - QValueListIterator < KServiceOffer > availList(offers.begin()); + TQValueListIterator < KServiceOffer > availList(offers.begin()); while (availList != offers.end()) { KSharedPtr < KService > o = (*availList).service(); @@ -283,7 +283,7 @@ void listConduits() } } -int show( const QString &what ) +int show( const TQString &what ) { FUNCTIONSETUP; @@ -377,7 +377,7 @@ int main(int argc, char **argv) Pilot::setupPilotCodec(KPilotSettings::encoding()); - QString device( "/dev/pilot" ); + TQString device( "/dev/pilot" ); if ( p->isSet("port") ) { diff --git a/kpilot/kpilot/memoWidget.cc b/kpilot/kpilot/memoWidget.cc index 0b5e16b42..143167aee 100644 --- a/kpilot/kpilot/memoWidget.cc +++ b/kpilot/kpilot/memoWidget.cc @@ -35,18 +35,18 @@ #include <pi-macros.h> #include <pi-dlp.h> -#include <qdir.h> -#include <qptrlist.h> -#include <qlistbox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qdom.h> -#include <qtextstream.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqdir.h> +#include <tqptrlist.h> +#include <tqlistbox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqdatetime.h> +#include <tqptrlist.h> #include <kapplication.h> #include <kmessagebox.h> @@ -70,12 +70,12 @@ public: ~Private() { KPILOT_DELETE(fMemoAppInfo); } ; PilotMemoInfo *fMemoAppInfo; - QPtrList<PilotMemo> fMemoList; + TQPtrList<PilotMemo> fMemoList; } ; -MemoWidget::MemoWidget(QWidget * parent, - const QString & path) : +MemoWidget::MemoWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_memo", path), fTextWidget(0L), d(new Private()), @@ -221,74 +221,74 @@ void MemoWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label = NULL; - QPushButton *button = NULL; - QGridLayout *grid = new QGridLayout(this, 5, 4, SPACING); - QString wt; + TQLabel *label = NULL; + TQPushButton *button = NULL; + TQGridLayout *grid = new TQGridLayout(this, 5, 4, SPACING); + TQString wt; - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("Select the category of addresses\n" "to display here.")); (void) i18n("Memos:"); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); - fListBox = new QListBox(this); + fListBox = new TQListBox(this); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(highlighted(int)), - this, SLOT(slotShowMemo(int))); - connect(fListBox, SIGNAL(selectionChanged()), - this,SLOT(slotUpdateButtons())); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotShowMemo(int))); + connect(fListBox, TQT_SIGNAL(selectionChanged()), + this,TQT_SLOT(slotUpdateButtons())); + TQWhatsThis::add(fListBox, i18n("This list displays all the memos\n" "in the selected category. Click on\n" "one to display it to the right.")); - label = new QLabel(i18n("Memo text:"), this); + label = new TQLabel(i18n("Memo text:"), this); grid->addWidget(label, 0, 2); fTextWidget = new KTextEdit(this, "textArea"); fTextWidget->setWordWrap(KTextEdit::WidgetWidth); fTextWidget->setTextFormat(Qt::PlainText); grid->addMultiCellWidget(fTextWidget, 1, 4, 2, 2); - QWhatsThis::add(fTextWidget, + TQWhatsThis::add(fTextWidget, i18n("The text of the selected memo appears here.")); fTextWidget->setReadOnly(!KPilotSettings::internalEditors()); - button = new QPushButton(i18n("Import Memo..."), this); + button = new TQPushButton(i18n("Import Memo..."), this); grid->addWidget(button, 2, 0); - connect(button, SIGNAL(clicked()), this, SLOT(slotImportMemo())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotImportMemo())); wt = KPilotSettings::internalEditors() ? i18n ("Read a text file and add it to the Pilot's memo database.") : i18n("<qt><i>Import is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(button,wt); + TQWhatsThis::add(button,wt); - fExportButton = new QPushButton(i18n("Export Memo..."), this); + fExportButton = new TQPushButton(i18n("Export Memo..."), this); grid->addWidget(fExportButton, 2, 1); - connect(fExportButton, SIGNAL(clicked()), this, - SLOT(slotExportMemo())); - QWhatsThis::add(fExportButton, + connect(fExportButton, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotExportMemo())); + TQWhatsThis::add(fExportButton, i18n("Write the selected memo to a file.")); - fDeleteButton = new QPushButton(i18n("Delete Memo"), this); + fDeleteButton = new TQPushButton(i18n("Delete Memo"), this); grid->addWidget(fDeleteButton, 3, 1); - connect(fDeleteButton, SIGNAL(clicked()), this, - SLOT(slotDeleteMemo())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotDeleteMemo())); wt = KPilotSettings::internalEditors() ? i18n("Delete the selected memo.") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(fDeleteButton, wt); + TQWhatsThis::add(fDeleteButton, wt); - button = new QPushButton(i18n("Add Memo"), this); + button = new TQPushButton(i18n("Add Memo"), this); grid->addWidget(button, 3, 0); - connect(button, SIGNAL(clicked()), this, SLOT(slotAddMemo())); - QWhatsThis::add(button,i18n("Add a new memo to the database.")); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddMemo())); + TQWhatsThis::add(button,i18n("Add a new memo to the database.")); } void MemoWidget::slotUpdateButtons() @@ -552,14 +552,14 @@ void MemoWidget::saveChangedMemo() writeMemo(currentMemo); } -/* virtual */ bool MemoWidget::preHotSync(QString &) +/* virtual */ bool MemoWidget::preHotSync(TQString &) { FUNCTIONSETUP; saveChangedMemo(); return true; } -bool MemoWidget::addMemo(const QString &s, int category) +bool MemoWidget::addMemo(const TQString &s, int category) { FUNCTIONSETUP; @@ -591,7 +591,7 @@ void MemoWidget::slotAddMemo() FUNCTIONSETUP; int currentCatID = findSelectedCategory(fCatList, d->fMemoAppInfo->categoryInfo(), true); - addMemo(QDateTime::currentDateTime().toString(), currentCatID); + addMemo(TQDateTime::currentDateTime().toString(), currentCatID); } void MemoWidget::slotImportMemo() @@ -602,11 +602,11 @@ void MemoWidget::slotImportMemo() int currentCatID = findSelectedCategory(fCatList, d->fMemoAppInfo->categoryInfo(), true); - QString fileName = KFileDialog::getOpenFileName(); + TQString fileName = KFileDialog::getOpenFileName(); if (!fileName.isEmpty()) { - QFile importFile(fileName); + TQFile importFile(fileName); if (importFile.open(IO_ReadOnly) == FALSE) { @@ -620,8 +620,8 @@ void MemoWidget::slotImportMemo() return; } - QTextStream stream(&importFile); - QString memoText = stream.read(); + TQTextStream stream(&importFile); + TQString memoText = stream.read(); addMemo(memoText, currentCatID); } } @@ -635,22 +635,22 @@ void MemoWidget::slotExportMemo() if (index == 0) return; - QString data; + TQString data; - const QString filter = CSL1("*|Plain text output\n*.xml|XML output"); - QString fileName; + const TQString filter = CSL1("*|Plain text output\n*.xml|XML output"); + TQString fileName; - KFileDialog kfile( QString::null , filter, fExportButton , "memoSave" , true ); + KFileDialog kfile( TQString::null , filter, fExportButton , "memoSave" , true ); kfile.setOperationMode( KFileDialog::Saving ); - if ( kfile.exec() == QDialog::Accepted ) { + if ( kfile.exec() == TQDialog::Accepted ) { fileName = kfile.selectedFile(); } if (fileName.isEmpty()) return; - QPtrList<PilotListItem> menu_items; + TQPtrList<PilotListItem> menu_items; for (int x = 0; x < index; x++){ if (fListBox->item(x)->isSelected()){ @@ -671,12 +671,12 @@ void MemoWidget::slotExportMemo() return; } -bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem> &memo_list) +bool MemoWidget::saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list) { - QFile f( fileName ); - QTextStream stream(&f); + TQFile f( fileName ); + TQTextStream stream(&f); - if ( QFile::exists( fileName ) ) + if ( TQFile::exists( fileName ) ) { if( !f.open(IO_ReadWrite | IO_Append) ) { @@ -691,7 +691,7 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem } } - QPtrListIterator<PilotListItem> it(memo_list); + TQPtrListIterator<PilotListItem> it(memo_list); for ( ; it.current(); ++it ) { PilotListItem *p = it.current(); @@ -703,12 +703,12 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem return true; } -bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &memo_list) +bool MemoWidget::saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list) { - QDomDocument doc( CSL1("kpilotmemos") ); - QFile f( fileName ); - QTextStream stream( &f ); - QDomElement memos; + TQDomDocument doc( CSL1("kpilotmemos") ); + TQFile f( fileName ); + TQTextStream stream( &f ); + TQDomElement memos; int append = 0; @@ -755,7 +755,7 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> f.close(); // These are temporary, and should be retrieved from the pilot stuff - QString mpilotid; + TQString mpilotid; mpilotid = "1"; // End of temp variables @@ -769,31 +769,31 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> doc.appendChild ( memos ); } - QPtrListIterator<PilotListItem> it(memo_list); + TQPtrListIterator<PilotListItem> it(memo_list); for ( ; it.current(); ++it ) { PilotListItem *p = it.current(); PilotMemo *theMemo = (PilotMemo *) p->rec(); - QDomElement memo = doc.createElement( CSL1("memo") ); + TQDomElement memo = doc.createElement( CSL1("memo") ); memo.setAttribute ( CSL1("pilotid") , mpilotid ); memos.appendChild ( memo ); - //QDomElement category = doc.createElement( "category" ); + //TQDomElement category = doc.createElement( "category" ); //head.appendChild ( category ); // - //QDomText categorytext = doc.createTextNode( memo->category() ); + //TQDomText categorytext = doc.createTextNode( memo->category() ); //category.appendChild ( categorytext ); //FIXME - QDomElement title = doc.createElement(CSL1("title" )); + TQDomElement title = doc.createElement(CSL1("title" )); memo.appendChild ( title ); - QDomText titletext = doc.createTextNode( theMemo->shortTitle() ); + TQDomText titletext = doc.createTextNode( theMemo->shortTitle() ); title.appendChild ( titletext ); - QDomText body = doc.createTextNode( theMemo->text() ); + TQDomText body = doc.createTextNode( theMemo->text() ); memo.appendChild ( body ); } if ( !f.open(IO_WriteOnly ) ) return false; diff --git a/kpilot/kpilot/memoWidget.h b/kpilot/kpilot/memoWidget.h index 837d25cd8..99657df8c 100644 --- a/kpilot/kpilot/memoWidget.h +++ b/kpilot/kpilot/memoWidget.h @@ -44,18 +44,18 @@ class MemoWidget : public PilotComponent Q_OBJECT public: - MemoWidget(QWidget* parent, const QString& dbpath); + MemoWidget(TQWidget* parent, const TQString& dbpath); virtual ~MemoWidget(); // Pilot Component Methods: /* virtual */ void showComponent(); /* virtual */ void hideComponent(); - /* virtual */ bool preHotSync(QString &); + /* virtual */ bool preHotSync(TQString &); /* virtual */ void postHotSync(); // Added by David Bishop, please move to correct location! - bool saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &menu_item ); - bool saveAsText(const QString &fileName,const QPtrList<PilotListItem> &menu_item ); + bool saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item ); + bool saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item ); typedef enum { MAX_MEMO_LEN = 8192 @@ -67,7 +67,7 @@ protected: void saveChangedMemo(); - bool addMemo(const QString &text, int category); + bool addMemo(const TQString &text, int category); public slots: /** @@ -97,13 +97,13 @@ private: class Private; - QComboBox* fCatList; + TQComboBox* fCatList; KTextEdit* fTextWidget; Private *d; - QListBox* fListBox; + TQListBox* fListBox; - QPushButton *fExportButton,*fDeleteButton; + TQPushButton *fExportButton,*fDeleteButton; int lastSelectedMemo; }; diff --git a/kpilot/kpilot/pilotComponent.cc b/kpilot/kpilot/pilotComponent.cc index 414db70e9..0172a44ea 100644 --- a/kpilot/kpilot/pilotComponent.cc +++ b/kpilot/kpilot/pilotComponent.cc @@ -35,8 +35,8 @@ #include <pi-appinfo.h> -#include <qwidget.h> -#include <qcombobox.h> +#include <tqwidget.h> +#include <tqcombobox.h> #include <kdebug.h> @@ -46,10 +46,10 @@ #include "pilotComponent.moc" -PilotComponent::PilotComponent(QWidget * parent, +PilotComponent::PilotComponent(TQWidget * parent, const char *id, - const QString & path) : - QWidget(parent, id), + const TQString & path) : + TQWidget(parent, id), fDBPath(path), shown(false) { @@ -65,7 +65,7 @@ PilotComponent::PilotComponent(QWidget * parent, -int PilotComponent::findSelectedCategory(QComboBox * fCatList, +int PilotComponent::findSelectedCategory(TQComboBox * fCatList, struct CategoryAppInfo *info, bool AllIsUnfiled) { FUNCTIONSETUP; @@ -101,7 +101,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList, } else { - QString selectedCategory = + TQString selectedCategory = fCatList->text(fCatList->currentItem()); currentCatID = Pilot::findCategory(info, selectedCategory, AllIsUnfiled); } @@ -112,7 +112,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList, } -void PilotComponent::populateCategories(QComboBox * c, +void PilotComponent::populateCategories(TQComboBox * c, struct CategoryAppInfo *info) { FUNCTIONSETUP; @@ -165,14 +165,14 @@ void PilotComponent::slotShowComponent() emit showComponent(this); } -/* virtual */ bool PilotComponent::preHotSync(QString &) +/* virtual */ bool PilotComponent::preHotSync(TQString &) { FUNCTIONSETUP; return true; } -void PilotComponent::markDBDirty(const QString db) +void PilotComponent::markDBDirty(const TQString db) { FUNCTIONSETUP; KPilotConfig::addDirtyDatabase(db); diff --git a/kpilot/kpilot/pilotComponent.h b/kpilot/kpilot/pilotComponent.h index f96093a2b..01c5a3f37 100644 --- a/kpilot/kpilot/pilotComponent.h +++ b/kpilot/kpilot/pilotComponent.h @@ -32,7 +32,7 @@ /** * Base class for any module to KPilot */ -#include <qwidget.h> +#include <tqwidget.h> struct CategoryAppInfo; class QComboBox; @@ -44,9 +44,9 @@ Q_OBJECT friend class KPilotInstaller; public: - PilotComponent(QWidget* parent, + PilotComponent(TQWidget* parent, const char *id, - const QString& dbPath); + const TQString& dbPath); /** * Called when the component is shown in kpilot. It should @@ -83,7 +83,7 @@ public: * "Can't start HotSync. %1" * where %1 is replaced by s. */ - virtual bool preHotSync(QString &s) ; + virtual bool preHotSync(TQString &s) ; /** * Reload data (possibly changed by the hotsync) etc. etc. @@ -105,7 +105,7 @@ protected: * selected, their ID is returned. If nothing is selected, * behave as if "All" is selected. */ - int findSelectedCategory(QComboBox *, + int findSelectedCategory(TQComboBox *, CategoryAppInfo *, bool AllIsUnfiled=false); @@ -119,12 +119,12 @@ protected: * * If info is a NULL pointer, just put "All" in the combo box. */ - void populateCategories(QComboBox *, + void populateCategories(TQComboBox *, CategoryAppInfo *info=0); - void setDBPath(const QString &path) { fDBPath = path; } ; - const QString& dbPath() const { return fDBPath; } ; - void markDBDirty(const QString db); + void setDBPath(const TQString &path) { fDBPath = path; } ; + const TQString& dbPath() const { return fDBPath; } ; + void markDBDirty(const TQString db); public slots: void slotShowComponent(); @@ -133,7 +133,7 @@ signals: void showComponent(PilotComponent *); private: - QString fDBPath; + TQString fDBPath; protected: bool shown; } ; diff --git a/kpilot/kpilot/pilotDaemon.cc b/kpilot/kpilot/pilotDaemon.cc index 6eea2f7e8..6541365d2 100644 --- a/kpilot/kpilot/pilotDaemon.cc +++ b/kpilot/kpilot/pilotDaemon.cc @@ -33,9 +33,9 @@ #include <stdlib.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qpixmap.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqpixmap.h> #include <kuniqueapplication.h> #include <kaboutapplication.h> @@ -89,13 +89,13 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : setAcceptDrops(true); } -/* virtual */ void PilotDaemonTray::dragEnterEvent(QDragEnterEvent * e) +/* virtual */ void PilotDaemonTray::dragEnterEvent(TQDragEnterEvent * e) { FUNCTIONSETUP; e->accept(KURLDrag::canDecode(e)); } -/* virtual */ void PilotDaemonTray::dropEvent(QDropEvent * e) +/* virtual */ void PilotDaemonTray::dropEvent(TQDropEvent * e) { FUNCTIONSETUP; @@ -103,7 +103,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : KURLDrag::decode(e, list); - QStringList files; + TQStringList files; for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it) { if ((*it).isLocalFile()) @@ -113,7 +113,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : daemon->addInstallFiles(files); } -/* virtual */ void PilotDaemonTray::mousePressEvent(QMouseEvent * e) +/* virtual */ void PilotDaemonTray::mousePressEvent(TQMouseEvent * e) { FUNCTIONSETUP; @@ -134,7 +134,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : } } -/* virtual */ void PilotDaemonTray::closeEvent(QCloseEvent *) +/* virtual */ void PilotDaemonTray::closeEvent(TQCloseEvent *) { FUNCTIONSETUP; daemon->quitNow(); @@ -150,18 +150,18 @@ void PilotDaemonTray::setupWidget() icons[NotListening] = loadIcon( CSL1("nosync") ); slotShowNotListening(); - QTimer::singleShot(2000,this,SLOT(slotShowNormal())); + TQTimer::singleShot(2000,this,TQT_SLOT(slotShowNormal())); KPopupMenu *menu = contextMenu(); menuKPilotItem = menu->insertItem(i18n("Start &KPilot"), daemon, - SLOT(slotRunKPilot())); + TQT_SLOT(slotRunKPilot())); menuConfigureConduitsItem = menu->insertItem(i18n("&Configure KPilot..."), - daemon, SLOT(slotRunConfig())); + daemon, TQT_SLOT(slotRunConfig())); menu->insertSeparator(); fSyncTypeMenu = new KPopupMenu(menu,"sync_type_menu"); - QString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)"); + TQString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)"); #define MI(a) fSyncTypeMenu->insertItem( \ SyncAction::SyncMode::name(SyncAction::SyncMode::a) + once, \ (int)(SyncAction::SyncMode::a)); @@ -181,7 +181,7 @@ void PilotDaemonTray::setupWidget() fSyncTypeMenu->setCheckable(true); fSyncTypeMenu->setItemChecked(0,true); #undef MI - connect(fSyncTypeMenu,SIGNAL(activated(int)),daemon,SLOT(requestSync(int))); + connect(fSyncTypeMenu,TQT_SIGNAL(activated(int)),daemon,TQT_SLOT(requestSync(int))); menu->insertItem(i18n("Next &Sync"),fSyncTypeMenu); KHelpMenu *help = new KHelpMenu(menu,aboutData); @@ -257,12 +257,12 @@ void PilotDaemonTray::startHotSync() changeIcon(Busy); if (!fBlinkTimer) { - fBlinkTimer = new QTimer(this,"blink timer"); + fBlinkTimer = new TQTimer(this,"blink timer"); } if (fBlinkTimer) { - connect(fBlinkTimer,SIGNAL(timeout()), - this,SLOT(slotBusyTimer())); + connect(fBlinkTimer,TQT_SIGNAL(timeout()), + this,TQT_SLOT(slotBusyTimer())); fBlinkTimer->start(750,false); } } @@ -290,7 +290,7 @@ PilotDaemon::PilotDaemon() : fLogStub(new LoggerDCOP_stub("kpilot", "LogIface")), fLogFileStub(new LoggerDCOP_stub("kpilotDaemon", "LogIface")), fKPilotStub(new KPilotDCOP_stub("kpilot", "KPilotIface")), - fTempDevice(QString::null) + fTempDevice(TQString::null) { FUNCTIONSETUP; @@ -305,8 +305,8 @@ PilotDaemon::PilotDaemon() : fInstaller = new FileInstaller; fLogFile = new LogFile; - connect(fInstaller, SIGNAL(filesChanged()), - this, SLOT(slotFilesChanged())); + connect(fInstaller, TQT_SIGNAL(filesChanged()), + this, TQT_SLOT(slotFilesChanged())); fNextSyncType.setMode( KPilotSettings::syncType() ); @@ -328,7 +328,7 @@ PilotDaemon::~PilotDaemon() (void) PilotDatabase::instanceCount(); } -void PilotDaemon::addInstallFiles(const QStringList &l) +void PilotDaemon::addInstallFiles(const TQStringList &l) { FUNCTIONSETUP; @@ -406,7 +406,7 @@ void PilotDaemon::showTray() updateTrayStatus(); } -/* DCOP ASYNC */ void PilotDaemon::setTempDevice(QString d) +/* DCOP ASYNC */ void PilotDaemon::setTempDevice(TQString d) { if ( !d.isEmpty() ){ fTempDevice = d; @@ -509,7 +509,7 @@ void PilotDaemon::showTray() } updateTrayStatus(); - logProgress(QString::null,0); + logProgress(TQString::null,0); } /* DCOP */ void PilotDaemon::stopListening() @@ -528,11 +528,11 @@ void PilotDaemon::showTray() fPilotLink->reset(); } -/* DCOP */ QString PilotDaemon::statusString() +/* DCOP */ TQString PilotDaemon::statusString() { FUNCTIONSETUP; - QString s = CSL1("PilotDaemon="); + TQString s = CSL1("PilotDaemon="); s.append(shortStatusString()); s.append(CSL1("; NextSync=")); @@ -548,9 +548,9 @@ void PilotDaemon::showTray() return s; } -/* DCOP */ QString PilotDaemon::shortStatusString() +/* DCOP */ TQString PilotDaemon::shortStatusString() { - QString s; + TQString s; switch (status()) { @@ -594,16 +594,16 @@ bool PilotDaemon::setupPilotLink() return false; } - QObject::connect(fPilotLink, SIGNAL(deviceReady(KPilotLink*)), - this, SLOT(startHotSync(KPilotLink*))); + TQObject::connect(fPilotLink, TQT_SIGNAL(deviceReady(KPilotLink*)), + this, TQT_SLOT(startHotSync(KPilotLink*))); // connect the signals emitted by the pilotDeviceLink - QObject::connect(fPilotLink, SIGNAL(logError(const QString &)), - this, SLOT(logError(const QString &))); - QObject::connect(fPilotLink, SIGNAL(logMessage(const QString &)), - this, SLOT(logMessage(const QString &))); - QObject::connect(fPilotLink, - SIGNAL(logProgress(const QString &,int)), - this, SLOT(logProgress(const QString &,int))); + TQObject::connect(fPilotLink, TQT_SIGNAL(logError(const TQString &)), + this, TQT_SLOT(logError(const TQString &))); + TQObject::connect(fPilotLink, TQT_SIGNAL(logMessage(const TQString &)), + this, TQT_SLOT(logMessage(const TQString &))); + TQObject::connect(fPilotLink, + TQT_SIGNAL(logProgress(const TQString &,int)), + this, TQT_SLOT(logProgress(const TQString &,int))); return true; @@ -631,7 +631,7 @@ bool PilotDaemon::setupPilotLink() fPostSyncAction |= Quit; break; } - emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() ); + emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() ); } /* DCOP ASYNC */ void PilotDaemon::requestRegularSyncNext() @@ -671,7 +671,7 @@ bool PilotDaemon::setupPilotLink() i18n("Please press the HotSync button.")); } -/* DCOP ASYNC */ void PilotDaemon::requestSyncType(QString s) +/* DCOP ASYNC */ void PilotDaemon::requestSyncType(TQString s) { FUNCTIONSETUP; @@ -712,36 +712,36 @@ bool PilotDaemon::setupPilotLink() /** * DCOP Functions reporting some status data, e.g. for the kontact plugin. */ -QDateTime PilotDaemon::lastSyncDate() +TQDateTime PilotDaemon::lastSyncDate() { return KPilotSettings::lastSyncTime(); } -static QDict<QString> *conduitNameMap = 0L; +static TQDict<TQString> *conduitNameMap = 0L; static void fillConduitNameMap() { if ( !conduitNameMap ) { - conduitNameMap = new QDict<QString>; + conduitNameMap = new TQDict<TQString>; conduitNameMap->setAutoDelete(true); } conduitNameMap->clear(); - QStringList l = KPilotSettings::installedConduits(); + TQStringList l = KPilotSettings::installedConduits(); // Fill with internal settings. if ( l.find( CSL1("internal_fileinstall") ) != l.end() ) { conduitNameMap->insert( CSL1("internal_fileinstall"), - new QString(i18n("File Installer")) ); + new TQString(i18n("File Installer")) ); } - QStringList::ConstIterator end = l.end(); - for (QStringList::ConstIterator i = l.begin(); i != end; ++i) + TQStringList::ConstIterator end = l.end(); + for (TQStringList::ConstIterator i = l.begin(); i != end; ++i) { if (!conduitNameMap->find(*i)) { - QString readableName = CSL1("<unknown>"); + TQString readableName = CSL1("<unknown>"); KSharedPtr < KService > o = KService::serviceByDesktopName(*i); if (!o) { @@ -751,28 +751,28 @@ static void fillConduitNameMap() { readableName = o->name(); } - conduitNameMap->insert( *i, new QString(readableName) ); + conduitNameMap->insert( *i, new TQString(readableName) ); } } } -QStringList PilotDaemon::configuredConduitList() +TQStringList PilotDaemon::configuredConduitList() { fillConduitNameMap(); - QStringList keys; + TQStringList keys; - QDictIterator<QString> it(*conduitNameMap); + TQDictIterator<TQString> it(*conduitNameMap); for ( ; *it; ++it) { keys << it.currentKey(); } keys.sort(); - QStringList::ConstIterator end = keys.end(); - QStringList result; - for (QStringList::ConstIterator i = keys.begin(); i != end; ++i) + TQStringList::ConstIterator end = keys.end(); + TQStringList result; + for (TQStringList::ConstIterator i = keys.begin(); i != end; ++i) { result << *(conduitNameMap->find(*i)); } @@ -780,16 +780,16 @@ QStringList PilotDaemon::configuredConduitList() return result; } -QString PilotDaemon::logFileName() +TQString PilotDaemon::logFileName() { return KPilotSettings::logFileName(); } -QString PilotDaemon::userName() +TQString PilotDaemon::userName() { return KPilotSettings::userName(); } -QString PilotDaemon::pilotDevice() +TQString PilotDaemon::pilotDevice() { return KPilotSettings::pilotDevice(); } @@ -814,8 +814,8 @@ static KDesktopLockStatus isKDesktopLockRunning() return DCOPError; } - QByteArray data,returnValue; - QCString returnType; + TQByteArray data,returnValue; + TQCString returnType; if (!dcopptr->call("kdesktop","KScreensaverIface","isBlanked()", data,returnType,returnValue,true)) @@ -829,7 +829,7 @@ static KDesktopLockStatus isKDesktopLockRunning() if (returnType == "bool") { bool b; - QDataStream reply(returnValue,IO_ReadOnly); + TQDataStream reply(returnValue,IO_ReadOnly); reply >> b; return (b ? Locked : NotLocked); } @@ -918,7 +918,7 @@ static bool isSyncPossible(ActionQueue *fSyncStack, static void queueInstaller(ActionQueue *fSyncStack, KPilotLink *pilotLink, FileInstaller *fInstaller, - const QStringList &c) + const TQStringList &c) { if (c.findIndex(CSL1("internal_fileinstall")) >= 0) { @@ -935,13 +935,13 @@ static void queueEditors(ActionQueue *fSyncStack, KPilotLink *pilotLink) } static void queueConduits(ActionQueue *fSyncStack, - const QStringList &conduits, + const TQStringList &conduits, SyncAction::SyncMode e) { if (conduits.count() > 0) { fSyncStack->queueConduits(conduits,e); - // QString s = i18n("Conduit flags: "); + // TQString s = i18n("Conduit flags: "); // s.append(ConduitProxy::flagsForMode(e).join(CSL1(" "))); // logMessage(s); } @@ -992,8 +992,8 @@ bool PilotDaemon::shouldBackup() FUNCTIONSETUP; bool pcchanged=false; // If last PC to sync was a different one (implies full sync, normally) - QStringList conduits ; // list of conduits to run - QString s; // a generic string for stuff + TQStringList conduits ; // list of conduits to run + TQString s; // a generic string for stuff #ifdef DEBUG DEBUGKPILOT << fname @@ -1107,23 +1107,23 @@ bool PilotDaemon::shouldBackup() launch: fSyncStack->queueCleanup(); - QObject::connect(fSyncStack, SIGNAL(logError(const QString &)), - this, SLOT(logError(const QString &))); - QObject::connect(fSyncStack, SIGNAL(logMessage(const QString &)), - this, SLOT(logMessage(const QString &))); - QObject::connect(fSyncStack, - SIGNAL(logProgress(const QString &,int)), - this, SLOT(logProgress(const QString &,int))); + TQObject::connect(fSyncStack, TQT_SIGNAL(logError(const TQString &)), + this, TQT_SLOT(logError(const TQString &))); + TQObject::connect(fSyncStack, TQT_SIGNAL(logMessage(const TQString &)), + this, TQT_SLOT(logMessage(const TQString &))); + TQObject::connect(fSyncStack, + TQT_SIGNAL(logProgress(const TQString &,int)), + this, TQT_SLOT(logProgress(const TQString &,int))); - QObject::connect(fSyncStack, SIGNAL(syncDone(SyncAction *)), - this, SLOT(endHotSync())); + TQObject::connect(fSyncStack, TQT_SIGNAL(syncDone(SyncAction *)), + this, TQT_SLOT(endHotSync())); - QTimer::singleShot(0,fSyncStack,SLOT(execConduit())); + TQTimer::singleShot(0,fSyncStack,TQT_SLOT(execConduit())); updateTrayStatus(); } -/* slot */ void PilotDaemon::logMessage(const QString & s) +/* slot */ void PilotDaemon::logMessage(const TQString & s) { FUNCTIONSETUPL(2); @@ -1132,7 +1132,7 @@ launch: updateTrayStatus(s); } -/* slot */ void PilotDaemon::logError(const QString & s) +/* slot */ void PilotDaemon::logError(const TQString & s) { FUNCTIONSETUP; @@ -1141,7 +1141,7 @@ launch: updateTrayStatus(s); } -/* slot */ void PilotDaemon::logProgress(const QString & s, int i) +/* slot */ void PilotDaemon::logProgress(const TQString & s, int i) { FUNCTIONSETUPL(2); @@ -1167,7 +1167,7 @@ launch: getLogger().logEndSync(); getFileLogger().logEndSync(); getKPilot().daemonStatus(KPilotDCOP::EndOfHotSync); - KPilotSettings::setLastSyncTime(QDateTime::currentDateTime()); + KPilotSettings::setLastSyncTime(TQDateTime::currentDateTime()); KPilotSettings::self()->writeConfig(); fDaemonStatus = HOTSYNC_END; @@ -1183,7 +1183,7 @@ launch: } else { - QTimer::singleShot(10000,fPilotLink,SLOT(reset())); + TQTimer::singleShot(10000,fPilotLink,TQT_SLOT(reset())); } fPostSyncAction = None; @@ -1204,12 +1204,12 @@ void PilotDaemon::slotRunKPilot() { FUNCTIONSETUP; - QString kpilotError; - QCString kpilotDCOP; + TQString kpilotError; + TQCString kpilotDCOP; int kpilotPID; if (KApplication::startServiceByDesktopName(CSL1("kpilot"), - QString::null, &kpilotError, &kpilotDCOP, &kpilotPID + TQString::null, &kpilotError, &kpilotDCOP, &kpilotPID #if (KDE_VERSION >= 220) // Startup notification added in 2.2 , "" @@ -1251,8 +1251,8 @@ void PilotDaemon::slotRunConfig() if ( client->isApplicationRegistered( "kpilot" ) ) { - client->send("kpilot", "kpilot-mainwindow#1", "raise()",QString::null); - client->send("kpilot", "KPilotIface", "configure()", QString::null); + client->send("kpilot", "kpilot-mainwindow#1", "raise()",TQString::null); + client->send("kpilot", "KPilotIface", "configure()", TQString::null); } else { @@ -1264,23 +1264,23 @@ void PilotDaemon::slotRunConfig() } } -void PilotDaemon::updateTrayStatus(const QString &s) +void PilotDaemon::updateTrayStatus(const TQString &s) { if (!fTray) return; - QString tipText = CSL1("<qt>"); + TQString tipText = CSL1("<qt>"); tipText.append( s ); tipText.append( CSL1(" ") ); tipText.append( i18n("Next sync is %1.") .arg( fNextSyncType.name() ) ); tipText.append( CSL1("</qt>") ); - QToolTip::remove(fTray); - QToolTip::add(fTray,tipText); - emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() ); + TQToolTip::remove(fTray); + TQToolTip::add(fTray,tipText); + emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() ); // emit the same dcop signal but including the information needed by Kontact to update its kpilot summary widget - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << lastSyncDate(); arg << shortStatusString(); arg << configuredConduitList(); @@ -1288,7 +1288,7 @@ void PilotDaemon::updateTrayStatus(const QString &s) arg << userName(); arg << pilotDevice(); arg << killDaemonOnExit(); - emitDCOPSignal( "kpilotDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", data ); + emitDCOPSignal( "kpilotDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", data ); } static KCmdLineOptions daemonoptions[] = { @@ -1342,12 +1342,12 @@ int main(int argc, char **argv) // tell the running kpilotDaemon to use // this device now DCOPClient d; - QString dev(p->getOption("device")); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQString dev(p->getOption("device")); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << dev; if (d.attach()){ - d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(QString)", data ); + d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(TQString)", data ); d.detach(); } } diff --git a/kpilot/kpilot/pilotDaemon.h b/kpilot/kpilot/pilotDaemon.h index c7ccd7eda..d50fa04cf 100644 --- a/kpilot/kpilot/pilotDaemon.h +++ b/kpilot/kpilot/pilotDaemon.h @@ -65,8 +65,8 @@ public: void enableRunKPilot(bool); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); protected: @@ -74,7 +74,7 @@ protected: /** * Menu of sync types. */ - QPopupMenu *fSyncTypeMenu; + TQPopupMenu *fSyncTypeMenu; protected slots: void slotShowAbout(); @@ -86,15 +86,15 @@ protected slots: // "Regular" QT actions // // - virtual void mousePressEvent(QMouseEvent* e); - virtual void closeEvent(QCloseEvent *e); + virtual void mousePressEvent(TQMouseEvent* e); + virtual void closeEvent(TQCloseEvent *e); protected: void startHotSync(); void endHotSync(); private: - QPixmap icons[((int) NotListening) + 1]; + TQPixmap icons[((int) NotListening) + 1]; IconShape fCurrentIcon; PilotDaemon *daemon; @@ -120,11 +120,11 @@ private: /** * Timer for blinking. */ - QTimer *fBlinkTimer; + TQTimer *fBlinkTimer; } ; -class PilotDaemon : public QObject, virtual public PilotDaemonDCOP +class PilotDaemon : public TQObject, virtual public PilotDaemonDCOP { Q_OBJECT @@ -148,8 +148,8 @@ public: }; DaemonStatus status() const { return fDaemonStatus; } ; - /* DCOP */ virtual QString statusString(); - /* DCOP */ virtual QString shortStatusString(); + /* DCOP */ virtual TQString statusString(); + /* DCOP */ virtual TQString shortStatusString(); /** * Display the daemon's system tray icon @@ -157,7 +157,7 @@ public: * setting in the config file) */ void showTray(); - virtual void addInstallFiles(const QStringList &); + virtual void addInstallFiles(const TQStringList &); // The next few functions are the DCOP interface. // Some are also slots. @@ -165,14 +165,14 @@ public: public slots: virtual ASYNC requestSync(int); public: - virtual ASYNC requestSyncType(QString); + virtual ASYNC requestSyncType(TQString); virtual ASYNC requestRegularSyncNext(); virtual int nextSyncType() const; virtual ASYNC requestSyncOptions(bool,bool); virtual ASYNC quitNow(); virtual ASYNC reloadSettings(); - virtual ASYNC setTempDevice(QString d); + virtual ASYNC setTempDevice(TQString d); virtual void stopListening(); virtual void startListening(); @@ -180,11 +180,11 @@ public: /** * Functions reporting same status data, e.g. for the kontact plugin. */ - virtual QDateTime lastSyncDate(); - virtual QStringList configuredConduitList(); - virtual QString logFileName(); - virtual QString userName(); - virtual QString pilotDevice(); + virtual TQDateTime lastSyncDate(); + virtual TQStringList configuredConduitList(); + virtual TQString logFileName(); + virtual TQString userName(); + virtual TQString pilotDevice(); virtual bool killDaemonOnExit(); protected: @@ -201,9 +201,9 @@ protected slots: void startHotSync( KPilotLink* lnk ); void endHotSync(); - void logMessage(const QString &); - void logError(const QString &); - void logProgress(const QString &,int); + void logMessage(const TQString &); + void logError(const TQString &); + void logProgress(const TQString &,int); private: int getPilotSpeed(); @@ -234,7 +234,7 @@ private: /** * Set or change the tooltip displayed by the tray icon. */ - void updateTrayStatus(const QString &s=QString::null); + void updateTrayStatus(const TQString &s=TQString::null); FileInstaller *fInstaller; @@ -272,7 +272,7 @@ private: LoggerDCOP_stub *fLogStub; LoggerDCOP_stub *fLogFileStub; KPilotDCOP_stub *fKPilotStub; - QString fTempDevice; + TQString fTempDevice; }; diff --git a/kpilot/kpilot/pilotDaemonDCOP.h b/kpilot/kpilot/pilotDaemonDCOP.h index 07f92bf63..b56a245b9 100644 --- a/kpilot/kpilot/pilotDaemonDCOP.h +++ b/kpilot/kpilot/pilotDaemonDCOP.h @@ -33,8 +33,8 @@ #include <dcopobject.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqdatetime.h> +#include <tqstringlist.h> class PilotDaemonDCOP : virtual public DCOPObject { @@ -53,7 +53,7 @@ k_dcop: * Request a particular kind of sync next; pass in the name * of a sync type instead. */ - virtual ASYNC requestSyncType(QString) = 0; + virtual ASYNC requestSyncType(TQString) = 0; /** Shortcut for using requestSync(1) */ virtual ASYNC requestRegularSyncNext() = 0; /** Query what type is set most recently. */ @@ -67,7 +67,7 @@ k_dcop: */ virtual ASYNC quitNow() = 0; virtual ASYNC reloadSettings() = 0; // Indicate changed config file. - virtual ASYNC setTempDevice(QString d) =0; // use this device + virtual ASYNC setTempDevice(TQString d) =0; // use this device virtual void stopListening() = 0; virtual void startListening() = 0; virtual bool isListening() =0 ; @@ -75,29 +75,29 @@ k_dcop: /** * Functions requesting the status of the daemon. */ - virtual QString statusString() = 0; - virtual QString shortStatusString() = 0; + virtual TQString statusString() = 0; + virtual TQString shortStatusString() = 0; /** * Functions reporting same status data, e.g. for the kontact plugin. */ - virtual QDateTime lastSyncDate() = 0; - virtual QStringList configuredConduitList() = 0; - virtual QString logFileName() = 0; - virtual QString userName() = 0; - virtual QString pilotDevice() = 0; + virtual TQDateTime lastSyncDate() = 0; + virtual TQStringList configuredConduitList() = 0; + virtual TQString logFileName() = 0; + virtual TQString userName() = 0; + virtual TQString pilotDevice() = 0; virtual bool killDaemonOnExit() = 0; /** * Some other useful functionality */ - virtual void addInstallFiles(const QStringList &) = 0; + virtual void addInstallFiles(const TQStringList &) = 0; k_dcop_signals: void kpilotDaemonStatusChanged(); // used to push status information - void kpilotDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool ); + void kpilotDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool ); } ; #endif diff --git a/kpilot/kpilot/syncCalendar.cc b/kpilot/kpilot/syncCalendar.cc index 7587ddebc..802ee354b 100644 --- a/kpilot/kpilot/syncCalendar.cc +++ b/kpilot/kpilot/syncCalendar.cc @@ -43,7 +43,7 @@ public: CalendarDumper() {} KCal::CalendarLocal *retrieve(int fd); - KCal::CalendarLocal *retrieve(const QString &filename); + KCal::CalendarLocal *retrieve(const TQString &filename); protected: KCal::CalendarLocal *retrieve(DatebookDB *db); @@ -58,7 +58,7 @@ KCal::CalendarLocal *CalendarDumper::retrieve(int fd) return retrieve(db); } -KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn) +KCal::CalendarLocal *CalendarDumped::retrieve(const TQString &fn) { PilotLocalDatabase ldb( fn ); DatebookDB db(&ldb); @@ -67,7 +67,7 @@ KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn) KCal::CalendarLocal *retrieve(DatebookDB *db) { - KCal::CalendarLocal *cal = new CalendarLocal( QString::null ); + KCal::CalendarLocal *cal = new CalendarLocal( TQString::null ); int count = db->db()->recordCount(); diff --git a/kpilot/kpilot/todoEditor.cc b/kpilot/kpilot/todoEditor.cc index 34a3b65df..d7017bb9a 100644 --- a/kpilot/kpilot/todoEditor.cc +++ b/kpilot/kpilot/todoEditor.cc @@ -31,11 +31,11 @@ #include "options.h" -#include <qcombobox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <kdatewidget.h> @@ -45,7 +45,7 @@ TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo, - QWidget * parent, const char *name) : + TQWidget * parent, const char *name) : KDialogBase(parent, name, false, i18n("To-do Editor"), Ok|Cancel), fDeleteOnCancel(p == 0L), fTodo(p), @@ -57,8 +57,8 @@ TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo, setMainWidget(fWidget); fillFields(); - connect(parent, SIGNAL(recordChanged(PilotTodoEntry *)), - this, SLOT(updateRecord(PilotTodoEntry *))); + connect(parent, TQT_SIGNAL(recordChanged(PilotTodoEntry *)), + this, TQT_SLOT(updateRecord(PilotTodoEntry *))); } diff --git a/kpilot/kpilot/todoEditor.h b/kpilot/kpilot/todoEditor.h index d982e3f54..4036ac9b1 100644 --- a/kpilot/kpilot/todoEditor.h +++ b/kpilot/kpilot/todoEditor.h @@ -49,7 +49,7 @@ class TodoEditor : public KDialogBase public: TodoEditor(PilotTodoEntry *todo, struct ToDoAppInfo *appInfo, - QWidget *parent, const char *name=0L); + TQWidget *parent, const char *name=0L); ~TodoEditor(); diff --git a/kpilot/kpilot/todoWidget.cc b/kpilot/kpilot/todoWidget.cc index 7f2ec137d..4e0e93944 100644 --- a/kpilot/kpilot/todoWidget.cc +++ b/kpilot/kpilot/todoWidget.cc @@ -29,15 +29,15 @@ #include "options.h" -#include <qptrlist.h> +#include <tqptrlist.h> #include <klistview.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtextview.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qtextcodec.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextview.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqtextcodec.h> #include <kmessagebox.h> @@ -49,7 +49,7 @@ -TodoCheckListItem::TodoCheckListItem(QListView*parent, const QString&text, +TodoCheckListItem::TodoCheckListItem(TQListView*parent, const TQString&text, recordid_t pilotid, void*r):PilotCheckListItem(parent, text, pilotid, r) { @@ -63,8 +63,8 @@ void TodoCheckListItem::stateChange(bool state) -TodoWidget::TodoWidget(QWidget * parent, - const QString & path) : +TodoWidget::TodoWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_todo", path), fTodoInfo(0L), fTodoAppInfo(0L), @@ -157,7 +157,7 @@ void TodoWidget::showComponent() updateWidget(); } -/* virtual */ bool TodoWidget::preHotSync(QString &s) +/* virtual */ bool TodoWidget::preHotSync(TQString &s) { FUNCTIONSETUP; @@ -172,7 +172,7 @@ void TodoWidget::showComponent() #if KDE_VERSION<220 s = i18n("There are still %1 to-do editing windows open.") - .arg(QString::number(fPendingTodos)); + .arg(TQString::number(fPendingTodos)); #else s = i18n("There is still a to-do editing window open.", "There are still %n to-do editing windows open.", @@ -207,17 +207,17 @@ void TodoWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label; - QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING); + TQLabel *label; + TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING); - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("<qt>Select the category of to-dos to display here.</qt>")); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); @@ -229,57 +229,57 @@ void TodoWidget::setupWidget() fListBox->setItemsMovable( FALSE ); fListBox->setItemsRenameable (TRUE); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotShowTodo(QListViewItem*))); - connect(fListBox, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); - connect(fListBox, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); - connect(fListBox, SIGNAL(itemChecked(QCheckListItem*, bool)), - this, SLOT(slotItemChecked(QCheckListItem*, bool))); - connect(fListBox, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)), - this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int))); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotShowTodo(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(itemChecked(TQCheckListItem*, bool)), + this, TQT_SLOT(slotItemChecked(TQCheckListItem*, bool))); + connect(fListBox, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)), + this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int))); + TQWhatsThis::add(fListBox, i18n("<qt>This list displays all the to-dos " "in the selected category. Click on " "one to display it to the right.</qt>")); - label = new QLabel(i18n("To-do info:"), this); + label = new TQLabel(i18n("To-do info:"), this); grid->addWidget(label, 0, 2); // todo info text view - fTodoInfo = new QTextView(this); + fTodoInfo = new TQTextView(this); grid->addMultiCellWidget(fTodoInfo, 1, 4, 2, 2); - QPushButton *button; - QString wt; + TQPushButton *button; + TQString wt; - fEditButton = new QPushButton(i18n("Edit Record..."), this); + fEditButton = new TQPushButton(i18n("Edit Record..."), this); grid->addWidget(fEditButton, 2, 0); - connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord())); + connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>You can edit a to-do when it is selected.</qt>") : i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(fEditButton,wt); + TQWhatsThis::add(fEditButton,wt); - button = new QPushButton(i18n("New Record..."), this); + button = new TQPushButton(i18n("New Record..."), this); grid->addWidget(button, 2, 1); - connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Add a new to-do to the to-do list.</qt>") : i18n("<qt><i>Adding new to-dos is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(button, wt); + TQWhatsThis::add(button, wt); button->setEnabled(KPilotSettings::internalEditors()); - fDeleteButton = new QPushButton(i18n("Delete Record"), this); + fDeleteButton = new TQPushButton(i18n("Delete Record"), this); grid->addWidget(fDeleteButton, 3, 0); - connect(fDeleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Delete the selected to-do from the to-do list.</qt>") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(fDeleteButton,wt); + TQWhatsThis::add(fDeleteButton,wt); } void TodoWidget::updateWidget() @@ -306,7 +306,7 @@ void TodoWidget::updateWidget() if ((currentCatID == -1) || (todo->category() == currentCatID)) { - QString title = todo->getDescription(); + TQString title = todo->getDescription(); TodoCheckListItem*item=new TodoCheckListItem(fListBox, title, listIndex, todo); @@ -348,7 +348,7 @@ void TodoWidget::slotEditRecord() { slotEditRecord(fListBox->currentItem()); } -void TodoWidget::slotEditRecord(QListViewItem*item) +void TodoWidget::slotEditRecord(TQListViewItem*item) { FUNCTIONSETUP; if (!shown) return; @@ -369,10 +369,10 @@ void TodoWidget::slotEditRecord(QListViewItem*item) TodoEditor *editor = new TodoEditor(selectedRecord, fTodoAppInfo->info(), this); - connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)), - this, SLOT(slotUpdateRecord(PilotTodoEntry *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)), + this, TQT_SLOT(slotUpdateRecord(PilotTodoEntry *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingTodos++; @@ -419,10 +419,10 @@ void TodoWidget::slotCreateNewRecord() TodoEditor *editor = new TodoEditor(0L, fTodoAppInfo->info(), this); - connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)), - this, SLOT(slotAddRecord(PilotTodoEntry *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)), + this, TQT_SLOT(slotAddRecord(PilotTodoEntry *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingTodos++; @@ -512,7 +512,7 @@ void TodoWidget::slotDeleteRecord() -void TodoWidget::slotShowTodo(QListViewItem*item) +void TodoWidget::slotShowTodo(TQListViewItem*item) { FUNCTIONSETUP; if (!shown) return; @@ -525,7 +525,7 @@ void TodoWidget::slotShowTodo(QListViewItem*item) DEBUGKPILOT << fname << ": Showing "<< todo->getDescription()<<endl; #endif - QString text(CSL1("<qt>")); + TQString text(CSL1("<qt>")); text += todo->getTextRepresentation(Qt::RichText); text += CSL1("</qt>\n"); fTodoInfo->setText(text); @@ -584,7 +584,7 @@ void TodoWidget::writeTodo(PilotTodoEntry * which, } } -void TodoWidget::slotItemChecked(QCheckListItem*item, bool on) +void TodoWidget::slotItemChecked(TQCheckListItem*item, bool on) { TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item); if (!p) return; @@ -594,7 +594,7 @@ void TodoWidget::slotItemChecked(QCheckListItem*item, bool on) slotShowTodo(item); } -void TodoWidget::slotItemRenamed(QListViewItem*item, const QString &txt, int nr) +void TodoWidget::slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr) { TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item); if (!p) return; diff --git a/kpilot/kpilot/todoWidget.h b/kpilot/kpilot/todoWidget.h index 14a139e51..18ea1f6d2 100644 --- a/kpilot/kpilot/todoWidget.h +++ b/kpilot/kpilot/todoWidget.h @@ -42,14 +42,14 @@ class TodoListView : public KListView { Q_OBJECT public: - TodoListView(QWidget * parent = 0, const char * name = 0 ):KListView(parent, name){}; + TodoListView(TQWidget * parent = 0, const char * name = 0 ):KListView(parent, name){}; ~TodoListView() {}; signals: - void itemChecked(QCheckListItem*item); - void itemChecked(QCheckListItem*item, bool on); + void itemChecked(TQCheckListItem*item); + void itemChecked(TQCheckListItem*item, bool on); //protected: public: - void itemWasChecked(QCheckListItem*item, bool on) { + void itemWasChecked(TQCheckListItem*item, bool on) { emit itemChecked(item); emit itemChecked(item, on); } @@ -58,7 +58,7 @@ public: class TodoCheckListItem : public PilotCheckListItem { public: - TodoCheckListItem(QListView*parent, const QString&text, recordid_t pilotid, void*r); + TodoCheckListItem(TQListView*parent, const TQString&text, recordid_t pilotid, void*r); ~TodoCheckListItem() {}; virtual void stateChange(bool state); }; @@ -68,11 +68,11 @@ class TodoWidget : public PilotComponent Q_OBJECT public: - TodoWidget(QWidget* parent,const QString& dbpath); + TodoWidget(TQWidget* parent,const TQString& dbpath); ~TodoWidget(); // Pilot Component Methods: - virtual bool preHotSync(QString &); + virtual bool preHotSync(TQString &); virtual void postHotSync(); virtual void showComponent(); virtual void hideComponent(); @@ -82,8 +82,8 @@ public slots: * Called when a particular todo is selected. This slot displays * it in the viewer widget. */ - void slotShowTodo(QListViewItem*); - void slotEditRecord(QListViewItem*item); + void slotShowTodo(TQListViewItem*); + void slotEditRecord(TQListViewItem*item); void slotEditRecord(); void slotCreateNewRecord(); void slotDeleteRecord(); @@ -113,8 +113,8 @@ protected slots: void slotSetCategory(int); - void slotItemChecked(QCheckListItem*item, bool on); - void slotItemRenamed(QListViewItem*item, const QString &txt, int nr); + void slotItemChecked(TQCheckListItem*item, bool on); + void slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr); private: void setupWidget(); void updateWidget(); // Called with the lists have changed.. @@ -132,13 +132,13 @@ private: * Create a sensible "title" for an todo, composed * of first + last name if possible. */ - QString createTitle(PilotTodoEntry *,int displayMode); + TQString createTitle(PilotTodoEntry *,int displayMode); /** - * We use a QComboBox fCatList to hold the user-visible names - * of all the categories. The QTextView fTodoInfo is for + * We use a TQComboBox fCatList to hold the user-visible names + * of all the categories. The TQTextView fTodoInfo is for * displaying the currently selected todo, if any. - * The QListView fListBox lists all the todoes in the + * The TQListView fListBox lists all the todoes in the * currently selected category. * * The entire todo database is read into memory in the @@ -151,7 +151,7 @@ private: QComboBox *fCatList; QTextView *fTodoInfo; PilotToDoInfo *fTodoAppInfo; - QPtrList<PilotTodoEntry> fTodoList; + TQPtrList<PilotTodoEntry> fTodoList; TodoListView *fListBox; QPushButton *fEditButton,*fDeleteButton; PilotDatabase *fTodoDB; diff --git a/kpilot/lib/actionQueue.cc b/kpilot/lib/actionQueue.cc index e4770d369..693629731 100644 --- a/kpilot/lib/actionQueue.cc +++ b/kpilot/lib/actionQueue.cc @@ -29,7 +29,7 @@ */ #include "options.h" -#include <qtimer.h> +#include <tqtimer.h> #include "actions.h" #include "plugin.h" @@ -70,7 +70,7 @@ void ActionQueue::queueInit() addAction(new WelcomeAction(fHandle)); } -void ActionQueue::queueConduits(const QStringList &l, +void ActionQueue::queueConduits(const TQStringList &l, const SyncAction::SyncMode &m) { FUNCTIONSETUP; @@ -78,7 +78,7 @@ void ActionQueue::queueConduits(const QStringList &l, // Add conduits here ... // // - for (QStringList::ConstIterator it = l.begin(); + for (TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { @@ -156,17 +156,17 @@ void ActionQueue::actionCompleted(SyncAction *b) << endl; #endif - QObject::connect(a, SIGNAL(logMessage(const QString &)), - this, SIGNAL(logMessage(const QString &))); - QObject::connect(a, SIGNAL(logError(const QString &)), - this, SIGNAL(logMessage(const QString &))); - QObject::connect(a, SIGNAL(logProgress(const QString &, int)), - this, SIGNAL(logProgress(const QString &, int))); - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - this, SLOT(actionCompleted(SyncAction *))); + TQObject::connect(a, TQT_SIGNAL(logMessage(const TQString &)), + this, TQT_SIGNAL(logMessage(const TQString &))); + TQObject::connect(a, TQT_SIGNAL(logError(const TQString &)), + this, TQT_SIGNAL(logMessage(const TQString &))); + TQObject::connect(a, TQT_SIGNAL(logProgress(const TQString &, int)), + this, TQT_SIGNAL(logProgress(const TQString &, int))); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + this, TQT_SLOT(actionCompleted(SyncAction *))); // Run the action picked from the queue when we get back // to the event loop. - QTimer::singleShot(0,a,SLOT(execConduit())); + TQTimer::singleShot(0,a,TQT_SLOT(execConduit())); } diff --git a/kpilot/lib/actionQueue.h b/kpilot/lib/actionQueue.h index bc8b11560..057b4beb0 100644 --- a/kpilot/lib/actionQueue.h +++ b/kpilot/lib/actionQueue.h @@ -28,7 +28,7 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qptrqueue.h> +#include <tqptrqueue.h> #include "syncAction.h" @@ -116,7 +116,7 @@ public: * ignored since those names are used by KPilot internally * for administrative purposes. */ - void queueConduits(const QStringList &conduits, + void queueConduits(const TQStringList &conduits, const SyncAction::SyncMode &mode); /** @@ -155,7 +155,7 @@ protected slots: private: /** A queue of actions to take. */ - QPtrQueue < SyncAction > SyncActionQueue; + TQPtrQueue < SyncAction > SyncActionQueue; }; diff --git a/kpilot/lib/actions.cc b/kpilot/lib/actions.cc index 6cd88273b..212540f7f 100644 --- a/kpilot/lib/actions.cc +++ b/kpilot/lib/actions.cc @@ -28,9 +28,9 @@ */ #include "options.h" -#include <qapplication.h> -#include <qdir.h> -#include <qfile.h> +#include <tqapplication.h> +#include <tqdir.h> +#include <tqfile.h> #include <ksavefile.h> @@ -52,13 +52,13 @@ WelcomeAction::WelcomeAction(KPilotLink *p) : FUNCTIONSETUP; addSyncLogEntry(i18n("KPilot %1 HotSync starting...\n") - .arg(QString::fromLatin1(KPILOT_VERSION))); + .arg(TQString::fromLatin1(KPILOT_VERSION))); emit logMessage( i18n("Using encoding %1 on the handheld.").arg(Pilot::codecName()) ); emit syncDone(this); return true; } -SorryAction::SorryAction(KPilotLink *p, const QString &s) : +SorryAction::SorryAction(KPilotLink *p, const TQString &s) : SyncAction(p,"sorryAction"), fMessage(s) { diff --git a/kpilot/lib/actions.h b/kpilot/lib/actions.h index ee353551f..2e3b9b20c 100644 --- a/kpilot/lib/actions.h +++ b/kpilot/lib/actions.h @@ -67,14 +67,14 @@ public: * print that message (it must be i18n()ed already) instead of * the standard message. */ - SorryAction(KPilotLink *device, const QString &s=QString::null); + SorryAction(KPilotLink *device, const TQString &s=TQString::null); protected: /** Reimplemented from SyncAction. */ virtual bool exec(); /** Message to print to the sync log. */ - QString fMessage; + TQString fMessage; } ; /** diff --git a/kpilot/lib/idmapper.cc b/kpilot/lib/idmapper.cc index 6e1031efe..f4fc38c5c 100644 --- a/kpilot/lib/idmapper.cc +++ b/kpilot/lib/idmapper.cc @@ -27,8 +27,8 @@ #include "idmapperxml.h" #include "options.h" -#include <qsqldatabase.h> -#include <qfile.h> +#include <tqsqldatabase.h> +#include <tqfile.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -57,9 +57,9 @@ IDMapper::IDMapper() fP = new IDMapperPrivate(); - QString dbPath = KGlobal::dirs()-> + TQString dbPath = KGlobal::dirs()-> saveLocation("data", CSL1("kpilot/") ); - QString dbFile = dbPath + CSL1("mapping.xml"); + TQString dbFile = dbPath + CSL1("mapping.xml"); if( !openDatasource( dbFile ) ) { @@ -67,7 +67,7 @@ IDMapper::IDMapper() } } -IDMapper::IDMapper( const QString &file) +IDMapper::IDMapper( const TQString &file) { FUNCTIONSETUP; @@ -84,7 +84,7 @@ IDMapper::~IDMapper() KPILOT_DELETE(fP); } -bool IDMapper::openDatasource( const QString &file ) +bool IDMapper::openDatasource( const TQString &file ) { FUNCTIONSETUP; @@ -92,7 +92,7 @@ bool IDMapper::openDatasource( const QString &file ) return fP->fXmlSource->open(); } -void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid ) +void IDMapper::registerPCObjectId( const TQString &conduit, const TQString &uid ) { FUNCTIONSETUP; @@ -103,7 +103,7 @@ void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid ) fP->fXmlSource->save(); } -void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid ) +void IDMapper::registerHHObjectId( const TQString &conduit, recordid_t pid ) { FUNCTIONSETUP; @@ -114,13 +114,13 @@ void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid ) fP->fXmlSource->save(); } -QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit ) +TQValueList<TQString> IDMapper::getPCObjectIds( const TQString &conduit ) { FUNCTIONSETUP; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; - QValueList<QString> uids; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; + TQValueList<TQString> uids; DEBUGKPILOT << fname << ": total " << mappings.count() << endl; @@ -141,13 +141,13 @@ QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit ) return uids; } -QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit ) +TQValueList<recordid_t> IDMapper::getHHObjectIds( const TQString &conduit ) { FUNCTIONSETUP; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; - QValueList<recordid_t> pids; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; + TQValueList<recordid_t> pids; for ( it = mappings.begin(); it != mappings.end(); ++it ) { @@ -164,12 +164,12 @@ QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit ) return pids; } -bool IDMapper::hasPCId( const QString &conduit, recordid_t pid ) +bool IDMapper::hasPCId( const TQString &conduit, recordid_t pid ) { FUNCTIONSETUP; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; for ( it = mappings.begin(); it != mappings.end(); ++it ) { @@ -183,12 +183,12 @@ bool IDMapper::hasPCId( const QString &conduit, recordid_t pid ) return false; } -bool IDMapper::hasHHId( const QString &conduit, const QString &uid ) +bool IDMapper::hasHHId( const TQString &conduit, const TQString &uid ) { FUNCTIONSETUP; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; for ( it = mappings.begin(); it != mappings.end(); ++it ) { @@ -202,15 +202,15 @@ bool IDMapper::hasHHId( const QString &conduit, const QString &uid ) return false; } -void IDMapper::setHHObjectId( const QString &conduit, const QString &uid +void IDMapper::setHHObjectId( const TQString &conduit, const TQString &uid , recordid_t pid ) { FUNCTIONSETUP; bool modified = false; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; for ( it = mappings.begin(); it != mappings.end(); ++it ) { @@ -224,15 +224,15 @@ void IDMapper::setHHObjectId( const QString &conduit, const QString &uid } } -void IDMapper::setPCObjectId( const QString &conduit, recordid_t pid - , const QString &uid ) +void IDMapper::setPCObjectId( const TQString &conduit, recordid_t pid + , const TQString &uid ) { FUNCTIONSETUP; bool modified = false; - QValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); - QValueList<IDMapping>::iterator it; + TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings(); + TQValueList<IDMapping>::iterator it; for ( it = mappings.begin(); it != mappings.end(); ++it ) { diff --git a/kpilot/lib/idmapper.h b/kpilot/lib/idmapper.h index 0364dbc93..b2ff0efe5 100644 --- a/kpilot/lib/idmapper.h +++ b/kpilot/lib/idmapper.h @@ -25,9 +25,9 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #include "pi-macros.h" @@ -51,85 +51,85 @@ public: /** * Creates a new IDMapper with file as datasource. */ - IDMapper( const QString &file ); + IDMapper( const TQString &file ); ~IDMapper(); /** * Adds an uid for PC objects to the database. */ - void registerPCObjectId( const QString &conduit, const QString &uid ); + void registerPCObjectId( const TQString &conduit, const TQString &uid ); /** * Returns all known uid's for given conduit. */ - QValueList<QString> getPCObjectIds( const QString &conduit ); + TQValueList<TQString> getPCObjectIds( const TQString &conduit ); /** * Adds a pid for HH objects to the database. */ - void registerHHObjectId( const QString &conduit, recordid_t pid ); + void registerHHObjectId( const TQString &conduit, recordid_t pid ); /** * Returns all know pids for given conduit. */ - QValueList<recordid_t> getHHObjectIds( const QString &conduit ); + TQValueList<recordid_t> getHHObjectIds( const TQString &conduit ); /** * Sets the PC uid for the handheld record with pid. Does nothing when * there is no handheld record with pid. */ - void setPCObjectId( const QString &conduit, recordid_t pid - , const QString &uid ); + void setPCObjectId( const TQString &conduit, recordid_t pid + , const TQString &uid ); /** * Sets the PC uid for the handheld record with pid. Does nothing when * there is no handheld record with pid. */ - void setHHObjectId( const QString &conduit, const QString &uid + void setHHObjectId( const TQString &conduit, const TQString &uid , recordid_t pid ); /** * Returns the PC uid for the handheld record with pid. Returns 0 when no * pid exists for given uid. */ - recordid_t getHHObjectId( const QString &conduit, const QString &uid ); + recordid_t getHHObjectId( const TQString &conduit, const TQString &uid ); /** * Returns the HH pid for the PC record with uid. Returns an empty string * when no uid exists for given pid. */ - QString getHHObjectId( const QString &conduit, recordid_t pid ); + TQString getHHObjectId( const TQString &conduit, recordid_t pid ); /** * Returns true when there is a uid set for given pid. The conduit itself * must determine if the two objects are in sync if this function returns * true. */ - bool hasPCId( const QString &conduit, recordid_t pid ); + bool hasPCId( const TQString &conduit, recordid_t pid ); /** * Returns true when there is a pid set for given uid. The conduit itself * must determine if the two objects are in sync if this function returns * true. */ - bool hasHHId( const QString &conduit, const QString &uid ); + bool hasHHId( const TQString &conduit, const TQString &uid ); /** * Sets the time that the two objects where last synced. The conduits * should call this method (or the pid version) when two objects are synced. * When the uid does not exist nothing happens. */ - void setLastSyncTime( const QString &conduit, const QString &uid, - const QDateTime &date ); + void setLastSyncTime( const TQString &conduit, const TQString &uid, + const TQDateTime &date ); /** * Sets the time that the two objects where last synced. The conduits * should call this (or the uid version) method when two objects are synced. * When the pid does not exist nothing happens. */ - void setLastSyncTime( const QString &conduit, recordid_t pid - , const QDateTime &date ); + void setLastSyncTime( const TQString &conduit, recordid_t pid + , const TQDateTime &date ); /** * Returns the date/time for the last time that the item with uid was @@ -138,7 +138,7 @@ public: * * Returns a null datetime when the pid does not excist. */ - QDateTime lastTimeSynced( const QString &conduit, const QString &uid ); + TQDateTime lastTimeSynced( const TQString &conduit, const TQString &uid ); /** * Returns the date/time for the last time that the item with pid was @@ -147,10 +147,10 @@ public: * * Returns a null datetime when the pid does not excist. */ - QDateTime lastTimeSynced( const QString &conduit, recordid_t pid ); + TQDateTime lastTimeSynced( const TQString &conduit, recordid_t pid ); protected: - bool openDatasource( const QString &file ); + bool openDatasource( const TQString &file ); private: IDMapperPrivate *fP; diff --git a/kpilot/lib/idmapperxml.cc b/kpilot/lib/idmapperxml.cc index a2a78a0c9..89fe51d91 100644 --- a/kpilot/lib/idmapperxml.cc +++ b/kpilot/lib/idmapperxml.cc @@ -27,7 +27,7 @@ #include "options.h" -IDMapperXml::IDMapperXml( const QString &file ) : fFile(file) +IDMapperXml::IDMapperXml( const TQString &file ) : fFile(file) , fCurrentMapping( 0l ) { } @@ -42,7 +42,7 @@ bool IDMapperXml::open() FUNCTIONSETUP; root = doc.createElement( CSL1("mappings") ); - QDomNode node = doc.createProcessingInstruction(CSL1("xml") + TQDomNode node = doc.createProcessingInstruction(CSL1("xml") ,CSL1("version=\"1.0\" encoding=\"UTF-8\"")); doc.appendChild( node ); @@ -54,7 +54,7 @@ bool IDMapperXml::open() if( fFile.open( IO_ReadWrite ) ) { - QTextStream out( &fFile ); + TQTextStream out( &fFile ); doc.save( out, 4 ); fFile.close(); return true; @@ -68,7 +68,7 @@ bool IDMapperXml::open() else { DEBUGKPILOT << fname << ": Parsing file " << fFile.name() << endl; - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler( this ); // Make sure that the file is closed after parsing. @@ -87,7 +87,7 @@ void IDMapperXml::save() << " mappings..." << endl; DEBUGKPILOT << fname << ": "; - QValueList<IDMapping>::const_iterator it; + TQValueList<IDMapping>::const_iterator it; for ( it = fMappings.begin(); it != fMappings.end(); ++it ) { DEBUGKPILOT << "."; @@ -96,27 +96,27 @@ void IDMapperXml::save() DEBUGKPILOT << fname << ": " << mapping.conduit(); - QDomElement mappingElement = doc.createElement( CSL1("mapping") ); + TQDomElement mappingElement = doc.createElement( CSL1("mapping") ); mappingElement.setAttribute( CSL1("conduit"), mapping.conduit() ); if( !mapping.uid().isNull() ) { - QDomElement uidElement = doc.createElement( CSL1("uid") ); + TQDomElement uidElement = doc.createElement( CSL1("uid") ); uidElement.setAttribute( CSL1("value"), mapping.uid() ); mappingElement.appendChild( uidElement ); } if( mapping.pid() != 0 ) { - QDomElement uidElement = doc.createElement( CSL1("pid") ); + TQDomElement uidElement = doc.createElement( CSL1("pid") ); uidElement.setAttribute( CSL1("value"), mapping.pid() ); mappingElement.appendChild( uidElement ); } if( !mapping.lastSyncTime().isNull() ) { - QDomElement uidElement = doc.createElement( CSL1("pid") ); - uidElement.setAttribute( CSL1("value"), QString::number( mapping.pid() ) ); + TQDomElement uidElement = doc.createElement( CSL1("pid") ); + uidElement.setAttribute( CSL1("value"), TQString::number( mapping.pid() ) ); mappingElement.appendChild( uidElement ); } @@ -125,7 +125,7 @@ void IDMapperXml::save() if( fFile.open( IO_ReadWrite ) ) { - QTextStream out( &fFile ); + TQTextStream out( &fFile ); doc.save( out, 4 ); fFile.close(); @@ -144,14 +144,14 @@ void IDMapperXml::addMapping( const IDMapping &mapping ) DEBUGKPILOT << fname << ": " << fMappings.first().conduit() << endl; } -QValueList<IDMapping>& IDMapperXml::mappings() +TQValueList<IDMapping>& IDMapperXml::mappings() { return fMappings; } -bool IDMapperXml::startElement( const QString &namespaceURI - , const QString &localName, const QString &qName - , const QXmlAttributes &attribs ) +bool IDMapperXml::startElement( const TQString &namespaceURI + , const TQString &localName, const TQString &qName + , const TQXmlAttributes &attribs ) { FUNCTIONSETUP; Q_UNUSED(namespaceURI); @@ -159,7 +159,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI if( qName == CSL1("mapping") ) { - QString conduit( attribs.value( CSL1("conduit") ) ); + TQString conduit( attribs.value( CSL1("conduit") ) ); fCurrentMapping = new IDMapping( conduit ); } @@ -175,7 +175,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI { // NOTE: this isn't very robuust! // Parses only dates in the form: dd-mm-yyyy hh:mm:ss - QString date = attribs.value( CSL1("value") ); + TQString date = attribs.value( CSL1("value") ); int day = date.left(2).toInt(); int month = date.mid(3,2).toInt(); int year = date.mid(6, 4).toInt(); @@ -184,17 +184,17 @@ bool IDMapperXml::startElement( const QString &namespaceURI int minute = date.mid(14,2).toInt(); int second = date.mid(17,2).toInt(); - QDate tmpDate = QDate( year, month, day ); - QTime tmpTime = QTime( hour, minute, second ); + TQDate tmpDate = TQDate( year, month, day ); + TQTime tmpTime = TQTime( hour, minute, second ); - fCurrentMapping->setLastSyncTime( QDateTime( tmpDate, tmpTime ) ); + fCurrentMapping->setLastSyncTime( TQDateTime( tmpDate, tmpTime ) ); } return true; } -bool IDMapperXml::endElement( const QString &namespaceURI - , const QString &localName, const QString &qName ) +bool IDMapperXml::endElement( const TQString &namespaceURI + , const TQString &localName, const TQString &qName ) { FUNCTIONSETUP; diff --git a/kpilot/lib/idmapperxml.h b/kpilot/lib/idmapperxml.h index 455673888..87c912379 100644 --- a/kpilot/lib/idmapperxml.h +++ b/kpilot/lib/idmapperxml.h @@ -27,15 +27,15 @@ #include "idmapping.h" -#include <qxml.h> -#include <qdom.h> -#include <qstring.h> -#include <qptrcollection.h> +#include <tqxml.h> +#include <tqdom.h> +#include <tqstring.h> +#include <tqptrcollection.h> class IDMapperXml : public QXmlDefaultHandler { public: - IDMapperXml( const QString &file ); + IDMapperXml( const TQString &file ); ~IDMapperXml(); @@ -59,26 +59,26 @@ public: /** * Returns the collection of mappings. */ - QValueList<IDMapping> &mappings(); + TQValueList<IDMapping> &mappings(); /** * Overloaded function to parse the xml file. */ - bool startElement( const QString &namespaceURI, const QString &localName - , const QString &qName, const QXmlAttributes &attribs ); + bool startElement( const TQString &namespaceURI, const TQString &localName + , const TQString &qName, const TQXmlAttributes &attribs ); /** * Overloaded function to parse the xml file. */ - bool endElement( const QString &namespaceURI, const QString &localName - , const QString &qName ); + bool endElement( const TQString &namespaceURI, const TQString &localName + , const TQString &qName ); private: - QFile fFile; - QDomDocument doc; - QDomElement root; + TQFile fFile; + TQDomDocument doc; + TQDomElement root; IDMapping *fCurrentMapping; - QValueList<IDMapping> fMappings; + TQValueList<IDMapping> fMappings; }; #endif diff --git a/kpilot/lib/idmapping.cc b/kpilot/lib/idmapping.cc index 7a49e9e3e..49a1e334e 100644 --- a/kpilot/lib/idmapping.cc +++ b/kpilot/lib/idmapping.cc @@ -29,7 +29,7 @@ IDMapping::IDMapping() { } -IDMapping::IDMapping( const QString &conduit ) +IDMapping::IDMapping( const TQString &conduit ) { fConduit = conduit; fPid = 0; @@ -53,7 +53,7 @@ IDMapping IDMapping::operator=( const IDMapping &m ) return local; } -void IDMapping::setUid( const QString &uid ) +void IDMapping::setUid( const TQString &uid ) { fUid = uid; } @@ -63,17 +63,17 @@ void IDMapping::setPid( recordid_t pid ) fPid = pid; } -void IDMapping::setLastSyncTime( const QDateTime &datetime ) +void IDMapping::setLastSyncTime( const TQDateTime &datetime ) { fLastSync = datetime; } -QString IDMapping::conduit() const +TQString IDMapping::conduit() const { return fConduit; } -QString IDMapping::uid() const +TQString IDMapping::uid() const { return fUid; } @@ -83,7 +83,7 @@ recordid_t IDMapping::pid() const return fPid; } -QDateTime IDMapping::lastSyncTime() const +TQDateTime IDMapping::lastSyncTime() const { return fLastSync; } diff --git a/kpilot/lib/idmapping.h b/kpilot/lib/idmapping.h index acb17dc8a..b8ed4d5e4 100644 --- a/kpilot/lib/idmapping.h +++ b/kpilot/lib/idmapping.h @@ -28,39 +28,39 @@ #include "pi-macros.h" -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> class IDMapping { public: IDMapping(); - IDMapping( const QString &conduit ); + IDMapping( const TQString &conduit ); IDMapping( const IDMapping &m ); IDMapping operator=( const IDMapping &m ); - void setUid( const QString &uid ); + void setUid( const TQString &uid ); void setPid( recordid_t uid ); - void setLastSyncTime( const QDateTime &datetime ); + void setLastSyncTime( const TQDateTime &datetime ); - QString conduit() const; + TQString conduit() const; - QString uid() const; + TQString uid() const; recordid_t pid() const; - QDateTime lastSyncTime() const; + TQDateTime lastSyncTime() const; private: - QString fConduit; - QString fUid; + TQString fConduit; + TQString fUid; recordid_t fPid; - QDateTime fLastSync; + TQDateTime fLastSync; }; #endif diff --git a/kpilot/lib/kpilotdevicelink.cc b/kpilot/lib/kpilotdevicelink.cc index 55027d763..5fed7961a 100644 --- a/kpilot/lib/kpilotdevicelink.cc +++ b/kpilot/lib/kpilotdevicelink.cc @@ -45,11 +45,11 @@ #include <pi-file.h> #include <pi-buffer.h> -#include <qdir.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qthread.h> -#include <qsocketnotifier.h> +#include <tqdir.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqthread.h> +#include <tqsocketnotifier.h> #include <kconfig.h> #include <kmessagebox.h> @@ -71,19 +71,19 @@ DeviceMap *DeviceMap::mThis = 0L; -static inline void startOpenTimer(DeviceCommThread *dev, QTimer *&t) +static inline void startOpenTimer(DeviceCommThread *dev, TQTimer *&t) { if ( !t) { - t = new QTimer(dev); - QObject::connect(t, SIGNAL(timeout()), dev, SLOT(openDevice())); + t = new TQTimer(dev); + TQObject::connect(t, TQT_SIGNAL(timeout()), dev, TQT_SLOT(openDevice())); } // just a single-shot timer. we'll know when to start it again... t->start(1000, true); } DeviceCommThread::DeviceCommThread(KPilotDeviceLink *d) : - QThread(), + TQThread(), fDone(true), fHandle(d), fOpenTimer(0L), @@ -144,7 +144,7 @@ void DeviceCommThread::reset() if (link()->fMessages->shouldPrint(Messages::OpenFailMessage)) { - QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, i18n("Could not open device: %1 (will retry)") .arg(link()->pilotPath() ))); } @@ -163,7 +163,7 @@ void DeviceCommThread::reset() * and then bind to it (in open()). If we're able to do those 2 things, then * we do 2 things: we set a timeout timer (which will tell us that X amount of * time has transpired before we get into the meat of the sync transaction), and - * we also set up a QSocketNotifier, which will tell us when data is available + * we also set up a TQSocketNotifier, which will tell us when data is available * to be read from the Palm socket. If we were unable to create a socket * and/or bind to the Palm in this method, we'll start our timer again. */ @@ -183,7 +183,7 @@ void DeviceCommThread::openDevice() if (link()->fMessages->shouldPrint(Messages::OpenMessage)) { - QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, i18n("Trying to open device %1...") .arg(link()->fPilotPath))); } @@ -219,13 +219,13 @@ void DeviceCommThread::openDevice() } } -bool DeviceCommThread::open(const QString &device) +bool DeviceCommThread::open(const TQString &device) { FUNCTIONSETUPL(2); int ret; int e = 0; - QString msg; + TQString msg; if (fTempSocket != -1) { @@ -246,7 +246,7 @@ bool DeviceCommThread::open(const QString &device) link()->fLinkStatus = PilotLinkError; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); return false; } @@ -265,7 +265,7 @@ bool DeviceCommThread::open(const QString &device) link()->fLinkStatus = PilotLinkError; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); return false; } @@ -277,7 +277,7 @@ bool DeviceCommThread::open(const QString &device) DEBUGKPILOT << fname << ": Binding to path: [" << link()->fRealPilotPath << "]" << endl; - ret = pi_bind(fTempSocket, QFile::encodeName(link()->fRealPilotPath)); + ret = pi_bind(fTempSocket, TQFile::encodeName(link()->fRealPilotPath)); if (ret < 0) { @@ -295,7 +295,7 @@ bool DeviceCommThread::open(const QString &device) if (link()->fMessages->shouldPrint(Messages::OpenFailMessage)) { - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); } return false; @@ -304,10 +304,10 @@ bool DeviceCommThread::open(const QString &device) link()->fLinkStatus = DeviceOpen; DeviceMap::self()->bindDevice(link()->fRealPilotPath); - fSocketNotifier = new QSocketNotifier(fTempSocket, - QSocketNotifier::Read, this); - QObject::connect(fSocketNotifier, SIGNAL(activated(int)), - this, SLOT(acceptDevice())); + fSocketNotifier = new TQSocketNotifier(fTempSocket, + TQSocketNotifier::Read, this); + TQObject::connect(fSocketNotifier, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(acceptDevice())); fSocketNotifierActive=true; /** @@ -322,15 +322,15 @@ bool DeviceCommThread::open(const QString &device) timeout=5000; } - fWorkaroundUSBTimer = new QTimer(this); - connect(fWorkaroundUSBTimer, SIGNAL(timeout()), this, SLOT(workaroundUSB())); + fWorkaroundUSBTimer = new TQTimer(this); + connect(fWorkaroundUSBTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(workaroundUSB())); fWorkaroundUSBTimer->start(timeout, true); return true; } /** - * We've been notified by our QSocketNotifier that we have data available on the + * We've been notified by our TQSocketNotifier that we have data available on the * socket. Try to go through the remaining steps of the connnection process. * Note: If we return at all from this before the very end without a successful * connection, we need to make sure we restart our connection open timer, otherwise @@ -387,14 +387,14 @@ void DeviceCommThread::acceptDevice() // Presumably, strerror() returns things in // local8Bit and not latin1. - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot listen on Pilot socket (%1)"). - arg(QString::fromLocal8Bit(s)))); + arg(TQString::fromLocal8Bit(s)))); reset(); return; } - QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 10)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 10)); DEBUGKPILOT << fname << ": Listening to pilot. Now trying accept..." << endl; @@ -408,8 +408,8 @@ void DeviceCommThread::acceptDevice() WARNINGKPILOT << "pi_accept returned: [" << s << "]" << endl; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") - .arg(QString::fromLocal8Bit(s)))); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") + .arg(TQString::fromLocal8Bit(s)))); link()->fLinkStatus = PilotLinkError; reset(); @@ -423,21 +423,21 @@ void DeviceCommThread::acceptDevice() link()->fLinkStatus = PilotLinkError; WARNINGKPILOT << "Already connected or unable to connect!" << endl; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") .arg(i18n("already connected")))); reset(); return; } - QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 30)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 30)); DEBUGKPILOT << fname << ": doing dlp_ReadSysInfo..." << endl; struct SysInfo sys_info; if (dlp_ReadSysInfo(fPilotSocket, &sys_info) < 0) { - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Unable to read system information from Pilot"))); link()->fLinkStatus=PilotLinkError; @@ -461,7 +461,7 @@ void DeviceCommThread::acceptDevice() fWorkaroundUSBTimer->stop(); KPILOT_DELETE(fWorkaroundUSBTimer); - QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 60)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 60)); KPILOT_DELETE(link()->fPilotUser); link()->fPilotUser = new KPilotUser; @@ -471,11 +471,11 @@ void DeviceCommThread::acceptDevice() /* Ask the pilot who it is. And see if it's who we think it is. */ dlp_ReadUserInfo(fPilotSocket, link()->fPilotUser->data()); - QString n = link()->getPilotUser().name(); + TQString n = link()->getPilotUser().name(); DEBUGKPILOT << fname << ": Read user name: [" << n << "]" << endl; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90)); /* Tell user (via Pilot) that we are starting things up */ if ((ret=dlp_OpenConduit(fPilotSocket)) < 0) @@ -483,18 +483,18 @@ void DeviceCommThread::acceptDevice() DEBUGKPILOT << fname << ": dlp_OpenConduit returned: [" << ret << "]" << endl; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Could not read user information from the Pilot. " "Perhaps you have a password set on the device?"))); } link()->fLinkStatus = AcceptedDevice; - QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 100)); + TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 100)); DeviceCommEvent * ev = new DeviceCommEvent(EventDeviceReady); ev->setCurrentSocket(fPilotSocket); - QApplication::postEvent(link(), ev); + TQApplication::postEvent(link(), ev); } @@ -516,19 +516,19 @@ void DeviceCommThread::run() // keep the thread alive until we're supposed to be done while (!fDone) { - QThread::sleep(sleepBetweenPoll); + TQThread::sleep(sleepBetweenPoll); } close(); // now sleep one last bit to make sure the pthread inside // pilot-link (potentially, if it's libusb) is done before we exit - QThread::sleep(1); + TQThread::sleep(1); DEBUGKPILOT << fname << ": comm thread now done..." << endl; } -KPilotDeviceLink::KPilotDeviceLink(QObject * parent, const char *name, - const QString &tempDevice) : +KPilotDeviceLink::KPilotDeviceLink(TQObject * parent, const char *name, + const TQString &tempDevice) : KPilotLink(parent, name), fLinkStatus(Init), fWorkaroundUSB(false), fPilotSocket(-1), fTempDevice(tempDevice), fMessages(new Messages(this)), fDeviceCommThread(0L) { @@ -553,7 +553,7 @@ KPilotDeviceLink::~KPilotDeviceLink() return fLinkStatus == AcceptedDevice; } -/* virtual */bool KPilotDeviceLink::event(QEvent *e) +/* virtual */bool KPilotDeviceLink::event(TQEvent *e) { FUNCTIONSETUP; @@ -636,7 +636,7 @@ void KPilotDeviceLink::close() fPilotSocket = (-1); } -void KPilotDeviceLink::reset(const QString & dP) +void KPilotDeviceLink::reset(const TQString & dP) { FUNCTIONSETUP; @@ -645,7 +645,7 @@ void KPilotDeviceLink::reset(const QString & dP) // Release all resources // close(); - fPilotPath = QString::null; + fPilotPath = TQString::null; fPilotPath = dP; if (fPilotPath.isEmpty()) @@ -667,7 +667,7 @@ void KPilotDeviceLink::startCommThread() WARNINGKPILOT << "No point in trying empty device." << endl; - QString msg = i18n("The Pilot device is not configured yet."); + TQString msg = i18n("The Pilot device is not configured yet."); WARNINGKPILOT << msg << endl; fLinkStatus = PilotLinkError; @@ -699,7 +699,7 @@ void KPilotDeviceLink::checkDevice() // If the device exists yet doesn't have the right // permissions, complain and then continue anyway. // - QFileInfo fi(fPilotPath); + TQFileInfo fi(fPilotPath); if (fi.exists()) { // If it exists, it ought to be RW already. @@ -725,7 +725,7 @@ void KPilotDeviceLink::checkDevice() } } -void KPilotDeviceLink::setTempDevice(const QString &d) +void KPilotDeviceLink::setTempDevice(const TQString &d) { fTempDevice = d; DeviceMap::self()->bindDevice(fTempDevice); @@ -738,24 +738,24 @@ void KPilotDeviceLink::setTempDevice(const QString &d) return pi_tickle(pilotSocket()) >= 0; } -/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const QString &entry) +/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const TQString &entry) { dlp_AddSyncLogEntry(fPilotSocket, const_cast<char *>((const char *)Pilot::toPilot(entry))); } -bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile) +bool KPilotDeviceLink::installFile(const TQString & f, const bool deleteFile) { FUNCTIONSETUP; DEBUGKPILOT << fname << ": Installing file " << f << endl; - if (!QFile::exists(f)) + if (!TQFile::exists(f)) return false; char buffer[PATH_MAX]; memset(buffer, 0, PATH_MAX); - strlcpy(buffer, QFile::encodeName(f), PATH_MAX); + strlcpy(buffer, TQFile::encodeName(f), PATH_MAX); struct pi_file *pf = pi_file_open(buffer); if (!f) @@ -778,7 +778,7 @@ bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile) pi_file_close(pf); if (deleteFile) - QFile::remove(f); + TQFile::remove(f); return true; } @@ -788,9 +788,9 @@ int KPilotDeviceLink::openConduit() return dlp_OpenConduit(fPilotSocket); } -QString KPilotDeviceLink::statusString(LinkStatus l) +TQString KPilotDeviceLink::statusString(LinkStatus l) { - QString s= CSL1("KPilotDeviceLink="); + TQString s= CSL1("KPilotDeviceLink="); switch (l) { @@ -826,7 +826,7 @@ QString KPilotDeviceLink::statusString(LinkStatus l) return s; } -QString KPilotDeviceLink::statusString() const +TQString KPilotDeviceLink::statusString() const { return statusString(status() ); } @@ -872,7 +872,7 @@ int KPilotDeviceLink::findDatabase(const char *name, struct DBInfo *dbinfo, type, creator, dbinfo); } -bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName, +bool KPilotDeviceLink::retrieveDatabase(const TQString &fullBackupName, DBInfo *info) { FUNCTIONSETUP; @@ -886,7 +886,7 @@ bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName, DEBUGKPILOT << fname << ": Writing DB <" << info->name << "> " << " to " << fullBackupName << endl; - QCString encodedName = QFile::encodeName(fullBackupName); + TQCString encodedName = TQFile::encodeName(fullBackupName); struct pi_file *f = pi_file_create(encodedName, info); if (!f) @@ -954,7 +954,7 @@ const KPilotCard *KPilotDeviceLink::getCardInfo(int card) return cardinfo; } -PilotDatabase *KPilotDeviceLink::database(const QString &name) +PilotDatabase *KPilotDeviceLink::database(const TQString &name) { return new PilotSerialDatabase( this, name ); } diff --git a/kpilot/lib/kpilotdevicelink.h b/kpilot/lib/kpilotdevicelink.h index d2527aee4..2f29a5877 100644 --- a/kpilot/lib/kpilotdevicelink.h +++ b/kpilot/lib/kpilotdevicelink.h @@ -58,7 +58,7 @@ enum LinkStatus { * Custom events we can be handling... */ enum DeviceCustomEvents { - EventLogMessage = QEvent::User + 777, + EventLogMessage = TQEvent::User + 777, EventLogError, EventLogProgress, EventDeviceReady @@ -86,9 +86,9 @@ public: * @param tempDevice Path to device node to use as an alternative * to the "normal" one set by KPilot. */ - KPilotDeviceLink( QObject *parent = 0, + KPilotDeviceLink( TQObject *parent = 0, const char *name = 0, - const QString &tempDevice = QString::null ); + const TQString &tempDevice = TQString::null ); /** * Destructor. This rudely ends the communication with the handheld. @@ -107,17 +107,17 @@ public: } /** Get a human-readable string for the given status @p l. */ - static QString statusString(LinkStatus l); + static TQString statusString(LinkStatus l); // The following API is the actual implementation of // the KPilotLink API, for documentation see that file. // - virtual QString statusString() const; + virtual TQString statusString() const; virtual bool isConnected() const; - virtual void reset( const QString & ); + virtual void reset( const TQString & ); virtual void close(); virtual void reset(); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); virtual bool tickle(); virtual const KPilotCard *getCardInfo(int card); virtual void endSync( EndOfSyncFlags f ); @@ -125,14 +125,14 @@ public: virtual int getNextDatabase(int index,struct DBInfo *); virtual int findDatabase(const char *name, struct DBInfo*, int index=0, unsigned long type=0, unsigned long creator=0); - virtual bool retrieveDatabase(const QString &path, struct DBInfo *db); + virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db); virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM); - virtual PilotDatabase *database( const QString &name ); + virtual PilotDatabase *database( const TQString &name ); virtual PilotDatabase *database( const DBInfo *info ); protected: - virtual bool installFile(const QString &, const bool deleteFile); - virtual void addSyncLogEntryImpl( const QString &s ); + virtual bool installFile(const TQString &, const bool deleteFile); + virtual void addSyncLogEntryImpl( const TQString &s ); virtual int pilotSocket() const { return fPilotSocket; @@ -161,14 +161,14 @@ public: * Useful for hotplug enviroments, this device is used @em once * for accepting a connection. */ - void setTempDevice( const QString &device ); + void setTempDevice( const TQString &device ); /** * Sets the device to use. Used by probe dialog, since we know * what device to use, but we don't want to start the detection * immediately. */ - void setDevice( const QString &device ) + void setDevice( const TQString &device ) { fPilotPath = device; } @@ -191,13 +191,13 @@ protected: * Path with resolved symlinks, to prevent double binding * to the same device. */ - QString fRealPilotPath; + TQString fRealPilotPath; /** * Pilot-link library handles for the device once it's opened. */ int fPilotSocket; - QString fTempDevice; + TQString fTempDevice; /** * Handle cases where we can't accept or open the device, diff --git a/kpilot/lib/kpilotdevicelinkPrivate.h b/kpilot/lib/kpilotdevicelinkPrivate.h index be2bbda35..d451e75c5 100644 --- a/kpilot/lib/kpilotdevicelinkPrivate.h +++ b/kpilot/lib/kpilotdevicelinkPrivate.h @@ -29,8 +29,8 @@ #include <errno.h> -#include <qstringlist.h> -#include <qthread.h> +#include <tqstringlist.h> +#include <tqthread.h> #include "kpilotdevicelink.h" #include "options.h" @@ -49,7 +49,7 @@ public: return mThis; } - bool canBind(const QString &device) + bool canBind(const TQString &device) { FUNCTIONSETUPL(5); DEBUGKPILOT << fname << ": device: [" @@ -59,7 +59,7 @@ public: return !mBoundDevices.contains(device); } - void bindDevice(const QString &device) + void bindDevice(const TQString &device) { FUNCTIONSETUPL(5); DEBUGKPILOT << fname << ": device: [" @@ -69,7 +69,7 @@ public: showList(); } - void unbindDevice(const QString &device) + void unbindDevice(const TQString &device) { FUNCTIONSETUPL(5); DEBUGKPILOT << fname << ": device: [" @@ -88,7 +88,7 @@ protected: { } - QStringList mBoundDevices; + TQStringList mBoundDevices; static DeviceMap *mThis; private: @@ -173,13 +173,13 @@ protected: class DeviceCommEvent : public QEvent { public: - DeviceCommEvent(DeviceCustomEvents type, QString msg = QString::null, + DeviceCommEvent(DeviceCustomEvents type, TQString msg = TQString::null, int progress = 0) : - QEvent( (QEvent::Type)type ), fMessage(msg), fProgress(progress), + TQEvent( (TQEvent::Type)type ), fMessage(msg), fProgress(progress), fPilotSocket(-1) { } - QString message() const + TQString message() const { return fMessage; } @@ -198,7 +198,7 @@ public: return fPilotSocket; } private: - QString fMessage; + TQString fMessage; int fProgress; /** * Pilot-link library handles for the device once it's opened. @@ -211,7 +211,7 @@ private: Event thread (similar to Swing's AWT event dispatch thread). */ -class DeviceCommThread : public QObject, public QThread +class DeviceCommThread : public TQObject, public QThread { friend class KPilotDeviceLink; @@ -239,7 +239,7 @@ protected: * Does the low-level opening of the device and handles the * pilot-link library initialisation. */ - bool open(const QString &device = QString::null); + bool open(const TQString &device = TQString::null); protected slots: /** @@ -277,7 +277,7 @@ private: WARNINGKPILOT << "Link asked for, but either I'm " << "done or I don't have a valid handle. " << "Shutting down comm thread." << endl; - QThread::exit(); + TQThread::exit(); return 0; } } @@ -285,12 +285,12 @@ private: /** * Timers and Notifiers for detecting activity on the device. */ - QTimer *fOpenTimer; - QSocketNotifier *fSocketNotifier; + TQTimer *fOpenTimer; + TQSocketNotifier *fSocketNotifier; bool fSocketNotifierActive; /** Timer used to check for a badly-connected Z31/72 */ - QTimer *fWorkaroundUSBTimer; + TQTimer *fWorkaroundUSBTimer; /** * Pilot-link library handles for the device once it's opened. @@ -298,7 +298,7 @@ private: int fPilotSocket; int fTempSocket; - inline QString errorMessage(int e) + inline TQString errorMessage(int e) { switch (e) { diff --git a/kpilot/lib/kpilotlink.cc b/kpilot/lib/kpilotlink.cc index 9c0b85ee9..da85d489d 100644 --- a/kpilot/lib/kpilotlink.cc +++ b/kpilot/lib/kpilotlink.cc @@ -47,10 +47,10 @@ #include <pi-file.h> #include <pi-buffer.h> -#include <qdir.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qthread.h> +#include <tqdir.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqthread.h> #include <kconfig.h> #include <kmessagebox.h> @@ -74,7 +74,7 @@ class TickleThread : public QThread { public: TickleThread(KPilotLink *d, bool *done, int timeout) : - QThread(), + TQThread(), fHandle(d), fDone(done), fTimeout(timeout) @@ -108,14 +108,14 @@ void TickleThread::run() while (!(*fDone)) { - QThread::msleep(1000/ChecksPerSecond); + TQThread::msleep(1000/ChecksPerSecond); if (!(--subseconds)) { if (timeout) { if (!(--timeout)) { - QApplication::postEvent(fHandle, new QEvent(static_cast<QEvent::Type>(KPilotLink::EventTickleTimeout))); + TQApplication::postEvent(fHandle, new TQEvent(static_cast<TQEvent::Type>(KPilotLink::EventTickleTimeout))); break; } } @@ -137,9 +137,9 @@ void TickleThread::run() -KPilotLink::KPilotLink( QObject *parent, const char *name ) : - QObject( parent, name ), - fPilotPath(QString::null), +KPilotLink::KPilotLink( TQObject *parent, const char *name ) : + TQObject( parent, name ), + fPilotPath(TQString::null), fPilotUser(0L), fPilotSysInfo(0L), fTickleDone(true), @@ -169,7 +169,7 @@ KPilotLink::~KPilotLink() KPILOT_DELETE(fPilotSysInfo); } -/* virtual */ bool KPilotLink::event(QEvent *e) +/* virtual */ bool KPilotLink::event(TQEvent *e) { if ((int)e->type() == EventTickleTimeout) { @@ -177,7 +177,7 @@ KPilotLink::~KPilotLink() emit timeout(); return true; } - else return QObject::event(e); + else return TQObject::event(e); } /* @@ -218,30 +218,30 @@ void KPilotLink::stopTickle() } } -unsigned int KPilotLink::installFiles(const QStringList & l, const bool deleteFiles) +unsigned int KPilotLink::installFiles(const TQStringList & l, const bool deleteFiles) { FUNCTIONSETUP; - QStringList::ConstIterator i,e; + TQStringList::ConstIterator i,e; unsigned int k = 0; unsigned int n = 0; unsigned int total = l.count(); for (i = l.begin(), e = l.end(); i != e; ++i) { - emit logProgress(QString::null, + emit logProgress(TQString::null, (int) ((100.0 / total) * (float) n)); if (installFile(*i, deleteFiles)) k++; n++; } - emit logProgress(QString::null, 100); + emit logProgress(TQString::null, 100); return k; } -void KPilotLink::addSyncLogEntry(const QString & entry, bool log) +void KPilotLink::addSyncLogEntry(const TQString & entry, bool log) { FUNCTIONSETUP; if (entry.isEmpty()) return; diff --git a/kpilot/lib/kpilotlink.h b/kpilot/lib/kpilotlink.h index 5c3865c3e..b0c97de0f 100644 --- a/kpilot/lib/kpilotlink.h +++ b/kpilot/lib/kpilotlink.h @@ -31,8 +31,8 @@ #include <pi-dlp.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> /** @file * Encapsulates all the communication with the handheld. Also @@ -96,7 +96,7 @@ class PilotDatabase; * The life-cycle of a KPilotLink object is as follows: * * # Object is created (one of the concrete subclasses, anyway) -* # Object gets a location assigned through reset(const QString &) +* # Object gets a location assigned through reset(const TQString &) * # Object is connected to the handheld device (somehow, depends on subclass) * # Object emits signal deviceReady() * @@ -104,7 +104,7 @@ class PilotDatabase; * the handheld. When the device connection is no longer needed, call either * endOfSync() or finishSync() to wrap up the communications. The object remains * alive and may be re-used by calling reset() to use the same location or -* reset(const QString &) to give it a new location. +* reset(const TQString &) to give it a new location. * * @section Tickle handling. * @@ -174,10 +174,10 @@ Q_OBJECT friend class SyncAction; public: /** A list of DBInfo structures. */ - typedef QValueList<struct DBInfo> DBInfoList; + typedef TQValueList<struct DBInfo> DBInfoList; /** Constructor. Use reset() to start looking for a device. */ - KPilotLink( QObject *parent = 0, const char *name = 0 ); + KPilotLink( TQObject *parent = 0, const char *name = 0 ); /** Destructor. This rudely interrupts any communication in progress. * It is best to call endOfSync() or finishSync() before destroying @@ -187,7 +187,7 @@ public: /** Provides a human-readable status string. */ - virtual QString statusString() const = 0; + virtual TQString statusString() const = 0; /** * True if HotSync has been started but not finished yet @@ -204,7 +204,7 @@ public: * Whichever is being used, this function returns its * name in a human-readable form. */ - QString pilotPath() const + TQString pilotPath() const { return fPilotPath; } @@ -217,13 +217,13 @@ public: * @see reset() * @see pilotPath() */ - virtual void reset(const QString &pilotPath) = 0; + virtual void reset(const TQString &pilotPath) = 0; /** Allows our class to receive custom events that our threads * will be giving to us, including tickle timeouts and * device communication events. */ - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /** * Install the list of files (full paths!) named by @p l @@ -232,7 +232,7 @@ public: * * @return the number of files successfully installed. */ - unsigned int installFiles(const QStringList &l, const bool deleteFiles); + unsigned int installFiles(const TQStringList &l, const bool deleteFiles); /** * Write a log entry to the handheld. If @p log is true, @@ -241,7 +241,7 @@ public: * log (with a physical device, that is what appears on * screen at the end of a sync). */ - void addSyncLogEntry(const QString &entry,bool log=true); + void addSyncLogEntry(const TQString &entry,bool log=true); /** * Find a database with the given @p name (and optionally, @@ -266,7 +266,7 @@ public: * * @return @c true on success */ - virtual bool retrieveDatabase(const QString &path, struct DBInfo *db) = 0; + virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db) = 0; /** * Fill the DBInfo structure @p db with information about @@ -300,12 +300,12 @@ public: * @note ownership of the database object is given to the caller, * who must delete the object in time. */ - virtual PilotDatabase *database( const QString &name ) = 0; + virtual PilotDatabase *database( const TQString &name ) = 0; /** * Return a database object for manipulating the database with * the name stored in the DBInfo structure @p info . The default - * version goes through method database( const QString & ), above. + * version goes through method database( const TQString & ), above. * * @return pointer to database object, or 0 on error. * @note ownership of the database object is given to the caller. @@ -387,17 +387,17 @@ signals: void timeout(); /** Signal that a message has been written to the sync log. */ - void logMessage(const QString &); + void logMessage(const TQString &); /** Signal that an error has occurred, for logging. */ - void logError(const QString &); + void logError(const TQString &); /** * Signal that progress has been made, for logging purposes. * @p p is the percentage completed (0 <= s <= 100). * The string @p s is logged as well, if non-Null. */ - void logProgress(const QString &s, int p); + void logProgress(const TQString &s, int p); /** * Emitted once the user information has been read and @@ -429,7 +429,7 @@ protected: * Usually /dev/pilot, /dev/ttySx, or /dev/usb/x. May be * a filesystem path for local links. */ - QString fPilotPath; + TQString fPilotPath; /** * Start tickling the Handheld (every few seconds). This @@ -453,7 +453,7 @@ protected: * @p f is used; in addition, if @p deleteFile is true remove * the source file. Returns @c true if the install succeeded. */ - virtual bool installFile( const QString &f, const bool deleteFile ) = 0; + virtual bool installFile( const TQString &f, const bool deleteFile ) = 0; /** * Notify the Pilot user that a conduit is running now. @@ -477,7 +477,7 @@ protected: * Actually write an entry to the device link. The message * @p s must be guaranteed non-empty. */ - virtual void addSyncLogEntryImpl( const QString &s ) = 0; + virtual void addSyncLogEntryImpl( const TQString &s ) = 0; /** * User information structure. Should be filled in when a sync @@ -494,7 +494,7 @@ protected: private: bool fTickleDone; - QThread *fTickleThread; + TQThread *fTickleThread; } ; diff --git a/kpilot/lib/kpilotlocallink.cc b/kpilot/lib/kpilotlocallink.cc index c3af1d342..8834b4a81 100644 --- a/kpilot/lib/kpilotlocallink.cc +++ b/kpilot/lib/kpilotlocallink.cc @@ -47,10 +47,10 @@ #include <pi-file.h> #include <pi-buffer.h> -#include <qdir.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qthread.h> +#include <tqdir.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqthread.h> #include <kconfig.h> #include <kmessagebox.h> @@ -65,8 +65,8 @@ #include "kpilotlocallink.moc" -typedef QPair<QString, struct DBInfo> DatabaseDescriptor; -typedef QValueList<DatabaseDescriptor> DatabaseDescriptorList; +typedef QPair<TQString, struct DBInfo> DatabaseDescriptor; +typedef TQValueList<DatabaseDescriptor> DatabaseDescriptorList; class KPilotLocalLink::Private { @@ -74,13 +74,13 @@ public: DatabaseDescriptorList fDBs; } ; -unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const QString &path ) +unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const TQString &path ) { FUNCTIONSETUP; info.fDBs.clear(); - QDir d(path); + TQDir d(path); if (!d.exists()) { // Perhaps return an error? @@ -90,16 +90,16 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private & // Use this to fake indexes in the list of DBInfo structs unsigned int counter = 0; - QStringList dbs = d.entryList( CSL1("*.pdb"), QDir::Files | QDir::NoSymLinks | QDir::Readable ); - for ( QStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i) + TQStringList dbs = d.entryList( CSL1("*.pdb"), TQDir::Files | TQDir::NoSymLinks | TQDir::Readable ); + for ( TQStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i) { struct DBInfo dbi; // Remove the trailing 4 characters - QString dbname = (*i); + TQString dbname = (*i); dbname.remove(dbname.length()-4,4); - QString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb"))); + TQString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb"))); Q_ASSERT(dbname == dbnamecheck); if (PilotLocalDatabase::infoFromFile( path + CSL1("/") + (*i), &dbi)) @@ -118,7 +118,7 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private & } -KPilotLocalLink::KPilotLocalLink( QObject *parent, const char *name ) : +KPilotLocalLink::KPilotLocalLink( TQObject *parent, const char *name ) : KPilotLink(parent,name), fReady(false), d( new Private ) @@ -132,7 +132,7 @@ KPilotLocalLink::~KPilotLocalLink() KPILOT_DELETE(d); } -/* virtual */ QString KPilotLocalLink::statusString() const +/* virtual */ TQString KPilotLocalLink::statusString() const { return fReady ? CSL1("Ready") : CSL1("Waiting") ; } @@ -142,7 +142,7 @@ KPilotLocalLink::~KPilotLocalLink() return fReady; } -/* virtual */ void KPilotLocalLink::reset( const QString &p ) +/* virtual */ void KPilotLocalLink::reset( const TQString &p ) { FUNCTIONSETUP; fPath = p; @@ -152,12 +152,12 @@ KPilotLocalLink::~KPilotLocalLink() /* virtual */ void KPilotLocalLink::reset() { FUNCTIONSETUP; - QFileInfo info( fPath ); + TQFileInfo info( fPath ); fReady = !fPath.isEmpty() && info.exists() && info.isDir() ; if (fReady) { findAvailableDatabases(*d, fPath); - QTimer::singleShot(500,this,SLOT(ready())); + TQTimer::singleShot(500,this,TQT_SLOT(ready())); } else { @@ -235,7 +235,7 @@ KPilotLocalLink::~KPilotLocalLink() return -1; } - QString desiredName = Pilot::fromPilot(name); + TQString desiredName = Pilot::fromPilot(name); DEBUGKPILOT << fname << ": Looking for DB " << desiredName << endl; for ( DatabaseDescriptorList::ConstIterator i = d->fDBs.at(index); i != d->fDBs.end(); ++i) @@ -260,19 +260,19 @@ KPilotLocalLink::~KPilotLocalLink() return -1; } -/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(QString const &s) +/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(TQString const &s) { FUNCTIONSETUP; DEBUGKPILOT << fname << ": " << s << endl ; } -/* virtual */ bool KPilotLocalLink::installFile(QString const &path, bool deletefile) +/* virtual */ bool KPilotLocalLink::installFile(TQString const &path, bool deletefile) { FUNCTIONSETUP; - QFileInfo srcInfo(path); - QString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ; - QString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName(); + TQFileInfo srcInfo(path); + TQString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ; + TQString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName(); if (canonicalSrcPath == canonicalDstPath) { @@ -293,18 +293,18 @@ KPilotLocalLink::~KPilotLocalLink() return true; } -/* virtual */ bool KPilotLocalLink::retrieveDatabase( const QString &path, struct DBInfo *db ) +/* virtual */ bool KPilotLocalLink::retrieveDatabase( const TQString &path, struct DBInfo *db ) { FUNCTIONSETUP; - QString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ; - QString sourcefile = fPath + CSL1("/") + dbname ; - QString destfile = path ; + TQString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ; + TQString sourcefile = fPath + CSL1("/") + dbname ; + TQString destfile = path ; DEBUGKPILOT << fname << ": src=" << sourcefile << endl; DEBUGKPILOT << fname << ": dst=" << destfile << endl; - QFile in( sourcefile ); + TQFile in( sourcefile ); if ( !in.exists() ) { WARNINGKPILOT << "Source file " << sourcefile << " doesn't exist." << endl; @@ -316,7 +316,7 @@ KPilotLocalLink::~KPilotLocalLink() return false; } - QFile out( destfile ); + TQFile out( destfile ); if ( !out.open( IO_WriteOnly | IO_Truncate | IO_Raw ) ) { WARNINGKPILOT << "Can't write destination file " << destfile << endl; @@ -350,7 +350,7 @@ KPilotLink::DBInfoList KPilotLocalLink::getDBList( int, int ) } -/* virtual */ PilotDatabase *KPilotLocalLink::database( const QString &name ) +/* virtual */ PilotDatabase *KPilotLocalLink::database( const TQString &name ) { FUNCTIONSETUP; return new PilotLocalDatabase( fPath, name ); diff --git a/kpilot/lib/kpilotlocallink.h b/kpilot/lib/kpilotlocallink.h index f18556b3c..ca37bb57d 100644 --- a/kpilot/lib/kpilotlocallink.h +++ b/kpilot/lib/kpilotlocallink.h @@ -44,12 +44,12 @@ class KDE_EXPORT KPilotLocalLink : public KPilotLink { Q_OBJECT public: - KPilotLocalLink( QObject *parent=0L, const char *name=0L ); + KPilotLocalLink( TQObject *parent=0L, const char *name=0L ); virtual ~KPilotLocalLink(); - virtual QString statusString() const; + virtual TQString statusString() const; virtual bool isConnected() const; - virtual void reset( const QString & ); + virtual void reset( const TQString & ); virtual void close(); virtual void reset(); virtual bool tickle(); @@ -59,16 +59,16 @@ public: virtual int getNextDatabase(int index,struct DBInfo *); virtual int findDatabase(const char *name, struct DBInfo*, int index=0, unsigned long type=0, unsigned long creator=0); - virtual bool retrieveDatabase(const QString &path, struct DBInfo *db); + virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db); virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM); - virtual PilotDatabase *database( const QString &name ); + virtual PilotDatabase *database( const TQString &name ); public slots: void ready(); protected: - virtual bool installFile(const QString &, const bool deleteFile); - virtual void addSyncLogEntryImpl( const QString &s ); + virtual bool installFile(const TQString &, const bool deleteFile); + virtual void addSyncLogEntryImpl( const TQString &s ); virtual int pilotSocket() const { return -1; @@ -76,7 +76,7 @@ protected: protected: bool fReady; - QString fPath; + TQString fPath; class Private; Private *d; @@ -87,7 +87,7 @@ protected: * * @return Number of database in @p path. */ - unsigned int findAvailableDatabases( Private &, const QString &path ); + unsigned int findAvailableDatabases( Private &, const TQString &path ); } ; diff --git a/kpilot/lib/options.cc b/kpilot/lib/options.cc index 0eb1babf7..be2b5e6e2 100644 --- a/kpilot/lib/options.cc +++ b/kpilot/lib/options.cc @@ -33,7 +33,7 @@ #include <iostream> -#include <qsize.h> +#include <tqsize.h> #include <kconfig.h> #include <kdebug.h> @@ -55,11 +55,11 @@ static const char debug_spaces[61] = " "; -QString rtExpand(const QString &s, Qt::TextFormat richText) +TQString rtExpand(const TQString &s, Qt::TextFormat richText) { if (richText == Qt::RichText) { - QString t(s); + TQString t(s); return t.replace(CSL1("\n"), CSL1("<br/>\n")); } else @@ -69,17 +69,17 @@ QString rtExpand(const QString &s, Qt::TextFormat richText) } -QDateTime readTm(const struct tm &t) +TQDateTime readTm(const struct tm &t) { - QDateTime dt; - dt.setDate(QDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday)); - dt.setTime(QTime(t.tm_hour, t.tm_min, t.tm_sec)); + TQDateTime dt; + dt.setDate(TQDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday)); + dt.setTime(TQTime(t.tm_hour, t.tm_min, t.tm_sec)); return dt; } -struct tm writeTm(const QDateTime &dt) +struct tm writeTm(const TQDateTime &dt) { struct tm t; @@ -102,9 +102,9 @@ struct tm writeTm(const QDateTime &dt) -struct tm writeTm(const QDate &d) +struct tm writeTm(const TQDate &d) { - QDateTime dt(d); + TQDateTime dt(d); return writeTm(dt); } diff --git a/kpilot/lib/options.h b/kpilot/lib/options.h index 6e036e82d..9fe0f8be2 100644 --- a/kpilot/lib/options.h +++ b/kpilot/lib/options.h @@ -36,9 +36,9 @@ #include "config.h" -#include <qglobal.h> -#include <qnamespace.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqnamespace.h> +#include <tqstring.h> #if (QT_VERSION < 0x030300) #error "This is KPilot for KDE3.5 and won't compile with Qt < 3.3.0" @@ -61,9 +61,9 @@ #include <iostream> using namespace std; -inline std::ostream& operator <<(std::ostream &o, const QString &s) +inline std::ostream& operator <<(std::ostream &o, const TQString &s) { if (s.isEmpty()) return o<<"<empty>"; else return o<<s.latin1(); } -inline std::ostream& operator <<(std::ostream &o, const QCString &s) +inline std::ostream& operator <<(std::ostream &o, const TQCString &s) { if (s.isEmpty()) return o<<"<empty>"; else return o << *s; } @@ -144,19 +144,19 @@ inline std::ostream& operator <<(std::ostream &o, const KPilotDepthCount &d) // Function to expand newlines in rich text to <br>\n -QString rtExpand(const QString &s, Qt::TextFormat richText); +TQString rtExpand(const TQString &s, Qt::TextFormat richText); /** * Convert a struct tm from the pilot-link package to a QDateTime */ -KDE_EXPORT QDateTime readTm(const struct tm &t); +KDE_EXPORT TQDateTime readTm(const struct tm &t); /** - * Convert a QDateTime to a struct tm for use with the pilot-link package + * Convert a TQDateTime to a struct tm for use with the pilot-link package */ -KDE_EXPORT struct tm writeTm(const QDateTime &dt); -KDE_EXPORT struct tm writeTm(const QDate &dt); +KDE_EXPORT struct tm writeTm(const TQDateTime &dt); +KDE_EXPORT struct tm writeTm(const TQDate &dt); // Some layout macros @@ -180,7 +180,7 @@ KDE_EXPORT struct tm writeTm(const QDate &dt); // variant is to handle plurals and is wrong, but unavoidable. // // -#define TODO_I18N(a) QString::fromLatin1(a) +#define TODO_I18N(a) TQString::fromLatin1(a) #define TODO_I18N_P(a,b,c) ((c>1) ? a : b) // Handle some cases for QT_NO_CAST_ASCII and NO_ASCII_CAST. @@ -194,6 +194,6 @@ KDE_EXPORT struct tm writeTm(const QDate &dt); // with constant strings. // // -#define CSL1(a) QString::fromLatin1(a "") +#define CSL1(a) TQString::fromLatin1(a "") #endif diff --git a/kpilot/lib/pilot.cc b/kpilot/lib/pilot.cc index 2585445c1..6a1267a9b 100644 --- a/kpilot/lib/pilot.cc +++ b/kpilot/lib/pilot.cc @@ -31,8 +31,8 @@ #include "options.h" -#include <qtextcodec.h> -#include <qmutex.h> +#include <tqtextcodec.h> +#include <tqmutex.h> #include <kcharsets.h> #include <kglobal.h> @@ -44,41 +44,41 @@ namespace Pilot { -static QTextCodec *codec = 0L; -static QMutex* mutex = 0L; +static TQTextCodec *codec = 0L; +static TQMutex* mutex = 0L; -QString fromPilot( const char *c, int len ) +TQString fromPilot( const char *c, int len ) { mutex->lock(); - QString str = codec->toUnicode(c,len); + TQString str = codec->toUnicode(c,len); mutex->unlock(); return str; } -QString fromPilot( const char *c ) +TQString fromPilot( const char *c ) { mutex->lock(); - QString str = codec->toUnicode(c); + TQString str = codec->toUnicode(c); mutex->unlock(); return str; } -QCString toPilot( const QString &s ) +TQCString toPilot( const TQString &s ) { mutex->lock(); - QCString str = codec->fromUnicode(s); + TQCString str = codec->fromUnicode(s); mutex->unlock(); return str; } -int toPilot( const QString &s, char *buf, int len) +int toPilot( const TQString &s, char *buf, int len) { mutex->lock(); // See toPilot() below. memset( buf, 0, len ); int used = len; - QCString cbuf = codec->fromUnicode(s,used); + TQCString cbuf = codec->fromUnicode(s,used); if (used > len) { used=len; @@ -88,7 +88,7 @@ int toPilot( const QString &s, char *buf, int len) return used; } -int toPilot( const QString &s, unsigned char *buf, int len) +int toPilot( const TQString &s, unsigned char *buf, int len) { mutex->lock(); // Clear the buffer @@ -96,7 +96,7 @@ int toPilot( const QString &s, unsigned char *buf, int len) // Convert to 8-bit encoding int used = len; - QCString cbuf = codec->fromUnicode(s,used); + TQCString cbuf = codec->fromUnicode(s,used); // Will it fit in the buffer? if (used > len) @@ -113,12 +113,12 @@ int toPilot( const QString &s, unsigned char *buf, int len) return used; } -bool setupPilotCodec(const QString &s) +bool setupPilotCodec(const TQString &s) { FUNCTIONSETUP; - mutex = new QMutex(); + mutex = new TQMutex(); mutex->lock(); - QString encoding(KGlobal::charsets()->encodingForName(s)); + TQString encoding(KGlobal::charsets()->encodingForName(s)); DEBUGKPILOT << fname << ": Using codec name " << s << endl; DEBUGKPILOT << fname << ": Creating codec " << encoding << endl; @@ -135,20 +135,20 @@ bool setupPilotCodec(const QString &s) return codec; } -QString codecName() +TQString codecName() { - return QString::fromLatin1(codec->name()); + return TQString::fromLatin1(codec->name()); } -QString category(const struct CategoryAppInfo *info, unsigned int i) +TQString category(const struct CategoryAppInfo *info, unsigned int i) { if (!info || (i>=CATEGORY_COUNT)) { - return QString::null; + return TQString::null; } mutex->lock(); - QString str = codec->toUnicode(info->name[i], + TQString str = codec->toUnicode(info->name[i], MIN(strlen(info->name[i]), CATEGORY_SIZE-1)); mutex->unlock(); return str; @@ -156,7 +156,7 @@ QString category(const struct CategoryAppInfo *info, unsigned int i) int findCategory(const struct CategoryAppInfo *info, - const QString &selectedCategory, + const TQString &selectedCategory, bool unknownIsUnfiled) { FUNCTIONSETUP; @@ -194,7 +194,7 @@ int findCategory(const struct CategoryAppInfo *info, } int insertCategory(struct CategoryAppInfo *info, - const QString &label, + const TQString &label, bool unknownIsUnfiled) { FUNCTIONSETUP; diff --git a/kpilot/lib/pilot.h b/kpilot/lib/pilot.h index d4fec82b2..3ac2918bd 100644 --- a/kpilot/lib/pilot.h +++ b/kpilot/lib/pilot.h @@ -35,9 +35,9 @@ #include <pi-buffer.h> #include <pi-dlp.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include "pilotLinkVersion.h" @@ -77,38 +77,38 @@ namespace Pilot /** Maximum size (in bytes) of a record's data */ static const int MAX_RECORD_SIZE = 65535; - typedef QValueList<recordid_t> RecordIDList; + typedef TQValueList<recordid_t> RecordIDList; /** Static translation function that maps handheld native (8 bit, * usually latin1 but sometimes someting else) encoded data to * a Unicode string. Converts the @p len characters in @p c * to a Unicode string. */ - QString fromPilot( const char *c, int len ); + TQString fromPilot( const char *c, int len ); /** Static translation function mapping a NUL-terminated * string from the handheld's encoding to UTF-8. * @param c the NUL-terminated string to decode - * @return QString (UTF-8) value of @p c + * @return TQString (UTF-8) value of @p c * @note NUL-terminated strings are rare on the handheld. */ - QString fromPilot( const char *c ); + TQString fromPilot( const char *c ); - /** Static translation function that maps a QString onto the + /** Static translation function that maps a TQString onto the * native 8 bit encoding of the handheld. Writes the result into * the buffer @p buf which has size @p len. Returns the length * of the result. Zero-fills the buffer as needed. */ - int toPilot( const QString &s, char *buf, int len); - int toPilot( const QString &s, unsigned char *buf, int len); + int toPilot( const TQString &s, char *buf, int len); + int toPilot( const TQString &s, unsigned char *buf, int len); - /** Static translation function that maps a QString onto the + /** Static translation function that maps a TQString onto the * native 8 bit encoding of the handheld. * * @param s String to encode * @return Encoded string in a QCString */ - QCString toPilot( const QString &s ); + TQCString toPilot( const TQString &s ); /** Create a codec for translating handheld native 8 bit to Unicode, * using the given codec @p name -- this will often be latin1, but @@ -117,10 +117,10 @@ namespace Pilot * * @return @c true on success, @c false otherwise */ - bool setupPilotCodec(const QString &name); + bool setupPilotCodec(const TQString &name); /** Returns the name of the codec being used. */ - QString codecName(); + TQString codecName(); /** For debugging, display category names for the given AppInfo * structure. Called by dump(). You must pass a valid reference. @@ -140,12 +140,12 @@ namespace Pilot return ((unsigned int)c<CATEGORY_COUNT); } - /** Returns the QString for the requested category @p i - * in the category structure @p info. Returns @c QString::null + /** Returns the TQString for the requested category @p i + * in the category structure @p info. Returns @c TQString::null * on error (bad pointer or bad category number). May also - * return @c QString::null if the category name is empty. + * return @c TQString::null if the category name is empty. */ - inline QString categoryName(const struct CategoryAppInfo *info, unsigned int i) + inline TQString categoryName(const struct CategoryAppInfo *info, unsigned int i) { if ( ( i < CATEGORY_COUNT ) && ( info->name[i][0] ) ) { @@ -157,7 +157,7 @@ namespace Pilot } else { - return QString::null; + return TQString::null; } } @@ -166,16 +166,16 @@ namespace Pilot * all sixteen categories -- empty category names on the * handheld are skipped. */ - inline QStringList categoryNames(const struct CategoryAppInfo *info) + inline TQStringList categoryNames(const struct CategoryAppInfo *info) { - QStringList l; + TQStringList l; if (!info) { return l; } for (unsigned int i=0; i<CATEGORY_COUNT; ++i) { - QString s = categoryName(info,i); + TQString s = categoryName(info,i); if (!s.isEmpty()) { l.append(s); @@ -198,7 +198,7 @@ namespace Pilot * @p unknownIsUnfiled is true. * */ - int findCategory(const struct CategoryAppInfo *info, const QString &name, bool unknownIsUnfiled); + int findCategory(const struct CategoryAppInfo *info, const TQString &name, bool unknownIsUnfiled); /** Search for the given category @p name in the list * of categories; returns the category number. If @p unknownIsUnfiled @@ -218,7 +218,7 @@ namespace Pilot * are all full. * */ - int insertCategory(struct CategoryAppInfo *info, const QString &label, bool unknownIsUnfiled); + int insertCategory(struct CategoryAppInfo *info, const TQString &label, bool unknownIsUnfiled); /** The handheld also holds data about each database * in a DBInfo structure; check if the database described diff --git a/kpilot/lib/pilotAddress.cc b/kpilot/lib/pilotAddress.cc index 418c705b4..f12e9cc50 100644 --- a/kpilot/lib/pilotAddress.cc +++ b/kpilot/lib/pilotAddress.cc @@ -35,8 +35,8 @@ #include <stdlib.h> #include <assert.h> -#include <qnamespace.h> -#include <qstringlist.h> +#include <tqnamespace.h> +#include <tqstringlist.h> #include "pilotAddress.h" @@ -91,7 +91,7 @@ void PilotAddressInfo::resetToDefault() } } -QString PilotAddressInfo::phoneLabel(EPhoneType i) const +TQString PilotAddressInfo::phoneLabel(EPhoneType i) const { if (i<=eMobile) { @@ -99,7 +99,7 @@ QString PilotAddressInfo::phoneLabel(EPhoneType i) const } else { - return QString(); + return TQString(); } } @@ -169,9 +169,9 @@ unsigned int PhoneSlot::toField() const } } -PhoneSlot::operator QString() const +PhoneSlot::operator TQString() const { - return QString("%1,%2").arg(toOffset()).arg(toField()); + return TQString("%1,%2").arg(toOffset()).arg(toField()); } #define MAXFIELDS 19 @@ -273,13 +273,13 @@ PilotAddress::~PilotAddress() free_Address(&fAddressInfo); } -QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const +TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const { - QString text, tmp; + TQString text, tmp; - QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString(); - QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); - QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); + TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString(); + TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); + TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); // title + name text += par; @@ -290,11 +290,11 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te } tmp = richText ? CSL1("<b><big>%1 %2</big></b>") : CSL1("%1 %2"); - QString firstName = getField(entryFirstname); + TQString firstName = getField(entryFirstname); if (firstName.isEmpty()) { // So replace placeholder for first name (%1) with empty - tmp = tmp.arg(QString()); + tmp = tmp.arg(TQString()); } else { @@ -392,7 +392,7 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te // category if (info) { - QString categoryName = info->categoryName( category() ); + TQString categoryName = info->categoryName( category() ); if (!categoryName.isEmpty()) { text += par; @@ -413,16 +413,16 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te return text; } -QStringList PilotAddress::getEmails() const +TQStringList PilotAddress::getEmails() const { - QStringList list; + TQStringList list; for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i) { PilotAddressInfo::EPhoneType t = getPhoneType( i ); if ( t == PilotAddressInfo::eEmail ) { - QString s = getField(i.toField()); + TQString s = getField(i.toField()); if (!s.isEmpty()) { list.append(s); @@ -433,10 +433,10 @@ QStringList PilotAddress::getEmails() const return list; } -void PilotAddress::setEmails(const QStringList &list) +void PilotAddress::setEmails(const TQStringList &list) { FUNCTIONSETUPL(4); - QString test; + TQString test; // clear all e-mails first for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i ) @@ -444,14 +444,14 @@ void PilotAddress::setEmails(const QStringList &list) PilotAddressInfo::EPhoneType t = getPhoneType( i ); if (t == PilotAddressInfo::eEmail) { - setField(i.toField(), QString() ); + setField(i.toField(), TQString() ); } } - for(QStringList::ConstIterator listIter = list.begin(); + for(TQStringList::ConstIterator listIter = list.begin(); listIter != list.end(); ++listIter) { - QString email = *listIter; + TQString email = *listIter; if (!setPhoneField(PilotAddressInfo::eEmail, email, NoFlags).isValid()) { WARNINGKPILOT << "Email accounts overflowed, silently dropped." << endl; @@ -459,7 +459,7 @@ void PilotAddress::setEmails(const QStringList &list) } } -QString PilotAddress::getField(int field) const +TQString PilotAddress::getField(int field) const { if ( (entryLastname <= field) && (field <= entryNote) ) { @@ -467,7 +467,7 @@ QString PilotAddress::getField(int field) const } else { - return QString(); + return TQString(); } } @@ -487,7 +487,7 @@ PhoneSlot PilotAddress::_getNextEmptyPhoneSlot() const } PhoneSlot PilotAddress::setPhoneField(PilotAddressInfo::EPhoneType type, - const QString &field, + const TQString &field, PhoneHandlingFlags flags) { FUNCTIONSETUPL(4); @@ -531,7 +531,7 @@ PhoneSlot PilotAddress::_findPhoneFieldSlot(PilotAddressInfo::EPhoneType t) cons return PhoneSlot(); } -QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const +TQString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const { FUNCTIONSETUPL(4); PhoneSlot fieldSlot = _findPhoneFieldSlot(type); @@ -541,7 +541,7 @@ QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const return getField(fieldSlot.toField()); } - return QString(); + return TQString(); } PhoneSlot PilotAddress::getShownPhone() const @@ -599,7 +599,7 @@ PilotAddressInfo::EPhoneType PilotAddress::getPhoneType( const PhoneSlot &field } } -void PilotAddress::setField(int field, const QString &text) +void PilotAddress::setField(int field, const TQString &text) { FUNCTIONSETUPL(4); // This will have either been created with unpack_Address, and/or will diff --git a/kpilot/lib/pilotAddress.h b/kpilot/lib/pilotAddress.h index d6dd20e45..5bd0a1e0c 100644 --- a/kpilot/lib/pilotAddress.h +++ b/kpilot/lib/pilotAddress.h @@ -33,7 +33,7 @@ #include <pi-macros.h> #include <pi-address.h> -#include <qnamespace.h> +#include <tqnamespace.h> #include "pilotRecord.h" #include "pilotAppInfo.h" @@ -119,7 +119,7 @@ public: return (entryPhone1 <= i) && (i <= entryPhone5); } - operator QString() const; + operator TQString() const; private: int i; } ; @@ -150,7 +150,7 @@ public: eNone=-1 } ; - QString phoneLabel(EPhoneType i) const; + TQString phoneLabel(EPhoneType i) const; } ; /** @brief A wrapper class around the Address struct provided by pi-address.h @@ -202,7 +202,7 @@ public: * is used to figure out the phone labels; if it is NULL then bogus labels are * used to identify phone types. */ - QString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const; + TQString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const; /** * @param text set the field value @@ -215,9 +215,9 @@ public: * entryTitle, entryCustom1, entryCustom2, entryCustom3, entryCustom4, * entryNote }; */ - void setField(int field, const QString &text); + void setField(int field, const TQString &text); /** Set a field @p i to a given text value. Uses the phone slots only. */ - void setField(const PhoneSlot &i, const QString &t) + void setField(const PhoneSlot &i, const TQString &t) { if (i.isValid()) { @@ -225,22 +225,22 @@ public: } } - /** Returns the text value of a given field @p field (or QString::null + /** Returns the text value of a given field @p field (or TQString::null * if there is no such field). */ - QString getField(int field) const; + TQString getField(int field) const; /** Returns the value of the phone field @p i . */ - QString getField(const PhoneSlot &i) const + TQString getField(const PhoneSlot &i) const { - return i.isValid() ? getField(i.toField()) : QString(); + return i.isValid() ? getField(i.toField()) : TQString(); } /** * Return list of all email addresses. This will search through our "phone" * fields and will return only those which are e-mail addresses. */ - QStringList getEmails() const; - void setEmails(const QStringList &emails); + TQStringList getEmails() const; + void setEmails(const TQStringList &emails); enum PhoneHandlingFlags { @@ -254,7 +254,7 @@ public: * for extra phone fields * @return the field associated with the type */ - QString getPhoneField(PilotAddressInfo::EPhoneType type) const; + TQString getPhoneField(PilotAddressInfo::EPhoneType type) const; /** * @param type is the type of phone @@ -265,7 +265,7 @@ public: * with the field, else it will always search for the first available slot * @return index of the field that this information was set to */ - PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const QString &value, PhoneHandlingFlags flags); + PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const TQString &value, PhoneHandlingFlags flags); /** * Returns the slot of the phone number diff --git a/kpilot/lib/pilotAppInfo.cc b/kpilot/lib/pilotAppInfo.cc index e8caf6234..5edc57160 100644 --- a/kpilot/lib/pilotAppInfo.cc +++ b/kpilot/lib/pilotAppInfo.cc @@ -62,7 +62,7 @@ PilotAppInfoBase::~PilotAppInfoBase() } } -bool PilotAppInfoBase::setCategoryName(unsigned int i, const QString &s) +bool PilotAppInfoBase::setCategoryName(unsigned int i, const TQString &s) { if ( (i>=Pilot::CATEGORY_COUNT) || // bad category number (!categoryInfo())) // Nowhere to write to diff --git a/kpilot/lib/pilotAppInfo.h b/kpilot/lib/pilotAppInfo.h index d5db9e358..b14cf0ace 100644 --- a/kpilot/lib/pilotAppInfo.h +++ b/kpilot/lib/pilotAppInfo.h @@ -96,15 +96,15 @@ public: return fLen; } ; - /** @see findCategory(const QString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */ - inline int findCategory(const QString &name, bool unknownIsUnfiled = false) const + /** @see findCategory(const TQString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */ + inline int findCategory(const TQString &name, bool unknownIsUnfiled = false) const { return Pilot::findCategory(fC,name,unknownIsUnfiled); } ; - /** Gets a single category name. Returns QString::null if there is no + /** Gets a single category name. Returns TQString::null if there is no * such category number @p i . */ - inline QString categoryName(unsigned int i) const + inline TQString categoryName(unsigned int i) const { return Pilot::categoryName(fC,i); } @@ -113,7 +113,7 @@ public: * on failure, e.g. the index @p i was out of range or the category name * was invalid. Category names that are too long are truncated to 15 characters. */ - bool setCategoryName(unsigned int i, const QString &s); + bool setCategoryName(unsigned int i, const TQString &s); /** For debugging, display all the category names */ inline void dump() const diff --git a/kpilot/lib/pilotDatabase.cc b/kpilot/lib/pilotDatabase.cc index fd568b703..cc65895e7 100644 --- a/kpilot/lib/pilotDatabase.cc +++ b/kpilot/lib/pilotDatabase.cc @@ -34,7 +34,7 @@ #include <time.h> // Needed by pilot-link include #include <pi-appinfo.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kglobal.h> @@ -42,9 +42,9 @@ #include "pilotRecord.h" static int creationCount = 0; -static QStringList *createdNames = 0L; +static TQStringList *createdNames = 0L; -PilotDatabase::PilotDatabase(const QString &s) : +PilotDatabase::PilotDatabase(const TQString &s) : fDBOpen(false), fName(s) { @@ -52,7 +52,7 @@ PilotDatabase::PilotDatabase(const QString &s) : creationCount++; if (!createdNames) { - createdNames = new QStringList(); + createdNames = new TQStringList(); } createdNames->append(s.isEmpty() ? CSL1("<empty>") : s); } diff --git a/kpilot/lib/pilotDatabase.h b/kpilot/lib/pilotDatabase.h index 84c922ed4..82a6431d7 100644 --- a/kpilot/lib/pilotDatabase.h +++ b/kpilot/lib/pilotDatabase.h @@ -50,11 +50,11 @@ class KDE_EXPORT PilotDatabase { public: - PilotDatabase(const QString &name = QString::null); + PilotDatabase(const TQString &name = TQString::null); virtual ~PilotDatabase(); - QString name() const { return fName; } ; + TQString name() const { return fName; } ; /** * Debugging information: tally how many databases are created @@ -90,7 +90,7 @@ public: */ virtual unsigned int recordCount() const=0; - /** Returns a QValueList of all record ids in the database. + /** Returns a TQValueList of all record ids in the database. This implementation is really bad. */ virtual Pilot::RecordIDList idList(); @@ -146,7 +146,7 @@ public: * the database. Serial databases get Pilot:, local * databases return the full path. */ - virtual QString dbPathName() const = 0; + virtual TQString dbPathName() const = 0; /** * Use this instead of RTTI to determine the type of a @@ -170,7 +170,7 @@ protected: private: bool fDBOpen; - QString fName; + TQString fName; }; /** A template class for reading and interpreting a database. This removes diff --git a/kpilot/lib/pilotDateEntry.cc b/kpilot/lib/pilotDateEntry.cc index 4fa93eac6..d7844b897 100644 --- a/kpilot/lib/pilotDateEntry.cc +++ b/kpilot/lib/pilotDateEntry.cc @@ -31,9 +31,9 @@ #include <stdlib.h> -#include <qdatetime.h> -#include <qnamespace.h> -#include <qregexp.h> +#include <tqdatetime.h> +#include <tqnamespace.h> +#include <tqregexp.h> #include <kglobal.h> @@ -160,12 +160,12 @@ PilotDateEntry & PilotDateEntry::operator = (const PilotDateEntry & e) } // end of assignment operator -QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) +TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) { - QString text, tmp; - QString par = (richText==Qt::RichText) ?CSL1("<p>"):QString::null; - QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); - QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); + TQString text, tmp; + TQString par = (richText==Qt::RichText) ?CSL1("<p>"):TQString::null; + TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); + TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); // title + name text += par; @@ -173,8 +173,8 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) text += tmp.arg(rtExpand(getDescription(), richText)); text += ps; - QDateTime dt(readTm(getEventStart())); - QString startDate(dt.toString(Qt::LocalDate)); + TQDateTime dt(readTm(getEventStart())); + TQString startDate(dt.toString(Qt::LocalDate)); text+=par; text+=i18n("Start date: %1").arg(startDate); text+=ps; @@ -188,7 +188,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) else { dt=readTm(getEventEnd()); - QString endDate(dt.toString(Qt::LocalDate)); + TQString endDate(dt.toString(Qt::LocalDate)); text+=par; text+=i18n("End date: %1").arg(endDate); text+=ps; @@ -204,7 +204,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) case advMinutes: tmp=tmp.arg(i18n("minutes")); break; case advHours: tmp=tmp.arg(i18n("hours")); break; case advDays: tmp=tmp.arg(i18n("days")); break; - default: tmp=tmp.arg(QString::null); break;; + default: tmp=tmp.arg(TQString::null); break;; } text+=tmp; text+=ps; @@ -224,7 +224,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) case repeatMonthlyByDay: case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break; case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break; - default: tmp=tmp.arg(QString::null); break; + default: tmp=tmp.arg(TQString::null); break; } text+=tmp; text+=br; @@ -244,7 +244,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) if (getRepeatType()==repeatMonthlyByDay) text+=i18n("Repeating on the i-th day of week j")+br; if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br; // TODO: show the dayArray when repeating weekly - /*QBitArray dayArray(7); + /*TQBitArray dayArray(7); if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays const int *days = dateEntry->getRepeatDays(); // Rotate the days of the week, since day numbers on the Pilot and @@ -263,7 +263,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) text+=i18n("Exceptions:")+br; for (int i = 0; i < getExceptionCount(); i++) { - QDate exdt=readTm(getExceptions()[i]).date(); + TQDate exdt=readTm(getExceptions()[i]).date(); text+=exdt.toString(Qt::LocalDate); text+=br; } @@ -282,19 +282,19 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText) return text; } -QDateTime PilotDateEntry::dtStart() const +TQDateTime PilotDateEntry::dtStart() const { FUNCTIONSETUP; return readTm( getEventStart() ); } -QDateTime PilotDateEntry::dtEnd() const +TQDateTime PilotDateEntry::dtEnd() const { FUNCTIONSETUP; return readTm( getEventEnd() ); } -QDateTime PilotDateEntry::dtRepeatEnd() const +TQDateTime PilotDateEntry::dtRepeatEnd() const { FUNCTIONSETUP; return readTm( getRepeatEnd() ); @@ -402,25 +402,25 @@ void PilotDateEntry::setNoteP(const char *note, int l) } } -void PilotDateEntry::setNote(const QString &s) +void PilotDateEntry::setNote(const TQString &s) { - QCString t = Pilot::toPilot(s); + TQCString t = Pilot::toPilot(s); setNoteP( t.data(),t.length() ); } -void PilotDateEntry::setLocation(const QString &s) +void PilotDateEntry::setLocation(const TQString &s) { - QString note = Pilot::fromPilot(getNoteP()); - QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n"); + TQString note = Pilot::fromPilot(getNoteP()); + TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); - // per QString docs, this covers null and 0 length + // per TQString docs, this covers null and 0 length if( s.isEmpty() ) { note.replace(rxp,""); } else { - QString location = "Location: " + s + "\n"; + TQString location = "Location: " + s + "\n"; int pos = note.find(rxp); if(pos >= 0) @@ -435,18 +435,18 @@ void PilotDateEntry::setLocation(const QString &s) } } -QString PilotDateEntry::getLocation() const +TQString PilotDateEntry::getLocation() const { // Read the complete note here and not the filtered // one from PilotDateEntry::getNote(); - QString note = Pilot::fromPilot(getNoteP()); - QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n"); + TQString note = Pilot::fromPilot(getNoteP()); + TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); int pos = note.find(rxp, 0); if(pos >= 0) { - QString location = rxp.capturedTexts().first(); - rxp = QRegExp("^[Ll]ocation:[\\s|\t]*"); + TQString location = rxp.capturedTexts().first(); + rxp = TQRegExp("^[Ll]ocation:[\\s|\t]*"); location.replace(rxp,""); location.replace("\n", ""); return location; @@ -457,21 +457,21 @@ QString PilotDateEntry::getLocation() const } } -void PilotDateEntry::setDescription(const QString &s) +void PilotDateEntry::setDescription(const TQString &s) { - QCString t = Pilot::toPilot(s); + TQCString t = Pilot::toPilot(s); setDescriptionP( t.data(),t.length() ); } -QString PilotDateEntry::getNote() const +TQString PilotDateEntry::getNote() const { - QString note = Pilot::fromPilot(getNoteP()); - QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n"); + TQString note = Pilot::fromPilot(getNoteP()); + TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); note.replace(rxp, "" ); return note; } -QString PilotDateEntry::getDescription() const +TQString PilotDateEntry::getDescription() const { return Pilot::fromPilot(getDescriptionP()); } diff --git a/kpilot/lib/pilotDateEntry.h b/kpilot/lib/pilotDateEntry.h index d9d5db2a6..43601013d 100644 --- a/kpilot/lib/pilotDateEntry.h +++ b/kpilot/lib/pilotDateEntry.h @@ -34,9 +34,9 @@ #include <pi-macros.h> #include <pi-datebook.h> -#include <qbitarray.h> -#include <qdatetime.h> -#include <qnamespace.h> +#include <tqbitarray.h> +#include <tqdatetime.h> +#include <tqnamespace.h> #include "pilotRecord.h" #include "pilotAppInfo.h" @@ -94,7 +94,7 @@ public: * If @p richText is true, then the text representation uses qt style * tags as well. */ - QString getTextRepresentation(Qt::TextFormat richText); + TQString getTextRepresentation(Qt::TextFormat richText); /** Is this appointment a "floating" appointment? * @@ -151,7 +151,7 @@ public: * Floating appointments are those that have a day assigned, but no time * in that day (birthday appointments are like that). */ - QDateTime dtStart() const; + TQDateTime dtStart() const; /** Get the end time of this appointment. See dtEnd() for caveats. */ inline struct tm getEventEnd() const @@ -177,7 +177,7 @@ public: * Floating appointments are those that have a day assigned, but no time * in that day (birthday appointments are like that). */ - QDateTime dtEnd() const; + TQDateTime dtEnd() const; /** Does this appointment have an alarm set? On the Pilot, an event * may have an alarm (or not). If it has one, it is also enabled and @@ -235,7 +235,7 @@ public: /** Returns the absolute date and time that the alarm should sound for * this appointment. */ - inline QDateTime dtAlarm() const + inline TQDateTime dtAlarm() const { return dtStart().addSecs(-alarmLeadTime()); } @@ -271,7 +271,7 @@ public: /** Returns the date and time that the repeat ends. If there is no repeat, * returns an invalid date and time. */ - QDateTime dtRepeatEnd() const; + TQDateTime dtRepeatEnd() const; inline int getRepeatFrequency() const { @@ -302,7 +302,7 @@ public: fAppointmentInfo.repeatDays[i] = rd[i]; } } - inline void setRepeatDays(QBitArray rba) + inline void setRepeatDays(TQBitArray rba) { for (int i = 0; i < 7; i++) { @@ -329,17 +329,17 @@ public: * entered in the day view on the handheld, and it is called the summary * in libkcal. */ - void setDescription(const QString &); + void setDescription(const TQString &); /** Gets the description of the appointment. See setDescription for meaning. */ - QString getDescription() const; + TQString getDescription() const; /** Sets the note for the appointment. The note is the long text entry * that is possible - but clumsy - on the handheld. It is called the * description in libkcal. */ - void setNote(const QString &); + void setNote(const TQString &); /** Gets the note for this appointment. See setNote for meaning. */ - QString getNote() const; + TQString getNote() const; /** * Sets the location for the appointment. For now it will be placed within @@ -348,10 +348,10 @@ public: * TODO: Make distinguish between handhelds that support the location field * and the ones that don't. (Shouldn't this be done in the pilot-link lib?) */ - void setLocation(const QString &); + void setLocation(const TQString &); /** Gets the location for this appointment. See setNote for meaning. */ - QString getLocation() const; + TQString getLocation() const; protected: void setDescriptionP(const char* desc, int l=-1); diff --git a/kpilot/lib/pilotLocalDatabase.cc b/kpilot/lib/pilotLocalDatabase.cc index 9f2d5e8a4..735632de7 100644 --- a/kpilot/lib/pilotLocalDatabase.cc +++ b/kpilot/lib/pilotLocalDatabase.cc @@ -38,11 +38,11 @@ #include <pi-file.h> -#include <qstring.h> -#include <qfile.h> -#include <qregexp.h> -#include <qdatetime.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqdatetime.h> +#include <tqvaluevector.h> #include <kdebug.h> #include <kglobal.h> @@ -52,7 +52,7 @@ #include "pilotRecord.h" #include "pilotLocalDatabase.h" -typedef QValueVector<PilotRecord *> Records; +typedef TQValueVector<PilotRecord *> Records; class PilotLocalDatabase::Private : public Records { @@ -81,8 +81,8 @@ public: int pending; } ; -PilotLocalDatabase::PilotLocalDatabase(const QString & path, - const QString & dbName, bool useDefaultPath) : +PilotLocalDatabase::PilotLocalDatabase(const TQString & path, + const TQString & dbName, bool useDefaultPath) : PilotDatabase(dbName), fPathName(path), fDBName(dbName), @@ -115,10 +115,10 @@ PilotLocalDatabase::PilotLocalDatabase(const QString & path, } -PilotLocalDatabase::PilotLocalDatabase(const QString &dbName) : - PilotDatabase( QString() ), - fPathName( QString() ), - fDBName( QString() ), +PilotLocalDatabase::PilotLocalDatabase(const TQString &dbName) : + PilotDatabase( TQString() ), + fPathName( TQString() ), + fDBName( TQString() ), fAppInfo(0L), fAppLen(0), d(0L) @@ -182,9 +182,9 @@ bool PilotLocalDatabase::createDatabase(long creator, long type, int, int flags, fDBInfo.version=version; fDBInfo.modnum=0; fDBInfo.index=0; - fDBInfo.createDate=(QDateTime::currentDateTime()).toTime_t(); - fDBInfo.modifyDate=(QDateTime::currentDateTime()).toTime_t(); - fDBInfo.backupDate=(QDateTime::currentDateTime()).toTime_t(); + fDBInfo.createDate=(TQDateTime::currentDateTime()).toTime_t(); + fDBInfo.modifyDate=(TQDateTime::currentDateTime()).toTime_t(); + fDBInfo.backupDate=(TQDateTime::currentDateTime()).toTime_t(); delete[] fAppInfo; fAppInfo=0L; @@ -205,9 +205,9 @@ int PilotLocalDatabase::deleteDatabase() closeDatabase(); } - QString dbpath=dbPathName(); - QFile fl(dbpath); - if (QFile::remove(dbPathName())) + TQString dbpath=dbPathName(); + TQFile fl(dbpath); + if (TQFile::remove(dbPathName())) { return 0; } @@ -269,11 +269,11 @@ unsigned int PilotLocalDatabase::recordCount() const } -// Returns a QValueList of all record ids in the database. -QValueList<recordid_t> PilotLocalDatabase::idList() +// Returns a TQValueList of all record ids in the database. +TQValueList<recordid_t> PilotLocalDatabase::idList() { int idlen=recordCount(); - QValueList<recordid_t> idlist; + TQValueList<recordid_t> idlist; if (idlen<=0) { return idlist; @@ -588,11 +588,11 @@ int PilotLocalDatabase::cleanup() return 0; } -QString PilotLocalDatabase::dbPathName() const +TQString PilotLocalDatabase::dbPathName() const { FUNCTIONSETUP; - QString tempName(fPathName); - QString slash = CSL1("/"); + TQString tempName(fPathName); + TQString slash = CSL1("/"); if (!tempName.endsWith(slash)) tempName += slash; tempName += getDBName(); @@ -608,10 +608,10 @@ void PilotLocalDatabase::openDatabase() setDBOpen(false); - dbFile = pi_file_open( QFile::encodeName(dbPathName()) ); + dbFile = pi_file_open( TQFile::encodeName(dbPathName()) ); if (dbFile == 0L) { - QString path = dbPathName(); + TQString path = dbPathName(); DEBUGKPILOT << fname << ": Failed to open " << path << endl; return; } @@ -665,13 +665,13 @@ void PilotLocalDatabase::closeDatabase() return; } - QString newName = dbPathName() + CSL1(".new"); - QString path = dbPathName(); + TQString newName = dbPathName() + CSL1(".new"); + TQString path = dbPathName(); DEBUGKPILOT << fname << ": Creating temp file " << newName << " for the database file " << path << endl; - dbFile = pi_file_create(QFile::encodeName(newName),&fDBInfo); + dbFile = pi_file_create(TQFile::encodeName(newName),&fDBInfo); pi_file_set_app_info(dbFile, fAppInfo, fAppLen); for (unsigned int i = 0; i < d->size(); i++) @@ -697,16 +697,16 @@ void PilotLocalDatabase::closeDatabase() } pi_file_close(dbFile); - QFile::remove(dbPathName()); - rename((const char *) QFile::encodeName(newName), - (const char *) QFile::encodeName(dbPathName())); + TQFile::remove(dbPathName()); + rename((const char *) TQFile::encodeName(newName), + (const char *) TQFile::encodeName(dbPathName())); setDBOpen(false); } -QString *PilotLocalDatabase::fPathBase = 0L; +TQString *PilotLocalDatabase::fPathBase = 0L; -void PilotLocalDatabase::setDBPath(const QString &s) +void PilotLocalDatabase::setDBPath(const TQString &s) { FUNCTIONSETUP; @@ -717,7 +717,7 @@ void PilotLocalDatabase::setDBPath(const QString &s) if (!fPathBase) { - fPathBase = new QString(s); + fPathBase = new TQString(s); } else { @@ -731,7 +731,7 @@ void PilotLocalDatabase::setDBPath(const QString &s) } -/* static */ bool PilotLocalDatabase::infoFromFile( const QString &path, DBInfo *d ) +/* static */ bool PilotLocalDatabase::infoFromFile( const TQString &path, DBInfo *d ) { FUNCTIONSETUP; @@ -741,12 +741,12 @@ void PilotLocalDatabase::setDBPath(const QString &s) { return false; } - if (!QFile::exists(path)) + if (!TQFile::exists(path)) { return false; } - QCString fileName = QFile::encodeName( path ); + TQCString fileName = TQFile::encodeName( path ); f = pi_file_open( fileName ); if (!f) { diff --git a/kpilot/lib/pilotLocalDatabase.h b/kpilot/lib/pilotLocalDatabase.h index c33455800..e5d11a63a 100644 --- a/kpilot/lib/pilotLocalDatabase.h +++ b/kpilot/lib/pilotLocalDatabase.h @@ -54,14 +54,14 @@ public: * the database cannot be found, no database is opened. It can then be * created explicitly at the specified location. */ - PilotLocalDatabase( const QString& path, - const QString& name, bool useDefaultPath=true); + PilotLocalDatabase( const TQString& path, + const TQString& name, bool useDefaultPath=true); /** * Opens the local database. This is primarily for testing * purposes; only tries the given path. */ - PilotLocalDatabase(const QString &name); + PilotLocalDatabase(const TQString &name); virtual ~PilotLocalDatabase(); @@ -85,8 +85,8 @@ public: virtual int writeAppBlock(unsigned char* buffer, int len); // returns the number of records in the database, 0 if not open virtual unsigned int recordCount() const; - // Returns a QValueList of all record ids in the database. - virtual QValueList<recordid_t> idList(); + // Returns a TQValueList of all record ids in the database. + virtual TQValueList<recordid_t> idList(); // Reads a record from database by id, returns record virtual PilotRecord* readRecordById(recordid_t id); // Reads a record from database, returns the record @@ -134,14 +134,14 @@ public: /** Return the name of the database (as it would be on the handheld). */ - QString getDBName() const { return fDBName; } + TQString getDBName() const { return fDBName; } /** * Returns the full path of the current database, based on * the path and dbname passed to the constructor, and including * the .pdb extension. */ - virtual QString dbPathName() const; + virtual TQString dbPathName() const; /** * Accessor functions for the application info block. @@ -166,7 +166,7 @@ public: * library doesn't provide a cheap way of getting this * information. */ - static bool infoFromFile( const QString &path, DBInfo *d ); + static bool infoFromFile( const TQString &path, DBInfo *d ); protected: // Changes any forward slashes to underscores @@ -176,7 +176,7 @@ protected: private: struct DBInfo fDBInfo; - QString fPathName,fDBName; + TQString fPathName,fDBName; char* fAppInfo; size_t fAppLen; @@ -189,13 +189,13 @@ public: * preferred one, too) try this path first before the default path. * Set statically so it's shared for all local databases. */ - static void setDBPath(const QString &); + static void setDBPath(const TQString &); /** * Accessor for the extra search path. */ - static const QString &getDBPath() { return *fPathBase; } ; + static const TQString &getDBPath() { return *fPathBase; } ; private: - static QString *fPathBase; + static TQString *fPathBase; }; #endif diff --git a/kpilot/lib/pilotMemo.cc b/kpilot/lib/pilotMemo.cc index 0ce09f8a7..946a995b1 100644 --- a/kpilot/lib/pilotMemo.cc +++ b/kpilot/lib/pilotMemo.cc @@ -28,7 +28,7 @@ #include "options.h" -#include <qnamespace.h> +#include <tqnamespace.h> #include "pilotMemo.h" #include "pilotDatabase.h" @@ -74,7 +74,7 @@ PilotRecord *PilotMemo::pack() } -QString PilotMemo::getTextRepresentation(Qt::TextFormat richText) +TQString PilotMemo::getTextRepresentation(Qt::TextFormat richText) { if (richText==Qt::RichText) { @@ -88,19 +88,19 @@ QString PilotMemo::getTextRepresentation(Qt::TextFormat richText) } -QString PilotMemo::getTitle() const +TQString PilotMemo::getTitle() const { - if (fText.isEmpty()) return QString::null; + if (fText.isEmpty()) return TQString::null; int memoTitleLen = fText.find('\n'); if (-1 == memoTitleLen) memoTitleLen=fText.length(); return fText.left(memoTitleLen); } -QString PilotMemo::shortTitle() const +TQString PilotMemo::shortTitle() const { FUNCTIONSETUP; - QString t = QString(getTitle()).simplifyWhiteSpace(); + TQString t = TQString(getTitle()).simplifyWhiteSpace(); if (t.length() < 32) return t; @@ -118,10 +118,10 @@ QString PilotMemo::shortTitle() const return t; } -QString PilotMemo::sensibleTitle() const +TQString PilotMemo::sensibleTitle() const { FUNCTIONSETUP; - QString s = getTitle(); + TQString s = getTitle(); if (!s.isEmpty()) { diff --git a/kpilot/lib/pilotMemo.h b/kpilot/lib/pilotMemo.h index 6897a0417..f4436ab75 100644 --- a/kpilot/lib/pilotMemo.h +++ b/kpilot/lib/pilotMemo.h @@ -28,8 +28,8 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qnamespace.h> -#include <qstring.h> +#include <tqnamespace.h> +#include <tqstring.h> #include <pi-memo.h> @@ -48,7 +48,7 @@ public: * Constructor. Create a memo in the Unfiled category with * text @p s . */ - PilotMemo(const QString &s) : PilotRecordBase() + PilotMemo(const TQString &s) : PilotRecordBase() { setText(s); } ; @@ -65,7 +65,7 @@ public: * attributes from the argument @p r, and set the * text of the memo from string @p s. */ - PilotMemo(const PilotRecordBase *r, const QString &s) : + PilotMemo(const PilotRecordBase *r, const TQString &s) : PilotRecordBase(r) { setText(s); @@ -73,10 +73,10 @@ public: ~PilotMemo() { } ; - virtual QString getTextRepresentation(Qt::TextFormat richText); - QString text(void) const { return fText; } ; - void setText(const QString &text) { fText = text.left(MAX_MEMO_LEN); } ; - QString getTitle(void) const ; + virtual TQString getTextRepresentation(Qt::TextFormat richText); + TQString text(void) const { return fText; } ; + void setText(const TQString &text) { fText = text.left(MAX_MEMO_LEN); } ; + TQString getTitle(void) const ; PilotRecord* pack(); static const int MAX_MEMO_LEN=8192; @@ -87,16 +87,16 @@ public: * and inconvenient. shortTitle() returns about 30 * characters. */ - QString shortTitle() const; + TQString shortTitle() const; /** * Returns a (complete) title if there is one and [unknown] * otherwise. */ - QString sensibleTitle() const; + TQString sensibleTitle() const; private: - QString fText; + TQString fText; }; diff --git a/kpilot/lib/pilotRecord.cc b/kpilot/lib/pilotRecord.cc index 44ae4f7be..59f055c3c 100644 --- a/kpilot/lib/pilotRecord.cc +++ b/kpilot/lib/pilotRecord.cc @@ -36,7 +36,7 @@ #include <string.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kglobal.h> #include <kcharsets.h> @@ -46,12 +46,12 @@ -/* virtual */ QString PilotRecordBase::textRepresentation() const +/* virtual */ TQString PilotRecordBase::textRepresentation() const { return CSL1("[ %1,%2,%3 ]") . arg(attributes(),category(),id()); } -/* virtual */ QString PilotRecord::textRepresentation() const +/* virtual */ TQString PilotRecord::textRepresentation() const { return CSL1("[ %1,%2 ]") .arg(PilotRecordBase::textRepresentation()) diff --git a/kpilot/lib/pilotRecord.h b/kpilot/lib/pilotRecord.h index a3812b333..fdf8a33e1 100644 --- a/kpilot/lib/pilotRecord.h +++ b/kpilot/lib/pilotRecord.h @@ -130,7 +130,7 @@ public: * * @return @c true on success, @c false on failure */ - bool setCategory(const struct CategoryAppInfo *info, const QString &label) + bool setCategory(const struct CategoryAppInfo *info, const TQString &label) { if (!info) { @@ -221,7 +221,7 @@ public: #undef SETTER /** Returns a text representation of this record. */ - virtual QString textRepresentation() const; + virtual TQString textRepresentation() const; private: int fAttrib, fCat; @@ -334,7 +334,7 @@ public: void setData(const char* data, int len); /** Returns a text representation of this record. */ - virtual QString textRepresentation() const; + virtual TQString textRepresentation() const; private: char* fData; diff --git a/kpilot/lib/pilotSerialDatabase.cc b/kpilot/lib/pilotSerialDatabase.cc index a38898d1d..f57cac934 100644 --- a/kpilot/lib/pilotSerialDatabase.cc +++ b/kpilot/lib/pilotSerialDatabase.cc @@ -34,7 +34,7 @@ #include <pi-dlp.h> -#include <qfile.h> +#include <tqfile.h> #include <klocale.h> #include <kdebug.h> @@ -45,7 +45,7 @@ #include "kpilotdevicelink.h" PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l, - const QString &dbName) : + const TQString &dbName) : PilotDatabase(dbName), fDBName( dbName ), fDBHandle(-1), @@ -56,8 +56,8 @@ PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l, } PilotSerialDatabase::PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info ) : - PilotDatabase( info ? Pilot::fromPilot( info->name ) : QString::null ), - fDBName( QString::null ), + PilotDatabase( info ? Pilot::fromPilot( info->name ) : TQString::null ), + fDBName( TQString::null ), fDBHandle( -1 ), fDBSocket( l->pilotSocket() ) { @@ -86,9 +86,9 @@ PilotSerialDatabase::~PilotSerialDatabase() closeDatabase(); } -QString PilotSerialDatabase::dbPathName() const +TQString PilotSerialDatabase::dbPathName() const { - QString s = CSL1("Pilot:"); + TQString s = CSL1("Pilot:"); s.append(fDBName); return s; } @@ -140,10 +140,10 @@ unsigned int PilotSerialDatabase::recordCount() const } -// Returns a QValueList of all record ids in the database. -QValueList<recordid_t> PilotSerialDatabase::idList() +// Returns a TQValueList of all record ids in the database. +TQValueList<recordid_t> PilotSerialDatabase::idList() { - QValueList<recordid_t> idlist; + TQValueList<recordid_t> idlist; int idlen=recordCount(); if (idlen<=0) return idlist; @@ -346,14 +346,14 @@ void PilotSerialDatabase::openDatabase() setDBOpen(false); - QString s = getDBName(); + TQString s = getDBName(); if (s.isEmpty()) { WARNINGKPILOT << "Bad DB name, " << s << " string given." << endl; return; } - QCString encodedName = QFile::encodeName(s); + TQCString encodedName = TQFile::encodeName(s); if (encodedName.isEmpty()) { WARNINGKPILOT << "Bad DB name, " diff --git a/kpilot/lib/pilotSerialDatabase.h b/kpilot/lib/pilotSerialDatabase.h index 51a6ba26d..1da2aaacb 100644 --- a/kpilot/lib/pilotSerialDatabase.h +++ b/kpilot/lib/pilotSerialDatabase.h @@ -49,7 +49,7 @@ class KDE_EXPORT PilotSerialDatabase : public PilotDatabase { friend class KPilotDeviceLink; protected: - PilotSerialDatabase( KPilotDeviceLink *l, const QString &dbName ); + PilotSerialDatabase( KPilotDeviceLink *l, const TQString &dbName ); PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info ); public: @@ -61,8 +61,8 @@ public: virtual int writeAppBlock(unsigned char* buffer, int len); /** returns the number of records in the database, 0 if not open */ virtual unsigned int recordCount() const; - /** Returns a QValueList of all record ids in the database. */ - virtual QValueList<recordid_t> idList(); + /** Returns a TQValueList of all record ids in the database. */ + virtual TQValueList<recordid_t> idList(); /** Reads a record from database by id, returns record length */ virtual PilotRecord* readRecordById(recordid_t id); /** Reads a record from database, returns the record length */ @@ -95,7 +95,7 @@ public: /** Purges all Archived/Deleted records from Palm Pilot database */ virtual int cleanup(); - virtual QString dbPathName() const; + virtual TQString dbPathName() const; /** * Deletes the database (by name, as given in the constructor and @@ -110,7 +110,7 @@ public: */ virtual bool createDatabase(long creator=0, long type=0, int cardno=0, int flags=0, int version=0); - QString getDBName() { return fDBName; } + TQString getDBName() { return fDBName; } virtual DBType dbType() const; @@ -130,7 +130,7 @@ protected: private: void setDBHandle(int handle) { fDBHandle = handle; } - QString fDBName; + TQString fDBName; int fDBHandle; int fDBSocket; // Pilot-link 0.12 allocates buffers as needed and resizes them. diff --git a/kpilot/lib/pilotTodoEntry.cc b/kpilot/lib/pilotTodoEntry.cc index f4c5596fb..1ed9dfa76 100644 --- a/kpilot/lib/pilotTodoEntry.cc +++ b/kpilot/lib/pilotTodoEntry.cc @@ -31,8 +31,8 @@ #include <stdlib.h> -#include <qdatetime.h> -#include <qnamespace.h> +#include <tqdatetime.h> +#include <tqnamespace.h> #include <kglobal.h> #include <kdebug.h> @@ -115,12 +115,12 @@ PilotTodoEntry & PilotTodoEntry::operator = (const PilotTodoEntry & e) return *this; } -QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText) +TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText) { - QString text, tmp; - QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString(); - QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); - QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); + TQString text, tmp; + TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString(); + TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); + TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); // title + name text += par; @@ -137,8 +137,8 @@ QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText) if (!getIndefinite()) { - QDate dt(readTm(getDueDate()).date()); - QString dueDate(dt.toString(Qt::LocalDate)); + TQDate dt(readTm(getDueDate()).date()); + TQString dueDate(dt.toString(Qt::LocalDate)); text+=par; text+=i18n("Due date: %1").arg(dueDate); text+=ps; @@ -177,7 +177,7 @@ PilotRecord *PilotTodoEntry::pack() const return new PilotRecord( b, this ); } -void PilotTodoEntry::setDescription(const QString &desc) +void PilotTodoEntry::setDescription(const TQString &desc) { if (desc.length() < fDescriptionSize) { @@ -218,12 +218,12 @@ void PilotTodoEntry::setDescriptionP(const char *desc, int len) } } -QString PilotTodoEntry::getDescription() const +TQString PilotTodoEntry::getDescription() const { return Pilot::fromPilot(getDescriptionP()); } -void PilotTodoEntry::setNote(const QString ¬e) +void PilotTodoEntry::setNote(const TQString ¬e) { if (note.length() < fNoteSize) { @@ -263,7 +263,7 @@ void PilotTodoEntry::setNoteP(const char *note, int len) } } -QString PilotTodoEntry::getNote() const +TQString PilotTodoEntry::getNote() const { return Pilot::fromPilot(getNoteP()); } diff --git a/kpilot/lib/pilotTodoEntry.h b/kpilot/lib/pilotTodoEntry.h index 3735771b6..020912f9c 100644 --- a/kpilot/lib/pilotTodoEntry.h +++ b/kpilot/lib/pilotTodoEntry.h @@ -35,8 +35,8 @@ #include <pi-macros.h> #include <pi-todo.h> -#include <qnamespace.h> -#include <qstring.h> +#include <tqnamespace.h> +#include <tqstring.h> #include "pilotRecord.h" #include "pilotAppInfo.h" @@ -72,7 +72,7 @@ public: /** Return a string for the ToDo item. If @param richText is true, then * use qt style markup to make the string clearer when displayed. */ - QString getTextRepresentation(Qt::TextFormat richText); + TQString getTextRepresentation(Qt::TextFormat richText); /** Assign an existing ToDo item to this one. */ PilotTodoEntry& operator=(const PilotTodoEntry &e); @@ -131,20 +131,20 @@ public: /** Get the ToDo item's description (which is the title shown on * the handheld, and the item's Title in KDE). This uses the default codec. */ - QString getDescription() const; + TQString getDescription() const; /** Set the ToDo item's description. */ - void setDescription(const QString &); + void setDescription(const TQString &); /** Get the ToDo item's note (the longer text, not immediately accessible * on the handheld). This uses the default codec. */ - QString getNote() const; + TQString getNote() const; /** Set the ToDo item's note. */ - void setNote(const QString ¬e); + void setNote(const TQString ¬e); /** Returns the label for the category this ToDo item is in. */ - QString getCategoryLabel() const; + TQString getCategoryLabel() const; PilotRecord *pack() const; diff --git a/kpilot/lib/pilotUser.h b/kpilot/lib/pilotUser.h index 6ba46b007..f7e17489a 100644 --- a/kpilot/lib/pilotUser.h +++ b/kpilot/lib/pilotUser.h @@ -60,14 +60,14 @@ public: } /** @return The username set on the handheld. */ - QString name() const + TQString name() const { return Pilot::fromPilot( fUser.username ); } /** Set the user name to the given @p name , truncated * if necessary to the size of the field on the handheld. */ - void setName( const QString &name ) + void setName( const TQString &name ) { Pilot::toPilot( name, fUser.username, sizeof(fUser.username) ); } diff --git a/kpilot/lib/plugin.cc b/kpilot/lib/plugin.cc index e9bcc9221..128c8ba99 100644 --- a/kpilot/lib/plugin.cc +++ b/kpilot/lib/plugin.cc @@ -35,17 +35,17 @@ #include <stdlib.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qtabwidget.h> -#include <qtextview.h> -#include <qtimer.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqtabwidget.h> +#include <tqtextview.h> +#include <tqtimer.h> #include <dcopclient.h> #include <kaboutapplication.h> @@ -65,9 +65,9 @@ #include "plugin.moc" -ConduitConfigBase::ConduitConfigBase(QWidget *parent, +ConduitConfigBase::ConduitConfigBase(TQWidget *parent, const char *name) : - QObject(parent,name), + TQObject(parent,name), fModified(false), fWidget(0L), fConduitName(i18n("Unnamed")) @@ -86,7 +86,7 @@ ConduitConfigBase::~ConduitConfigBase() emit changed(true); } -/* virtual */ QString ConduitConfigBase::maybeSaveText() const +/* virtual */ TQString ConduitConfigBase::maybeSaveText() const { FUNCTIONSETUP; @@ -108,36 +108,36 @@ ConduitConfigBase::~ConduitConfigBase() return true; } -QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) +TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) { FUNCTIONSETUP; - QWidget *w = new QWidget(parent, "aboutpage"); + TQWidget *w = new TQWidget(parent, "aboutpage"); - QString s; - QLabel *text; + TQString s; + TQLabel *text; KIconLoader *l = KGlobal::iconLoader(); const KAboutData *p = ad ? ad : KGlobal::instance()->aboutData(); - QGridLayout *grid = new QGridLayout(w, 5, 4, SPACING); + TQGridLayout *grid = new TQGridLayout(w, 5, 4, SPACING); grid->addColSpacing(0, SPACING); grid->addColSpacing(4, SPACING); - QPixmap applicationIcon = - l->loadIcon(QString::fromLatin1(p->appName()), + TQPixmap applicationIcon = + l->loadIcon(TQString::fromLatin1(p->appName()), KIcon::Desktop, 64, KIcon::DefaultState, 0L, true); if (applicationIcon.isNull()) { - applicationIcon = l->loadIcon(QString::fromLatin1("kpilot"), + applicationIcon = l->loadIcon(TQString::fromLatin1("kpilot"), KIcon::Desktop); } - text = new QLabel(w); + text = new TQLabel(w); // Experiment with a long non-<qt> string. Use that to find // sensible widths for the columns. // @@ -148,7 +148,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) int lineheight = text->size().height(); // Use the label to display the applciation icon - text->setText(QString::null); + text->setText(TQString::null); text->setPixmap(applicationIcon); text->adjustSize(); grid->addWidget(text, 0, 1); @@ -165,8 +165,8 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) grid->setColStretch(3,50); linktext->setMinimumSize(linewidth,kMax(260,60+12*lineheight)); linktext->setFixedHeight(kMax(260,60+12*lineheight)); - linktext->setVScrollBarMode(QScrollView::Auto/*AlwaysOn*/); - text = new QLabel(w); + linktext->setVScrollBarMode(TQScrollView::Auto/*AlwaysOn*/); + text = new TQLabel(w); grid->addMultiCellWidget(text,0,0,2,3); grid->addMultiCellWidget(linktext,1,2,1,3); @@ -183,14 +183,14 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) if (!p->homepage().isEmpty()) { - s = QString::null; + s = TQString::null; s += CSL1("<a href=\"%1\">").arg(p->homepage()); s += p->homepage(); s += CSL1("</a><br>"); linktext->append(s); } - s = QString::null; + s = TQString::null; s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.") .arg( CSL1("[email protected]") ) .arg( CSL1("[email protected]") ); @@ -203,16 +203,16 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) "<a href=\"help:/kpilot/trademarks.html\">KPilot User's Guide</a>."); s += CSL1("<br>"); linktext->append(s); - linktext->append(QString::null); + linktext->append(TQString::null); - QValueList<KAboutPerson> pl = p->authors(); - QValueList<KAboutPerson>::ConstIterator i; + TQValueList<KAboutPerson> pl = p->authors(); + TQValueList<KAboutPerson>::ConstIterator i; s = i18n("<b>Authors:</b> "); - QString comma = CSL1(", "); + TQString comma = CSL1(", "); unsigned int count=1; for (i=pl.begin(); i!=pl.end(); ++i) @@ -220,13 +220,13 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) s.append(CSL1("%1 (<i>%2</i>)%3") .arg((*i).name()) .arg((*i).task()) - .arg(count<pl.count() ? comma : QString::null) + .arg(count<pl.count() ? comma : TQString::null) ); count++; } linktext->append(s); - s = QString::null; + s = TQString::null; pl = p->credits(); if (pl.count()>0) { @@ -237,7 +237,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) s.append(CSL1("%1 (<i>%2</i>)%3") .arg((*i).name()) .arg((*i).task()) - .arg(count<pl.count() ? comma : QString::null) + .arg(count<pl.count() ? comma : TQString::null) ); count++; } @@ -250,15 +250,15 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) return w; } -/* static */ void ConduitConfigBase::addAboutPage(QTabWidget *tw, +/* static */ void ConduitConfigBase::addAboutPage(TQTabWidget *tw, KAboutData *ad) { FUNCTIONSETUP; Q_ASSERT(tw); - QWidget *w = aboutPage(tw,ad); - QSize sz = w->size(); + TQWidget *w = aboutPage(tw,ad); + TQSize sz = w->size(); if (sz.width() < tw->size().width()) { @@ -278,7 +278,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad) ConduitAction::ConduitAction(KPilotLink *p, const char *name, - const QStringList &args) : + const TQStringList &args) : SyncAction(p,name), fDatabase(0L), fLocalDatabase(0L), @@ -290,14 +290,14 @@ ConduitAction::ConduitAction(KPilotLink *p, { FUNCTIONSETUP; - QString cResolution(args.grep(QRegExp(CSL1("--conflictResolution \\d*"))).first()); + TQString cResolution(args.grep(TQRegExp(CSL1("--conflictResolution \\d*"))).first()); if (cResolution.isEmpty()) { fConflictResolution=(SyncAction::ConflictResolution) - cResolution.replace(QRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt(); + cResolution.replace(TQRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt(); } - for (QStringList::ConstIterator it = args.begin(); + for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) { @@ -320,7 +320,7 @@ ConduitAction::ConduitAction(KPilotLink *p, KPILOT_DELETE(fCtrPC); } -bool ConduitAction::openDatabases(const QString &name, bool *retrieved) +bool ConduitAction::openDatabases(const TQString &name, bool *retrieved) { FUNCTIONSETUP; @@ -335,7 +335,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved) KPILOT_DELETE(fLocalDatabase); - QString localPathName = PilotLocalDatabase::getDBPath() + name; + TQString localPathName = PilotLocalDatabase::getDBPath() + name; // we always want to use the conduits/ directory for our local // databases. this keeps our backups and data that our conduits use @@ -359,7 +359,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved) // if there is no backup db yet, fetch it from the palm, open it and set the full sync flag. if (!localDB->isOpen() ) { - QString dbpath(localDB->dbPathName()); + TQString dbpath(localDB->dbPathName()); KPILOT_DELETE(localDB); DEBUGKPILOT << fname << ": Backup database " << dbpath @@ -383,8 +383,8 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved) dbinfo.flags &= ~dlpDBFlagOpen; // make sure the dir for the backup db really exists! - QFileInfo fi(dbpath); - QString path(QFileInfo(dbpath).dir(true).absPath()); + TQFileInfo fi(dbpath); + TQString path(TQFileInfo(dbpath).dir(true).absPath()); if (!path.endsWith(CSL1("/"))) path.append(CSL1("/")); if (!KStandardDirs::exists(path)) { @@ -477,9 +477,9 @@ void ConduitAction::finished() // this is a percentage... int allowedVolatility = 70; - QString caption = i18n("Large Changes Detected"); + TQString caption = i18n("Large Changes Detected"); // args are already i18n'd - QString query = i18n("The %1 conduit has made a " + TQString query = i18n("The %1 conduit has made a " "large number of changes to your %2. Do you want " "to allow this change?\nDetails:\n\t%3"); @@ -494,7 +494,7 @@ void ConduitAction::finished() /* int rc = questionYesNo(query, caption, - QString::null, 0 ); + TQString::null, 0 ); if (rc == KMessageBox::Yes) { // TODO: add commit and rollback code. @@ -514,7 +514,7 @@ void ConduitAction::finished() ConduitProxy::ConduitProxy(KPilotLink *p, - const QString &name, + const TQString &name, const SyncAction::SyncMode &m) : ConduitAction(p,name.latin1(),m.list()), fDesktopName(name) @@ -548,7 +548,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, << endl; KLibrary *library = KLibLoader::self()->library( - QFile::encodeName(fLibraryName)); + TQFile::encodeName(fLibraryName)); if (!library) { WARNINGKPILOT << "Can't load library " @@ -582,11 +582,11 @@ ConduitProxy::ConduitProxy(KPilotLink *p, return false; } - QStringList l = syncMode().list(); + TQStringList l = syncMode().list(); DEBUGKPILOT << fname << ": Flags: " << syncMode().name() << endl; - QObject *object = factory->create(fHandle,name(),"SyncAction",l); + TQObject *object = factory->create(fHandle,name(),"SyncAction",l); if (!object) { @@ -607,17 +607,17 @@ ConduitProxy::ConduitProxy(KPilotLink *p, addSyncLogEntry(i18n("[Conduit %1]").arg(fDesktopName)); // Handle the syncDone signal properly & unload the conduit. - QObject::connect(fConduit,SIGNAL(syncDone(SyncAction *)), - this,SLOT(execDone(SyncAction *))); + TQObject::connect(fConduit,TQT_SIGNAL(syncDone(SyncAction *)), + this,TQT_SLOT(execDone(SyncAction *))); // Proxy all the log and error messages. - QObject::connect(fConduit,SIGNAL(logMessage(const QString &)), - this,SIGNAL(logMessage(const QString &))); - QObject::connect(fConduit,SIGNAL(logError(const QString &)), - this,SIGNAL(logError(const QString &))); - QObject::connect(fConduit,SIGNAL(logProgress(const QString &,int)), - this,SIGNAL(logProgress(const QString &,int))); - - QTimer::singleShot(0,fConduit,SLOT(execConduit())); + TQObject::connect(fConduit,TQT_SIGNAL(logMessage(const TQString &)), + this,TQT_SIGNAL(logMessage(const TQString &))); + TQObject::connect(fConduit,TQT_SIGNAL(logError(const TQString &)), + this,TQT_SIGNAL(logError(const TQString &))); + TQObject::connect(fConduit,TQT_SIGNAL(logProgress(const TQString &,int)), + this,TQT_SIGNAL(logProgress(const TQString &,int))); + + TQTimer::singleShot(0,fConduit,TQT_SLOT(execConduit())); return true; } @@ -649,11 +649,11 @@ void ConduitProxy::execDone(SyncAction *p) namespace PluginUtility { -QString findArgument(const QStringList &a, const QString &arg) +TQString findArgument(const TQStringList &a, const TQString &arg) { FUNCTIONSETUP; - QString search; + TQString search; if (arg.startsWith( CSL1("--") )) { @@ -666,20 +666,20 @@ QString findArgument(const QStringList &a, const QString &arg) search.append( CSL1("=") ); - QStringList::ConstIterator end = a.end(); - for (QStringList::ConstIterator i = a.begin(); i != end; ++i) + TQStringList::ConstIterator end = a.end(); + for (TQStringList::ConstIterator i = a.begin(); i != end; ++i) { if ((*i).startsWith( search )) { - QString s = (*i).mid(search.length()); + TQString s = (*i).mid(search.length()); return s; } } - return QString::null; + return TQString::null; } -/* static */ bool isRunning(const QCString &n) +/* static */ bool isRunning(const TQCString &n) { DCOPClient *dcop = KApplication::kApplication()->dcopClient(); QCStringList apps = dcop->registeredApplications(); @@ -689,7 +689,7 @@ QString findArgument(const QStringList &a, const QString &arg) /* static */ unsigned long pluginVersion(const KLibrary *lib) { - QString symbol = CSL1("version_"); + TQString symbol = CSL1("version_"); symbol.append(lib->name()); if (!lib->hasSymbol(symbol.latin1())) return 0; @@ -699,21 +699,21 @@ QString findArgument(const QStringList &a, const QString &arg) } -/* static */ QString pluginVersionString(const KLibrary *lib) +/* static */ TQString pluginVersionString(const KLibrary *lib) { - QString symbol= CSL1("id_"); + TQString symbol= CSL1("id_"); symbol.append(lib->name()); - if (!lib->hasSymbol(symbol.latin1())) return QString::null; + if (!lib->hasSymbol(symbol.latin1())) return TQString::null; - return QString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1())))); + return TQString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1())))); } } -CUDCounter::CUDCounter(QString s) : +CUDCounter::CUDCounter(TQString s) : fC(0),fU(0),fD(0),fStart(0),fEnd(0),fType(s) { } @@ -743,9 +743,9 @@ void CUDCounter::setEndCount(unsigned int t) fEnd = t; } -QString CUDCounter::moo() const +TQString CUDCounter::moo() const { - QString result = fType + ": " + + TQString result = fType + ": " + i18n("Start: %1. End: %2. ").arg(fStart).arg(fEnd); if (fC > 0) result += i18n("%1 new. ").arg(fC); diff --git a/kpilot/lib/plugin.h b/kpilot/lib/plugin.h index b825b899f..d768b6015 100644 --- a/kpilot/lib/plugin.h +++ b/kpilot/lib/plugin.h @@ -29,7 +29,7 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qstringlist.h> +#include <tqstringlist.h> #include "syncAction.h" @@ -67,11 +67,11 @@ namespace Pilot * and it's what is used in the KPilot conduit configuration dialog. * The factory is asked for a "ConduitConfigBase" object. * -* NB. The reason that this is a QObject which needs to create a -* separate widget - instead of a QWidget subclass - has to do with +* NB. The reason that this is a TQObject which needs to create a +* separate widget - instead of a TQWidget subclass - has to do with * layouting. If you make the widget with designer then the easiest * thing to do is to use a grid layout there. Making ConduitConfigBase -* a QWidget subclass would require an additional layout here, which +* a TQWidget subclass would require an additional layout here, which * seems a little foolish. * */ @@ -83,7 +83,7 @@ public: * Constructor. Creates a conduit configuration support object * with the given parent @p parent and name (optional) @p n. */ - ConduitConfigBase(QWidget *parent=0L, const char *n=0L); + ConduitConfigBase(TQWidget *parent=0L, const char *n=0L); /** Destructor. */ virtual ~ConduitConfigBase(); @@ -100,7 +100,7 @@ public: } ; /** Accessor for the actual widget for the configuration. */ - QWidget *widget() const + TQWidget *widget() const { return fWidget; } ; @@ -124,7 +124,7 @@ public: */ virtual bool maybeSave(); - QString conduitName() const { return fConduitName; } ; + TQString conduitName() const { return fConduitName; } ; /** * This is the function that does the work of adding an about @@ -139,7 +139,7 @@ public: * @param data The KAboutData that is used. * */ - static void addAboutPage(QTabWidget *w, + static void addAboutPage(TQTabWidget *w, KAboutData *data=0L); /** @@ -154,20 +154,20 @@ public: * @param parent The widget that holds the about widget. * @param data The KAboutData that is used to populate the widget. */ - static QWidget *aboutPage(QWidget *parent, KAboutData *data=0L); + static TQWidget *aboutPage(TQWidget *parent, KAboutData *data=0L); protected: /** * This function provides the string for the prompt used * in maybeSave(). Override it to change the text. */ - virtual QString maybeSaveText() const; + virtual TQString maybeSaveText() const; void unmodified() { fModified=false; } ; bool fModified; - QWidget *fWidget; - QString fConduitName; + TQWidget *fWidget; + TQString fConduitName; protected slots: @@ -196,7 +196,7 @@ class KDE_EXPORT CUDCounter public: /** Create new counter initialized to 0, and be told what * kind of CUD we're counting (PC or Handheld, etc.) */ - CUDCounter(QString s); + CUDCounter(TQString s); /** Track the creation of @p c items */ void created(unsigned int c=1); @@ -227,12 +227,12 @@ public: * objects created, updated, deleted. This * string is already i18n()ed. */ - QString moo() const; + TQString moo() const; /** Type of counter(Handheld or PC). This string is already * i18n()ed. */ - QString type() const { return fType; } + TQString type() const { return fType; } private: /** keep track of Creates, Updates, Deletes, and Total * number of records so we can detect abnormal behavior and @@ -243,7 +243,7 @@ private: /** What kind of CUD are we keeping track of so we can * moo() it out later? (PC, Handheld, etc.) */ - QString fType; + TQString fType; } ; @@ -264,7 +264,7 @@ Q_OBJECT public: ConduitAction(KPilotLink *, const char *name=0L, - const QStringList &args = QStringList()); + const TQStringList &args = TQStringList()); virtual ~ConduitAction(); /** ConduitAction is done doing work. Allow it to sanity-check the @@ -272,7 +272,7 @@ public: */ void finished(); - QString conduitName() const { return fConduitName; } ; + TQString conduitName() const { return fConduitName; } ; /** Retrieve the sync mode set for this action. */ const SyncMode &syncMode() const { return fSyncDirection; }; @@ -338,13 +338,13 @@ protected: * @param retrieved indicator whether the database had to be loaded * from the handheld. */ - bool openDatabases(const QString &dbName, bool*retrieved=0L); + bool openDatabases(const TQString &dbName, bool*retrieved=0L); /** * Name of the conduit; might be changed by subclasses. Should * normally be set in the constructor. */ - QString fConduitName; + TQString fConduitName; /** Every plugin has 2 CUDCounters--one for keeping track of * changes made to PC data and one for keeping track of Palm data. */ @@ -370,7 +370,7 @@ Q_OBJECT public: ConduitProxy(KPilotLink *, - const QString &desktopName, + const TQString &desktopName, const SyncAction::SyncMode &m); protected: @@ -379,17 +379,17 @@ protected slots: void execDone(SyncAction *); protected: - QString fDesktopName; - QString fLibraryName; + TQString fDesktopName; + TQString fLibraryName; ConduitAction *fConduit; } ; /** A namespace containing only static helper methods. */ namespace PluginUtility { - /** Searches the argument list for --foo=bar and returns bar, QString::null if not found. + /** Searches the argument list for --foo=bar and returns bar, TQString::null if not found. * Don't include the -- in the argname. */ - QString findArgument(const QStringList &a, const QString argname); + TQString findArgument(const TQStringList &a, const TQString argname); /** * This function attempts to detect whether or not the given @@ -399,14 +399,14 @@ namespace PluginUtility * The current approach is to ask the DCOP server if the application * has registered. */ - bool isRunning(const QCString &appName); + bool isRunning(const TQCString &appName); /** * Check a given library for its version, returning 0 if no * version symbol is found. */ unsigned long pluginVersion(const KLibrary *); - QString pluginVersionString(const KLibrary *); + TQString pluginVersionString(const KLibrary *); } /** @@ -420,7 +420,7 @@ namespace PluginUtility * Q_OBJECT * * public: -* KPilotPlugin(QObject * = 0L,const char * = 0L) ; +* KPilotPlugin(TQObject * = 0L,const char * = 0L) ; * virtual ~KPilotPlugin(); * </pre> * @@ -440,10 +440,10 @@ namespace PluginUtility * * <pre> * protected: -* virtual QObject* createObject( QObject* parent = 0, +* virtual TQObject* createObject( TQObject* parent = 0, * const char* name = 0, -* const char* classname = "QObject", -* const QStringList &args = QStringList() ); +* const char* classname = "TQObject", +* const TQStringList &args = TQStringList() ); * </pre> * * More boilerplate, and support for an instance and about data, used diff --git a/kpilot/lib/pluginfactory.h b/kpilot/lib/pluginfactory.h index 8eecc5584..f43c706db 100644 --- a/kpilot/lib/pluginfactory.h +++ b/kpilot/lib/pluginfactory.h @@ -27,7 +27,7 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qwidget.h> +#include <tqwidget.h> #include <kdebug.h> #include <klibloader.h> @@ -45,22 +45,22 @@ class KPilotLink; template <class Widget, class Action> class ConduitFactory : public KLibFactory { public: - ConduitFactory(QObject *parent = 0, const char *name = 0) : + ConduitFactory(TQObject *parent = 0, const char *name = 0) : KLibFactory(parent,name) { fInstance = new KInstance(name); } ; virtual ~ConduitFactory() { delete fInstance; } ; protected: - virtual QObject *createObject( - QObject* parent = 0, + virtual TQObject *createObject( + TQObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList() ) + const char* classname = "TQObject", + const TQStringList &args = TQStringList() ) { if (qstrcmp(classname,"ConduitConfigBase")==0) { - QWidget *w = dynamic_cast<QWidget *>(parent); + TQWidget *w = dynamic_cast<TQWidget *>(parent); if (w) return new Widget(w,name); else { diff --git a/kpilot/lib/recordConduit.cc b/kpilot/lib/recordConduit.cc index f11b3b573..f7692de47 100644 --- a/kpilot/lib/recordConduit.cc +++ b/kpilot/lib/recordConduit.cc @@ -37,8 +37,8 @@ #include "options.h" -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include "pilotAppCategory.h" #include "pilotSerialDatabase.h" @@ -75,8 +75,8 @@ long version_record_conduit = Pilot::PLUGIN_API; else fIDList=fDatabase->modifiedIDList(); fIDListIterator = fIDList.begin(); - fTimer = new QTimer(this); - connect(fTimer,SIGNAL(timeout()),this,SLOT(process())); + fTimer = new TQTimer(this); + connect(fTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(process())); fTimer->start(0,false); // Fire as often as possible to prompt processing return true; } @@ -170,7 +170,7 @@ long version_record_conduit = Pilot::PLUGIN_API; } -QString RecordConduitBase::name(RecordConduitBase::SyncProgress s) +TQString RecordConduitBase::name(RecordConduitBase::SyncProgress s) { switch(s) { @@ -184,7 +184,7 @@ QString RecordConduitBase::name(RecordConduitBase::SyncProgress s) } -QString RecordConduitBase::name(RecordConduitBase::States s) +TQString RecordConduitBase::name(RecordConduitBase::States s) { switch(s) { @@ -216,7 +216,7 @@ bool RecordConduit::PCData::makeArchived( RecordConduit::PCEntry *pcEntry ) /* Builds the map which links record ids to uid's of PCEntry. This is the slow implementation, * that should always work. subclasses should reimplement it to speed things up. */ -bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idContactMap ) +bool RecordConduit::PCData::mapContactsToPilot( TQMap<recordid_t,TQString> &idContactMap ) { FUNCTIONSETUP; @@ -249,7 +249,7 @@ bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idCont bool RecordConduit::mArchiveDeleted = false; -RecordConduit::RecordConduit(QString name, KPilotDeviceLink * o, const char *n, const QStringList & a): +RecordConduit::RecordConduit(TQString name, KPilotDeviceLink * o, const char *n, const TQStringList & a): ConduitAction(o, n, a), mPCData(0), mPalmIndex(0), mEntryMap(), mSyncedIds(), mAllIds() @@ -327,7 +327,7 @@ RecordConduit::~RecordConduit() for this, and no longer purge the whole addressbook before the sync to prevent data loss in case of connection loss. */ - QTimer::singleShot(0, this, SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); return true; } @@ -342,7 +342,7 @@ void RecordConduit::slotPalmRecToPC() if ( getSyncDirection() == SyncAction::eCopyPCToHH ) { mPCIter = mPCData->begin(); - QTimer::singleShot(0, this, SLOT(slotPCRecToPalm())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); return; } @@ -354,7 +354,7 @@ void RecordConduit::slotPalmRecToPC() if ( !palmRec ) { mPCIter = mPCData->begin(); - QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) ); return; } @@ -362,7 +362,7 @@ void RecordConduit::slotPalmRecToPC() if ( mSyncedIds.contains( palmRec->id() ) ) { KPILOT_DELETE( palmRec ); - QTimer::singleShot( 0, this, SLOT( slotPalmRecToPC() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPalmRecToPC() ) ); return; } @@ -389,7 +389,7 @@ void RecordConduit::slotPalmRecToPC() KPILOT_DELETE( palmRec ); KPILOT_DELETE( backupRec ); - QTimer::singleShot(0, this, SLOT(slotPalmRecToPC())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); } @@ -402,7 +402,7 @@ void RecordConduit::slotPCRecToPalm() mPCData->atEnd( mPCIter ) ) { mPalmIndex = 0; - QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) ); return; } @@ -418,7 +418,7 @@ void RecordConduit::slotPCRecToPalm() " marked archived, so don't sync." << endl; #endif KPILOT_DELETE( pcEntry ); - QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) ); return; } @@ -428,7 +428,7 @@ void RecordConduit::slotPCRecToPalm() // it's a new item(no record ID and not inserted by the Palm -> PC sync), so add it syncEntry( pcEntry, 0L, 0L ); KPILOT_DELETE( pcEntry ); - QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) ); return; } @@ -439,7 +439,7 @@ void RecordConduit::slotPCRecToPalm() DEBUGKPILOT << ": address with id " << recID << " already synced." << endl; #endif KPILOT_DELETE( pcEntry ); - QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) ); return; } @@ -470,7 +470,7 @@ void RecordConduit::slotPCRecToPalm() mSyncedIds.append( recID ); // done with the sync process, go on with the next one: - QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) ); } @@ -483,7 +483,7 @@ void RecordConduit::slotDeletedRecord() if( !backupRec || isFirstSync() ) { KPILOT_DELETE(backupRec); - QTimer::singleShot( 0, this, SLOT( slotDeleteUnsyncedPCRecords() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteUnsyncedPCRecords() ) ); return; } @@ -491,11 +491,11 @@ void RecordConduit::slotDeletedRecord() if ( mSyncedIds.contains( backupRec->id() ) ) { KPILOT_DELETE( backupRec ); - QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) ); return; } - QString uid = mEntryMap[ backupRec->id() ]; + TQString uid = mEntryMap[ backupRec->id() ]; PCEntry *pcEntry = mPCData->findByUid( uid ); PilotRecord *palmRec = fDatabase->readRecordById( backupRec->id() ); PilotAppCategory *backupEntry = 0L; @@ -513,7 +513,7 @@ void RecordConduit::slotDeletedRecord() KPILOT_DELETE( backupEntry ); KPILOT_DELETE( palmRec ); KPILOT_DELETE( backupRec ); - QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) ); } @@ -523,9 +523,9 @@ void RecordConduit::slotDeleteUnsyncedPCRecords() FUNCTIONSETUP; if ( getSyncDirection() == SyncAction::eCopyHHToPC ) { - QStringList uids; + TQStringList uids; RecordIDList::iterator it; - QString uid; + TQString uid; for ( it = mSyncedIds.begin(); it != mSyncedIds.end(); ++it) { uid = mEntryMap[ *it ]; @@ -533,8 +533,8 @@ void RecordConduit::slotDeleteUnsyncedPCRecords() } // TODO: Does this speed up anything? // qHeapSort( uids ); - const QStringList alluids( mPCData->uids() ); - QStringList::ConstIterator uidit; + const TQStringList alluids( mPCData->uids() ); + TQStringList::ConstIterator uidit; for ( uidit = alluids.constBegin(); uidit != alluids.constEnd(); ++uidit ) { if ( !uids.contains( *uidit ) ) @@ -546,7 +546,7 @@ void RecordConduit::slotDeleteUnsyncedPCRecords() } } } - QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedHHRecords())); + TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedHHRecords())); } @@ -570,7 +570,7 @@ void RecordConduit::slotDeleteUnsyncedHHRecords() } } } - QTimer::singleShot( 0, this, SLOT( slotCleanup() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotCleanup() ) ); } @@ -602,11 +602,11 @@ void RecordConduit::slotCleanup() /** Return the list of category names on the handheld */ -const QStringList RecordConduit::categories() const +const TQStringList RecordConduit::categories() const { - QStringList cats; + TQStringList cats; for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ ) { - QString catName( category( j ) ); + TQString catName( category( j ) ); if ( !catName.isEmpty() ) cats << catName; } return cats; @@ -684,7 +684,7 @@ void RecordConduit::_setAppInfo() } -int RecordConduit::compareStr( const QString & str1, const QString & str2 ) +int RecordConduit::compareStr( const TQString & str1, const TQString & str2 ) { // FUNCTIONSETUP; if ( str1.isEmpty() && str2.isEmpty() ) @@ -696,23 +696,23 @@ int RecordConduit::compareStr( const QString & str1, const QString & str2 ) /** * _getCat returns the id of the category from the given categories list. - * If the address has no categories on the PC, QString::null is returned. + * If the address has no categories on the PC, TQString::null is returned. * If the current category exists in the list of cats, it is returned * Otherwise the first cat in the list that exists on the HH is returned - * If none of the categories exists on the palm, QString::null is returned + * If none of the categories exists on the palm, TQString::null is returned */ -QString RecordConduit::getCatForHH( const QStringList cats, const QString curr ) const +TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString curr ) const { FUNCTIONSETUP; if ( cats.size() < 1 ) - return QString::null; + return TQString::null; if ( cats.contains( curr ) ) return curr; - for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it) + for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it) { for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ ) { - QString catnm( category( j ) ); + TQString catnm( category( j ) ); if ( !(*it).isEmpty() && ( (*it)==catnm ) ) { return catnm; @@ -720,11 +720,11 @@ QString RecordConduit::getCatForHH( const QStringList cats, const QString curr ) } } // If we have a free label, return the first possible cat - QString lastCat( category( Pilot::CATEGORY_COUNT-1 ) ); - return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( QString::null ); + TQString lastCat( category( Pilot::CATEGORY_COUNT-1 ) ); + return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( TQString::null ); } -void RecordConduit::setCategory(PCEntry * pcEntry, QString cat) +void RecordConduit::setCategory(PCEntry * pcEntry, TQString cat) { if ( !cat.isEmpty() && cat!=category( 0 ) ) pcEntry->insertCategory(cat); @@ -1096,7 +1096,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry ) // first, use the pilotID to UID map to find the appropriate record if( !isFirstSync() && ( palmEntry->id() > 0) ) { - QString id( mEntryMap[palmEntry->id()] ); + TQString id( mEntryMap[palmEntry->id()] ); #ifdef DEBUG DEBUGKPILOT << fname << ": PilotRecord has id " << palmEntry->id() << ", mapped to " << id << endl; #endif @@ -1131,7 +1131,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry ) KPILOT_DELETE( abEntry ); } #ifdef DEBUG - DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << QString::number( palmEntry->id() ) << endl; + DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << TQString::number( palmEntry->id() ) << endl; #endif return 0; } diff --git a/kpilot/lib/recordConduit.h b/kpilot/lib/recordConduit.h index d12ceef2e..743e326d2 100644 --- a/kpilot/lib/recordConduit.h +++ b/kpilot/lib/recordConduit.h @@ -27,7 +27,7 @@ ** Bug reports and questions can be sent to [email protected] */ -#include <qtimer.h> +#include <tqtimer.h> #include <klocale.h> #include "plugin.h" @@ -57,11 +57,11 @@ class RecordConduitBase : public ConduitAction { Q_OBJECT public: - /** Constructor. The QStringList @p a sets flags for the ConduitAction. + /** Constructor. The TQStringList @p a sets flags for the ConduitAction. */ RecordConduitBase(KPilotDeviceLink *o, const char *n, - const QStringList a = QStringList()) : + const TQStringList a = TQStringList()) : ConduitAction(o,n,a), fTimer(0L) { @@ -80,12 +80,12 @@ public: enum SyncProgress { NotDone=0, Done=1, Error=2 } ; /** Returns a human-readable name for the progress indicator @p s */ - static QString name(SyncProgress s); + static TQString name(SyncProgress s); /** State of the conduit's sync. This is changed by process(). */ enum States { Initialize, PalmToPC, PCToPalm, Cleanup } ; - static QString name(States s); + static TQString name(States s); protected: /** Function called at the beginning of a sync to load data from the PC. @@ -129,14 +129,14 @@ protected: private: /** Timer to signal the process() slot. Used to keep the UI responsive. */ - QTimer *fTimer; + TQTimer *fTimer; States fState; Pilot::RecordIDList fIDList; Pilot::RecordIDList::Iterator fIDListIterator; - QString fDBName; + TQString fDBName; } ; template <class PCEntry, class PCContainer, class HHEntry, class HHAppInfo, class Syncer> @@ -146,8 +146,8 @@ public: /** Construct a record conduit on a given device link. */ RecordConduit( KPilotDeviceLink *o /**< Connection to HH */, - const char *n /**< Name for QObject */, - const QStringList a = QStringList() /**< Flags */) : + const char *n /**< Name for TQObject */, + const TQStringList a = TQStringList() /**< Flags */) : RecordConduitBase(o,n,a) { } ; diff --git a/kpilot/lib/syncAction.cc b/kpilot/lib/syncAction.cc index 818503807..d9f539559 100644 --- a/kpilot/lib/syncAction.cc +++ b/kpilot/lib/syncAction.cc @@ -34,17 +34,17 @@ #include <pi-socket.h> #include <pi-dlp.h> -#include <qtimer.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qmessagebox.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtl.h> -#include <qstyle.h> +#include <tqtimer.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqmessagebox.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtl.h> +#include <tqstyle.h> #include <kdialogbase.h> #include <kglobal.h> @@ -57,7 +57,7 @@ SyncAction::SyncAction(KPilotLink *p, const char *name) : - QObject(p, name), + TQObject(p, name), fHandle(p), fParent(0L) { @@ -65,9 +65,9 @@ SyncAction::SyncAction(KPilotLink *p, } SyncAction::SyncAction(KPilotLink *p, - QWidget * visibleparent, + TQWidget * visibleparent, const char *name) : - QObject(p, name), + TQObject(p, name), fHandle(p), fParent(visibleparent) { @@ -78,12 +78,12 @@ SyncAction::~SyncAction() { } -/* virtual */ QString SyncAction::statusString() const +/* virtual */ TQString SyncAction::statusString() const { FUNCTIONSETUP; - QString s = CSL1("status="); + TQString s = CSL1("status="); - s.append(QString::number(status())); + s.append(TQString::number(status())); return s; } @@ -101,7 +101,7 @@ SyncAction::~SyncAction() if (!r) { emit logError(i18n("The conduit %1 could not be executed.") - .arg(QString::fromLatin1(name()))); + .arg(TQString::fromLatin1(name()))); delayDone(); } } @@ -113,7 +113,7 @@ SyncAction::~SyncAction() bool SyncAction::delayDone() { - QTimer::singleShot(0,this,SLOT(delayedDoneSlot())); + TQTimer::singleShot(0,this,TQT_SLOT(delayedDoneSlot())); return true; } @@ -134,7 +134,7 @@ static struct } ; -SyncAction::SyncMode::SyncMode(const QStringList &args) : +SyncAction::SyncMode::SyncMode(const TQStringList &args) : fMode(eHotSync), fTest(args.contains("--test")), fLocal(args.contains("--local")) @@ -142,7 +142,7 @@ SyncAction::SyncMode::SyncMode(const QStringList &args) : int i = 0; while(maps[i].name) { - if (args.contains(QString::fromLatin1(maps[i].name))) + if (args.contains(TQString::fromLatin1(maps[i].name))) { fMode = maps[i].mode; break; @@ -170,18 +170,18 @@ SyncAction::SyncMode::SyncMode(Mode m, bool test, bool local) : } } -QStringList SyncAction::SyncMode::list() const +TQStringList SyncAction::SyncMode::list() const { FUNCTIONSETUPL(3); - QStringList l; + TQStringList l; int i=0; while(maps[i].name) { if ( fMode == maps[i].mode ) { - l.append(QString::fromLatin1(maps[i].name)); + l.append(TQString::fromLatin1(maps[i].name)); break; } i++; @@ -189,7 +189,7 @@ QStringList SyncAction::SyncMode::list() const if ( !maps[i].name ) { WARNINGKPILOT << "Mode " << fMode << " does not have a name." << endl; - l.append(QString::fromLatin1(maps[0].name)); + l.append(TQString::fromLatin1(maps[0].name)); } if (isTest()) l.append(CSL1("--test")); @@ -197,7 +197,7 @@ QStringList SyncAction::SyncMode::list() const return l; } -/* static */ QString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e) +/* static */ TQString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e) { switch(e) { @@ -211,9 +211,9 @@ QStringList SyncAction::SyncMode::list() const return CSL1("<unknown>"); } -QString SyncAction::SyncMode::name() const +TQString SyncAction::SyncMode::name() const { - QString s = name(fMode); + TQString s = name(fMode); if (isTest()) { @@ -272,7 +272,7 @@ void SyncAction::startTickle(unsigned timeout) } else { - connect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout())); + connect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout())); deviceLink()->startTickle(timeout); } } @@ -286,18 +286,18 @@ void SyncAction::stopTickle() } else { - disconnect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout())); + disconnect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout())); deviceLink()->stopTickle(); } } -int SyncAction::questionYesNo(const QString & text, - const QString & caption, - const QString & key, +int SyncAction::questionYesNo(const TQString & text, + const TQString & caption, + const TQString & key, unsigned timeout, - const QString & yes, - const QString &no ) + const TQString & yes, + const TQString &no ) { FUNCTIONSETUP; @@ -322,17 +322,17 @@ int SyncAction::questionYesNo(const QString & text, if ( (timeout > 0) && ( deviceLink() ) ) { - QObject::connect(deviceLink(), SIGNAL(timeout()), - dialog, SLOT(slotCancel())); + TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()), + dialog, TQT_SLOT(slotCancel())); startTickle(timeout); } #if KDE_IS_VERSION(3,3,0) r = (KMessageBox::ButtonCode) KMessageBox::createKMessageBox(dialog, - QMessageBox::Question, + TQMessageBox::Question, text, - QStringList(), - (key.isEmpty() ? QString::null : i18n("&Do not ask again")), + TQStringList(), + (key.isEmpty() ? TQString::null : i18n("&Do not ask again")), &checkboxReturn, 0); @@ -342,32 +342,32 @@ int SyncAction::questionYesNo(const QString & text, // by Waldo Bastian. // // - QVBox *topcontents = new QVBox(dialog); + TQVBox *topcontents = new TQVBox(dialog); topcontents->setSpacing(KDialog::spacingHint() * 2); topcontents->setMargin(KDialog::marginHint() * 2); - QWidget *contents = new QWidget(topcontents); - QHBoxLayout *lay = new QHBoxLayout(contents); + TQWidget *contents = new TQWidget(topcontents); + TQHBoxLayout *lay = new TQHBoxLayout(contents); lay->setSpacing(KDialog::spacingHint() * 2); lay->addStretch(1); - QLabel *label1 = new QLabel( contents); - label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information)); + TQLabel *label1 = new TQLabel( contents); + label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information)); lay->add( label1 ); - QLabel *label2 = new QLabel( text, contents); + TQLabel *label2 = new TQLabel( text, contents); label2->setMinimumSize(label2->sizeHint()); lay->add(label2); lay->addStretch(1); - QSize extraSize = QSize(50, 30); + TQSize extraSize = TQSize(50, 30); - QCheckBox *checkbox = 0L; + TQCheckBox *checkbox = 0L; if (!key.isEmpty()) { - checkbox = new QCheckBox(i18n("Do not ask again"),topcontents); - extraSize = QSize(50,0); + checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents); + extraSize = TQSize(50,0); } dialog->setMainWidget(topcontents); @@ -400,12 +400,12 @@ int SyncAction::questionYesNo(const QString & text, } -int SyncAction::questionYesNoCancel(const QString & text, - const QString & caption, - const QString & key, +int SyncAction::questionYesNoCancel(const TQString & text, + const TQString & caption, + const TQString & key, unsigned timeout, - const QString &yes, - const QString &no) + const TQString &yes, + const TQString &no) { FUNCTIONSETUP; @@ -435,17 +435,17 @@ int SyncAction::questionYesNoCancel(const QString & text, if ( (timeout > 0) && (deviceLink()) ) { - QObject::connect(deviceLink(), SIGNAL(timeout()), - dialog, SLOT(slotCancel())); + TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()), + dialog, TQT_SLOT(slotCancel())); startTickle(timeout); } #if KDE_IS_VERSION(3,3,0) r = KMessageBox::createKMessageBox(dialog, - QMessageBox::Question, + TQMessageBox::Question, text, - QStringList(), - (key.isEmpty() ? QString::null : i18n("&Do not ask again")), + TQStringList(), + (key.isEmpty() ? TQString::null : i18n("&Do not ask again")), &checkboxReturn, 0); #else @@ -454,32 +454,32 @@ int SyncAction::questionYesNoCancel(const QString & text, // by Waldo Bastian. // // - QVBox *topcontents = new QVBox(dialog); + TQVBox *topcontents = new TQVBox(dialog); topcontents->setSpacing(KDialog::spacingHint() * 2); topcontents->setMargin(KDialog::marginHint() * 2); - QWidget *contents = new QWidget(topcontents); - QHBoxLayout *lay = new QHBoxLayout(contents); + TQWidget *contents = new TQWidget(topcontents); + TQHBoxLayout *lay = new TQHBoxLayout(contents); lay->setSpacing(KDialog::spacingHint() * 2); lay->addStretch(1); - QLabel *label1 = new QLabel( contents); - label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information)); + TQLabel *label1 = new TQLabel( contents); + label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information)); lay->add( label1 ); - QLabel *label2 = new QLabel( text, contents); + TQLabel *label2 = new TQLabel( text, contents); label2->setMinimumSize(label2->sizeHint()); lay->add(label2); lay->addStretch(1); - QSize extraSize = QSize(50, 30); + TQSize extraSize = TQSize(50, 30); - QCheckBox *checkbox = 0L; + TQCheckBox *checkbox = 0L; if (!key.isEmpty()) { - checkbox = new QCheckBox(i18n("Do not ask again"),topcontents); - extraSize = QSize(50,0); + checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents); + extraSize = TQSize(50,0); } dialog->setMainWidget(topcontents); diff --git a/kpilot/lib/syncAction.h b/kpilot/lib/syncAction.h index a93bff99c..4643e7c6e 100644 --- a/kpilot/lib/syncAction.h +++ b/kpilot/lib/syncAction.h @@ -33,9 +33,9 @@ #include <pi-dlp.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "kpilotlink.h" @@ -55,7 +55,7 @@ public: SyncAction(KPilotLink *p, const char *name=0L); SyncAction(KPilotLink *p, - QWidget *visibleparent, + TQWidget *visibleparent, const char *name=0L); ~SyncAction(); @@ -70,7 +70,7 @@ public: return fActionStatus; } /** Return a human-readable representation of the status. */ - virtual QString statusString() const; + virtual TQString statusString() const; protected: /** @@ -97,9 +97,9 @@ public slots: signals: void syncDone(SyncAction *); - void logMessage(const QString &); - void logError(const QString &); - void logProgress(const QString &,int); + void logMessage(const TQString &); + void logError(const TQString &); + void logProgress(const TQString &,int); protected slots: /** This slot emits syncDone(), and does nothing else. This @@ -128,7 +128,7 @@ public: * @note Having messages appear on the handheld but not in KPilot * should be a @em very rare occurrence. */ - void addSyncLogEntry(const QString &e,bool log=true) + void addSyncLogEntry(const TQString &e,bool log=true) { if (deviceLink()) { @@ -138,17 +138,17 @@ public: /** Public API for adding a message to the log in KPilot. * Adds @p msg to the synclog maintained on the PC. */ - void addLogMessage( const QString &msg ) + void addLogMessage( const TQString &msg ) { emit logMessage( msg ); } /** Log an error message in KPilot (the PC side of things). */ - void addLogError( const QString &msg ) + void addLogError( const TQString &msg ) { emit logError( msg ); } /** Log progress in KPilot (the PC side of things). */ - void addLogProgress( const QString &msg, int prog ) + void addLogProgress( const TQString &msg, int prog ) { emit logProgress( msg, prog ); } @@ -217,7 +217,7 @@ public: * a string list to pass aparameters to the shared * library loader. */ - SyncMode(const QStringList &l); + SyncMode(const TQStringList &l); /** Returns the kind of sync; this is just incomplete * information, since a test hot sync is very different from @@ -311,20 +311,20 @@ public: /** * Returns a standard name for each of the sync modes. */ - static QString name(Mode); + static TQString name(Mode); /** * Returns a (human readable) name for this particular mode, * including extra information about test and local mode. */ - QString name() const; + TQString name() const; /** - * Returns a QStringList that, when passed to the constructor + * Returns a TQStringList that, when passed to the constructor * of SyncMode, will re-create it. Used to pass modes into * shared library factories. */ - QStringList list() const; + TQStringList list() const; private: Mode fMode; @@ -378,7 +378,7 @@ signals: protected: - QWidget *fParent; + TQWidget *fParent; /** * Ask a yes-no question of the user. This has a timeout so that @@ -392,18 +392,18 @@ protected: * @p key Key for the "Don't ask again" code. * @p timeout Timeout, in seconds. */ - int questionYesNo(const QString &question , - const QString &caption = QString::null, - const QString &key = QString::null, + int questionYesNo(const TQString &question , + const TQString &caption = TQString::null, + const TQString &key = TQString::null, unsigned timeout = 20, - const QString &yes = QString::null, - const QString &no = QString::null ); - int questionYesNoCancel(const QString &question , - const QString &caption = QString::null, - const QString &key = QString::null, + const TQString &yes = TQString::null, + const TQString &no = TQString::null ); + int questionYesNoCancel(const TQString &question , + const TQString &caption = TQString::null, + const TQString &key = TQString::null, unsigned timeout = 20, - const QString &yes = QString::null, - const QString &no = QString::null ) ; + const TQString &yes = TQString::null, + const TQString &no = TQString::null ) ; }; diff --git a/kpilot/tests/conduits/vcalconduit/exampletest.cc b/kpilot/tests/conduits/vcalconduit/exampletest.cc index 5d6ba40d5..b16a6c3e5 100644 --- a/kpilot/tests/conduits/vcalconduit/exampletest.cc +++ b/kpilot/tests/conduits/vcalconduit/exampletest.cc @@ -8,7 +8,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( VCalConduitTest ); void VCalConduitTest::setUp() { - device = QString("testdevice"); + device = TQString("testdevice"); link = new KPilotLocalLink(0, "localLink"); syncMode = SyncAction::SyncMode::eHotSync; } diff --git a/kpilot/tests/conduits/vcalconduit/exampletest.h b/kpilot/tests/conduits/vcalconduit/exampletest.h index 137c31326..f98c14c58 100644 --- a/kpilot/tests/conduits/vcalconduit/exampletest.h +++ b/kpilot/tests/conduits/vcalconduit/exampletest.h @@ -2,7 +2,7 @@ #define EXAMPLETEST_H #include <cppunit/extensions/HelperMacros.h> -#include <qstring.h> +#include <tqstring.h> #include "kpilotlocallink.h" #include "syncAction.h" @@ -14,7 +14,7 @@ class VCalConduitTest : public CppUnit::TestFixture CPPUNIT_TEST_SUITE_END(); private: - QString device; + TQString device; KPilotLocalLink *link; SyncAction::SyncMode::Mode syncMode; diff --git a/kpilot/tests/exportdatebook.cc b/kpilot/tests/exportdatebook.cc index fcc236cca..d4cf8c53e 100644 --- a/kpilot/tests/exportdatebook.cc +++ b/kpilot/tests/exportdatebook.cc @@ -70,8 +70,8 @@ int main(int argc, char **argv) debug_level= (args->isSet("verbose")) ? 4 : 0; - QString datadir = args->getOption("data-dir"); - QString vcalfile = args->getOption("vcal-file"); + TQString datadir = args->getOption("data-dir"); + TQString vcalfile = args->getOption("vcal-file"); if (datadir.isEmpty()) { @@ -91,13 +91,13 @@ int main(int argc, char **argv) // this part taken from adcalendarbase.cpp: korgcfg.setGroup( "Time & Date" ); - QString tz(korgcfg.readEntry( "TimeZoneId" ) ); + TQString tz(korgcfg.readEntry( "TimeZoneId" ) ); DEBUGKPILOT << fname << ": KOrganizer's time zone = " << tz << endl; KCal::CalendarLocal *calendar = new KCal::CalendarLocal( tz ); */ - KCal::CalendarLocal *calendar = new KCal::CalendarLocal( QString() ); + KCal::CalendarLocal *calendar = new KCal::CalendarLocal( TQString() ); if (!calendar) { diff --git a/kpilot/tests/importaddresses.cc b/kpilot/tests/importaddresses.cc index 34250b2c1..61cc513a3 100644 --- a/kpilot/tests/importaddresses.cc +++ b/kpilot/tests/importaddresses.cc @@ -67,8 +67,8 @@ int main(int argc, char **argv) #ifdef DEBUG debug_level= (args->isSet("verbose")) ? 4 : 0; #endif - QString datadir = args->getOption("data-dir"); - QString addressfile = args->getOption("address-file"); + TQString datadir = args->getOption("data-dir"); + TQString addressfile = args->getOption("address-file"); if (datadir.isEmpty()) { diff --git a/kpilot/tests/importdatebook.cc b/kpilot/tests/importdatebook.cc index b7a66080d..ebbb70122 100644 --- a/kpilot/tests/importdatebook.cc +++ b/kpilot/tests/importdatebook.cc @@ -67,8 +67,8 @@ int main(int argc, char **argv) debug_level= (args->isSet("verbose")) ? 4 : 0; - QString datadir = args->getOption("data-dir"); - QString vcalfile = args->getOption("vcal-file"); + TQString datadir = args->getOption("data-dir"); + TQString vcalfile = args->getOption("vcal-file"); if (datadir.isEmpty()) { @@ -87,7 +87,7 @@ int main(int argc, char **argv) << "], creating DatebookDB in: [" << datadir << "]" << endl; - KCal::CalendarLocal *calendar = new KCal::CalendarLocal( QString::fromLatin1("UTC") ); + KCal::CalendarLocal *calendar = new KCal::CalendarLocal( TQString::fromLatin1("UTC") ); if (!calendar || !calendar->load( vcalfile )) { return 1; diff --git a/kpilot/tests/mergecalendars.cc b/kpilot/tests/mergecalendars.cc index 221da26b0..898eb8c06 100644 --- a/kpilot/tests/mergecalendars.cc +++ b/kpilot/tests/mergecalendars.cc @@ -63,9 +63,9 @@ int main(int argc, char **argv) int debug_level= (args->isSet("verbose")) ? 4 : 0; - QString korgfile = args->getOption("korgfile"); - QString newfile = args->getOption("newfile"); - QString category = args->getOption("category"); + TQString korgfile = args->getOption("korgfile"); + TQString newfile = args->getOption("newfile"); + TQString category = args->getOption("category"); if (korgfile.isEmpty()) { @@ -84,8 +84,8 @@ int main(int argc, char **argv) return 1; } - QString korgsave = QString("%1.updated").arg(korgfile); - QString newfilesave = QString("%1.updated").arg(newfile); + TQString korgsave = TQString("%1.updated").arg(korgfile); + TQString newfilesave = TQString("%1.updated").arg(newfile); DEBUGKPILOT << "Using korgfile: [" << korgfile << "]" << endl; @@ -96,8 +96,8 @@ int main(int argc, char **argv) DEBUGKPILOT << "Will save newfile to: [" << newfilesave << "]" << endl << endl; - KCal::CalendarLocal *calkorg = new KCal::CalendarLocal( QString::fromLatin1("UTC") ); - KCal::CalendarLocal *calnew = new KCal::CalendarLocal( QString::fromLatin1("UTC") ); + KCal::CalendarLocal *calkorg = new KCal::CalendarLocal( TQString::fromLatin1("UTC") ); + KCal::CalendarLocal *calnew = new KCal::CalendarLocal( TQString::fromLatin1("UTC") ); if (!calkorg || !calnew) { WARNINGKPILOT << "Unable to create base calendar objects." << endl; @@ -137,7 +137,7 @@ int main(int argc, char **argv) for (newIt = newEvents.begin(); newIt != newEvents.end(); ++newIt ) { ev = *newIt; - QString uid = ev->uid(); + TQString uid = ev->uid(); if (debug_level) DEBUGKPILOT << " - Looking at event: [" << ev->summary() << "], uid: [" @@ -168,7 +168,7 @@ int main(int argc, char **argv) // that matches up with this external event's UID unsigned int numkorgremoved = 0; - QString categoryToken = category; + TQString categoryToken = category; // careful iterating and removing... KCal::Event *next = 0; diff --git a/kpilot/tests/testaddress.cc b/kpilot/tests/testaddress.cc index 0919b8c0e..5da0c4474 100644 --- a/kpilot/tests/testaddress.cc +++ b/kpilot/tests/testaddress.cc @@ -62,7 +62,7 @@ int main(int argc, char **argv) #ifdef DEBUG debug_level= (args->isSet("verbose")) ? 4 : 0; #endif - QString datadir = args->getOption("data-dir"); + TQString datadir = args->getOption("data-dir"); DEBUGKPILOT << "### testaddresses\n#\n#" << endl; diff --git a/kpilot/tests/testcategories.cc b/kpilot/tests/testcategories.cc index 1ecfebf66..aefb8b944 100644 --- a/kpilot/tests/testcategories.cc +++ b/kpilot/tests/testcategories.cc @@ -44,16 +44,16 @@ // Name of an actual DB #define MEMO_NAME "MemoDB" -QStringList categories( const PilotAppInfoBase *appinfo ) +TQStringList categories( const PilotAppInfoBase *appinfo ) { - QStringList cats; + TQStringList cats; for (unsigned int i=0; i<Pilot::CATEGORY_COUNT; i++) { - QString cat = appinfo->categoryName(i); + TQString cat = appinfo->categoryName(i); if (!cat.isEmpty()) { - QString s = CSL1("(%1:%2)").arg(i).arg(cat); + TQString s = CSL1("(%1:%2)").arg(i).arg(cat); cats.append(s); } } @@ -61,9 +61,9 @@ QStringList categories( const PilotAppInfoBase *appinfo ) return cats; } -QStringList listCategories( const QString &dir, const char *dbname ) +TQStringList listCategories( const TQString &dir, const char *dbname ) { - QStringList cats; + TQStringList cats; PilotLocalDatabase *database = new PilotLocalDatabase( dir, dbname ); if (!database->isOpen()) return cats; @@ -90,7 +90,7 @@ void badAppInfoCreation() KPILOT_DELETE( appinfo ); } -void categoryNames( const QString &dir ) +void categoryNames( const TQString &dir ) { PilotLocalDatabase *database = new PilotLocalDatabase( dir, MEMO_NAME ); if (!database->isOpen()) @@ -123,14 +123,14 @@ void categoryNames( const QString &dir ) DEBUGKPILOT << "# Expect three truncation errors and two bad category numbers." << endl; for (unsigned int i=0; i<Pilot::CATEGORY_COUNT+2; i++) { - QString name = QString::fromLatin1(funnyname+funnyname_length-i-3); + TQString name = TQString::fromLatin1(funnyname+funnyname_length-i-3); if (!appinfo->setCategoryName(i,name)) { WARNINGKPILOT << "Failed to set category " << i << " name to <" << name << ">" << endl; } else { - QString categoryname = appinfo->categoryName(i); + TQString categoryname = appinfo->categoryName(i); if (categoryname != name) { WARNINGKPILOT << "Category name " << i @@ -179,7 +179,7 @@ int main(int argc, char **argv) 0L }; - QString datadir = args->getOption("data-dir"); + TQString datadir = args->getOption("data-dir"); DEBUGKPILOT << "### testcategories\n#\n#" << endl; DEBUGKPILOT << "# Listing categories from database files.\n#" << endl; diff --git a/kpilot/tests/testdatabase.cc b/kpilot/tests/testdatabase.cc index b1a4ddbe0..02b43c6be 100644 --- a/kpilot/tests/testdatabase.cc +++ b/kpilot/tests/testdatabase.cc @@ -105,7 +105,7 @@ int checkDatabase(const char *path, recordInfo *info) { FUNCTIONSETUP; - PilotLocalDatabase db(QString::fromLatin1(path)); + PilotLocalDatabase db(TQString::fromLatin1(path)); if (!db.isOpen()) { kdDebug() << "No database " << path << endl; @@ -166,9 +166,9 @@ const char *categoryNames[4] = "impersonal" } ; -QStringList listCategories() +TQStringList listCategories() { - QStringList cats; + TQStringList cats; PilotLocalDatabase *l = new PilotLocalDatabase("./data/MemoDB"); PilotMemoInfo *m = new PilotMemoInfo(l); @@ -186,12 +186,12 @@ QStringList listCategories() for (int i=0; i<4; i++) { - QString s = m->category(i); + TQString s = m->category(i); kdDebug() << "Category " << i << ": " << (s.isEmpty() ? CSL1("<empty>") : s) << endl; cats.append(s); /* if (i<((sizeof(categoryNames) / sizeof(categoryNames[0])))) - m->setCategoryName(i,QString::fromLatin1(categoryNames[i])); + m->setCategoryName(i,TQString::fromLatin1(categoryNames[i])); */ } @@ -205,8 +205,8 @@ QStringList listCategories() int checkCategories() { - QStringList l = listCategories(); - QStringList m = listCategories(); + TQStringList l = listCategories(); + TQStringList m = listCategories(); if (l.isEmpty() || m.isEmpty()) return ERR; if (l!=m) return ERR; @@ -221,7 +221,7 @@ int checkMemo() PilotMemoInfo *m = new PilotMemoInfo(l); m->dump(); - QString c = m->category(1); + TQString c = m->category(1); if (c != CSL1("Business")) { kdDebug() << "* Category 1 is not 'Business' but " << c << endl; diff --git a/kpilot/tests/testdatebook.cc b/kpilot/tests/testdatebook.cc index 5c1da9d21..8e6cc5569 100644 --- a/kpilot/tests/testdatebook.cc +++ b/kpilot/tests/testdatebook.cc @@ -62,7 +62,7 @@ int main(int argc, char **argv) #ifdef DEBUG debug_level= (args->isSet("verbose")) ? 4 : 0; #endif - QString datadir = args->getOption("data-dir"); + TQString datadir = args->getOption("data-dir"); DEBUGKPILOT << "### testdatebook\n#\n#" << endl; diff --git a/kpilot/tests/testidmapper.cc b/kpilot/tests/testidmapper.cc index a694a4c38..8d60afc5b 100644 --- a/kpilot/tests/testidmapper.cc +++ b/kpilot/tests/testidmapper.cc @@ -33,8 +33,8 @@ #include <kapplication.h> #include <kcmdlineargs.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #define TESTFILE "Testing/mapping.xml" #define CONDUIT CSL1("knotes") @@ -51,7 +51,7 @@ bool test1() delete mapper; mapper = 0l; - QFile f( TESTFILE ); + TQFile f( TESTFILE ); bool result = f.exists(); if( result ) @@ -293,15 +293,15 @@ int main(int argc, char **argv) KApplication app( false, false ); // Remove file from previous test run - QDir test( "Testing" ); + TQDir test( "Testing" ); if( !test.exists() ) { - QDir current; + TQDir current; current.mkdir( "Testing" ); } - QFile f( TESTFILE ); + TQFile f( TESTFILE ); if( f.exists() ) - QFile::remove( TESTFILE ); + TQFile::remove( TESTFILE ); if( test1() && test2() && test3() && test4() && test5() && test6() && |